stack_car 0.8.0 → 0.9.0

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: 185a0b49e3f2bdac8994507a50f3454d1455df64
4
- data.tar.gz: 1a924d44567950615378184317b421e9c9ccee51
3
+ metadata.gz: c7301a4a9e6745ea63c51217c2351ba840cb4ebf
4
+ data.tar.gz: a312f4b382681fcdd9a25e9347e0fcff2ebf409f
5
5
  SHA512:
6
- metadata.gz: c65cd894261123a12ebf2ac3f47a39b57a44aea50f87e1d481e255b755c9edc490ffa32dd4ae9e61e777be0cc3c44e89e2b43ea885ffe236da8f3540577862f1
7
- data.tar.gz: 24e5e23aceb5cbd161017047ef4ee1d54b01288877d21ad3e8598659bd90b8f5c9f617c005a31e30c346bff01295ca2dbff3037737bfe7e1edfd3d53fb4e8ce6
6
+ metadata.gz: 44ee3efc1d3dcbc2b6cdf7f8875f46cb74e0daa8ce9254a37516bde59f0a022f502c7db3bc0fdf8d5f850f88bb2d0827ddfdc90159f7af1967c6b7c34e9914f0
7
+ data.tar.gz: f649a49b69c16c437ab8fece76db95d768ffb7f54325a2d1ce0a2f9f7cc082130a75587fac9d2ed5699bad5201de312feb4910d21d6eac987e0e37bc49b5ce41
data/lib/stack_car/cli.rb CHANGED
@@ -19,6 +19,7 @@ module StackCar
19
19
  method_option :logs, default: true, type: :boolean
20
20
  desc "up", "starts docker-compose with rebuild and orphan removal, defaults to web"
21
21
  def up
22
+ ensure_development_env
22
23
  args = ['--remove-orphans']
23
24
  args << '--build' if options[:build]
24
25
  if options[:build]
@@ -31,6 +32,7 @@ module StackCar
31
32
  method_option :service, default: '', type: :string, aliases: '-s'
32
33
  desc "stop", "stops the specified running service, defaults to all"
33
34
  def stop
35
+ ensure_development_env
34
36
  run("docker-compose stop #{options[:service]}")
35
37
  run_with_exit("rm -rf tmp/pids/*")
36
38
  end
@@ -39,6 +41,7 @@ module StackCar
39
41
  method_option :service, default: 'web', type: :string, aliases: '-s'
40
42
  desc "build", "builds specified service, defaults to web"
41
43
  def build
44
+ ensure_development_env
42
45
  run_with_exit("docker-compose build #{options[:service]}")
43
46
  end
44
47
 
@@ -264,5 +267,11 @@ module StackCar
264
267
  end
265
268
  end
266
269
 
270
+ def ensure_development_env
271
+ if !File.exists?('.env.development')
272
+ template(".env.development.erb", ".env.development")
273
+ end
274
+ end
275
+
267
276
  end
268
277
  end
@@ -1,3 +1,3 @@
1
1
  module StackCar
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack_car
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Kaufman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-16 00:00:00.000000000 Z
11
+ date: 2018-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler