module Rails::Tc::CommandRunner
Public Class Methods
add_development_gem(gem)
click to toggle source
# File lib/rails/tc/command_runner.rb, line 19 def self.add_development_gem(gem) system "bundle add #{gem} --group development" unless gem_installed?(gem) end
add_runtime_gem(gem)
click to toggle source
# File lib/rails/tc/command_runner.rb, line 23 def self.add_runtime_gem(gem) system "bundle add #{gem}" unless gem_installed?(gem) end
gem_installed?(gem)
click to toggle source
# File lib/rails/tc/command_runner.rb, line 27 def self.gem_installed?(gem) `bundle show`.scan(/^\s*\*\s*([^\s]+).*/).map(&:first).include? gem end
generate()
click to toggle source
# File lib/rails/tc/command_runner.rb, line 10 def self.generate system "bundle exec tapioca gem" system "bundle exec tapioca dsl" end
init()
click to toggle source
# File lib/rails/tc/command_runner.rb, line 6 def self.init `bundle exec srb init 2>&1` end
type_check()
click to toggle source
# File lib/rails/tc/command_runner.rb, line 15 def self.type_check `bundle exec srb tc 2>&1` end