heroku_deploy 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.8
1
+ 0.1.9
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{heroku_deploy}
8
- s.version = "0.1.8"
8
+ s.version = "0.1.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ross Hale"]
12
- s.date = %q{2010-09-09}
12
+ s.date = %q{2010-09-10}
13
13
  s.description = %q{Deploy strategy and scripts for Heroku.}
14
14
  s.email = %q{rosshale@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -150,7 +150,7 @@ class HerokuDeploy
150
150
  `heroku maintenance:on --app #{app}`
151
151
 
152
152
  print "Waiting for slug to re-compile..."
153
- wait_for_maintenance_page( app )
153
+ wait_for_maintenance_on( app )
154
154
  puts ""
155
155
 
156
156
  puts "Pushing to #{app}"
@@ -170,6 +170,9 @@ class HerokuDeploy
170
170
 
171
171
  `heroku maintenance:off --app #{app}`
172
172
 
173
+ print "Waiting for app to go live..."
174
+ wait_for_maintenance_off(app)
175
+ puts ""
173
176
  end
174
177
 
175
178
  def backup( app )
@@ -204,10 +207,23 @@ class HerokuDeploy
204
207
 
205
208
  end
206
209
 
207
- def wait_for_maintenance_page(app)
208
- response_code = 200
209
- while (response_code != 422)
210
- response_code = HTTParty.get("http://#{app}.heroku.com").code
210
+ def maintenance_off(app)
211
+ HTTParty.get("http://#{app}.heroku.com").code != 422
212
+ end
213
+
214
+ def wait_for_maintenance_on(app)
215
+ while (maintenance_off(app))
216
+ print "."
217
+ STDOUT.flush
218
+ end
219
+ end
220
+
221
+ def maintenance_on(app)
222
+ HTTParty.get("http://#{app}.heroku.com").code != 200
223
+ end
224
+
225
+ def wait_for_maintenance_off(app)
226
+ while (maintenance_on(app))
211
227
  print "."
212
228
  STDOUT.flush
213
229
  end
@@ -25,7 +25,8 @@ class HerokuDeployTest < Test::Unit::TestCase
25
25
  stub(@heroku_deploy).puts
26
26
  stub(@heroku_deploy).bundle_not_yet_captured? { false }
27
27
  stub(@heroku_deploy).bundle_captured? { true }
28
- stub.any_instance_of(HTTParty::Response).code { 422 }
28
+ stub(@heroku_deploy).maintenance_off { false }
29
+ stub(@heroku_deploy).maintenance_on { false }
29
30
  end
30
31
 
31
32
  should "assign staging_app" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_deploy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 8
10
- version: 0.1.8
9
+ - 9
10
+ version: 0.1.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ross Hale
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-09 00:00:00 -07:00
18
+ date: 2010-09-10 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21