Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
Add railtie support for Rails 2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjohnston committed Oct 16, 2013
1 parent 462a9d8 commit 252bf9a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ The Porter Ruby gem is comprised of Capistrano and Rake tasks that make cloning
* A Rails app
* rsync (locally and remotely, if you want to sync assets)

### If you're running Rails 2.3

Add `require "porter"` to your Rakefile.

## Capistrano Multistage (capistrano-ext)

As of v1.1.0, Porter expects that your Capistrano setup utilizes the Capistrano Multistage Extension (capistrano-ext). This is a really great way to manage the various "stages" you deploy to and Porter is opinionated in that it requires you to organize your stage-specific settings into the Capistrano Multistage pattern.
Expand All @@ -18,7 +22,7 @@ More on the Capistrano Multistage Extension:

## Installation

* Add gem "porter", "~> 1.2.2" to your Gemfile
* Add gem "porter", "~> 1.2.4" to your Gemfile
* Run: bundle install
* Run: rails g porter
* Add require "porter/capistrano" to your config/deploy.rb
Expand Down
19 changes: 10 additions & 9 deletions lib/porter/railtie.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
require "porter"
require "rails"

module Porter
class Railtie < Rails::Railtie
railtie_name :porter

rake_tasks do
load "tasks/porter.rake"
if defined?(Rails)
if Rails.version < "3"
load "tasks/porter.rake"
else
module PgbackupsArchive
class Railtie < Rails::Railtie
rake_tasks do
load "tasks/porter.rake"
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/porter/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Porter
VERSION = "1.2.3"
VERSION = "1.2.4"
end

0 comments on commit 252bf9a

Please sign in to comment.