rumination 0.13.2 → 0.13.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20f4845afaa4f3b3d49bcc74556769df5a13a5ab
4
- data.tar.gz: ea3240b0b35c23d2fc5bb5b0dee7d2dd4e7511d3
3
+ metadata.gz: b87297844ce8122bb82eee52961f82e88770a545
4
+ data.tar.gz: 3a02edfd178805045ff0798492d90533b046ea74
5
5
  SHA512:
6
- metadata.gz: e79e99f4816d70fa80c8a33a2aea8b12ff6044089b1a40b34ff2b05d8fa05a98b61fc1c4c2b00948cc5e31de9d8389c9519d92dcc9804249494d244886183abf
7
- data.tar.gz: 780000452b75562cce550673a91ab040701d29b8904e5aacab4267104f7db99a79ee8d573ee02548d6bf335ce6698020b367f3c84e4d26ed77ee492aa0b63e76
6
+ metadata.gz: 88489a6a0d47654b473ba49f1cded3896ec4569c36c3004862345e5f47bcf943f35e5b5cbdf2021b584075ae81a41334cd4934980a5dade191e221ba7bcc1804
7
+ data.tar.gz: 10165c3f2392ba346536e513a964570299ffc62d8c4d0fe5d388afcd9d80b513c4d8812cc9ce0f378bc68ec66169f40eef9809bae2a84c1cfcbc0dfc2dcf53f9
@@ -63,6 +63,10 @@ module Rumination
63
63
  (ENV["COMPOSE_PROJECT_NAME"] || File.basename(Dir.pwd)).gsub("_","")
64
64
  end
65
65
 
66
+ def bootstrapped_flag_path
67
+ "/opt/app/bootstrapped.ok"
68
+ end
69
+
66
70
  private
67
71
 
68
72
  def persistent_env
@@ -12,11 +12,13 @@ namespace :deploy do
12
12
 
13
13
  task :bootstrap, [:target] => %w[
14
14
  start
15
+ bootstrap:check_flag
15
16
  bootstrap:env_file
16
17
  bootstrap:copy_files
17
18
  bootstrap:db
18
19
  on:bootstrapped
19
20
  finish
21
+ bootstrap:flag_success
20
22
  ]
21
23
 
22
24
  task :env, [:target] => :load_target_config_filterd do |t, args|
@@ -55,6 +57,20 @@ namespace :deploy do
55
57
 
56
58
  task :db
57
59
 
60
+ task :flag_success do
61
+ container = Rumination::Deploy.app_container_name
62
+ flag_path = Rumination::Deploy.bootstrapped_flag_path
63
+ sh "docker-compose run --rm #{container} touch #{flag_path}"
64
+ end
65
+
66
+ task :check_flag do
67
+ container = Rumination::Deploy.app_container_name
68
+ flag_path = Rumination::Deploy.bootstrapped_flag_path
69
+ sh "docker-compose run --rm #{container} test -f #{flag_path}" do |ok, err|
70
+ raise Rumination::Deploy::BootstrappedAlready, "The target '#{Rumination::Deploy.target}' was bootstrap already"
71
+ end
72
+ end
73
+
58
74
  task :undo, [:target] => %w[confirm_undo] do |t, args|
59
75
  sh "docker-compose down --remove-orphans -v"
60
76
  end
@@ -1,3 +1,3 @@
1
1
  module Rumination
2
- VERSION = "0.13.2"
2
+ VERSION = "0.13.3"
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.13.2
4
+ version: 0.13.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Baguinski