alpha_omega 1.3.42 → 1.3.43

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.42
1
+ 1.3.43
@@ -1,3 +1,5 @@
1
+ require 'tempfile'
2
+
1
3
  Capistrano::Configuration.instance(:must_exist).load do |config|
2
4
  namespace :deploy do
3
5
  namespace :notify do
@@ -14,10 +16,6 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
14
16
  end
15
17
  end
16
18
 
17
- task :email do
18
- run_locally "echo '#{notify_message}' | mail -s '#{notify_message_abbr}' #{$deploy["notify"]["email"]["recipients"].join(" ")}"
19
- end
20
-
21
19
  task :campfire do
22
20
  require 'capistrano/campfire'
23
21
 
@@ -76,12 +74,32 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
76
74
  require 'new_relic/recipes'
77
75
  end
78
76
 
77
+ task :email do
78
+ tmp_notify = Tempfile.new('email')
79
+ tmp_notify.write notify_message
80
+ tmp_notify.close
81
+ run_locally "cat '#{tmp_notify.path}' | mail -s '#{notify_message_abbr}' #{$deploy["notify"]["email"]["recipients"].join(" ")}"
82
+ tmp_notify.unlink
83
+ end
84
+
85
+ def map_sha_tag rev
86
+ %x(git show-ref | grep '^#{rev} refs/tags/' | cut -d/ -f3).chomp
87
+ end
88
+
79
89
  def notify_message
80
- "#{ENV['_AO_USER']} deployed #{application} to #{dna['app_env']}: #{repository}: #{ENV['FLAGS_tag']} => #{current_revision}"
90
+ if dna["app_env"] == "production"
91
+ summary = "#{repository.sub("git@github.com:","https://github.com/")}/compare/#{map_sha_tag cmp_previous_revision}...#{map_sha_tag cmp_active_revision}"
92
+ else
93
+ summary = "#{repository.sub("git@github.com:","https://github.com/")}/commit/#{cmp_active_revision}"
94
+ end
95
+
96
+ "#{ENV['_AO_DEPLOYER']} deployed #{application} to #{ENV['_AO_ARGS']} (#{dna['app_env']}): #{ENV['FLAGS_tag']}" +
97
+ "\n\nSummary:\n\n" + summary +
98
+ "\n\nLog:\n\n" + full_log
81
99
  end
82
100
 
83
101
  def notify_message_abbr
84
- "#{ENV['_AO_USER']} deployed #{application} to #{dna['app_env']}: #{ENV['FLAGS_tag']}"
102
+ "#{ENV['_AO_DEPLOYER']} deployed #{application} to #{ENV['_AO_ARGS']} (#{dna['app_env']}): #{ENV['FLAGS_tag']}"
85
103
  end
86
104
  end
87
105
  end
@@ -164,9 +164,11 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
164
164
 
165
165
  _cset(:rollback_revision) { capture("cat #{rollback_release}/REVISION 2>&- || true").strip }
166
166
  _cset(:previous_revision) { capture("cat #{previous_release}/REVISION 2>&- || true").strip }
167
+ _cset(:cmp_previous_revision) { capture("cat #{previous_release}/REVISION 2>&- || true").strip }
167
168
  _cset(:current_revision) { capture("cat #{current_release}/REVISION 2>&- || true").strip }
168
169
  _cset(:next_revision) { capture("cat #{next_release}/REVISION 2>&- || true").strip }
169
170
  _cset(:active_revision) { capture("cat #{active_release}/REVISION 2>&- || true").strip }
171
+ _cset(:cmp_active_revision) { capture("cat #{active_release}/REVISION 2>&- || true").strip }
170
172
  _cset(:compare_revision) { capture("cat #{compare_release}/REVISION 2>&- || true").strip }
171
173
  _cset(:migrate_revision) { capture("cat #{migrate_release}/REVISION 2>&- || true").strip }
172
174
  _cset(:deploy_revision) { capture("cat #{deploy_release}/REVISION 2>&- || true").strip }
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: 79
4
+ hash: 77
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 42
10
- version: 1.3.42
9
+ - 43
10
+ version: 1.3.43
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: json
@@ -102,95 +103,96 @@ files:
102
103
  - LICENSE
103
104
  - VERSION
104
105
  - README.mkd
105
- - libexec/_ao
106
- - libexec/_bump
107
- - libexec/_jason
108
- - libexec/_log4sh
106
+ - libexec/aoh-lock
107
+ - libexec/build
108
+ - libexec/publish-gem
109
+ - libexec/_treadstone
109
110
  - libexec/_meat
111
+ - libexec/aoh-restart
112
+ - libexec/aoh-dist
110
113
  - libexec/_prime
111
- - libexec/_shflags
112
- - libexec/_shunit
114
+ - libexec/local-helper
115
+ - libexec/aoh-migrate
116
+ - libexec/aoh-dna
117
+ - libexec/aoh-stage
118
+ - libexec/bump
119
+ - libexec/_log4sh
120
+ - libexec/_jason
121
+ - libexec/build-gem
122
+ - libexec/edit-gem
123
+ - libexec/aoh-compare
124
+ - libexec/aoh-rollback
125
+ - libexec/aoh-unlock
126
+ - libexec/aoh-remote
127
+ - libexec/aoh-deploy
128
+ - libexec/aoh-debug
129
+ - libexec/aoh-proxy
113
130
  - libexec/_sub
114
- - libexec/_treadstone
115
- - libexec/_versions
116
- - libexec/aoh
117
131
  - libexec/aoh-activate
