Browse files

Merge pull request #10002 from charliesome/revert-version-method-on-r…

…ails

Reverts changes to Rails.version made in #8501
  • Loading branch information...
2 parents c311447 + ceb3b87 commit ed8df3ff018d17fad123e48c7cb907332e72e7dc @jeremy jeremy committed Apr 1, 2013
Showing with 16 additions and 13 deletions.
  1. +4 −0 railties/lib/rails.rb
  2. +6 −7 railties/lib/rails/version.rb
  3. +6 −6 version.rb
View
4 railties/lib/rails.rb
@@ -82,6 +82,10 @@ def groups(*groups)
groups
end
+ def version
+ VERSION::STRING
+ end
+
def public_path
application && Pathname.new(application.paths["public"].first)
end
View
13 railties/lib/rails/version.rb
@@ -1,11 +1,10 @@
module Rails
- # Returns the version of the currently loaded Rails as a Gem::Version
- def self.version
- Gem::Version.new "4.0.0.beta1"
- end
+ module VERSION
+ MAJOR = 4
+ MINOR = 0
+ TINY = 0
+ PRE = "beta1"
- module VERSION #:nodoc:
- MAJOR, MINOR, TINY, PRE = Rails.version.segments
- STRING = Rails.version.to_s
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
end
View
12 version.rb
@@ -1,10 +1,10 @@
module Rails
- def self.version
- Gem::Version.new "4.0.0.beta1"
- end
+ module VERSION
+ MAJOR = 4
+ MINOR = 0
+ TINY = 0
+ PRE = "beta1"
- module VERSION #:nodoc:
- MAJOR, MINOR, TINY, PRE = Rails.version.segments
- STRING = Rails.version.to_s
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
end

0 comments on commit ed8df3f

Please sign in to comment.