alpha_omega 0.0.158 → 0.0.159

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/alpha_omega/utils.rb +3 -8
  3. metadata +32 -30
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.158
1
+ 0.0.159
@@ -166,21 +166,16 @@ module AlphaOmega
166
166
  pods = { }
167
167
 
168
168
  this_pod = File.read("/etc/podname").strip
169
+ config.set :current_pod, this_pod
169
170
 
170
171
  this_host = Socket.gethostname.chomp.split(".")[0]
171
172
  n = File.exists?("#{node_home}/pods/#{this_pod}/#{this_host}.yaml") ? YAML.load(File.read("#{node_home}/pods/#{this_pod}/#{this_host}.yaml")) : JSON.load(File.read("#{node_home}/pods/#{this_pod}/#{this_host}.json"))
172
173
  this_node = AlphaOmega.node_defaults(n, pods_config, opsdb, this_pod, this_pod, this_host)
173
174
 
174
- pods[this_pod] = {
175
- "nodes_specs" => [ "#{node_home}/pods/#{this_pod}/*.yaml", "#{node_home}/pods/#{this_pod}/*.json" ],
176
- "node_suffix" => ""
177
- }
178
- yield config, this_pod, pods[this_pod], pods_config, opsdb, this_pod, this_node
179
-
180
- (this_node["pods"] || []).each do |pod_name|
175
+ ((this_node["pods"] || []) + [this_pod]).each do |pod_name|
181
176
  pods[pod_name] = {
182
177
  "nodes_specs" => [ "#{node_home}/pods/#{pod_name}/*.yaml", "#{node_home}/pods/#{pod_name}/*.json" ],
183
- "node_suffix" => ".#{pod_name}"
178
+ "node_suffix" => (pod_name == this_pod ? "" : ".#{pod_name}")
184
179
  }
185
180
  yield config, pod_name, pods[pod_name], pods_config, opsdb, this_pod, this_node
186
181
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpha_omega
3
3
  version: !ruby/object:Gem::Version
4
- hash: 291
4
+ hash: 289
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 158
10
- version: 0.0.158
9
+ - 159
10
+ version: 0.0.159
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem
@@ -16,7 +16,8 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-08-31 00:00:00 Z
19
+ date: 2011-08-31 00:00:00 +00:00
20
+ default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: grit
@@ -118,43 +119,44 @@ files:
118
119
  - LICENSE
119
120
  - VERSION
120
121
  - README.mkd
121
- - libexec/activate
122
+ - libexec/unlock
123
+ - libexec/proxy
122
124
  - libexec/build
123
- - libexec/bump
124
- - libexec/check
125
+ - libexec/restart
126
+ - libexec/stage
127
+ - libexec/activate
128
+ - libexec/rollback
129
+ - libexec/plan
125
130
  - libexec/compare
126
- - libexec/config
127
- - libexec/debug
131
+ - libexec/shell
132
+ - libexec/migrate
128
133
  - libexec/deploy
129
- - libexec/dist
134
+ - libexec/config
135
+ - libexec/bump
130
136
  - libexec/dna
131
- - libexec/hosts
132
- - libexec/invoke
137
+ - libexec/check
138
+ - libexec/debug
133
139
  - libexec/lock
134
- - libexec/migrate
135
- - libexec/plan
136
- - libexec/proxy
140
+ - libexec/invoke
141
+ - libexec/hosts
137
142
  - libexec/release
138
- - libexec/restart
139
- - libexec/rollback
140
- - libexec/shell
141
- - libexec/stage
142
- - libexec/unlock
143
- - lib/alpha_omega/deploy/dependencies.rb
143
+ - libexec/dist
144
+ - lib/alpha_omega/utils.rb
145
+ - lib/alpha_omega/deploy.rb
146
+ - lib/alpha_omega/version.rb
144
147
  - lib/alpha_omega/deploy/local_dependency.rb
145
- - lib/alpha_omega/deploy/remote_dependency.rb
146
- - lib/alpha_omega/deploy/scm/base.rb
147
- - lib/alpha_omega/deploy/scm/git.rb
148
- - lib/alpha_omega/deploy/scm.rb
149
148
  - lib/alpha_omega/deploy/strategy/base.rb
150
149
  - lib/alpha_omega/deploy/strategy/checkout.rb
151
150
  - lib/alpha_omega/deploy/strategy/remote.rb
152
- - lib/alpha_omega/deploy/strategy.rb
151
+ - lib/alpha_omega/deploy/scm.rb
153
152
  - lib/alpha_omega/deploy/templates/maintenance.rhtml
154
- - lib/alpha_omega/deploy.rb
155
- - lib/alpha_omega/utils.rb
156
- - lib/alpha_omega/version.rb
153
+ - lib/alpha_omega/deploy/strategy.rb
154
+ - lib/alpha_omega/deploy/scm/base.rb
155
+ - lib/alpha_omega/deploy/scm/git.rb
156
+ - lib/alpha_omega/deploy/dependencies.rb
157
+ - lib/alpha_omega/deploy/remote_dependency.rb
157
158
  - bin/alpha_omega
159
+ has_rdoc: true
158
160
  homepage: https://github.com/HeSYINUvSBZfxqA/alpha_omega
159
161
  licenses: []
160
162
 
@@ -184,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
186
  requirements: []
185
187
 
186
188
  rubyforge_project:
187
- rubygems_version: 1.8.21
189
+ rubygems_version: 1.5.3
188
190
  signing_key:
189
191
  specification_version: 3
190
192
  summary: alpha_omega capistrano recipes