rumination 0.7.1 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2afed5ca80b04f1575951b1aeb0466cf7182478a
4
- data.tar.gz: 8c626fa7af82fef84010d167df1a62051f3a441a
3
+ metadata.gz: 7f325774e91ad159086866c8010c446d6fbfb0fc
4
+ data.tar.gz: 33f015937b823de3e20fff0387c27cfe56a19133
5
5
  SHA512:
6
- metadata.gz: ecdb3578cc2423459fbfd47e541e2608593a0e98c7f2c5d0c2ad445a0745da1dc0ea37897e77a71a9988afca224f137afd7daf9cb746fdd7044a28692fec391c
7
- data.tar.gz: 96e1954f9e85f6b0a38ff5be333a494e2cabcbec98dfa7b2885d9260acde2d433527bf548eef76185af8898578c02d640f2485afc84ccb1333e0731ea8cad416
6
+ metadata.gz: d1d52842fb9ddd24612a8d379884e3b9d016f6bd6a2e2fccccb3e3855c22af6c18e926367b1e8881e464b63702c7bde44bb99359b1d0479d5d37e851b1c50372
7
+ data.tar.gz: 5a115792541d136597d743e5292cee53e8fe98e21f58ecd331b59bf4f13c5866985c50793a14aea0ffcbf5798adf8086590f27d612da0ccb27627123d4eacd6d
@@ -8,6 +8,12 @@ module Rumination
8
8
  Base ||= Struct.new(:target) do
9
9
  delegate :config, to: Deploy
10
10
 
11
+ def initialize *args
12
+ super
13
+ load_application_config_if_exists
14
+ load_target_config
15
+ end
16
+
11
17
  def bootstrap
12
18
  call do
13
19
  on_fresh_containers
@@ -15,8 +21,6 @@ module Rumination
15
21
  end
16
22
 
17
23
  def call
18
- load_application_config_if_exists
19
- load_target_config
20
24
  DockerCompose.build.down("--remove-orphans").up
21
25
  yield if block_given?
22
26
  container(:backend).exec("rake deploy:unload[#{target}]")
@@ -73,7 +77,7 @@ module Rumination
73
77
  end
74
78
 
75
79
  def target_config_path
76
- "./config/deploy/targets/#{target}.rb"
80
+ (config.target_config_path || "./config/deploy/targets/%s.rb") % target
77
81
  end
78
82
 
79
83
  def password_vars
@@ -81,7 +85,11 @@ module Rumination
81
85
  end
82
86
 
83
87
  def docker_machine_env
84
- dm_env_str = `docker-machine env #{config.docker_machine}`
88
+ dm_env_str = if config.docker_machine
89
+ `docker-machine env #{config.docker_machine}`
90
+ else
91
+ ""
92
+ end
85
93
  Dotenv::Parser.call(dm_env_str)
86
94
  end
87
95
 
@@ -1,3 +1,3 @@
1
1
  module Rumination
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
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.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Baguinski