132
+ - libexec/aohelper
133
+ - libexec/_shunit
134
+ - libexec/aoh
135
+ - libexec/aoh-task
136
+ - libexec/_shflags
137
+ - libexec/_versions
138
+ - libexec/_bump
139
+ - libexec/stub-prepare
140
+ - libexec/aoh-init
118
141
  - libexec/aoh-check
119
- - libexec/aoh-compare
120
- - libexec/aoh-debug
121
- - libexec/aoh-deploy
122
- - libexec/aoh-dist
123
- - libexec/aoh-dna
142
+ - libexec/_ao
124
143
  - libexec/aoh-hosts
125
- - libexec/aoh-init
126
- - libexec/aoh-lock
127
- - libexec/aoh-migrate
128
- - libexec/aoh-proxy
129
- - libexec/aoh-release
130
- - libexec/aoh-remote
131
- - libexec/aoh-restart
132
- - libexec/aoh-rollback
133
144
  - libexec/aoh-shell
134
- - libexec/aoh-stage
135
- - libexec/aoh-task
136
- - libexec/aoh-unlock
137
- - libexec/aohelper
138
- - libexec/build
139
- - libexec/build-gem
140
- - libexec/bump
141
- - libexec/edit-gem
142
- - libexec/local-helper
145
+ - libexec/aoh-release
143
146
  - libexec/publish
144
- - libexec/publish-gem
145
- - libexec/stub-prepare
146
- - lib/alpha_omega/config/deploy.rb
147
- - lib/alpha_omega/config/deploy_challenge.rb
148
- - lib/alpha_omega/config/deploy_localhost.rb
149
- - lib/alpha_omega/config/deploy_log.rb
150
- - lib/alpha_omega/config/deploy_notify.rb
151
- - lib/alpha_omega/config/deploy_perf.rb
152
- - lib/alpha_omega/config/deploy_ssh.rb
153
- - lib/alpha_omega/deploy/dependencies.rb
154
- - lib/alpha_omega/deploy/local_dependency.rb
155
- - lib/alpha_omega/deploy/remote_dependency.rb
156
- - lib/alpha_omega/deploy/scm/base.rb
147
+ - lib/alpha_omega/deploy.rb
148
+ - lib/alpha_omega/deploy/strategy.rb
157
149
  - lib/alpha_omega/deploy/scm/git.rb
150
+ - lib/alpha_omega/deploy/scm/base.rb
151
+ - lib/alpha_omega/deploy/remote_dependency.rb
152
+ - lib/alpha_omega/deploy/dependencies.rb
158
153
  - lib/alpha_omega/deploy/scm.rb
159
- - lib/alpha_omega/deploy/strategy/base.rb
154
+ - lib/alpha_omega/deploy/local_dependency.rb
160
155
  - lib/alpha_omega/deploy/strategy/checkout.rb
161
156
  - lib/alpha_omega/deploy/strategy/remote.rb
162
- - lib/alpha_omega/deploy/strategy.rb
157
+ - lib/alpha_omega/deploy/strategy/base.rb
163
158
  - lib/alpha_omega/deploy/templates/maintenance.rhtml
164
- - lib/alpha_omega/deploy.rb
165
- - lib/alpha_omega/utils.rb
166
159
  - lib/alpha_omega/version.rb
160
+ - lib/alpha_omega/config/deploy.rb
161
+ - lib/alpha_omega/config/deploy_localhost.rb
162
+ - lib/alpha_omega/config/deploy_notify.rb
163
+ - lib/alpha_omega/config/deploy_log.rb
164
+ - lib/alpha_omega/config/deploy_challenge.rb
165
+ - lib/alpha_omega/config/deploy_perf.rb
166
+ - lib/alpha_omega/config/deploy_ssh.rb
167
+ - lib/alpha_omega/utils.rb
167
168
  - lib/development.rb
168
169
  - sbin/activate
169
- - sbin/aoh
170
- - sbin/aoh-stub
171
- - sbin/bump
170
+ - sbin/stage
172
171
  - sbin/check
173
- - sbin/compare
174
- - sbin/debug
172
+ - sbin/stub
175
173
  - sbin/deploy
176
174
  - sbin/dist
177
- - sbin/dna
178
- - sbin/hosts
175
+ - sbin/restart
179
176
  - sbin/local-helper
180
- - sbin/lock
177
+ - sbin/bump
178
+ - sbin/hosts
181
179
  - sbin/migrate
182
- - sbin/proxy
183
- - sbin/release
184
- - sbin/remote
185
180
  - sbin/remote-helper
186
- - sbin/restart
187
181
  - sbin/rollback
188
- - sbin/shell
189
- - sbin/stage
190
- - sbin/stub
191
182
  - sbin/task
183
+ - sbin/release
184
+ - sbin/proxy
185
+ - sbin/compare
186
+ - sbin/aoh
187
+ - sbin/shell
188
+ - sbin/lock
192
189
  - sbin/unlock
190
+ - sbin/dna
191
+ - sbin/aoh-stub
192
+ - sbin/remote
193
+ - sbin/debug
193
194
  - bin/ao
195
+ has_rdoc: true
194
196
  homepage: https://github.com/destructuring/alpha_omega
195
197
  licenses: []
196
198
 
@@ -220,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
222
  requirements: []
221
223
 
222
224
  rubyforge_project:
223
- rubygems_version: 1.8.24
225
+ rubygems_version: 1.5.3
224
226
  signing_key:
225
227
  specification_version: 3
226
228
  summary: alpha_omega capistrano recipes