heroku_deploy 0.0.10 → 0.0.11

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.0.10
1
+ 0.0.11
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{heroku_deploy}
8
- s.version = "0.0.10"
8
+ s.version = "0.0.11"
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", "Chris Lemcke"]
@@ -47,11 +47,13 @@ class HerokuDeploy
47
47
  puts "Creating #{staging_app} Heroku app"
48
48
  puts ""
49
49
  `heroku app:create #{staging_app}`
50
+ `heroku addons:add bundles:single --app #{staging_app}`
50
51
 
51
52
  puts ""
52
53
  puts "Creating #{production_app} Heroku app"
53
54
  puts ""
54
55
  `heroku app:create #{production_app}`
56
+ `heroku addons:add bundles:single --app #{production_app}`
55
57
 
56
58
  puts ""
57
59
  puts "Setup Complete!"
@@ -151,19 +153,33 @@ class HerokuDeploy
151
153
  `heroku bundles:capture backup-#{timestamp} --app #{app}`
152
154
  puts "New Bundle Captured on Heroku: backup-#{timestamp}"
153
155
 
154
- while !`heroku bundles --app #{app}`.include?("complete") do
156
+ puts "Waiting for Bundle to become available..."
157
+ while bundle_not_yet_captured?( app ) do
158
+ print "."
155
159
  end
156
160
 
157
- puts "New Bundle Ready For Download"
161
+ if bundle_captured?( app )
162
+ puts "New Bundle Ready For Download"
158
163
 
159
- `heroku bundles:download backup-#{timestamp} --app #{app}`
160
- `mv #{app}.tar.gz #{app}-#{timestamp}.tar.gz`
161
-
162
- puts "New Bundle Downloaded: #{app}-#{timestamp}.tar.gz"
164
+ `heroku bundles:download backup-#{timestamp} --app #{app}`
165
+ `mv #{app}.tar.gz #{app}-#{timestamp}.tar.gz`
163
166
 
167
+ puts "New Bundle Downloaded: #{app}-#{timestamp}.tar.gz"
168
+ end
169
+
164
170
  puts "Backup Complete!"
165
171
  puts ""
166
172
 
167
173
  end
168
174
 
175
+ protected
176
+
177
+ def bundle_not_yet_captured?( app )
178
+ `heroku bundles --app #{app}`.include?(" capturing ")
179
+ end
180
+
181
+ def bundle_captured?( app )
182
+ `heroku bundles --app #{app}`.include?(" complete ")
183
+ end
184
+
169
185
  end
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
  - 0
9
- - 10
10
- version: 0.0.10
9
+ - 11
10
+ version: 0.0.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ross Hale