rumination 0.6.4 → 0.6.5

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: 8637e2cfba60a39dfcb10f58cf97ad5c9c33f443
4
- data.tar.gz: a09f5a6fcbb8a271b9efa8b70a50a7e860e7a04d
3
+ metadata.gz: c7e00e5d7dc67dbd062da7009910390f735ce556
4
+ data.tar.gz: 0b98fb1060661319ce681dba7b1d96fc6e2ef6e1
5
5
  SHA512:
6
- metadata.gz: f093406ef23657bfc265a65cb22b015ee85c66f6c0408fc385ffb557a36e700c3dc7742e8a099b9d0e1fe709555c2d611feba9d940497594ad741dd22edc6fa7
7
- data.tar.gz: 626e6b99e1b07920c084b1624358a2a35b661f7a5c3d9e01edf840ccfdcd6a74244496326e93fed9be89b15bae6404fad2e6b96c5bcd47522729ddf3a9ce50a9
6
+ metadata.gz: f1e8f889d4953a6d4e9035ee03c8dfbbd5a7bc3e85b2f2ca0ed60a9051aec9e3be8c98e2e009662d9167f73d8b6756720ebf25d73396c2bc827bf921a6b87c49
7
+ data.tar.gz: ee09e2d3c14effff6a9a9bc45a9382824ef4aa6f12ee7dededf6550f57fa3380c7c6c239e0bbb75d610d998751d2b41c1ec1076d81cec8023709c98e95cbe5e3
@@ -40,10 +40,7 @@ module Rumination
40
40
  end
41
41
 
42
42
  def load_target_config
43
- load target_config_path
44
- ENV["VIRTUAL_HOST"] = config.virtual_host
45
- ENV["COMPOSE_FILE"] = config.compose_file if config.compose_file
46
- setup_docker_machine_env if config.docker_machine
43
+ ENV.merge env
47
44
  rescue LoadError => e
48
45
  raise UnknownTarget, e.message
49
46
  end
@@ -56,9 +53,17 @@ module Rumination
56
53
  config.generate_passwords || Array(config.generate_password)
57
54
  end
58
55
 
59
- def setup_docker_machine_env
56
+ def env
57
+ load target_config_path
58
+ env = docker_machine_env
59
+ env["VIRTUAL_HOST"] = config.virtual_host
60
+ env["COMPOSE_FILE"] = config.compose_file if config.compose_file
61
+ env
62
+ end
63
+
64
+ def docker_machine_env
60
65
  dm_env_str = `docker-machine env #{config.docker_machine}`
61
- ENV.update Dotenv::Parser.call(dm_env_str)
66
+ Dotenv::Parser.call(dm_env_str)
62
67
  end
63
68
 
64
69
  def write_env_file
@@ -10,6 +10,10 @@ module Rumination
10
10
  def app target:
11
11
  Base.new(target).call
12
12
  end
13
+
14
+ def env target:
15
+ Base.new(target).env
16
+ end
13
17
  end
14
18
  end
15
19
  end
@@ -0,0 +1,8 @@
1
+ namespace :deploy do
2
+ task :env, [:target] do |t, args|
3
+ args.with_defaults target: :development
4
+ Rumination::Deploy.env(target: args.target).each do |var, val|
5
+ puts %Q[export #{var}="#{val}"]
6
+ end
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module Rumination
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
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.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Baguinski
@@ -140,6 +140,7 @@ files:
140
140
  - lib/rumination/railtie.rb
141
141
  - lib/rumination/tasks/deploy.rake
142
142
  - lib/rumination/tasks/deploy/bootstrap.rake
143
+ - lib/rumination/tasks/deploy/env.rake
143
144
  - lib/rumination/tasks/deploy/finish.rake
144
145
  - lib/rumination/version.rb
145
146
  - rumination.gemspec