capistrano 2.15.5 → 2.15.6

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: f6d390cc4fc2f8e025b2aba4fa2c287e36c999ed
4
- data.tar.gz: 04a65a40859de8159af366edc9b73248a28cdca2
3
+ metadata.gz: 09f391e9aa754cd9e2b9414b047993aaee463747
4
+ data.tar.gz: 5cb90bd02e70dcb1551dc57d1a4ff2ccdeb7c131
5
5
  SHA512:
6
- metadata.gz: ebf02e5b3c3bd832ca9c67f8c9cae56cbaf424ef6797d43d611604db68088c43b79f7577e9887b7960984f328162390c566ed38c479754a877fb955b3325a86f
7
- data.tar.gz: 43ad8672fb85662636eb379a98987fe32bf0ff72af01d5718b6d303eb95335277aabdbfc058f62b6f249973cd1d97a53a66bcca56029847a837179e3f2466222
6
+ metadata.gz: d4be16d73d6fb8358d51a7c6fa5086322a12fb4827aa6781fb068867af4fb1cb780482303460bacef63b7c10c79dda937e24d3b9eb6e96c26648f91ed786a4fa
7
+ data.tar.gz: 58d9a81ec729dce023d40601a2ccb9b2b17b683fd7b6f5b5412c4efbc92a29458a452226aa89d060777efe3bed183050346b0032c7297c47298e011ace4b8bc4
@@ -1,7 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
- - 1.9.2
5
3
  - 1.9.3
6
4
  - 2.0.0
7
- - ree
5
+ - 2.1.1
6
+ cache: bundler
7
+ branches:
8
+ except:
9
+ - legacy-v2
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.15.5 / June 17 2015
2
+
3
+ * Handle new Sprockets manifest name (@skaes)
4
+
1
5
  ## 2.15.5 / July 4 2013
2
6
 
3
7
  * Fix multistage argument parsing when using the `-s` option. (@jmazzi)
@@ -3,7 +3,7 @@ module Capistrano
3
3
  module AliasTask
4
4
  # Attempts to find the task at the given fully-qualified path, and
5
5
  # alias it. If arguments don't have correct task names, an ArgumentError
6
- # wil be raised. If no such task exists, a Capistrano::NoSuchTaskError
6
+ # will be raised. If no such task exists, a Capistrano::NoSuchTaskError
7
7
  # will be raised.
8
8
  #
9
9
  # Usage:
@@ -16,7 +16,7 @@ module Capistrano
16
16
  end
17
17
 
18
18
  original_task = find_task(old_name) or raise NoSuchTaskError, "the task `#{old_name}' does not exist"
19
- task = original_task.dup # Dup. task to avoid modify original task
19
+ task = original_task.dup # Duplicate task to avoid modify original task
20
20
  task.name = new_name
21
21
 
22
22
  define_task(task)
@@ -13,9 +13,9 @@
13
13
  # { :match => /git/, :color => :white, :priority => 20, :style => :reverse }
14
14
  # ]
15
15
  #
16
- # format_logs capistrano_log_formatters
16
+ # log_formatter capistrano_log_formatters
17
17
  #
18
- # You can call format_logs multiple times, with either a hash or an array of hashes.
18
+ # You can call log_formatter multiple times, with either a hash or an array of hashes.
19
19
  #
20
20
  # == Colors:
21
21
  #
@@ -63,6 +63,12 @@ module Capistrano
63
63
  # the roles as the remaining parameters:
64
64
  #
65
65
  # server "master.example.com", :web, :app
66
+ #
67
+ # Also, you can specify additional information
68
+ # (in the form of a Hash) which can be used to more uniquely specify the
69
+ # subset of servers specified by this specific definition:
70
+ #
71
+ # server "master.example.com", :db, :primary => true
66
72
  def server(host, *roles)
67
73
  options = roles.last.is_a?(Hash) ? roles.pop : {}
68
74
  raise ArgumentError, "you must associate a server with at least one role" if roles.empty?
@@ -14,7 +14,7 @@ module Capistrano
14
14
  # an array of host names or ServerDefinition instances), a :roles
15
15
  # option (specifying an array of roles), an :only option (specifying
16
16
  # a hash of key/value pairs that any matching server must match),
17
- # an :exception option (like :only, but the inverse), and a
17
+ # an :except option (like :only, but the inverse), and a
18
18
  # :skip_hostfilter option to ignore the HOSTFILTER environment variable
19
19
  # described below.
20
20
  #
@@ -95,7 +95,7 @@ module Capistrano
95
95
 
96
96
  def log(level, message, line_prefix=nil)
97
97
  if level <= self.level
98
- # Only format output if device is a TTY or formatters are not disabled
98
+ # Only format output if device is a TTY and formatters are not disabled
99
99
  if device.tty? && !@disable_formatters
100
100
  color = :none
101
101
  style = nil
@@ -7,6 +7,7 @@ _cset :assets_prefix, "assets"
7
7
  _cset :shared_assets_prefix, "assets"
8
8
  _cset :assets_role, [:web]
9
9
  _cset :expire_assets_after, (3600 * 24 * 7)
10
+ _cset :asset_manifest_prefix, (`sprockets -v`.chomp < "3.0" ? "manifest" : ".sprockets-manifest") rescue "manifest"
10
11
 
11
12
  _cset :normalize_asset_timestamps, false
12
13
 
@@ -17,7 +18,7 @@ after 'deploy:cleanup', 'deploy:assets:clean_expired'
17
18
  after 'deploy:rollback:revision', 'deploy:assets:rollback'
18
19
 
19
20
  def shared_manifest_path
