codebase 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/codebase/recipes.rb +11 -11
  2. metadata +2 -2
@@ -25,17 +25,17 @@ Capistrano::Configuration.instance(:must_exist).load do
25
25
 
26
26
 
27
27
  environment_to_send = begin
28
- env = (self.environment rescue self.rails_env).dup
29
- env.gsub!(/\W+/, ' ')
30
- env.strip!
31
- env.downcase!
32
- env.gsub!(/\ +/, '-')
33
-
34
- puts " - Environment..: #{env}" unless env.blank?
35
-
36
- env
37
- rescue
38
- ''
28
+ if respond_to?(:environment)
29
+ env = environment.dup
30
+ env.gsub!(/\W+/, ' ')
31
+ env.strip!
32
+ env.downcase!
33
+ env.gsub!(/\ +/, '-')
34
+ puts " - Environment..: #{env}" unless env.nil? || env.empty?
35
+ env
36
+ else
37
+ ''
38
+ end
39
39
  end
40
40
 
41
41
  servers = roles.values.collect{|r| r.servers}.flatten.collect{|s| s.host}.uniq.join(', ') rescue ''
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebase
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-28 00:00:00 +00:00
12
+ date: 2010-03-04 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency