Class: Gaku::Container
- Inherits:
-
Object
- Object
- Gaku::Container
- Defined in:
- lib/gaku/container.rb
Class Method Summary collapse
- ._exe(command) ⇒ Object
- ._goto_root_dir ⇒ Object
- .Console ⇒ Object
- .Delete ⇒ Object
- .Detach ⇒ Object
- .Sample ⇒ Object
- .Start ⇒ Object
- .Stop ⇒ Object
- .Terminal ⇒ Object
- .Testing ⇒ Object
Class Method Details
._exe(command) ⇒ Object
39 40 41 |
# File 'lib/gaku/container.rb', line 39 def self._exe(command) `#{_goto_root_dir} && #{command}` end |
._goto_root_dir ⇒ Object
35 36 37 |
# File 'lib/gaku/container.rb', line 35 def self._goto_root_dir "cd #{__dir__}/../../" end |
.Console ⇒ Object
15 16 17 |
# File 'lib/gaku/container.rb', line 15 def self.Console _exe 'docker-compose exec web bundle exec rails console' end |
.Delete ⇒ Object
11 12 13 |
# File 'lib/gaku/container.rb', line 11 def self.Delete _exe 'docker-compose down -v' end |
.Detach ⇒ Object
27 28 29 |
# File 'lib/gaku/container.rb', line 27 def self.Detach _exe 'docker-compose up -d' end |
.Sample ⇒ Object
23 24 25 |
# File 'lib/gaku/container.rb', line 23 def self.Sample _exe 'docker-compose exec web bundle exec rake db:sample' end |
.Start ⇒ Object
3 4 5 |
# File 'lib/gaku/container.rb', line 3 def self.Start _exe 'docker-compose up -d' end |
.Stop ⇒ Object
7 8 9 |
# File 'lib/gaku/container.rb', line 7 def self.Stop _exe 'docker-compose down' end |
.Terminal ⇒ Object
19 20 21 |
# File 'lib/gaku/container.rb', line 19 def self.Terminal _exe 'docker-compose exec web bundle exec /bin/bash' end |
.Testing ⇒ Object
31 32 33 |
# File 'lib/gaku/container.rb', line 31 def self.Testing _exe 'docker-compose exec web bundle exec rake testing:env_setup' end |