heroku_san 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -0
- data/VERSION +1 -1
- data/lib/heroku_san/tasks.rb +25 -8
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -76,6 +76,8 @@ A full list of tasks provided:
|
|
76
76
|
rake heroku:create # Creates the Heroku app
|
77
77
|
rake heroku:create_config # Creates an example configuration file
|
78
78
|
rake heroku:gems # Generate the Heroku gems manifest from gem dependencies
|
79
|
+
rake heroku:maintenance # Enable maintenance mode
|
80
|
+
rake heroku:maintenance_off# Disable maintenance mode
|
79
81
|
rake heroku:push # Pushes the given commit (default: HEAD)
|
80
82
|
rake heroku:push:force # Force-pushes the given commit (default: HEAD)
|
81
83
|
rake heroku:remotes # Add git remotes for all apps in this project
|
@@ -103,6 +105,7 @@ Issue Tracker:: http://github.com/fastestforward/heroku_san/issues
|
|
103
105
|
* Peter Jaros
|
104
106
|
* Lee Semel
|
105
107
|
* Michael Haddad (michael@ludditetechnology.com)
|
108
|
+
* Les Hill (leshill@gmail.com)
|
106
109
|
|
107
110
|
== License
|
108
111
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.6
|
data/lib/heroku_san/tasks.rb
CHANGED
@@ -2,15 +2,15 @@ HEROKU_CONFIG_FILE = Rails.root.join('config', 'heroku.yml')
|
|
2
2
|
|
3
3
|
HEROKU_SETTINGS =
|
4
4
|
if File.exists?(HEROKU_CONFIG_FILE)
|
5
|
-
YAML.load_file(HEROKU_CONFIG_FILE)
|
5
|
+
YAML.load_file(HEROKU_CONFIG_FILE)
|
6
6
|
else
|
7
|
-
{}
|
7
|
+
{}
|
8
8
|
end
|
9
9
|
|
10
10
|
(HEROKU_SETTINGS['apps'] || []).each do |name, app|
|
11
11
|
desc "Select #{name} Heroku app for later commands"
|
12
12
|
task name do
|
13
|
-
@heroku_apps ||= []
|
13
|
+
@heroku_apps ||= []
|
14
14
|
@heroku_apps << name
|
15
15
|
end
|
16
16
|
end
|
@@ -33,7 +33,7 @@ namespace :heroku do
|
|
33
33
|
RAILS_ENV='production'
|
34
34
|
Rake::Task[:environment].invoke
|
35
35
|
gems = Rails.configuration.gems.reject { |g| g.frozen? && !g.framework_gem? }
|
36
|
-
list = gems.collect do |g|
|
36
|
+
list = gems.collect do |g|
|
37
37
|
command, *options = g.send(:install_command)
|
38
38
|
options.join(" ")
|
39
39
|
end
|
@@ -51,7 +51,7 @@ namespace :heroku do
|
|
51
51
|
system("git remote add #{name} #{repo}")
|
52
52
|
end
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
desc 'Adds a collaborator'
|
56
56
|
task :share do
|
57
57
|
print "Email address of collaborator to add: "
|
@@ -80,7 +80,7 @@ namespace :heroku do
|
|
80
80
|
puts
|
81
81
|
end
|
82
82
|
end
|
83
|
-
|
83
|
+
|
84
84
|
desc 'Add proper RACK_ENV to each application'
|
85
85
|
task :rack_env => :all do
|
86
86
|
each_heroku_app do |name, app, repo|
|
@@ -92,7 +92,7 @@ namespace :heroku do
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
desc 'Creates an example configuration file'
|
97
97
|
task :create_config do
|
98
98
|
example = File.join(File.dirname(__FILE__), '..', 'templates', 'heroku.example.yml')
|
@@ -128,6 +128,19 @@ namespace :heroku do
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
+
desc "Enable maintenance mode"
|
132
|
+
task :maintenance do
|
133
|
+
each_heroku_app do |name, app, repo|
|
134
|
+
maintenance(app, 'on')
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
desc "Disable maintenance mode"
|
139
|
+
task :maintenance_off do
|
140
|
+
each_heroku_app do |name, app, repo|
|
141
|
+
maintenance(app, 'off')
|
142
|
+
end
|
143
|
+
end
|
131
144
|
end
|
132
145
|
|
133
146
|
desc "Pushes the given commit, migrates and restarts (default: HEAD)"
|
@@ -232,7 +245,7 @@ def each_heroku_app
|
|
232
245
|
|
233
246
|
puts "\nYou can use also command all Heroku apps for this project:
|
234
247
|
rake all heroku:share"
|
235
|
-
|
248
|
+
|
236
249
|
exit(1)
|
237
250
|
end
|
238
251
|
end
|
@@ -252,3 +265,7 @@ def migrate(app)
|
|
252
265
|
sh "heroku rake --app #{app} db:migrate"
|
253
266
|
sh "heroku restart --app #{app}"
|
254
267
|
end
|
268
|
+
|
269
|
+
def maintenance(app, action)
|
270
|
+
sh "heroku maintenance:#{action} --app #{app}"
|
271
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_san
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 6
|
10
|
+
version: 1.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Elijah Miller
|