aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/CHANGELOG.md4
-rw-r--r--railties/lib/rails.rb4
-rw-r--r--railties/lib/rails/version.rb13
-rw-r--r--version.rb12
4 files changed, 16 insertions, 17 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index c9c1048150..891fabac90 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -17,10 +17,6 @@
*Gabe Kopley*
-* `Rails.version` now returns an instance of `Gem::Version`
-
- *Charlie Somerville*
-
* Don't generate a scaffold.css when --no-assets is specified
*Kevin Glowacz*
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb
index 84f8b82ad5..bb98bbe5bf 100644
--- a/railties/lib/rails.rb
+++ b/railties/lib/rails.rb
@@ -82,6 +82,10 @@ module Rails
groups
end
+ def version
+ VERSION::STRING
+ end
+
def public_path
application && Pathname.new(application.paths["public"].first)
end
diff --git a/railties/lib/rails/version.rb b/railties/lib/rails/version.rb
index d1d02e086d..47c21b112c 100644
--- a/railties/lib/rails/version.rb
+++ b/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
diff --git a/version.rb b/version.rb
index 367d0f6546..47c21b112c 100644
--- a/version.rb
+++ b/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