stack_car 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e473b03950dfbcb31858766afa0245def8112adc
4
- data.tar.gz: d203703f1ad6d9c27839e41d07d932b0c2f619e1
3
+ metadata.gz: ab04880c08dc85e5e7ff89567dfab7d3e176b2bc
4
+ data.tar.gz: 33950ed5dc0a2a6aaa57882eab82ec7d178158bd
5
5
  SHA512:
6
- metadata.gz: 2625e606422979ce77c236cc5c57f89c05ad8e68c8dfccd27200faf036f1056d0511e97c3b4ebc9269c9924cb9bd00346ba01d866ad45cddf59d56bc6a6adf7f
7
- data.tar.gz: ddd4007f734fe0ef0403cf43dc0904ac381deffa67d9bb2a7b21e749ec15c85072d13c103d1b9b35a57a4282ce3b7bf88ecc866e2318790a4a3aa7074a4c17ca
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
- desc "up", "starts docker-compose with rebuild and orphan removal"
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
- %x{docker-compose up --build --remove-orphans}
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 e: :exec
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'
@@ -1,3 +1,3 @@
1
1
  module StackCar
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -70,7 +70,7 @@ services:
70
70
  environment:
71
71
  - RAILS_ENV=development
72
72
  - RACK_ENV=development
73
- links:
73
+ depends_on:
74
74
  <% if options[:postgres] -%>
75
75
  - postgres
76
76
  <% end -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack_car
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Kaufman