At the beginning of each cohort:
- Update ruby verison in
.ruby-version
- Update
Gemfile
:- Update ruby version.
- Find updated versions of gems referenced from Gemfile.
- Update semantic versions in Gemfile as appropriate.
bundle update
bin/rake # runs both nag and test
Fix errors and conflicts as necessary.
Dependencies are stored in Gemfile
.
Do not configure bin/rake
tasks directly in Rakefile
. Instead,
store tasks in the lib/tasks
directory. Task aliases should go
in lib/tasks/aliases.rake
.
Developers should store ruby files in lib
, or perhaps a subdirectory.
If a command line script is needed, it should go in bin
.
With this in the markdown:
<!-- start code block file="lib/example.rb" -->
This gets replaced with the contents of lib/example.rb
<!-- end code block -->
running:
cp README.md README.bak
bin/add-code-block.rb README.bak >README.md
produces:
# frozen_string_literal: true
# An example class
class Example
attr_accessor :value
def initialize(value = 0)
@value = value
end
end
Check the markdown source to see what happens.
Developers should run these often!
bin/rake nag
(orbundle exec rake nag
): runs code quality analysis tools on your code and complains.bin/rake test
(orbundle exec rake test
): runs automated tests.bin/rake
will run bothnag
andtest
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.