cap-rightscale 0.4.3 → 0.4.4

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.4.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cap-rightscale}
8
- s.version = "0.4.3"
8
+ s.version = "0.4.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Satoshi Ohki"]
12
- s.date = %q{2011-02-04}
12
+ s.date = %q{2011-02-05}
13
13
  s.description = %q{Capistrano extension that maps RightScale parameters to Roles.}
14
14
  s.email = %q{roothybrid7@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -55,7 +55,7 @@ start = Time.now
55
55
 
56
56
  host_list = use_rs_cache ? get_cache_instance.load_server_cache(role, @caller) : [] # Get cache
57
57
 
58
- if host_list && host_list.size > 0
58
+ if host_list.size > 0
59
59
  [:array_id, :except_tags].each {|key| params.delete(key)} # remove rightscale's parameters
60
60
  logger.info("restore cache of servers:\n#{host_list.pretty_inspect}")
61
61
  role(role, params) { host_list } # set cache to role()
@@ -84,7 +84,7 @@ start = Time.now
84
84
  end
85
85
  host_list = RSUtils.valid_echo(host_list, logger) if validate_echo
86
86
 
87
- if host_list && host_list.size > 0
87
+ if host_list.size > 0
88
88
  [:array_id, :except_tags].each {|key| params.delete(key)} # remove rightscale's parameters
89
89
  role(role, params) { host_list }
90
90
  get_cache_instance.dump_server_cache(role, host_list, @caller) if use_rs_cache # Dump cache
@@ -141,7 +141,7 @@ start = Time.now
141
141
  end
142
142
  host_list = RSUtils.valid_echo(host_list, logger) if validate_echo
143
143
 
144
- if host_list && host_list.size > 0
144
+ if host_list.size > 0
145
145
  [:array_id, :except_tags].each {|key| params.delete(key)} # remove rightscale's parameters
146
146
  role(role, params) { host_list }
147
147
  get_cache_instance.dump_server_cache(role, host_list, @caller) if use_rs_cache # Dump cache
@@ -154,7 +154,8 @@ puts "Time: #{Time.now - start}"
154
154
  # Get servers matching tags in deployment
155
155
  # === Parameters
156
156
  # * _role_ - Capistrano role symbol (ex. :app, :web, :db)
157
- # * _params[:tags]_ - ex. :tags => "xx_db:role=master", "xx_web:role", "xx_lb" (RightScale tags partial matchs 'namespece:predicate=value')
157
+ # * _params[:tags]_ - ex. :tags => "xx_db:role=master",
158
+ # "xx_web:role", "xx_lb" (RightScale tags partial matchs 'namespece:predicate=value')
158
159
  # * _params[:deployment]_ - ex. :deployment => 1[https://my.rightscale.com/deployments/{id}]
159
160
  # * _params[:xxx]_ - ex. :user => "www", :port => 2345, etc...
160
161
  # === Examples
@@ -171,7 +172,7 @@ start = Time.now
171
172
 
172
173
  host_list = use_rs_cache ? get_cache_instance.load_server_cache(role, @caller) : [] # Get cache
173
174
 
174
- if host_list && host_list.size > 0
175
+ if host_list.size > 0
175
176
  [:deployment, :tags, :except_tags].each {|key| params.delete(key)} # remove rightscale's parameters
176
177
  logger.info("restore cache of servers:\n#{host_list.pretty_inspect}")
177
178
  role(role, params) { host_list } # set cache to role()
@@ -202,7 +203,7 @@ start = Time.now
202
203
 
203
204
  host_list = RSUtils.valid_echo(host_list, logger) if validate_echo
204
205
 
205
- if host_list && host_list.size > 0
206
+ if host_list.size > 0
206
207
  [:deployment, :tags, :except_tags].each {|key| params.delete(key)} # remove rightscale's parameters
207
208
  role(role, params) { host_list }
208
209
  get_cache_instance.dump_server_cache(role, host_list, @caller) if use_rs_cache # Dump cache
@@ -10,7 +10,7 @@ class RSUtils
10
10
  path = "#{tmpdir}/#{_prefix}-#{ENV['USER']}-#{rand(0x100000000).to_s(36)}"
11
11
  Dir.mkdir(path, 0700)
12
12
  rescue Errno::EEXIST
13
- warn(e)
13
+ STEDERR.puts(e)
14
14
  exit(1)
15
15
  end
16
16
  end
@@ -32,7 +32,7 @@ class RSUtils
32
32
  hosts.delete(nil)
33
33
  threads.clear
34
34
 
35
- hosts
35
+ hosts || []
36
36
  end
37
37
  end
38
38
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cap-rightscale
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 3
10
- version: 0.4.3
9
+ - 4
10
+ version: 0.4.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Satoshi Ohki
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-04 00:00:00 +09:00
18
+ date: 2011-02-05 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency