Module: Ruby
- Extended by:
- Ruby
- Included in:
- Ruby
- Defined in:
- lib/scripts/ruby/bundler.rb,
lib/scripts/ruby/rubocop.rb,
lib/scripts/ruby/rake_test.rb
Instance Method Summary collapse
Instance Method Details
#bundler ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/scripts/ruby/bundler.rb', line 3 def bundler unless installed?("bundler") command("gem", "install", "bundler", "--no-ri", "--no-rdoc") end install_path = env_fetch("BUNDLER_INSTALL_PATH", "vendor") unless test_command?("bundler", "check") command("bundler", "install", "--path", install_path) end end |
#rake_test ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/scripts/ruby/rake_test.rb', line 3 def rake_test if test_command?("bundler", "exec", "rake", "-V") return command("bundler", "exec", "rake", "test") end unless installed?("rake") command("gem", "install", "rake") end command("rake", "test") end |
#rubocop ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/scripts/ruby/rubocop.rb', line 3 def rubocop unless installed?("rubocop") command("gem", "install", "rubocop") end # ugh check bundle rubocop as well # puts test_command?("bundle exec rubocop") command("rubocop") end |