capistrano-postgresql 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +49 -52
- data/lib/capistrano/postgresql/helper_methods.rb +7 -64
- data/lib/capistrano/postgresql/password_helpers.rb +25 -0
- data/lib/capistrano/postgresql/psql_helpers.rb +21 -0
- data/lib/capistrano/postgresql/version.rb +1 -1
- data/lib/capistrano/tasks/postgresql.rake +47 -79
- data/lib/generators/capistrano/postgresql/templates/postgresql.yml.erb +6 -6
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86fb4bf23488e11c1621ea0220f0f9de556bd54b
|
4
|
+
data.tar.gz: fb80400a70f99e7235f18e154ebe413903716f97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a26868b035dc682b3a9a73c332b0837c91f8ef5738d580a20e13df409204005a9bb5ff3b347ad05183b3abeebc1128f43149bd26541bfd129aa212975956829
|
7
|
+
data.tar.gz: a109426f8a310440d3827c5938883e9688f2dcb9a15e10ced05ea690ad52b0a7d099aa2615b9df3a13b8f870dde89d936c68d26ba4e389727a3b59db5d3e14e9
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
### v2.0.0, 2014-03-30
|
2
|
+
- shorten variable names: postgresql -> pg
|
3
|
+
- better helpers module separation
|
4
|
+
- lots of code styling updates
|
5
|
+
- lots of code improvements
|
6
|
+
- less layered and simpler code
|
7
|
+
- readme updates
|
8
|
+
### v1.0.0, 2014-03-19
|
9
|
+
- all the v1.0.0 features
|
data/README.md
CHANGED
@@ -15,30 +15,34 @@ Here are the specific things this plugin does for your capistrano deployment
|
|
15
15
|
process:
|
16
16
|
|
17
17
|
* creates a new PostgreSQL database and database user on the server
|
18
|
-
* generates and populates `database.yml` file
|
18
|
+
* generates and populates `database.yml` file
|
19
19
|
(no need to ssh to the server and do this manually!)
|
20
|
-
*
|
20
|
+
* zero-config
|
21
21
|
|
22
22
|
### Installation
|
23
23
|
|
24
24
|
Put the following in your application's `Gemfile`:
|
25
25
|
|
26
26
|
group :development do
|
27
|
-
gem 'capistrano' ~>
|
27
|
+
gem 'capistrano', '~> 3.1'
|
28
28
|
gem 'capistrano-postgresql'
|
29
29
|
end
|
30
30
|
|
31
|
-
|
31
|
+
Then:
|
32
32
|
|
33
33
|
$ bundle install
|
34
34
|
|
35
|
-
###
|
35
|
+
### Usage
|
36
36
|
|
37
37
|
If you're deploying a standard rails app, all you need to do is put
|
38
38
|
the following in `Capfile` file:
|
39
39
|
|
40
40
|
require 'capistrano/postgresql'
|
41
41
|
|
42
|
+
And deploy:
|
43
|
+
|
44
|
+
$ bundle exec cap production deploy
|
45
|
+
|
42
46
|
Easy, right?
|
43
47
|
|
44
48
|
Check below to see what happens in the background.
|
@@ -50,49 +54,40 @@ Check here for the full capistrano deployment flow
|
|
50
54
|
|
51
55
|
The following tasks run automatically after `deploy:started` task:
|
52
56
|
|
57
|
+
* `postgresql:create_db_user`<br/>
|
58
|
+
creates a postgresql user. Password for the user is automatically generated and
|
59
|
+
used in the next steps.
|
53
60
|
* `postgresql:create_database`<br/>
|
54
|
-
creates
|
55
|
-
automatically generated and used in the next step.
|
61
|
+
creates database for your app.
|
56
62
|
* `postgresql:generate_database_yml`<br/>
|
57
63
|
creates a `database.yml` file and copies it to
|
58
64
|
`#{shared_path}/config/database.yml` on the server.
|
59
|
-
* `postgresql:ensure_database_yml_symlink`<br/>
|
60
|
-
adds `config/database.yml` to the `linked_files` array. Capistrano handles
|
61
|
-
symlinking `database.yml` to the application release path.
|
62
65
|
|
63
|
-
|
66
|
+
Also, the plugin ensures `config/database.yml` is symlinked from `shared_path`.
|
67
|
+
The above tasks are all you need for getting a Rails app to work with PostgreSQL.
|
64
68
|
|
65
69
|
### Gotchas
|
66
70
|
|
67
71
|
Be sure to remove `config/database.yml` from your application's version control.
|
68
72
|
|
69
|
-
### Debugging
|
70
|
-
|
71
|
-
A debugging task is provided. Run `bundle exec <your_stage> cap postgres:debug`
|
72
|
-
and you should get a list of all capistrano-postgresql settings and their
|
73
|
-
values.
|
74
|
-
|
75
|
-
I deeply hope you'll never need to use this, as this plugins strives to be
|
76
|
-
very easy to use with minimal or no configuration.
|
77
|
-
|
78
73
|
### Configuration
|
79
74
|
|
80
75
|
This plugin should just work with no configuration whatsoever. However,
|
81
76
|
configuration is possible. Put all your configs in capistrano stage files i.e.
|
82
|
-
`config/deploy/production.rb
|
77
|
+
`config/deploy/production.rb`.
|
83
78
|
|
84
79
|
Here's the list of options and the defaults for each option:
|
85
80
|
|
86
|
-
* `set :
|
81
|
+
* `set :pg_database`<br/>
|
87
82
|
Name of the database for your app. Defaults to `#{application}_#{stage}`,
|
88
83
|
example: `myface_production`.
|
89
84
|
|
90
|
-
* `set :
|
91
|
-
Name of the database user. Defaults to whatever is set for `
|
85
|
+
* `set :pg_user`<br/>
|
86
|
+
Name of the database user. Defaults to whatever is set for `pg_database`
|
92
87
|
option.
|
93
88
|
|
94
|
-
* `set :
|
95
|
-
Password for the database user. By default this option is not set and
|
89
|
+
* `set :pg_password`<br/>
|
90
|
+
Password for the database user. By default this option is not set and a
|
96
91
|
**new random password** is generated each time you create a new database.<br/>
|
97
92
|
If you set this option to `"some_secure_password"` - that will be the db user's
|
98
93
|
password. Keep in mind that having a hardcoded password in `deploy.rb` (or
|
@@ -101,29 +96,23 @@ I recommend sticking to the default and generating a new secure and random
|
|
101
96
|
password each time a db user is generated. That way you don't have to worry
|
102
97
|
about it or try to remember it.
|
103
98
|
|
104
|
-
* `set :
|
99
|
+
* `set :pg_ask_for_password`<br/>
|
105
100
|
Default `false`. Set this option to `true` if you want to be prompted for the
|
106
101
|
password when database user is created. This is safer than setting the password
|
107
|
-
via `
|
102
|
+
via `pg_password`. The downside is you have to choose and remember
|
108
103
|
yet another fricking password.<br/>
|
109
|
-
`
|
110
|
-
`
|
111
|
-
|
112
|
-
* `set :postgresql_default_tasks`<br/>
|
113
|
-
This task determines whether capistrano tasks from this plugin are executed
|
114
|
-
automatically during capistrano deploy process. Defaults to `true`. Tasks that
|
115
|
-
run automatically are: `postgresql:create_database`,
|
116
|
-
`postgresql:generate_database_yml` and `postgresql:ensure_database_yml_symlink`.
|
104
|
+
`pg_password` option has precedence. If it is set,
|
105
|
+
`pg_ask_for_password` is ignored.
|
117
106
|
|
118
107
|
`database.yml` template-only settings:
|
119
108
|
|
120
|
-
* `set :
|
109
|
+
* `set :pg_pool`<br/>
|
121
110
|
Pool config in `database.yml` template. Defaults to `5`.
|
122
111
|
|
123
|
-
* `set :
|
112
|
+
* `set :pg_host`<br/>
|
124
113
|
`hostname` config in `database.yml` template. Defaults to `localhost`.
|
125
114
|
|
126
|
-
* `set :
|
115
|
+
* `set :pg_encoding`<br/>
|
127
116
|
`encoding` config in `database.yml` template. Defaults to `unicode`.
|
128
117
|
|
129
118
|
### Customizing the `database.yml` template
|
@@ -134,26 +123,39 @@ shared directory on the server:
|
|
134
123
|
```yml
|
135
124
|
<%= fetch :stage %>:
|
136
125
|
adapter: postgresql
|
137
|
-
encoding: <%=
|
138
|
-
database: <%=
|
139
|
-
pool: <%=
|
140
|
-
username: <%=
|
141
|
-
password: '<%=
|
142
|
-
host: <%=
|
126
|
+
encoding: <%= pg_encoding %>
|
127
|
+
database: <%= pg_database %>
|
128
|
+
pool: <%= pg_pool %>
|
129
|
+
username: <%= pg_user %>
|
130
|
+
password: '<%= pg_password %>'
|
131
|
+
host: <%= pg_host %>
|
143
132
|
```
|
144
133
|
|
145
134
|
If for any reason you want to edit or tweak this template, you can copy it to
|
146
135
|
`config/deploy/templates/postgresql.yml.erb` with this command:
|
147
136
|
|
148
|
-
bundle exec rails g capistrano:postgresql:template
|
137
|
+
$ bundle exec rails g capistrano:postgresql:template
|
149
138
|
|
150
139
|
After you edit this newly created file in your repo, it will be used as a
|
151
140
|
template for `database.yml` on the server.
|
152
141
|
|
153
142
|
You can configure the template location. For example:
|
154
|
-
`set :
|
143
|
+
`set :pg_templates_path, "config"` and the template will be copied to
|
155
144
|
`config/postgresql.yml.erb`.
|
156
145
|
|
146
|
+
### More Capistrano automation?
|
147
|
+
|
148
|
+
If you'd like to streamline your Capistrano deploys, you might want to check
|
149
|
+
these zero-configuration, plug-n-play plugins:
|
150
|
+
|
151
|
+
- [capistrano-unicorn-nginx](https://github.com/bruno-/capistrano-unicorn-nginx)<br/>
|
152
|
+
no-configuration unicorn and nginx setup with sensible defaults
|
153
|
+
- [capistrano-rbenv-install](https://github.com/bruno-/capistrano-rbenv-install)<br/>
|
154
|
+
would you like Capistrano to install rubies for you?
|
155
|
+
- [capistrano-safe-deploy-to](https://github.com/bruno-/capistrano-safe-deploy-to)<br/>
|
156
|
+
if you're annoyed that Capistrano does **not** create a deployment path for the
|
157
|
+
app on the server (default `/var/www/myapp`), this is what you need!
|
158
|
+
|
157
159
|
### Contributing and bug reports
|
158
160
|
|
159
161
|
Contributions and improvements are very welcome. Just open a pull request and
|
@@ -169,11 +171,6 @@ Here are other plugins and people this project was based upon:
|
|
169
171
|
from this plugin are heavily based on his
|
170
172
|
[capistrano-recipes repo](https://github.com/mattdbridges/capistrano-recipes).
|
171
173
|
|
172
|
-
* [Kalys Osmonom](https://github.com/kalys) - his
|
173
|
-
[capistrano-nginx-unicorn](https://github.com/kalys/capistrano-nginx-unicorn)
|
174
|
-
gem structure was an inspiration for this plugin. A lot of the features were
|
175
|
-
directly copied from his project (example: `database.yml` template generator).
|
176
|
-
|
177
174
|
### License
|
178
175
|
|
179
176
|
[MIT](LICENSE.md)
|
@@ -1,79 +1,22 @@
|
|
1
|
-
require 'securerandom'
|
2
1
|
require 'erb'
|
3
2
|
|
4
3
|
module Capistrano
|
5
4
|
module Postgresql
|
6
5
|
module HelperMethods
|
7
6
|
|
8
|
-
def
|
9
|
-
config_file = "#{fetch(:
|
7
|
+
def pg_template(template_name)
|
8
|
+
config_file = "#{fetch(:pg_templates_path)}/#{template_name}"
|
10
9
|
# If there's no customized file in your rails app template directory,
|
11
10
|
# proceed with the default.
|
12
11
|
unless File.exists?(config_file)
|
13
|
-
|
12
|
+
default_config_path = "../../generators/capistrano/postgresql/templates/#{template_name}"
|
13
|
+
config_file = File.join(File.dirname(__FILE__), default_config_path)
|
14
14
|
end
|
15
|
-
|
15
|
+
StringIO.new ERB.new(File.read(config_file)).result(binding)
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
def ask_for_or_generate_password
|
21
|
-
if fetch(:postgresql_ask_for_password)
|
22
|
-
ask :postgresql_password, "Postgresql database password for the app: "
|
23
|
-
else
|
24
|
-
set :postgresql_password, generate_random_password
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def generate_random_password
|
29
|
-
SecureRandom.hex(10)
|
30
|
-
end
|
31
|
-
|
32
|
-
def db_user_exists?(name)
|
33
|
-
psql "-tAc", %Q{"SELECT 1 FROM pg_roles WHERE rolname='#{name}';" | grep -q 1}
|
34
|
-
end
|
35
|
-
|
36
|
-
def create_db_user(name, password)
|
37
|
-
if psql "-c", %Q{"CREATE user #{name} WITH password '#{password}';"}
|
38
|
-
info "postgresq: database user '#{name}' created"
|
39
|
-
else
|
40
|
-
error "postgresql: creating database user failed!"
|
41
|
-
exit 1
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def ensure_db_user_created(name, password)
|
46
|
-
unless db_user_exists?(name)
|
47
|
-
create_db_user(name, password)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
def database_exists?(db_name)
|
52
|
-
psql "-tAc", %Q{"SELECT 1 FROM pg_database WHERE datname='#{db_name}';" | grep -q 1}
|
53
|
-
end
|
54
|
-
|
55
|
-
def create_database(db_name, user_name)
|
56
|
-
if psql "-c", %Q{"CREATE database #{db_name} owner #{user_name};"}
|
57
|
-
info "postgresql: database '#{db_name}' created"
|
58
|
-
else
|
59
|
-
error "postgresql: creating database '#{db_name}' failed!"
|
60
|
-
exit 1
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def ensure_database_created(db_name, user_name)
|
65
|
-
unless database_exists?(db_name)
|
66
|
-
create_database(db_name, user_name)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
# returns true or false depending on the remote command exit status
|
71
|
-
def psql(*args)
|
72
|
-
test :sudo, "-u postgres psql", *args
|
73
|
-
end
|
74
|
-
|
75
|
-
def remote_file_exists?(path)
|
76
|
-
test "[ -e #{path} ]"
|
18
|
+
def database_yml_file
|
19
|
+
shared_path.join('config/database.yml')
|
77
20
|
end
|
78
21
|
|
79
22
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'securerandom'
|
2
|
+
|
3
|
+
module Capistrano
|
4
|
+
module Postgresql
|
5
|
+
module PasswordHelpers
|
6
|
+
|
7
|
+
def generate_random_password
|
8
|
+
SecureRandom.hex(10)
|
9
|
+
end
|
10
|
+
|
11
|
+
# This method is invoked only if `:pg_password` is not already
|
12
|
+
# set in `config/#{:stage}/deploy.rb`. Directly setting
|
13
|
+
# `:pg_password` has precedence.
|
14
|
+
def ask_for_or_generate_password
|
15
|
+
if fetch(:pg_ask_for_password)
|
16
|
+
ask :pg_password, "Postgresql database password for the app: "
|
17
|
+
else
|
18
|
+
set :pg_password, generate_random_password
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Capistrano
|
2
|
+
module Postgresql
|
3
|
+
module PsqlHelpers
|
4
|
+
|
5
|
+
# returns true or false depending on the remote command exit status
|
6
|
+
def psql(*args)
|
7
|
+
test :sudo, '-u postgres psql', *args
|
8
|
+
end
|
9
|
+
|
10
|
+
def db_user_exists?(name)
|
11
|
+
psql '-tAc', %Q{"SELECT 1 FROM pg_roles WHERE rolname='#{name}';" | grep -q 1}
|
12
|
+
end
|
13
|
+
|
14
|
+
def database_exists?(db_name)
|
15
|
+
psql '-tAc', %Q{"SELECT 1 FROM pg_database WHERE datname='#{db_name}';" | grep -q 1}
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
@@ -1,110 +1,78 @@
|
|
1
1
|
require 'capistrano/postgresql/helper_methods'
|
2
|
+
require 'capistrano/postgresql/password_helpers'
|
3
|
+
require 'capistrano/postgresql/psql_helpers'
|
2
4
|
|
3
5
|
include Capistrano::Postgresql::HelperMethods
|
6
|
+
include Capistrano::Postgresql::PasswordHelpers
|
7
|
+
include Capistrano::Postgresql::PsqlHelpers
|
4
8
|
|
5
9
|
namespace :load do
|
6
10
|
task :defaults do
|
7
|
-
set :
|
8
|
-
set :
|
9
|
-
set :
|
10
|
-
set :
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
set :
|
15
|
-
set :
|
16
|
-
set :postgresql_encoding, "unicode"
|
17
|
-
set :postgresql_host, "localhost"
|
11
|
+
set :pg_database, -> { "#{fetch(:application)}_#{fetch(:stage)}" }
|
12
|
+
set :pg_user, -> { fetch(:pg_database) }
|
13
|
+
set :pg_ask_for_password, false
|
14
|
+
set :pg_password, -> { ask_for_or_generate_password }
|
15
|
+
# template only settings
|
16
|
+
set :pg_templates_path, 'config/deploy/templates'
|
17
|
+
set :pg_pool, 5
|
18
|
+
set :pg_encoding, 'unicode'
|
19
|
+
set :pg_host, 'localhost'
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
21
23
|
namespace :postgresql do
|
22
24
|
|
23
|
-
|
24
|
-
task :
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
puts "postgresql_default_tasks: #{fetch(:postgresql_default_tasks)}"
|
30
|
-
puts "postgresql_pool: #{fetch(:postgresql_pool)}"
|
31
|
-
puts "postgresql_encoding: #{fetch(:postgresql_encoding)}"
|
32
|
-
puts "postgresql_host #{fetch(:postgresql_host)}"
|
33
|
-
end
|
34
|
-
|
35
|
-
# This task never runs automatically
|
36
|
-
# desc "Drop a database for this application"
|
37
|
-
task :drop_database do
|
38
|
-
on roles(:db) do
|
39
|
-
psql "-c", %Q{"DROP database #{fetch(:postgresql_database)};"}
|
25
|
+
# undocumented, for a reason: drops database. Use with care!
|
26
|
+
task :remove_all do
|
27
|
+
on roles :app do
|
28
|
+
if test "[ -e #{database_yml_file} ]"
|
29
|
+
execute :rm, database_yml_file
|
30
|
+
end
|
40
31
|
end
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
# desc "Delete database user for this application"
|
45
|
-
task :delete_db_user do
|
46
|
-
on roles(:db) do
|
47
|
-
psql "-c", %Q{"DROP user #{fetch(:postgresql_user)};"}
|
32
|
+
on roles :db do
|
33
|
+
psql '-c', %Q{"DROP database #{fetch(:pg_database)};"}
|
34
|
+
psql '-c', %Q{"DROP user #{fetch(:pg_user)};"}
|
48
35
|
end
|
49
36
|
end
|
50
37
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
38
|
+
desc 'Create DB user'
|
39
|
+
task :create_db_user do
|
40
|
+
on roles :db do
|
41
|
+
next if db_user_exists? fetch(:pg_user)
|
42
|
+
unless psql '-c', %Q{"CREATE user #{fetch(:pg_user)} WITH password '#{fetch(:pg_password)}';"}
|
43
|
+
error 'postgresql: creating database user failed!'
|
44
|
+
exit 1
|
58
45
|
end
|
59
46
|
end
|
60
47
|
end
|
61
48
|
|
62
|
-
|
63
|
-
# desc "Removes application database, DB user and removes `database.yml` from the server"
|
64
|
-
task remove_all: [:drop_database, :delete_db_user, :delete_database_yml]
|
65
|
-
|
66
|
-
|
67
|
-
desc "Create a database for this application"
|
49
|
+
desc 'Create database'
|
68
50
|
task :create_database do
|
69
|
-
on roles
|
70
|
-
|
71
|
-
|
51
|
+
on roles :db do
|
52
|
+
next if database_exists? fetch(:pg_database)
|
53
|
+
unless psql '-c', %Q{"CREATE database #{fetch(:pg_database)} owner #{fetch(:pg_user)};"}
|
54
|
+
error 'postgresql: creating database failed!'
|
55
|
+
exit 1
|
56
|
+
end
|
72
57
|
end
|
73
58
|
end
|
74
59
|
|
75
|
-
desc
|
60
|
+
desc 'Generate database.yml'
|
76
61
|
task :generate_database_yml do
|
77
|
-
on roles
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
else
|
82
|
-
info "postgresql: generating database.yml in shared path"
|
83
|
-
execute :mkdir, "-p", shared_path.join("config")
|
84
|
-
database_yml_template "postgresql.yml.erb", database_yml_path
|
85
|
-
end
|
62
|
+
on roles :app do
|
63
|
+
next if test "[ -e #{database_yml_file} ]"
|
64
|
+
execute :mkdir, '-pv', shared_path.join('config')
|
65
|
+
upload! pg_template('postgresql.yml.erb'), database_yml_file
|
86
66
|
end
|
87
67
|
end
|
88
68
|
|
89
|
-
|
90
|
-
|
91
|
-
on roles(:app) do
|
92
|
-
if fetch(:linked_files).nil?
|
93
|
-
set :linked_files, ["config/database.yml"]
|
94
|
-
elsif !fetch(:linked_files).include? "config/database.yml"
|
95
|
-
fetch(:linked_files) << "config/database.yml"
|
96
|
-
end
|
97
|
-
end
|
69
|
+
task :database_yml_symlink do
|
70
|
+
set :linked_files, fetch(:linked_files, []).push('config/database.yml')
|
98
71
|
end
|
99
72
|
|
100
|
-
after
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
invoke "postgresql:create_database"
|
105
|
-
invoke "postgresql:generate_database_yml"
|
106
|
-
invoke "postgresql:ensure_database_yml_symlink"
|
107
|
-
end
|
108
|
-
end
|
73
|
+
after 'deploy:started', 'postgresql:create_db_user'
|
74
|
+
after 'deploy:started', 'postgresql:create_database'
|
75
|
+
after 'deploy:started', 'postgresql:generate_database_yml'
|
76
|
+
after 'deploy:started', 'postgresql:database_yml_symlink'
|
109
77
|
|
110
78
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%= fetch :stage %>:
|
2
2
|
adapter: postgresql
|
3
|
-
encoding: <%= fetch :
|
4
|
-
database: <%= fetch :
|
5
|
-
pool: <%= fetch :
|
6
|
-
username: <%= fetch :
|
7
|
-
password: '<%= fetch :
|
8
|
-
host: <%= fetch :
|
3
|
+
encoding: <%= fetch :pg_encoding %>
|
4
|
+
database: <%= fetch :pg_database %>
|
5
|
+
pool: <%= fetch :pg_pool %>
|
6
|
+
username: <%= fetch :pg_user %>
|
7
|
+
password: '<%= fetch :pg_password %>'
|
8
|
+
host: <%= fetch :pg_host %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-postgresql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno Sutic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -49,6 +49,7 @@ executables: []
|
|
49
49
|
extensions: []
|
50
50
|
extra_rdoc_files: []
|
51
51
|
files:
|
52
|
+
- CHANGELOG.md
|
52
53
|
- Gemfile
|
53
54
|
- LICENSE.md
|
54
55
|
- README.md
|
@@ -57,6 +58,8 @@ files:
|
|
57
58
|
- lib/capistrano-postgresql.rb
|
58
59
|
- lib/capistrano/postgresql.rb
|
59
60
|
- lib/capistrano/postgresql/helper_methods.rb
|
61
|
+
- lib/capistrano/postgresql/password_helpers.rb
|
62
|
+
- lib/capistrano/postgresql/psql_helpers.rb
|
60
63
|
- lib/capistrano/postgresql/version.rb
|
61
64
|
- lib/capistrano/tasks/postgresql.rake
|
62
65
|
- lib/generators/capistrano/postgresql/README.md
|