heroku-rails 0.2.2 → 0.2.3
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/Gemfile.lock +1 -1
- data/heroku-rails.gemspec +1 -1
- data/lib/heroku/rails/heroku_config.rb +3 -3
- data/lib/heroku/rails/heroku_runner.rb +13 -4
- data/lib/heroku/rails/tasks.rb +2 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/heroku-rails.gemspec
CHANGED
@@ -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
|
-
|
20
|
+
apps.values
|
21
21
|
end
|
22
22
|
|
23
23
|
def app_environments
|
24
|
-
|
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 "
|
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
|
data/lib/heroku/rails/tasks.rb
CHANGED
@@ -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:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Elijah Miller
|