Class: GrokCLI::Docker::Rails::Rake
- Inherits:
-
Object
- Object
- GrokCLI::Docker::Rails::Rake
- Defined in:
- lib/grok_cli/docker/rails/rake.rb
Instance Method Summary collapse
- #execute(rake_command = "") ⇒ Object
-
#initialize(config = GrokCLI::Docker::Configuration.new) ⇒ Rake
constructor
A new instance of Rake.
Constructor Details
#initialize(config = GrokCLI::Docker::Configuration.new) ⇒ Rake
Returns a new instance of Rake.
3 4 5 |
# File 'lib/grok_cli/docker/rails/rake.rb', line 3 def initialize(config = GrokCLI::Docker::Configuration.new) @config = config end |
Instance Method Details
#execute(rake_command = "") ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/grok_cli/docker/rails/rake.rb', line 7 def execute(rake_command = "") GrokCLI::Docker::Boot.new.execute GrokCLI::Docker::UpdateEtcHosts.new.execute system "\n eval \"$(docker-machine env \#{@config.machine_name})\"\n\n docker-compose run --rm web bundle exec rake \#{rake_command}\n\n CMD\nend\n" |