Class: DockerJockey::RubyHelper
- Inherits:
-
Object
- Object
- DockerJockey::RubyHelper
- Defined in:
- lib/langs/ruby_helper.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/langs/ruby_helper.rb', line 5 def @options end |
Instance Method Details
#run(args = [], options) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/langs/ruby_helper.rb', line 7 def run(args=[], ) @options = if args.length < 1 raise "devo ruby: invalid args." end case args[0] when 'bundle', 'vendor' cmd = "install --standalone --clean" if args[1] == "update" cmd = "update" end DockerJockey.docker_exec("iron/ruby:dev", "bundle config --local build.nokogiri --use-system-libraries && bundle #{cmd}", ) DockerJockey.exec("chmod -R a+rw bundle") DockerJockey.exec("chmod -R a+rw .bundle") when 'run' DockerJockey.docker_exec("iron/ruby", "ruby #{args[1]}", ) when 'image' DockerJockey::ImageHelper.build1('iron/ruby', 'ruby', args[1..args.length]) when 'version' DockerJockey.docker_exec("iron/ruby", "ruby -v", ) else raise "Invalid ruby command: #{args[0]}" end end |