rumination 0.6.8 → 0.6.9

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: 52352bdb43b4394fabb6cfef23fb4e5320051fef
4
- data.tar.gz: 41fb907c3cfdcf5ede334a05a426bdeb3da56464
3
+ metadata.gz: 938c429154e0360fccdd0b7428e6dbecd51fb74c
4
+ data.tar.gz: fea29da95ea74b4f4dee7f297cf4d322d220d097
5
5
  SHA512:
6
- metadata.gz: 3eb7fc8494a4f27fc4a18bd2838c98647a9d432b42a69182086002b3d914e06cbb8c55b7c6e18adddf068877c007f2f60184a54becd38e0f30e00fa437ec26ad
7
- data.tar.gz: c44b223019005135a4085eeae462d7466f5ff2f83104713f7d16a7985b83aa3eb591501fa0b7c9d83c93a86147e4129d588b635ff884d326afbf43303034ed91
6
+ metadata.gz: 58ac25b1db66764b77b36507091ddd7fc3de8efe96f49f23be56f97c1c5f17f4f18a8a8b1aa4b4874a71fe52e2fb5057aa6eb1cd7c2eb2f47778814303bf8853
7
+ data.tar.gz: 83e97c18903f7268405905686c5f5a44e2763b23b426ffb369eb8242a342266342fe66704e49b143fcb6d690fd8bf046f0ba26d98df1ec81c1d93abf679c0441
@@ -19,9 +19,10 @@ module Rumination
19
19
  load_target_config
20
20
  DockerCompose.build.down("--remove-orphans").up
21
21
  yield if block_given?
22
- container(:backend)
23
- .exec("rake deploy:unload[#{target}]")
24
- .run("rake deploy:finish[#{target}]")
22
+ container(:backend).exec("rake deploy:unload[#{target}]")
23
+ raise DeployError unless $? == 0
24
+ container(:backend).run("rake deploy:finish[#{target}]")
25
+ raise DeployError unless $? == 0
25
26
  end
26
27
 
27
28
  def env
@@ -49,6 +50,7 @@ module Rumination
49
50
  def on_fresh_containers
50
51
  raise BootstrappedAlready if bootstrapped?
51
52
  container(:backend).run("rake deploy:bootstrap:inside[#{target}]")
53
+ raise BootstrapError unless $? == 0
52
54
  end
53
55
 
54
56
  def load_application_config_if_exists
@@ -14,6 +14,10 @@ module Rumination
14
14
  def env target:
15
15
  Base.new(target).env
16
16
  end
17
+
18
+ def write_env_file target:
19
+ Base.new(target).write_env_file
20
+ end
17
21
  end
18
22
  end
19
23
  end
@@ -5,8 +5,10 @@ module Rumination
5
5
  module Deploy
6
6
  include ActiveSupport::Configurable
7
7
  extend Deploy::ClassMethods
8
- UnknownTarget = Class.new(RuntimeError)
9
- BootstrappedAlready = Class.new(RuntimeError)
10
- DatabaseInitError = Class.new(RuntimeError)
8
+ DeployError = Class.new(RuntimeError)
9
+ UnknownTarget = Class.new(DeployError)
10
+ BootstrapError = Class.new(DeployError)
11
+ BootstrappedAlready = Class.new(BootstrapError)
12
+ DatabaseInitError = Class.new(BootstrapError)
11
13
  end
12
14
  end
@@ -13,7 +13,7 @@ namespace :deploy do
13
13
  task :inside, [:target] => %w[write_env_file db:setup:maybe_load_dump]
14
14
 
15
15
  task :write_env_file, [:target] do |t, args|
16
- Rumination::Deploy.new(args.target).write_env_file
16
+ Rumination::Deploy.write_env_file(target: args.target)
17
17
  end
18
18
  end
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module Rumination
2
- VERSION = "0.6.8"
2
+ VERSION = "0.6.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8
4
+ version: 0.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Baguinski