alpha_omega 0.0.96 → 0.0.97

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.
@@ -63,7 +63,7 @@ module AlphaOmega
63
63
  end
64
64
 
65
65
  def self.default_pods_tasks
66
- Proc.new do |config, pod_name, pod, mix_pods, pods_config, opsdb, this_pod, this_node, &node_filter|
66
+ Proc.new do |config, pod_name, pod, pods_config, opsdb, this_pod, this_node, &node_filter|
67
67
  %w(app echo yaml).each do |tsuffix|
68
68
  # world task accumulates all.* after tasks
69
69
  config.task "world.#{tsuffix}" do # task world
@@ -98,7 +98,7 @@ module AlphaOmega
98
98
 
99
99
  %w(app echo yaml).each do |tsuffix|
100
100
  config.task "#{task_name}.#{tsuffix}" do # task host -> host.current_pod
101
- after "#{task_name}.#{tsuffix}", "#{task_name}.#{current_pod}.#{tsuffix}"
101
+ config.after "#{task_name}.#{tsuffix}", "#{task_name}.#{current_pod}.#{tsuffix}"
102
102
  end
103
103
  end
104
104
 
@@ -113,67 +113,31 @@ module AlphaOmega
113
113
  # simulate all podXX all
114
114
  %w(app echo yaml).each do |tsuffix|
115
115
  unless pod_name == "default"
116
- config.after "world.#{tsuffix}", "#{pod_name}.#{tsuffix}"
116
+ config.after "world.#{tsuffix}", "#{pod_name}.#{tsuffix}" # podXX, hence the guard for default
117
117
  end
118
- config.after "world.#{tsuffix}", "#{task_name}.#{tsuffix}"
118
+ config.after "world.#{tsuffix}", "#{task_name}.#{tsuffix}" # all
119
119
  end
120
120
  end
121
121
 
122
- config.task "#{task_name}.#{pod_name}.app" do
123
- unless mix_pods
124
- if last_pod && last_pod != pod_name
125
- puts "ERROR: cannot call tasks that mix different dc_env (last pod = #{last_pod}, current pod = #{pod_name})"
126
- exit 1
127
- end
122
+ %w(app echo yaml).each do |tsuffix|
123
+ config.task "#{task_name}.#{pod_name}.#{tsuffix}" do
128
124
  end
129
125
 
130
- set :last_pod, pod_name
131
126
  nodes.keys.sort.each do |remote_name|
132
- role :app, remote_name
133
- set :dna, node_dna[remote_name]
127
+ config.after "#{task_name}.#{pod_name}.#{tsuffix}", "#{remote_name}.#{tsuffix}"
134
128
  end
135
- end
136
129
 
137
- config.task "#{task_name}.#{pod_name}.echo" do
138
- unless mix_pods
139
- if last_pod && last_pod != pod_name
140
- puts "ERROR: cannot call tasks that mix different dc_env (last pod = #{last_pod}, current pod = #{pod_name})"
141
- exit 1
142
- end
143
- end
144
-
145
- set :last_pod, pod_name
146
- nodes.keys.sort.each do |remote_name|
147
- puts "#{AlphaOmega.magic_prefix} #{remote_name}"
148
- end
149
- end
150
-
151
- config.task "#{task_name}.#{pod_name}.yaml" do
152
- unless mix_pods
153
- if last_pod && last_pod != pod_name
154
- puts "ERROR: cannot call tasks that mix different dc_env (last pod = #{last_pod}, current pod = #{pod_name})"
155
- exit 1
156
- end
157
- end
158
-
159
- set :last_pod, pod_name
160
- nodes.sort.each do |remote_name, node|
161
- StringIO.new({ remote_name => node }.to_yaml).lines.each {|l| puts "#{AlphaOmega.magic_prefix} #{l}" }
162
- end
163
- end
164
-
165
- %w(app echo yaml).each do |tsuffix|
166
130
  config.task "#{task_name}.#{tsuffix}" do
167
- after "#{task_name}.#{tsuffix}", "#{task_name}.#{current_pod}.#{tsuffix}"
131
+ config.after "#{task_name}.#{tsuffix}", "#{task_name}.#{current_pod}.#{tsuffix}"
168
132
  end
