Skip to content

Commit

Permalink
Reorganizing gem to be heroku-rails
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacques Crocker committed Nov 1, 2010
1 parent 9f8ae6b commit 6211c62
Show file tree
Hide file tree
Showing 17 changed files with 303 additions and 239 deletions.
1 change: 1 addition & 0 deletions .rvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rvm use 1.8.7@heroku_rails_dev
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Heroku Rails
v0.0.1
============================================
Initial fork and reorganization


Heroku Sans
v0.2.0
============================================

Expand Down
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source :rubygems
gemspec

gem "ruby-debug", :platforms => :mri_18
gem "ruby-debug19", :platforms => :mri_19

gem "autotest", ">= 0"
gem "growl-glue", ">= 0"
57 changes: 40 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,20 +1,43 @@
Copyright (c) 2008 Elijah Miller
Heroku Rails License:
Copyright (c) 2010 Jacques Crocker

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Heroku Sans License:
Copyright (c) 2008 Elijah Miller

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
117 changes: 117 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
Heroku Rails
=============

Easier configuration and deployment of Rails apps on Heroku

Configure your Heroku environment via a YML file (config/heroku.yml) that defines all your environments, addons, and environment variables.

Heroku Rails also handles asset packaging (via jammit), deployment of assets to s3 (via jammit-s3).

## Install

### Rails 3

Add this to your Gemfile:

group :development do
gem 'heroku-rails'
end

### Rails 2

To install add the following to config/environment.rb:

config.gem 'heroku-rails'

Rake tasks are not automatically loaded from gems, so you’ll need to add the following to your Rakefile:

begin
require 'heroku/rails/tasks'
rescue LoadError
STDERR.puts "Run `rake gems:install` to install heroku-rails"
end

## Configure

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:

rake heroku:create_config

If this is a fresh project, heroku_san can create all the applications for
you, and set the RACK_ENV.

rake all heroku:create heroku:rack_env

## Usage

After configuring your Heroku apps you can use rake tasks to control the
apps.

rake production deploy

A rake task with the shorthand name of each app is now available and adds that
server to the list that subsequent commands will execute on. Because this list
is additive, you can easily select which servers to run a command on.

rake demo staging restart

A special rake task 'all' is created that causes any further commands to
execute on all heroku apps.

Manipulate collaborators on all this project's apps (prompts for email
address):

rake all heroku:share
rake all heroku:unshare

Need to add remotes for each app?

rake all heroku:remotes

A full list of tasks provided:

rake all # Select all Heroku apps for later command
rake console # Opens a remote console
rake deploy # Deploys, migrates and restarts latest code.
rake after_deploy # Callback run after the overall deploy
rake after_each_deploy # Callback run after each environment's deploy
rake before_deploy # Callback run before the overall deploy
rake before_each_deploy # Callback run before each environment's deploy
rake capture # Captures a bundle on Heroku
rake heroku:apps # Lists configured apps
rake heroku:create # Creates the Heroku app
rake heroku:create_config # Creates an example configuration file
rake heroku:gems # Generate the Heroku gems manifest from gem dependencies
rake heroku:remotes # Add git remotes for all apps in this project
rake heroku:rack_env # Add proper RACK_ENV to each application
rake heroku:share # Adds a collaborator
rake heroku:unshare # Removes a collaborator
rake migrate # Migrates and restarts remote servers
rake restart # Restarts remote servers

Frequently used tasks are not namespaced, everything else lives under heroku.

## About Heroku Rails

### Links

Homepage:: http://github.com/railsjedi/heroku-rails
Issue Tracker:: http://github.com/railsjedi/heroku-rails/issues

### License

License:: Copyright (c) 2010 [Jacques Crocker](mailto:railsjedi@gmail.com), released under the MIT license.

## Forked from Heroku Sans

Heroku Rails is a fork and rewrite/reorganiziation of Heroku Sans, and a nice simple set of Rake tasks for managing Heroku environments. Check out that project here: http://github.com/fastestforward/heroku_san

### Heroku Sans Contributors

* Elijah Miller (elijah.miller@gmail.com)
* Glenn Roberts (glenn.roberts@siyelo.com)
* Damien Mathieu (42@dmathieu.com)

### Heroku Sans License

License:: Copyright (c) 2009 Elijah Miller <mailto:elijah.miller@gmail.com>, released under the MIT license.
102 changes: 0 additions & 102 deletions README.rdoc

This file was deleted.

57 changes: 39 additions & 18 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,43 @@
require "bundler"
Bundler.setup

require 'rake'
require 'rake/gempackagetask'

gemspec = eval(File.read('heroku-rails.gemspec'))
Rake::GemPackageTask.new(gemspec) do |pkg|
pkg.gem_spec = gemspec
end

desc "build the gem and release it to rubygems.org"
task :release => :gem do
puts "Tagging #{gemspec.version}..."
system "git tag -a #{gemspec.version} -m 'Tagging #{gemspec.version}'"
puts "Pushing to Github..."
system "git push --tags"
puts "Pushing to rubygems.org..."
system "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
end

require "rspec"
require "rspec/core/rake_task"

begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "heroku_san"
gem.summary = %Q{A bunch of useful Rake tasks for managing your Heroku apps}
gem.description = %Q{Manage multiple Heroku instances/apps for a single Rails app using Rake}
gem.email = "elijah.miller@gmail.com"
gem.homepage = "http://github.com/glennr/heroku_san"
gem.authors = ["Elijah Miller", "Glenn Roberts"]
gem.files = Dir["{lib}/**/*", "VERSION", "LICENSE", "CHANGELOG", "TODO", "README.rdoc", "Rakefile"]
gem.extra_rdoc_files = []
gem.add_dependency("heroku")
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
Rspec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = "spec/**/*_spec.rb"
end

desc 'Default: build gem.'
task :default => :build
Rspec::Core::RakeTask.new('spec:progress') do |spec|
spec.rspec_opts = %w(--format progress)
spec.pattern = "spec/**/*_spec.rb"
end

require "rake/rdoctask"
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = "rdoc"
rdoc.title = "Heroku Rails #{gemspec.version}"
rdoc.rdoc_files.include("README*")
rdoc.rdoc_files.include("lib/**/*.rb")
end


task :default => :spec
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

Loading

0 comments on commit 6211c62

Please sign in to comment.