capistrano-fiftyfive 0.11.0 → 0.11.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1ad4e92fe008acf75a2a3281becf8f61cecf67a
|
4
|
+
data.tar.gz: bebf97f80cd64e0cf52bca965318d8605f966737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 791fd196392a42c2b7c694a869e774479a5b821058e2f1fa668d6fdfe5ebda1ee5f47b548291d0cce4705c164feef8d052b80e72976ce436d9c5d1d9c529000c
|
7
|
+
data.tar.gz: 8a2bc6793637ae88835cbc2ed0eb8ab9319b2c562144e7eaef945919779fdba4e4b2566d74f81bf7fc3eb2082c57da7cff8e0eb87043e468e4abe2cf4f71f9cb
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# capistrano-fiftyfive Changelog
|
2
2
|
|
3
|
+
## `0.11.1`
|
4
|
+
|
5
|
+
Fixes errors caused by PostgreSQL password containing shell-unsafe characters. Passwords are now safely hashed with MD5 before being used in the `CREATE USER` command.
|
6
|
+
|
3
7
|
## `0.11.0`
|
4
8
|
|
5
9
|
* INFO log messages are now included in abbreviated output (e.g. upload/download progress).
|
data/lib/capistrano/fiftyfive.rb
CHANGED
@@ -45,7 +45,9 @@ namespace :fiftyfive do
|
|
45
45
|
|
46
46
|
unless test("sudo -u postgres psql -c '\\du' | grep -q #{user}")
|
47
47
|
passwd = fetch(:fiftyfive_postgresql_password)
|
48
|
-
|
48
|
+
md5 = Digest::MD5.hexdigest(passwd + user)
|
49
|
+
execute "sudo -u postgres psql -c " +
|
50
|
+
%Q["CREATE USER #{user} PASSWORD 'md5#{md5}';"]
|
49
51
|
end
|
50
52
|
end
|
51
53
|
end
|
@@ -64,11 +66,22 @@ namespace :fiftyfive do
|
|
64
66
|
|
65
67
|
desc "Generate database.yml"
|
66
68
|
task :database_yml do
|
69
|
+
yaml = {
|
70
|
+
fetch(:rails_env).to_s => {
|
71
|
+
"adapter" => "postgresql",
|
72
|
+
"encoding" => "unicode",
|
73
|
+
"database" => fetch(:fiftyfive_postgresql_database).to_s,
|
74
|
+
"pool" => fetch(:fiftyfive_postgresql_pool_size).to_i,
|
75
|
+
"username" => fetch(:fiftyfive_postgresql_user).to_s,
|
76
|
+
"password" => fetch(:fiftyfive_postgresql_password).to_s,
|
77
|
+
"host" => fetch(:fiftyfive_postgresql_host).to_s
|
78
|
+
}
|
79
|
+
}
|
67
80
|
fetch(:fiftyfive_postgresql_password)
|
68
81
|
on release_roles(:all) do
|
69
|
-
|
70
|
-
|
71
|
-
|
82
|
+
put YAML.dump(yaml),
|
83
|
+
"#{shared_path}/config/database.yml",
|
84
|
+
:mode => "600"
|
72
85
|
end
|
73
86
|
end
|
74
87
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-fiftyfive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -110,7 +110,6 @@ files:
|
|
110
110
|
- lib/capistrano/fiftyfive/templates/nginx_unicorn.erb
|
111
111
|
- lib/capistrano/fiftyfive/templates/pgpass.erb
|
112
112
|
- lib/capistrano/fiftyfive/templates/postgresql-backup-logrotate.erb
|
113
|
-
- lib/capistrano/fiftyfive/templates/postgresql.yml.erb
|
114
113
|
- lib/capistrano/fiftyfive/templates/rbenv_bashrc
|
115
114
|
- lib/capistrano/fiftyfive/templates/sidekiq_init.erb
|
116
115
|
- lib/capistrano/fiftyfive/templates/ssl_setup
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<%= fetch(:rails_env) %>:
|
2
|
-
adapter: postgresql
|
3
|
-
encoding: unicode
|
4
|
-
database: <%= fetch(:fiftyfive_postgresql_database) %>
|
5
|
-
pool: <%= fetch(:fiftyfive_postgresql_pool_size) %>
|
6
|
-
username: <%= fetch(:fiftyfive_postgresql_user) %>
|
7
|
-
password: <%= fetch(:fiftyfive_postgresql_password) %>
|
8
|
-
host: <%= fetch(:fiftyfive_postgresql_host) %>
|