Class: Shiprails::Port
- Inherits:
-
Thor
- Object
- Thor
- Shiprails::Port
- Includes:
- Thor::Actions
- Defined in:
- lib/shiprails/port.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.configuration ⇒ Object
39 40 41 |
# File 'lib/shiprails/port.rb', line 39 def self.configuration YAML.load(File.read(".shiprails.yml")).deep_symbolize_keys rescue {} end |
Instance Method Details
#config(*command) ⇒ Object
15 16 17 |
# File 'lib/shiprails/port.rb', line 15 def config(*command) say "TODO: store development config vars" end |
#exec(*command_args) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/shiprails/port.rb', line 25 def exec(*command_args) build_command_args = ["docker-compose", "run"] build_command_args << "--rm" unless ['no-rm'] build_command_args << "app" build_command_args += command_args command_string = build_command_args.join(' ') run command_string end |
#up ⇒ Object
35 36 37 |
# File 'lib/shiprails/port.rb', line 35 def up run "docker-compose up" end |