cape 1.2.0 → 1.3.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.
data/History.markdown
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Version history for the _Cape_ project
|
2
2
|
|
3
|
-
## <a name="v1.
|
3
|
+
## <a name="v1.3.0"></a>v1.3.0, Fri 2/03/2012
|
4
|
+
|
5
|
+
* Don’t allow `nil` environment variables to pass through to the remote command line
|
6
|
+
|
7
|
+
## <a name="v1.2.0"></a>v1.2.0, Wed 2/01/2012
|
4
8
|
|
5
9
|
* Add support in the DSL for specifying remote environment variables and Capistrano recipe options
|
6
10
|
* Add support for Rake tasks that overlap with (have the same full name as) namespaces
|
@@ -95,6 +95,48 @@ Feature: The #mirror_rake_tasks DSL method with arguments of a defined task and
|
|
95
95
|
`with_period' is only run for servers matching {:roles=>:app}, but no servers matched
|
96
96
|
"""
|
97
97
|
|
98
|
+
Scenario: mirror Rake task 'with_period' with its implementation, ignoring nil environment variable names
|
99
|
+
Given a full-featured Rakefile
|
100
|
+
And a Capfile with:
|
101
|
+
"""
|
102
|
+
set :current_path, '/path/to/current/deployed/application'
|
103
|
+
set :rails_env, 'production'
|
104
|
+
|
105
|
+
Cape do
|
106
|
+
mirror_rake_tasks :roles => :app do |env|
|
107
|
+
env[nil] = 'foo'
|
108
|
+
end
|
109
|
+
end
|
110
|
+
"""
|
111
|
+
When I run `cap with_period`
|
112
|
+
Then the output should contain:
|
113
|
+
"""
|
114
|
+
* executing `with_period'
|
115
|
+
* executing "cd /path/to/current/deployed/application && /usr/bin/env rake with_period"
|
116
|
+
`with_period' is only run for servers matching {:roles=>:app}, but no servers matched
|
117
|
+
"""
|
118
|
+
|
119
|
+
Scenario: mirror Rake task 'with_period' with its implementation, ignoring nil environment variable values
|
120
|
+
Given a full-featured Rakefile
|
121
|
+
And a Capfile with:
|
122
|
+
"""
|
123
|
+
set :current_path, '/path/to/current/deployed/application'
|
124
|
+
set :rails_env, 'production'
|
125
|
+
|
126
|
+
Cape do
|
127
|
+
mirror_rake_tasks :roles => :app do |env|
|
128
|
+
env['FOO'] = nil
|
129
|
+
end
|
130
|
+
end
|
131
|
+
"""
|
132
|
+
When I run `cap with_period`
|
133
|
+
Then the output should contain:
|
134
|
+
"""
|
135
|
+
* executing `with_period'
|
136
|
+
* executing "cd /path/to/current/deployed/application && /usr/bin/env rake with_period"
|
137
|
+
`with_period' is only run for servers matching {:roles=>:app}, but no servers matched
|
138
|
+
"""
|
139
|
+
|
98
140
|
Scenario: mirror Rake task 'with_one_arg' with its description
|
99
141
|
Given a full-featured Rakefile
|
100
142
|
And a Capfile with:
|
data/lib/cape/capistrano.rb
CHANGED
@@ -110,6 +110,9 @@ Set environment #{noun} #{parameters_list} if you want to pass #{noun_phrase}.
|
|
110
110
|
end
|
111
111
|
env_hash = {}
|
112
112
|
env_block.call(env_hash) if env_block
|
113
|
+
env_hash.reject! do |var_name, var_value|
|
114
|
+
var_name.nil? || var_value.nil?
|
115
|
+
end
|
113
116
|
env_strings = env_hash.collect do |var_name, var_value|
|
114
117
|
"#{var_name}=#{var_value.inspect}"
|
115
118
|
end
|
data/lib/cape/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cape
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 3
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nils Jonsson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-02-
|
18
|
+
date: 2012-02-03 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: aruba
|