Permalink
Browse files

Remove things moved to 3-0-stable

  • Loading branch information...
1 parent 2906830 commit 652c28a3c0e1f9a987c5e0a056b43a4867564262 @wycats committed Aug 3, 2010
Showing with 8 additions and 22 deletions.
  1. +8 −22 rails_upgrade.rb
View
@@ -55,7 +55,6 @@ def require_bundler
require "rails/all"
require "active_support/all"
-
require "rails_upgrade/action_view"
# This is needed because Rails 3 requires development.rb, while Rails 2.3
@@ -64,13 +63,6 @@ def self.config
Rails.application.config
end
-module Kernel
- def returning(value)
- yield value
- value
- end
-end
-
module Rails
module VERSION
class VersionFaker < ActiveSupport::BasicObject
@@ -99,27 +91,21 @@ def method_missing(meth, *args, &block)
end
end
- MAJOR = VersionFaker.new(MAJOR, 2)
- MINOR = VersionFaker.new(MINOR, 3)
- TINY = VersionFaker.new(TINY, 5)
+ def self.with_version(full_version)
+ new = full_version.split(".")
+ old = [MAJOR, MINOR, TINY]
+ class_eval "MAJOR, MINOR, TINY = #{new.inspect}"
+ yield
+ ensure
+ class_eval "MAJOR, MINOR, TINY = #{old.inspect}"
+ end
end
module Initializer
def self.run(&block)
klass = Class.new(Rails::Application)
klass.instance_exec(klass.config, &block)
- klass.config.autoload_paths << klass.root.join("lib")
- Object.const_set(:RAILS_ROOT, klass.root.to_s)
klass.initialize!
end
end
-
- class Boot
- def self.inherited(klass)
- Rails.module_eval do
- def self.boot!
- end
- end
- end
- end
end

0 comments on commit 652c28a

Please sign in to comment.