stack_car 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stack_car/cli.rb +17 -9
- data/lib/stack_car/version.rb +1 -1
- data/templates/docker-compose.yml.erb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab04880c08dc85e5e7ff89567dfab7d3e176b2bc
|
4
|
+
data.tar.gz: 33950ed5dc0a2a6aaa57882eab82ec7d178158bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcd561a3723fddf59412276c670a130d5a0ec3aea95c1b784afc550b3851c8d863edeeab1b2133e25088144aba242e63d66e3974ece115e7d36f47c926516157
|
7
|
+
data.tar.gz: 2d9ba45c6d96cd263ea1ac2bdca2efd39d7304c83a433b4d254d314609786ec68b1bd996c7682e8d988c8bcff389af1acff9c495312325851726856e5a79603d
|
data/lib/stack_car/cli.rb
CHANGED
@@ -3,9 +3,23 @@ require 'erb'
|
|
3
3
|
module StackCar
|
4
4
|
class HammerOfTheGods < Thor
|
5
5
|
include Thor::Actions
|
6
|
-
|
6
|
+
|
7
|
+
method_option :service, default: 'web', type: :string, aliases: '-s'
|
8
|
+
desc "up", "starts docker-compose with rebuild and orphan removal, defaults to web"
|
7
9
|
def up
|
8
|
-
|
10
|
+
run("docker-compose up #{options[:service]} --build --remove-orphans")
|
11
|
+
end
|
12
|
+
|
13
|
+
method_option :service, default: '', type: :string, aliases: '-s'
|
14
|
+
desc "stop", "starts docker-compose with rebuild and orphan removal, defaults to all"
|
15
|
+
def stop
|
16
|
+
run("docker-compose stop #{options[:service]}")
|
17
|
+
end
|
18
|
+
|
19
|
+
method_option :service, default: 'web', type: :string, aliases: '-s'
|
20
|
+
desc "run ARGS", "wraps docker-compose exec web unless --service is used to specify"
|
21
|
+
def run(args)
|
22
|
+
run("docker-compose run #{options[:service]} #{args}")
|
9
23
|
end
|
10
24
|
|
11
25
|
method_option :service, default: 'web', type: :string, aliases: '-s'
|
@@ -13,7 +27,7 @@ module StackCar
|
|
13
27
|
def exec(args)
|
14
28
|
run("docker-compose exec #{options[:service]} #{args}")
|
15
29
|
end
|
16
|
-
map
|
30
|
+
map ex: :exec
|
17
31
|
|
18
32
|
method_option :service, default: 'web', type: :string, aliases: '-s'
|
19
33
|
desc "bundle_exec ARGS", "wraps docker-compose exec web bundle exec unless --service is used to specify"
|
@@ -29,12 +43,6 @@ module StackCar
|
|
29
43
|
end
|
30
44
|
map rc: :console
|
31
45
|
|
32
|
-
method_option :service, default: 'web', type: :string, aliases: '-s'
|
33
|
-
desc "restart", "shortcut to restart rails server"
|
34
|
-
def restart(*args)
|
35
|
-
run("docker-compose exec #{options[:service]} touch tmp/restart.txt")
|
36
|
-
end
|
37
|
-
|
38
46
|
method_option :elasticsearch, default: false, type: :boolean, aliases: '-e'
|
39
47
|
method_option :solr, default: false, type: :boolean, aliases: '-s'
|
40
48
|
method_option :postgres, default: false, type: :boolean, aliases: '-p'
|
data/lib/stack_car/version.rb
CHANGED