jw-heroku-rails 0.4.6

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.
@@ -0,0 +1,38 @@
1
+ Heroku Rails
2
+
3
+ v0.4.4
4
+ ============================================
5
+ Fix heroku rake
6
+ Upgrade heroku authorization
7
+ Fix deprecation warning
8
+
9
+ v0.2.0
10
+ ============================================
11
+ Added Heroku Settings tasks, and rails generators
12
+
13
+ Cleaned out lots of tasks that are now handled by editing config/heroku.yml and running `rake heroku:setup`
14
+
15
+ Namespaced tasks such as heroku:deploy, heroku:console, etc. The only top level task now is `rake all ...` which sets all the environments. Individual environment tasks (e.g. `rake production ...`) are still generated without a namespace.
16
+
17
+
18
+ v0.0.1
19
+ ============================================
20
+ Initial fork and reorganization
21
+
22
+
23
+ Heroku Sans
24
+ v0.2.0
25
+ ============================================
26
+
27
+ Elijah Miller
28
+ Fix newline error in gem manifest
29
+ Improve instructions
30
+
31
+ Glenn Roberts
32
+ Gem-ify it
33
+ Improve generation of gems manifest
34
+
35
+
36
+ v0.0.1.
37
+ ============================================
38
+ Initial release.
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source :rubygems
2
+ gemspec
3
+
4
+ gem "ruby-debug", :platforms => :mri_18
5
+ gem "ruby-debug19", :platforms => :mri_19
6
+
7
+ gem "autotest", ">= 0"
8
+ gem "growl-glue", ">= 0"
9
+ gem "rdoc"
@@ -0,0 +1,67 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ jw-heroku-rails (0.4.6)
5
+ heroku-api (>= 0.3.8)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ ZenTest (4.9.0)
11
+ archive-tar-minitar (0.5.2)
12
+ autotest (4.4.6)
13
+ ZenTest (>= 4.4.1)
14
+ columnize (0.3.6)
15
+ diff-lcs (1.2.1)
16
+ excon (0.16.10)
17
+ growl-glue (1.0.7)
18
+ hoe (>= 1.8.2)
19
+ heroku-api (0.3.8)
20
+ excon (~> 0.16.10)
21
+ hoe (3.5.1)
22
+ rake (>= 0.8, < 11.0)
23
+ json (1.7.7)
24
+ linecache (0.46)
25
+ rbx-require-relative (> 0.0.4)
26
+ linecache19 (0.5.12)
27
+ ruby_core_source (>= 0.1.4)
28
+ rake (0.9.6)
29
+ rbx-require-relative (0.0.9)
30
+ rdoc (4.0.0)
31
+ json (~> 1.4)
32
+ rspec (2.13.0)
33
+ rspec-core (~> 2.13.0)
34
+ rspec-expectations (~> 2.13.0)
35
+ rspec-mocks (~> 2.13.0)
36
+ rspec-core (2.13.1)
37
+ rspec-expectations (2.13.0)
38
+ diff-lcs (>= 1.1.3, < 2.0)
39
+ rspec-mocks (2.13.0)
40
+ ruby-debug (0.10.4)
41
+ columnize (>= 0.1)
42
+ ruby-debug-base (~> 0.10.4.0)
43
+ ruby-debug-base (0.10.4)
44
+ linecache (>= 0.3)
45
+ ruby-debug-base19 (0.11.25)
46
+ columnize (>= 0.3.1)
47
+ linecache19 (>= 0.5.11)
48
+ ruby_core_source (>= 0.1.4)
49
+ ruby-debug19 (0.11.6)
50
+ columnize (>= 0.3.1)
51
+ linecache19 (>= 0.5.11)
52
+ ruby-debug-base19 (>= 0.11.19)
53
+ ruby_core_source (0.1.5)
54
+ archive-tar-minitar (>= 0.5.2)
55
+
56
+ PLATFORMS
57
+ ruby
58
+
59
+ DEPENDENCIES
60
+ autotest
61
+ growl-glue
62
+ jw-heroku-rails!
63
+ rake (~> 0.9.2)
64
+ rdoc
65
+ rspec (~> 2.0)
66
+ ruby-debug
67
+ ruby-debug19
data/LICENSE ADDED
@@ -0,0 +1,43 @@
1
+ Heroku Rails License:
2
+ Copyright (c) 2010 Jacques Crocker
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ Heroku Sans License:
24
+ Copyright (c) 2008 Elijah Miller
25
+
26
+ Permission is hereby granted, free of charge, to any person obtaining
27
+ a copy of this software and associated documentation files (the
28
+ "Software"), to deal in the Software without restriction, including
29
+ without limitation the rights to use, copy, modify, merge, publish,
30
+ distribute, sublicense, and/or sell copies of the Software, and to
31
+ permit persons to whom the Software is furnished to do so, subject to
32
+ the following conditions:
33
+
34
+ The above copyright notice and this permission notice shall be
35
+ included in all copies or substantial portions of the Software.
36
+
37
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
39
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
41
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
42
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
43
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,196 @@
1
+ Heroku Rails
2
+ =============
3
+
4
+ Easier configuration and deployment of Rails apps on Heroku
5
+
6
+ Configure your Heroku environment via a YML file (config/heroku.yml) that defines all your environments, addons, and environment variables.
7
+
8
+ Heroku Rails also handles asset packaging (via jammit), deployment of assets to s3 (via jammit-s3).
9
+
10
+ ## Install
11
+
12
+ ### Rails 3
13
+
14
+ Add this to your Gemfile:
15
+
16
+ group :development do
17
+ gem 'heroku-rails'
18
+ end
19
+
20
+ ### Rails 2
21
+
22
+ To install add the following to config/environment.rb:
23
+
24
+ config.gem 'heroku-rails'
25
+
26
+ Rake tasks are not automatically loaded from gems, so you’ll need to add the following to your Rakefile:
27
+
28
+ begin
29
+ require 'heroku/rails/tasks'
30
+ rescue LoadError
31
+ STDERR.puts "Run `rake gems:install` to install heroku-rails"
32
+ end
33
+
34
+ ## Configure
35
+
36
+ In config/heroku.yml you will need add the Heroku apps that you would like to attach to this project. You can generate this file and edit it by running:
37
+
38
+ rails generate heroku:config
39
+
40
+ ### Example Configuration File
41
+
42
+ apps:
43
+ production: awesomeapp
44
+ staging: awesomeapp-staging
45
+ legacy: awesomeapp-legacy
46
+
47
+ stacks:
48
+ all: bamboo-mri-1.9.2
49
+ legacy: bamboo-ree-1.8.7
50
+
51
+ config:
52
+ all:
53
+ BUNDLE_WITHOUT: "test:development"
54
+ production:
55
+ MONGODB_URI: "mongodb://[username:password@]host1[:port1][/database]"
56
+ staging:
57
+ MONGODB_URI: "mongodb://[username:password@]host1[:port1][/database]"
58
+
59
+ collaborators:
60
+ all:
61
+ - "heroku1@somedomain.com"
62
+ - "heroku2@somedomain.com"
63
+
64
+ domains:
65
+ production:
66
+ - "awesomeapp.com"
67
+ - "www.awesomeapp.com"
68
+
69
+ addons:
70
+ all:
71
+ - newrelic:bronze
72
+ # add any other addons here
73
+
74
+ production:
75
+ - ssl:piggyback
76
+ - cron:daily
77
+ # list production env specific addons here
78
+
79
+
80
+ ### Setting up Heroku
81
+
82
+ To set heroku up (using your heroku.yml), just run.
83
+
84
+ rake all heroku:setup
85
+
86
+ This will create the heroku apps you have defined, and create the settings for each.
87
+
88
+ Run `rake heroku:setup` every time you edit the heroku.yml. It will only make incremental changes (based on what you've added/removed). If nothing has changed in the heroku.yml since the last `heroku:setup`, then no heroku changes will be sent.
89
+
90
+
91
+ ## Usage
92
+
93
+ After configuring your Heroku apps you can use rake tasks to control the
94
+ apps.
95
+
96
+ rake production heroku:deploy
97
+
98
+ A rake task with the shorthand name of each app is now available and adds that
99
+ server to the list that subsequent commands will execute on. Because this list
100
+ is additive, you can easily select which servers to run a command on.
101
+
102
+ rake demo staging heroku:restart
103
+
104
+ A special rake task 'all' is created that causes any further commands to
105
+ execute on all heroku apps.
106
+
107
+ Need to add remotes for each app?
108
+
109
+ rake all heroku:remotes
110
+
111
+ A full list of tasks provided:
112
+
113
+ rake all # Select all Heroku apps for later command
114
+ rake heroku:deploy # Deploys, migrates and restarts latest code.
115
+ rake heroku:apps # Lists configured apps
116
+ rake heroku:info # Queries the heroku status info on each app
117
+ rake heroku:console # Opens a remote console
118
+ rake heroku:capture # Captures a bundle on Heroku
119
+ rake heroku:remotes # Add git remotes for all apps in this project
120
+ rake heroku:migrate # Migrates and restarts remote servers
121
+ rake heroku:restart # Restarts remote servers
122
+
123
+ rake heroku:setup # runs all heroku setup scripts
124
+ rake heroku:setup:addons # sets up the heroku addons
125
+ rake heroku:setup:collaborators # sets up the heroku collaborators
126
+ rake heroku:setup:config # sets up the heroku config env variables
127
+ rake heroku:setup:domains # sets up the heroku domains
128
+ rake heroku:setup:stacks # sets the correct stack for each heroku app
129
+
130
+ rake heroku:db:setup # Migrates and restarts remote servers
131
+
132
+ You can easily alias frequently used tasks within your application's Rakefile:
133
+
134
+ task :deploy => ["heroku:deploy"]
135
+ task :console => ["heroku:console"]
136
+ task :capture => ["heroku:capture"]
137
+
138
+ With this in place, you can be a bit more terse:
139
+
140
+ rake staging console
141
+ rake all deploy
142
+
143
+ ### Deploy Hooks
144
+
145
+ You can easily hook into the deploy process by defining any of the following rake tasks.
146
+
147
+ When you ran `rails generate heroku:config`, it created a list of empty rake tasks within lib/tasks/heroku.rake. Edit these rake tasks to provide custom logic for before/after deployment.
148
+
149
+ namespace :heroku do
150
+ # runs before all the deploys complete
151
+ task :before_deploy do
152
+
153
+ end
154
+
155
+ # runs before each push to a particular heroku deploy environment
156
+ task :before_each_deploy do
157
+
158
+ end
159
+
160
+ # runs after each push to a particular heroku deploy environment
161
+ task :after_each_deploy do
162
+
163
+ end
164
+
165
+ # runs after all the deploys complete
166
+ task :after_deploy do
167
+
168
+ end
169
+ end
170
+
171
+
172
+ ## About Heroku Rails
173
+
174
+ ### Links
175
+
176
+ Homepage:: <http://github.com/railsjedi/heroku-rails>
177
+
178
+ Issue Tracker:: <http://github.com/railsjedi/heroku-rails/issues>
179
+
180
+ ### License
181
+
182
+ License:: Copyright (c) 2010 Jacques Crocker <railsjedi@gmail.com> released under the MIT license.
183
+
184
+ ## Forked from Heroku Sans
185
+
186
+ Heroku Rails is a fork and rewrite/reorganiziation of the heroku_sans gem. Heroku Sans is a simple and elegant set of Rake tasks for managing Heroku environments. Check out that project here: <http://github.com/fastestforward/heroku_san>
187
+
188
+ ### Heroku Sans Contributors
189
+
190
+ * Elijah Miller (elijah.miller@gmail.com)
191
+ * Glenn Roberts (glenn.roberts@siyelo.com)
192
+ * Damien Mathieu (42@dmathieu.com)
193
+
194
+ ### Heroku Sans License
195
+
196
+ License:: Copyright (c) 2009 Elijah Miller <elijah.miller@gmail.com>, released under the MIT license.
@@ -0,0 +1,43 @@
1
+ require "bundler"
2
+ Bundler.setup
3
+
4
+ require 'rake'
5
+ require 'rubygems/package_task'
6
+
7
+ gemspec = eval(File.read('heroku-rails.gemspec'))
8
+ Gem::PackageTask.new(gemspec) do |pkg|
9
+ pkg.gem_spec = gemspec
10
+ end
11
+
12
+ desc "build the gem and release it to rubygems.org"
13
+ task :release => :gem do
14
+ puts "Tagging #{gemspec.version}..."
15
+ system "git tag -a #{gemspec.version} -m 'Tagging #{gemspec.version}'"
16
+ puts "Pushing to Github..."
17
+ system "git push --tags"
18
+ puts "Pushing to rubygems.org..."
19
+ system "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
20
+ end
21
+
22
+ require "rspec"
23
+ require "rspec/core/rake_task"
24
+
25
+ RSpec::Core::RakeTask.new(:spec) do |spec|
26
+ spec.pattern = "spec/**/*_spec.rb"
27
+ end
28
+
29
+ RSpec::Core::RakeTask.new('spec:progress') do |spec|
30
+ spec.rspec_opts = %w(--format progress)
31
+ spec.pattern = "spec/**/*_spec.rb"
32
+ end
33
+
34
+ require "rdoc/task"
35
+ RDoc::Task.new do |rdoc|
36
+ rdoc.rdoc_dir = "rdoc"
37
+ rdoc.title = "Heroku Rails #{gemspec.version}"
38
+ rdoc.rdoc_files.include("README*")
39
+ rdoc.rdoc_files.include("lib/**/*.rb")
40
+ end
41
+
42
+
43
+ task :default => :spec
data/TODO ADDED
@@ -0,0 +1,5 @@
1
+ √ refactor config/helpers out of tasks.rb into own file(s)
2
+ √ add config setup tasks (DONE)
3
+ √ add proper rails3 generator support
4
+ √ add hooks to allow other precompilations before deploy
5
+ - add sass/coffeescript precompile + jammit-s3 support
@@ -0,0 +1,37 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "jw-heroku-rails"
3
+ s.version = "0.4.6"
4
+
5
+ s.authors = ["Jeff Whitmire", "Elijah Miller", "Glenn Roberts", "Jacques Crocker"]
6
+ s.summary = "Deployment and configuration tools for Heroku/Rails"
7
+ s.description = "Manage multiple Heroku instances/apps for a single Rails app using Rake. It's the Capistrano for Heroku, without the suck."
8
+
9
+ s.email = "jeff@jwhitmire.com"
10
+ s.homepage = "http://github.com/jwhitmire/heroku-rails"
11
+ s.rubyforge_project = "none"
12
+
13
+ s.require_paths = ["lib"]
14
+ s.files = Dir['lib/**/*',
15
+ 'spec/**/*',
16
+ 'heroku-rails.gemspec',
17
+ 'Gemfile',
18
+ 'Gemfile.lock',
19
+ 'CHANGELOG',
20
+ 'LICENSE',
21
+ 'Rakefile',
22
+ 'README.md',
23
+ 'TODO']
24
+
25
+ s.test_files = Dir['spec/**/*']
26
+ s.rdoc_options = ["--charset=UTF-8"]
27
+ s.extra_rdoc_files = [
28
+ "LICENSE",
29
+ "README.md",
30
+ "TODO",
31
+ "CHANGELOG"
32
+ ]
33
+
34
+ s.add_runtime_dependency "heroku-api", ">= 0.3.8"
35
+ s.add_development_dependency "rspec", "~> 2.0"
36
+ s.add_development_dependency "rake", "~> 0.9.2"
37
+ end