eb_capistrano_extensions 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/eb_capistrano_extensions.rb +3 -3
- metadata +3 -3
@@ -1,6 +1,4 @@
|
|
1
1
|
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
-
set :rails_root, "#{File.dirname(__FILE__)}/.."
|
3
|
-
|
4
2
|
desc "Verify that the firewall configuration of the production boxes is correct"
|
5
3
|
task :verify_firewall do
|
6
4
|
hosts_to_verify = find_servers.map {|server| IPSocket.getaddress(server.host) }
|
@@ -19,7 +17,9 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
19
17
|
password = Capistrano::CLI.password_prompt("what is the database root password?")
|
20
18
|
password = Escape.shell_command([password])
|
21
19
|
production_ips = find_servers.map {|server| [server.host, IPSocket.getaddress(server.host)] }
|
22
|
-
|
20
|
+
|
21
|
+
db_config_yml = capture(%Q{RAILS_ENV="#{rails_env}" #{current_path}/script/runner 'puts File.read("#{current_path}/config/database.yml")'})
|
22
|
+
database_config = YAML::load(db_config_yml)[rails_env]
|
23
23
|
|
24
24
|
database_servers.each do |db_server_ip|
|
25
25
|
production_ips.each do |hostname, ip|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eb_capistrano_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Gordon
|