capistrano-fiftyfive 0.14.0 → 0.15.0

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: 37e7a11ca6da560677e7c92b29fdd9f86c9e282b
4
- data.tar.gz: 32b016831b52ccf65cad50a5c9c7ce18a18f5674
3
+ metadata.gz: d15143df1e051d1271a91b50155e66283a99ac9f
4
+ data.tar.gz: 4ffc60fa16e4dfdf7fb11da146175010db75fa22
5
5
  SHA512:
6
- metadata.gz: 44a70450dbce4ccb4b1797847a7b0af74d01b42f161d243a35c72e3a87ec3cb6e8942698d1c2736ab0056590efe97f59ff4f1107fa9da447ffe42f1d24f3a53b
7
- data.tar.gz: f0e5afaee684a66408a9963de88ead097189bb1da6f95f77efaa3f321affe2c69202d8647f611bb9269bc4302e7d556ee641d61eebd0102726407ec039af398a
6
+ metadata.gz: 1d28e298d864d74d3241e65091fbc431bbbae4428368f72e5148431e55d18af998f7206d3e90ab101f9a6f8db665283cfe8b05abc3ccd5cc3550b9d30e523310
7
+ data.tar.gz: 7520df650e1d9bd6653598396a0a6da2590ce668bf403ac5168cb583dd8b5bb1a995fd8e96a4799f583489b9fb76342fc81067f282b82449966f6d2a21121138
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # capistrano-fiftyfive Changelog
2
2
 
3
+ ## `0.15.0`
4
+
5
+ * Dump useful troubleshooting information when a deploy fails.
6
+ * Nginx/unicorn: fix syntax errors introduced by changes in 0.14.0, ensuring that gzip and far-future expires headers are sent as expected.
7
+
3
8
  ## `0.14.0`
4
9
 
5
10
  * The `highline` gem is now a dependency ([#3](https://github.com/55minutes/capistrano-fiftyfive/pull/3) from [@ahmozkya](https://github.com/ahmozkya)).
@@ -17,7 +17,7 @@ module Capistrano
17
17
  # width. If the underlying IO is not a TTY, ANSI colors are removed from
18
18
  # the output. A newline is always added. Color output can be forced by
19
19
  # setting the SSHKIT_COLOR environment variable.
20
- def print_line(obj)
20
+ def print_line(obj="")
21
21
  string = obj.to_s
22
22
 
23
23
  if console_width
@@ -59,10 +59,11 @@ upstream unicorn_<%= application_basename %> {
59
59
  <% end %>
60
60
 
61
61
  # Far-future expires and gzip for fingerprinted assets
62
- location ^~ /<%= fetch(:assets_prefix, "assets") %>/.*-[0-9a-f]{32}.* {
62
+ location ~ "/<%= fetch(:assets_prefix, "assets") %>/.*-[0-9a-f]{32}.*" {
63
63
  gzip_static on;
64
64
  expires max;
65
65
  add_header Cache-Control public;
66
+ break;
66
67
  }
67
68
 
68
69
  include /etc/nginx/<%= application_basename%>-locations/*;
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Fiftyfive
3
- VERSION = "0.14.0"
3
+ VERSION = "0.15.0"
4
4
  end
5
5
  end
@@ -29,3 +29,4 @@ load File.expand_path("../tasks/seed.rake", __FILE__)
29
29
  load File.expand_path("../tasks/version.rake", __FILE__)
30
30
  load File.expand_path("../tasks/rake.rake", __FILE__)
31
31
  load File.expand_path("../tasks/sidekiq.rake", __FILE__)
32
+ load File.expand_path("../tasks/deploy.rake", __FILE__)
@@ -0,0 +1,6 @@
1
+ namespace :deploy do
2
+ task :failed do
3
+ output = env.backend.config.output
4
+ output.on_deploy_failure if output.respond_to?(:on_deploy_failure)
5
+ end
6
+ end
@@ -60,6 +60,17 @@ module SSHKit
60
60
  end
61
61
  alias :<< :write
62
62
 
63
+ def on_deploy_failure
64
+ err = Capistrano::Fiftyfive::Console.new($stderr)
65
+ err.print_line
66
+ err.print_line(red("** DEPLOY FAILED"))
67
+ err.print_line(yellow(
68
+ "** Refer to #{@log_file} for details. Here are the last 10 lines:"
69
+ ))
70
+ err.print_line
71
+ system("tail -n 10 #{@log_file.shellescape} 1>&2")
72
+ end
73
+
63
74
  private
64
75
 
65
76
  def write_log_message(log_message)
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.14.0
4
+ version: 0.15.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: 2014-09-25 00:00:00.000000000 Z
11
+ date: 2014-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -135,6 +135,7 @@ files:
135
135
  - lib/capistrano/tasks/crontab.rake
136
136
  - lib/capistrano/tasks/defaults.rake
137
137
  - lib/capistrano/tasks/delayed_job.rake
138
+ - lib/capistrano/tasks/deploy.rake
138
139
  - lib/capistrano/tasks/dotenv.rake
139
140
  - lib/capistrano/tasks/logrotate.rake
140
141
  - lib/capistrano/tasks/maintenance.rake