capistrano-mb 0.22.2 → 0.23.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 +59 -22
- data/LICENSE.txt +1 -1
- data/lib/capistrano/mb.rb +1 -0
- data/lib/capistrano/mb/compatibility.rb +34 -14
- data/lib/capistrano/mb/version.rb +1 -1
- data/lib/capistrano/tasks/bundler.rake +31 -0
- data/lib/capistrano/tasks/defaults.rake +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0bf12dd707d6d24d97510271923e2b808551369
|
4
|
+
data.tar.gz: d82f49ab413a40e89639974be522fbb6aeee89e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff8b4895ffa87304bacdef0279caa8db45a7f0dd42215653c7ded17a7e5bec2800a7596bb8d0027f29f6927706a5f34c64c3fdce94e2d90400c630d460ce3c69
|
7
|
+
data.tar.gz: 89e74b626f258c05ff2c499cf91da747c25c9ae71d48b62b655930879405a6e2b3cd6aa3189c40f833aed1be2672220c71c8a709742a6803c818b420bcb740c5
|
data/CHANGELOG.md
CHANGED
@@ -2,15 +2,27 @@
|
|
2
2
|
|
3
3
|
* Your contribution here!
|
4
4
|
|
5
|
-
## 0.
|
5
|
+
## [0.23.0][] (2015-07-10)
|
6
|
+
|
7
|
+
This release introduces a `bundler` recipe that automatically installs or upgrades bundler using `gem install bundler` during `cap deploy`. To disable this behavior:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
set :mb_bundler_gem_install_command, nil
|
11
|
+
```
|
12
|
+
|
13
|
+
Other changes:
|
14
|
+
|
15
|
+
* No longer assume that the `colorize` gem is available (it may be removed in an upcoming version of SSHKit/capistrano).
|
16
|
+
|
17
|
+
## [0.22.2][] (2015-06-22)
|
6
18
|
|
7
19
|
* For backwards compatibility with capistrano-fiftyfive, also search `lib/capistrano/fiftyfive/templates` for template files (the preferred location is `lib/capistrano/mb/templates`).
|
8
20
|
|
9
|
-
## 0.22.1 (2015-06-22)
|
21
|
+
## [0.22.1][] (2015-06-22)
|
10
22
|
|
11
23
|
* Remove "capistrano-fiftyfive has been renamed to capistrano-mb" post-install message.
|
12
24
|
|
13
|
-
## 0.22.0 (2015-06-22)
|
25
|
+
## [0.22.0][] (2015-06-22)
|
14
26
|
|
15
27
|
**THIS GEM HAS A NEW NAME! It is now `capistrano-mb`.**
|
16
28
|
|
@@ -18,43 +30,43 @@
|
|
18
30
|
* All tasks now use the `mb` namespace. E.g. `cap fiftyfive:crontab` is now `cap mb:crontab`.
|
19
31
|
* For backwards compatibility, you can still use the `fiftyfive` versions, but a deprecation warning will be printed. This compatibility will be removed in capistrano-mb 1.0.
|
20
32
|
|
21
|
-
## 0.21.0 (2015-06-22)
|
33
|
+
## [0.21.0][] (2015-06-22)
|
22
34
|
|
23
35
|
* Add a post-install message explaining the rename of `capistrano-fiftyfive` to `capistrano-mb`.
|
24
36
|
|
25
|
-
## 0.20.1 (2015-05-29)
|
37
|
+
## [0.20.1][] (2015-05-29)
|
26
38
|
|
27
39
|
* An internal change in Capistrano 3.4.0 caused `fiftyfive:aptitude:install` to fail to install packages. This is now fixed.
|
28
40
|
|
29
|
-
## 0.20.0 (2015-05-29)
|
41
|
+
## [0.20.0][] (2015-05-29)
|
30
42
|
|
31
43
|
* Increase SSL/TLS security of the generated nginx configuration by following the suggestions of [weakdh.org](https://weakdh.org/sysadmin.html).
|
32
44
|
|
33
|
-
## 0.19.0 (2015-04-10)
|
45
|
+
## [0.19.0][] (2015-04-10)
|
34
46
|
|
35
47
|
* Add `--retry=3` to bundle install options. This will help prevent deployment failures in case that a gem initially fails to download during the `bundle install` step.
|
36
48
|
* Ensure that `--dry-run` works without crashing. This involved working around Capistrano's `download!` behavior (it returns a String normally, but an entirely different object during a dry run).
|
37
49
|
|
38
|
-
## 0.18.0
|
50
|
+
## [0.18.0][]
|
39
51
|
|
40
52
|
* **The abbreviated log formatter has been removed and is now available in a new gem: `airbrussh`.** With this change, capistrano-fiftyfive no longer automatically changes the logging format of capistrano. To opt into the prettier, more concise format, add the airbrussh gem to your project as explained in the [airbrussh README](https://github.com/mattbrictson/airbrussh#readme).
|
41
53
|
* The version initializer that capistrano-fiftyfive adds during deployment sets a new value: `Rails.application.config.version_time`. You can use this value within your app for the date and time of the last commit that produced the version that is currently deployed.
|
42
54
|
|
43
55
|
|
44
|
-
## 0.17.2
|
56
|
+
## [0.17.2][]
|
45
57
|
|
46
58
|
* Default self-signed SSL certificate is now more generic (for real this time).
|
47
59
|
|
48
|
-
## 0.17.1
|
60
|
+
## [0.17.1][]
|
49
61
|
|
50
62
|
* Cosmetic changes to the gemspec.
|
51
63
|
|
52
|
-
## 0.17.0
|
64
|
+
## [0.17.0][]
|
53
65
|
|
54
66
|
* Write a banner message into `capistrano.log` at the start of each cap run, to aid in troubleshooting.
|
55
67
|
* Default self-signed SSL certificate is now more generic.
|
56
68
|
|
57
|
-
## 0.16.0
|
69
|
+
## [0.16.0][]
|
58
70
|
|
59
71
|
* capistrano-fiftyfive now requires capistrano >= 3.3.5 and sshkit => 1.6.1
|
60
72
|
* `ask_secretly` has been removed in favor of Capistrano's built-in `ask ..., :echo => false`
|
@@ -62,20 +74,20 @@
|
|
62
74
|
* highline dependency removed
|
63
75
|
* Install libffi-dev so that Ruby 2.2.0 can be compiled
|
64
76
|
|
65
|
-
## 0.15.2
|
77
|
+
## [0.15.2][]
|
66
78
|
|
67
79
|
* The capistrano-fiftyfive GitHub repository has changed: it is now <https://github.com/mattbrictson/capistrano-fiftyfive>.
|
68
80
|
|
69
|
-
## 0.15.1
|
81
|
+
## [0.15.1][]
|
70
82
|
|
71
83
|
* Remove `-j4` bundler flag
|
72
84
|
|
73
|
-
## 0.15.0
|
85
|
+
## [0.15.0][]
|
74
86
|
|
75
87
|
* Dump useful troubleshooting information when a deploy fails.
|
76
88
|
* Nginx/unicorn: fix syntax errors introduced by changes in 0.14.0, ensuring that gzip and far-future expires headers are sent as expected.
|
77
89
|
|
78
|
-
## 0.14.0
|
90
|
+
## [0.14.0][]
|
79
91
|
|
80
92
|
* The `highline` gem is now a dependency ([#3](https://github.com/mattbrictson/capistrano-fiftyfive/pull/3) from [@ahmozkya](https://github.com/ahmozkya)).
|
81
93
|
* Dotenv: only mask input when prompting for keys containing the words "key", "secret", "token", or "password". Input for other keys is echoed for easier data entry.
|
@@ -83,7 +95,7 @@
|
|
83
95
|
* Nginx/unicorn: tweak reverse-proxy cache settings to prevent cache stampede.
|
84
96
|
* Nginx/unicorn: apply far-future expires cache headers only for assets that have fingerprints.
|
85
97
|
|
86
|
-
## 0.13.0
|
98
|
+
## [0.13.0][]
|
87
99
|
|
88
100
|
The provisioning tasks now work for a non-root user that has password-less sudo privileges. Assuming a user named `matt` that can sudo without being prompted for a password ([instructions here](http://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password)), simply modify `deploy.rb` with:
|
89
101
|
|
@@ -93,30 +105,55 @@ set :fiftyfive_privileged_user, "matt"
|
|
93
105
|
|
94
106
|
Now all provisioning tasks that would normally run as root will instead run as `matt` using `sudo`.
|
95
107
|
|
96
|
-
## 0.12.0
|
108
|
+
## [0.12.0][]
|
97
109
|
|
98
110
|
* capistrano-fiftyfive's abbreviated format now honors the new `SSHKIT_COLOR` environment variable. Set `SSHKIT_COLOR=1` to force ANSI color even on non-ttys (e.g. Jenkins).
|
99
111
|
* The generated nginx config now enables reverse proxy caching by default.
|
100
112
|
* INFO messages printed by sshkit are now printed to console under the appropriate rake task heading.
|
101
113
|
|
102
|
-
## 0.11.1
|
114
|
+
## [0.11.1][]
|
103
115
|
|
104
116
|
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.
|
105
117
|
|
106
|
-
## 0.11.0
|
118
|
+
## [0.11.0][]
|
107
119
|
|
108
120
|
* INFO log messages are now included in abbreviated output (e.g. upload/download progress).
|
109
121
|
* Add `agree()` method to the DSL, which delegates to `HighLine.new.agree`.
|
110
122
|
* Add `fiftyfive:postgresql:dump`/`restore` tasks.
|
111
123
|
|
112
|
-
## 0.10.0
|
124
|
+
## [0.10.0][]
|
113
125
|
|
114
126
|
Add support for Ubuntu 14.04 LTS. To provision a 14.04 server, use the new `provision:14_04` task.
|
115
127
|
|
116
|
-
## 0.9.1
|
128
|
+
## [0.9.1][]
|
117
129
|
|
118
130
|
Flush console output after each line is printed. This allows deployment progress to be monitored in e.g. Jenkins.
|
119
131
|
|
120
132
|
## 0.9.0
|
121
133
|
|
122
134
|
Initial Rubygems release!
|
135
|
+
|
136
|
+
[Unreleased]: https://github.com/mattbrictson/capistrano-mb/compare/v0.23.0...HEAD
|
137
|
+
[0.23.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.22.2...v0.23.0
|
138
|
+
[0.22.2]: https://github.com/mattbrictson/capistrano-mb/compare/v0.22.1...v0.22.2
|
139
|
+
[0.22.1]: https://github.com/mattbrictson/capistrano-mb/compare/v0.22.0...v0.22.1
|
140
|
+
[0.22.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.21.0...v0.22.0
|
141
|
+
[0.21.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.20.1...v0.21.0
|
142
|
+
[0.20.1]: https://github.com/mattbrictson/capistrano-mb/compare/v0.20.0...v0.20.1
|
143
|
+
[0.20.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.19.0...v0.20.0
|
144
|
+
[0.19.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.18.0...v0.19.0
|
145
|
+
[0.18.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.17.2...v0.18.0
|
146
|
+
[0.17.2]: https://github.com/mattbrictson/capistrano-mb/compare/v0.17.1...v0.17.2
|
147
|
+
[0.17.1]: https://github.com/mattbrictson/capistrano-mb/compare/v0.17.0...v0.17.1
|
148
|
+
[0.17.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.16.0...v0.17.0
|
149
|
+
[0.16.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.15.2...v0.16.0
|
150
|
+
[0.15.2]: https://github.com/mattbrictson/capistrano-mb/compare/v0.15.1...v0.15.2
|
151
|
+
[0.15.1]: https://github.com/mattbrictson/capistrano-mb/compare/v0.15.0...v0.15.1
|
152
|
+
[0.15.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.14.0...v0.15.0
|
153
|
+
[0.14.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.13.0...v0.14.0
|
154
|
+
[0.13.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.12.0...v0.13.0
|
155
|
+
[0.12.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.11.1...v0.12.0
|
156
|
+
[0.11.1]: https://github.com/mattbrictson/capistrano-mb/compare/v0.11.0...v0.11.1
|
157
|
+
[0.11.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.10.0...v0.11.0
|
158
|
+
[0.10.0]: https://github.com/mattbrictson/capistrano-mb/compare/v0.9.1...v0.10.0
|
159
|
+
[0.9.1]: https://github.com/mattbrictson/capistrano-mb/compare/v0.9.0...v0.9.1
|
data/LICENSE.txt
CHANGED
data/lib/capistrano/mb.rb
CHANGED
@@ -26,4 +26,5 @@ load File.expand_path("../tasks/seed.rake", __FILE__)
|
|
26
26
|
load File.expand_path("../tasks/version.rake", __FILE__)
|
27
27
|
load File.expand_path("../tasks/rake.rake", __FILE__)
|
28
28
|
load File.expand_path("../tasks/sidekiq.rake", __FILE__)
|
29
|
+
load File.expand_path("../tasks/bundler.rake", __FILE__)
|
29
30
|
load File.expand_path("../tasks/fiftyfive.rake", __FILE__)
|
@@ -1,17 +1,37 @@
|
|
1
|
-
|
1
|
+
module Capistrano
|
2
|
+
module MB
|
3
|
+
module Compatibility
|
4
|
+
def self.check
|
5
|
+
check_capistrano_and_rake_are_loaded
|
6
|
+
check_blacklisted_capistrano_version
|
7
|
+
end
|
2
8
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
9
|
+
def self.check_capistrano_and_rake_are_loaded
|
10
|
+
return if defined?(Capistrano::VERSION) && defined?(Rake)
|
11
|
+
|
12
|
+
warn "capistrano/mb must be loaded by Capistrano in order "\
|
13
|
+
"to work.\nRequire this gem by using Capistrano's Capfile, "\
|
14
|
+
"as described here:\n"\
|
15
|
+
"https://github.com/mattbrictson/capistrano-mb#installation"
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.check_blacklisted_capistrano_version
|
19
|
+
return unless defined?(Capistrano::VERSION)
|
20
|
+
return unless Capistrano::VERSION == "3.2.0"
|
11
21
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
22
|
+
warn "Capistrano 3.2.0 has a critical bug that prevents "\
|
23
|
+
"capistrano-mb from working as intended:\n"\
|
24
|
+
"https://github.com/capistrano/capistrano/issues/1004"
|
25
|
+
end
|
26
|
+
|
27
|
+
# We can't really rely on anything being loaded at this point, so define
|
28
|
+
# our own basic colorizing helper.
|
29
|
+
def self.warn(message)
|
30
|
+
return $stderr.puts("WARNING: #{message}") unless $stderr.tty?
|
31
|
+
$stderr.puts("\e[0;31;49mWARNING: #{message}\e[0m")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
17
35
|
end
|
36
|
+
|
37
|
+
Capistrano::MB::Compatibility.check
|
@@ -0,0 +1,31 @@
|
|
1
|
+
mb_recipe :bundler do
|
2
|
+
prior_to "bundler:install", "gem_install"
|
3
|
+
end
|
4
|
+
|
5
|
+
namespace :mb do
|
6
|
+
namespace :bundler do
|
7
|
+
desc "Install correct version of bundler based on Gemfile.lock"
|
8
|
+
task :gem_install do
|
9
|
+
install_command = fetch(:mb_bundler_gem_install_command, nil)
|
10
|
+
next unless install_command
|
11
|
+
|
12
|
+
on fetch(:bundle_servers) do
|
13
|
+
within release_path do
|
14
|
+
if (bundled_with = capture_bundled_with)
|
15
|
+
execute "#{install_command} -v #{bundled_with}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def capture_bundled_with
|
22
|
+
lockfile = fetch(:mb_bundler_lockfile, "Gemfile.lock")
|
23
|
+
return unless test "[ -f #{release_path.join(lockfile)} ]"
|
24
|
+
|
25
|
+
ruby_expr = 'puts $<.read[/BUNDLED WITH\n (\S+)$/, 1]'
|
26
|
+
version = capture :ruby, "-e", ruby_expr.shellescape, lockfile
|
27
|
+
version.strip!
|
28
|
+
version.empty? ? nil : version
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -3,6 +3,7 @@ namespace :load do
|
|
3
3
|
|
4
4
|
set :mb_recipes, %w(
|
5
5
|
aptitude
|
6
|
+
bundler
|
6
7
|
crontab
|
7
8
|
dotenv
|
8
9
|
logrotate
|
@@ -31,6 +32,10 @@ namespace :load do
|
|
31
32
|
"postgresql@ppa:pitti/postgresql" => :db,
|
32
33
|
"ufw" => :all
|
33
34
|
|
35
|
+
set :mb_bundler_lockfile, "Gemfile.lock"
|
36
|
+
set :mb_bundler_gem_install_command,
|
37
|
+
"gem install bundler --conservative --no-document"
|
38
|
+
|
34
39
|
set :mb_delayed_job_args, "-n 2"
|
35
40
|
set :mb_delayed_job_script, "bin/delayed_job"
|
36
41
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-mb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.23.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/capistrano/mb/templates/version.rb.erb
|
118
118
|
- lib/capistrano/mb/version.rb
|
119
119
|
- lib/capistrano/tasks/aptitude.rake
|
120
|
+
- lib/capistrano/tasks/bundler.rake
|
120
121
|
- lib/capistrano/tasks/crontab.rake
|
121
122
|
- lib/capistrano/tasks/defaults.rake
|
122
123
|
- lib/capistrano/tasks/delayed_job.rake
|