20
- @shared_manifest_path ||= capture("ls #{shared_path.shellescape}/#{shared_assets_prefix}/manifest*").strip
21
+ @shared_manifest_path ||= capture("ls #{shared_path.shellescape}/#{shared_assets_prefix}/#{asset_manifest_prefix}*").strip
21
22
  end
22
23
 
23
24
  # Parses manifest and returns array of uncompressed and compressed asset filenames with and without digests
@@ -64,14 +65,14 @@ namespace :deploy do
64
65
  RAILS_ENV=#{rails_env.to_s.shellescape} #{asset_env} #{rake} assets:precompile
65
66
  CMD
66
67
 
67
- if capture("ls -1 #{shared_path.shellescape}/#{shared_assets_prefix}/manifest* | wc -l").to_i > 1
68
+ if capture("ls -1 #{shared_path.shellescape}/#{shared_assets_prefix}/#{asset_manifest_prefix}* | wc -l").to_i > 1
68
69
  raise "More than one asset manifest file was found in '#{shared_path.shellescape}/#{shared_assets_prefix}'. If you are upgrading a Rails 3 application to Rails 4, follow these instructions: http://github.com/capistrano/capistrano/wiki/Upgrading-to-Rails-4#asset-pipeline"
69
70
  end
70
71
 
71
72
  # Sync manifest filenames across servers if our manifest has a random filename
72
- if shared_manifest_path =~ /manifest-.+\./
73
+ if shared_manifest_path =~ /#{asset_manifest_prefix}-.+\./
73
74
  run <<-CMD.compact
74
- [ -e #{shared_manifest_path.shellescape} ] || mv -- #{shared_path.shellescape}/#{shared_assets_prefix}/manifest* #{shared_manifest_path.shellescape}
75
+ [ -e #{shared_manifest_path.shellescape} ] || mv -- #{shared_path.shellescape}/#{shared_assets_prefix}/#{asset_manifest_prefix}* #{shared_manifest_path.shellescape}
75
76
  CMD
76
77
  end
77
78
 
@@ -87,7 +88,7 @@ namespace :deploy do
87
88
  DESC
88
89
  task :update_asset_mtimes, :roles => lambda { assets_role }, :except => { :no_release => true } do
89
90
  # Fetch assets/manifest contents.
90
- manifest_content = capture("[ -e #{shared_path.shellescape}/#{shared_assets_prefix}/manifest* ] && cat #{shared_path.shellescape}/#{shared_assets_prefix}/manifest* || echo").strip
91
+ manifest_content = capture("[ -e '#{shared_path.shellescape}/#{shared_assets_prefix}/#{asset_manifest_prefix}*' ] && cat #{shared_path.shellescape}/#{shared_assets_prefix}/#{asset_manifest_prefix}* || echo").strip
91
92
 
92
93
  if manifest_content != ""
93
94
  current_assets = parse_manifest(manifest_content)
@@ -239,7 +239,7 @@ module Capistrano
239
239
  return newrev if newrev =~ /^[0-9a-f]{40}$/
240
240
 
241
241
  # If sha is not found on remote, try expanding from local repository
242
- command = scm('rev-parse --revs-only', revision)
242
+ command = scm('rev-parse --revs-only', origin + '/' + revision)
243
243
  newrev = yield(command).to_s.strip
244
244
 
245
245
  raise "Unable to resolve revision for '#{revision}' on repository '#{repository}'." unless newrev =~ /^[0-9a-f]{40}$/
@@ -3,9 +3,10 @@ module Capistrano
3
3
  module Strategy
4
4
  def self.new(strategy, config={})
5
5
  strategy_file = "capistrano/recipes/deploy/strategy/#{strategy}"
6
- require(strategy_file)
7
-
8
6
  strategy_const = strategy.to_s.capitalize.gsub(/_(.)/) { $1.upcase }
7
+
8
+ require(strategy_file) unless const_defined?(strategy_const)
9
+
9
10
  if const_defined?(strategy_const)
10
11
  const_get(strategy_const).new(config)
11
12
  else
@@ -2,10 +2,12 @@ module Capistrano
2
2
  class Version
3
3
  MAJOR = 2
4
4
  MINOR = 15
5
- PATCH = 5
5
+ PATCH = 6
6
6
 
7
7
  def self.to_s
8
8
  "#{MAJOR}.#{MINOR}.#{PATCH}"
9
9
  end
10
10
  end
11
+
12
+ VERSION = Version.to_s
11
13
  end
@@ -0,0 +1,11 @@
1
+ require 'capistrano/version'
2
+
3
+ class VersionTest < Test::Unit::TestCase
4
+ def test_version_constant_is_not_nil
5
+ assert_not_nil Capistrano::VERSION
6
+ end
7
+
8
+ def test_version_constant_matches_class_method
9
+ assert_equal Capistrano::VERSION, Capistrano::Version.to_s
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.5
4
+ version: 2.15.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-04 00:00:00.000000000 Z
12
+ date: 2015-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
@@ -225,6 +225,7 @@ files:
225
225
  - test/task_definition_test.rb
226
226
  - test/transfer_test.rb
227
227
  - test/utils.rb
228
+ - test/version_test.rb
228
229
  homepage: http://github.com/capistrano/capistrano
229
230
  licenses: []
230
231
  metadata: {}
@@ -244,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
245
  version: '0'
245
246
  requirements: []
246
247
  rubyforge_project:
247
- rubygems_version: 2.0.3
248
+ rubygems_version: 2.0.14
248
249
  signing_key:
249
250
  specification_version: 3
250
251
  summary: Capistrano - Welcome to easy deployment with Ruby over SSH
@@ -294,4 +295,4 @@ test_files:
294
295
  - test/task_definition_test.rb
295
296
  - test/transfer_test.rb
296
297
  - test/utils.rb
297
- has_rdoc:
298
+ - test/version_test.rb