heroku-rails 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- heroku-rails (0.2.2)
4
+ heroku-rails (0.2.3)
5
5
  heroku (>= 1.11.0)
6
6
 
7
7
  GEM
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "heroku-rails"
3
- s.version = "0.2.2"
3
+ s.version = "0.2.3"
4
4
 
5
5
  s.authors = ["Elijah Miller", "Glenn Roberts", "Jacques Crocker"]
6
6
  s.summary = "Deployment and configuration tools for Heroku/Rails"
@@ -13,15 +13,15 @@ module Heroku
13
13
  end
14
14
 
15
15
  def apps
16
- self.settings['apps']
16
+ self.settings['apps'] || {}
17
17
  end
18
18
 
19
19
  def app_names
20
- self.settings['apps'].values
20
+ apps.values
21
21
  end
22
22
 
23
23
  def app_environments
24
- self.settings['apps'].keys
24
+ apps.keys
25
25
  end
26
26
 
27
27
  # return the stack setting for a particular app environment
@@ -205,9 +205,18 @@ module Heroku
205
205
  # cycles through each configured heroku app
206
206
  # yields the environment name, the app name, and the repo url
207
207
  def each_heroku_app
208
+
209
+ if @config.apps.size == 0
210
+ puts "\nNo heroku apps are configured. Run:
211
+ rails generate heroku:config\n\n"
212
+ puts "this will generate a default config/heroku.yml that you should edit"
213
+ puts "and then try running this command again"
214
+
215
+ exit(1)
216
+ end
217
+
208
218
  if @environments.blank? && @config.apps.size == 1
209
219
  @environments = [@config.app_environments.first]
210
- puts "Defaulting to #{@environments.first} app since only one app is defined"
211
220
  end
212
221
 
213
222
  if @environments.present?
@@ -216,13 +225,13 @@ module Heroku
216
225
  yield(heroku_env, app_name, "git@heroku.com:#{app_name}.git")
217
226
  end
218
227
  else
219
- puts "You must first specify at least one Heroku app:
228
+ puts "\nYou must first specify at least one Heroku app:
220
229
  rake <app> [<app>] <command>
221
230
  rake production restart
222
231
  rake demo staging deploy"
223
232
 
224
- puts "\nYou can use also command all Heroku apps for this project:
225
- rake all heroku:setup"
233
+ puts "\n\nYou can use also command all Heroku apps for this project:
234
+ rake all heroku:setup\n"
226
235
 
227
236
  exit(1)
228
237
  end
@@ -48,7 +48,7 @@ namespace :heroku do
48
48
  desc "Deploys, migrates and restarts latest code"
49
49
  task :deploy => "heroku:before_deploy" do
50
50
  HEROKU_RUNNER.each_heroku_app do |heroku_env, app_name, repo|
51
-
51
+ puts "\n\nDeploying to #{app_name}..."
52
52
  # set the current heroku_app so that callbacks can read the data
53
53
  @heroku_app = {:env => heroku_env, :app_name => app_name, :repo => repo}
54
54
  Rake::Task["heroku:before_each_deploy"].invoke
@@ -62,6 +62,7 @@ namespace :heroku do
62
62
  exit(1)
63
63
  end
64
64
  Rake::Task["heroku:after_each_deploy"].invoke
65
+ puts "\n"
65
66
  end
66
67
  Rake::Task["heroku:after_deploy"].execute
67
68
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Elijah Miller