- Use Bundler and organize your Gemfiles.
- Use the Ruby Style Guide and validate style.
Use bundler. Check in your Gemfile to source control.
When organizing your Gemfile, do the following:
-
Provide a version for all gems. Prefer ~> to >=.
-
Begin with gems for all groups. Provide a comment explaining the purpose of each gem.
-
If using JRuby, follow with MRI-platform and then JRuby platform-specific gems.
-
Follow with development only gems
group :development do gem 'rubocop', '~>0.10.0' end
-
Follow with a combined development/test group. Be sure all gems need to be in both groups.
group :development, :test do end
- This group is usually for dependencies that you would require to run developmental commands as well as the test suite, but which are not needed for production. Things like guard or gems which have generators.
-
Follow with test group. These are gems that would only be used in a test environment.
- This group should be able to be excluded and developmental commands can run.
-
To integrate with Coveralls: -Add the Coveralls gem and the simplecov gem to your gemfile -Bundle install -Add the badge to your readme file (Badges can be found in readme.md files in osulp repos) -Add require 'coveralls' and Coveralls.wear! to spechelper or railshelper -Commit Changes -Add Coveralls token generated by logging in and adding the repo to Coveralls, to CircleCI
-
To integrate with CircleCI: -First login to CircleCI using github authentication -Go to the Org settings and find the repo you want to add. -Click project settings -Click follow -Create a circle.yml file in the root of your project -machine: ruby: version: -Add the badge to your readme file Style