capistrano 2.15.5 → 2.15.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -3
- data/CHANGELOG +4 -0
- data/lib/capistrano/configuration/alias_task.rb +2 -2
- data/lib/capistrano/configuration/log_formatters.rb +2 -2
- data/lib/capistrano/configuration/roles.rb +6 -0
- data/lib/capistrano/configuration/servers.rb +1 -1
- data/lib/capistrano/logger.rb +1 -1
- data/lib/capistrano/recipes/deploy/assets.rb +6 -5
- data/lib/capistrano/recipes/deploy/scm/git.rb +1 -1
- data/lib/capistrano/recipes/deploy/strategy.rb +3 -2
- data/lib/capistrano/version.rb +3 -1
- data/test/version_test.rb +11 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09f391e9aa754cd9e2b9414b047993aaee463747
|
4
|
+
data.tar.gz: 5cb90bd02e70dcb1551dc57d1a4ff2ccdeb7c131
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4be16d73d6fb8358d51a7c6fa5086322a12fb4827aa6781fb068867af4fb1cb780482303460bacef63b7c10c79dda937e24d3b9eb6e96c26648f91ed786a4fa
|
7
|
+
data.tar.gz: 58d9a81ec729dce023d40601a2ccb9b2b17b683fd7b6f5b5412c4efbc92a29458a452226aa89d060777efe3bed183050346b0032c7297c47298e011ace4b8bc4
|
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
@@ -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
|
-
#
|
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 #
|
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
|
-
#
|
16
|
+
# log_formatter capistrano_log_formatters
|
17
17
|
#
|
18
|
-
# You can call
|
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 :
|
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
|
#
|
data/lib/capistrano/logger.rb
CHANGED
@@ -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
|
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}
|
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}
|
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 =~
|
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}
|
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}
|
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
|
data/lib/capistrano/version.rb
CHANGED
@@ -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.
|
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:
|
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.
|
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
|
-
|
298
|
+
- test/version_test.rb
|