lib/porter/railtie.rb in porter-1.2.3 vs lib/porter/railtie.rb in porter-1.2.4

- old
+ new

@@ -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