capistrano3-postgres 0.1.1 → 0.1.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 +4 -4
- data/lib/capistrano3/postgres/version.rb +1 -1
- data/lib/capistrano3/tasks/postgres.rb +7 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 98eadadd989d6092c76aee573e1307d96af1ed9a
|
|
4
|
+
data.tar.gz: 46ab9e6a5d382febadc2a6267c63a5b8d626b9bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a22da966f93180428de06d40cc73747bff99dd31f57c3e48e89fc5b8d2cceeda5a3b51b89716ea341c9c1284eb54d506f6e77aec9f5c7d1bc7199aeececd3b22
|
|
7
|
+
data.tar.gz: 70a4e5e92d5268b3fa3c70727bd2917e6e964c1b0ecb8e3e14cae1161f6cb2c6806324f83ba4131646d1c0a6c9c8d18915914ff0ce062f48a83e2f2420f5ae39
|
|
@@ -137,10 +137,13 @@ namespace :postgres do
|
|
|
137
137
|
def grab_remote_database_config
|
|
138
138
|
return if fetch(:postgres_remote_database_config)
|
|
139
139
|
on roles(fetch(:postgres_role)) do |role|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
within release_path do
|
|
141
|
+
env = fetch(:postgres_env).to_s.downcase
|
|
142
|
+
filename = "#{deploy_to}/current/config/database.yml"
|
|
143
|
+
capture_config_cmd = "ruby -e \"require 'erb'; puts ERB.new(File.read('#{filename}')).result\""
|
|
144
|
+
yaml_content = test('ruby -v') ? capture(capture_config_cmd) : capture(:bundle, :exec, capture_config_cmd)
|
|
145
|
+
set :postgres_remote_database_config, database_config_defaults.merge(YAML::load(yaml_content)[env])
|
|
146
|
+
end
|
|
144
147
|
end
|
|
145
148
|
end
|
|
146
149
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capistrano3-postgres
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Krasynskyi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: capistrano
|