169
133
  end
170
134
  end
171
135
  end
172
136
  end
173
137
 
174
- def self.setup_pods (config, node_home, mix_pods = true, &node_filter)
138
+ def self.setup_pods (config, node_home, &node_filter)
175
139
  self.what_pods(config, node_home) do |config, pod_name, pod, pods_config, opsdb, this_pod, this_node|
176
- self.default_pods_tasks.call(config, pod_name, pod, mix_pods, pods_config, opsdb, this_pod, this_node, &node_filter)
140
+ self.default_pods_tasks.call(config, pod_name, pod, pods_config, opsdb, this_pod, this_node, &node_filter)
177
141
  end
178
142
  end
179
143
 
@@ -1,3 +1,3 @@
1
1
  module AlphaOmega
2
- Version = "0.0.96"
2
+ Version = File.read(File.expand_path('../../../VERSION', __FILE__)).strip
3
3
  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: 223
4
+ hash: 221
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 96
10
- version: 0.0.96
9
+ - 97
10
+ version: 0.0.97
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem
@@ -16,8 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-08-31 00:00:00 +00:00
20
- default_executable:
19
+ date: 2011-08-31 00:00:00 Z
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
23
22
  name: grit
@@ -119,37 +118,36 @@ files:
119
118
  - LICENSE
120
119
  - README.mkd
121
120
  - Procfile.rb
122
- - libexec/proxy
123
121
  - libexec/build
124
- - libexec/restart
125
- - libexec/stage
126
- - libexec/rollback
122
+ - libexec/check
127
123
  - libexec/compare
128
- - libexec/shell
129
- - libexec/deploy
130
124
  - libexec/config
125
+ - libexec/deploy
126
+ - libexec/dist
131
127
  - libexec/dna
132
- - libexec/check
133
- - libexec/invoke
134
128
  - libexec/hosts
129
+ - libexec/invoke
130
+ - libexec/proxy
135
131
  - libexec/release
136
- - libexec/dist
137
- - lib/alpha_omega/utils.rb
138
- - lib/alpha_omega/deploy.rb
139
- - lib/alpha_omega/version.rb
132
+ - libexec/restart
133
+ - libexec/rollback
134
+ - libexec/shell
135
+ - libexec/stage
136
+ - lib/alpha_omega/deploy/dependencies.rb
140
137
  - lib/alpha_omega/deploy/local_dependency.rb
138
+ - lib/alpha_omega/deploy/remote_dependency.rb
139
+ - lib/alpha_omega/deploy/scm/base.rb
140
+ - lib/alpha_omega/deploy/scm/git.rb
141
+ - lib/alpha_omega/deploy/scm.rb
141
142
  - lib/alpha_omega/deploy/strategy/base.rb
142
143
  - lib/alpha_omega/deploy/strategy/checkout.rb
143
144
  - lib/alpha_omega/deploy/strategy/remote.rb
144
- - lib/alpha_omega/deploy/scm.rb
145
- - lib/alpha_omega/deploy/templates/maintenance.rhtml
146
145
  - lib/alpha_omega/deploy/strategy.rb
147
- - lib/alpha_omega/deploy/scm/base.rb
148
- - lib/alpha_omega/deploy/scm/git.rb
149
- - lib/alpha_omega/deploy/dependencies.rb
150
- - lib/alpha_omega/deploy/remote_dependency.rb
146
+ - lib/alpha_omega/deploy/templates/maintenance.rhtml
147
+ - lib/alpha_omega/deploy.rb
148
+ - lib/alpha_omega/utils.rb
149
+ - lib/alpha_omega/version.rb
151
150
  - bin/alpha_omega
152
- has_rdoc: true
153
151
  homepage: https://github.com/HeSYINUvSBZfxqA/alpha_omega
154
152
  licenses: []
155
153
 
@@ -179,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
177
  requirements: []
180
178
 
181
179
  rubyforge_project:
182
- rubygems_version: 1.5.3
180
+ rubygems_version: 1.8.21
183
181
  signing_key:
184
182
  specification_version: 3
185
183
  summary: alpha_omega capistrano recipes