mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add version method to top level modules
This commit is contained in:
parent
70d0537d55
commit
c07e1515f7
7 changed files with 48 additions and 42 deletions
|
@ -1,10 +1,11 @@
|
|||
module ActionMailer
|
||||
module VERSION #:nodoc:
|
||||
MAJOR = 4
|
||||
MINOR = 0
|
||||
TINY = 0
|
||||
PRE = "beta1"
|
||||
# Returns the version of the currently loaded ActionMailer as a Gem::Version
|
||||
def self.version
|
||||
Gem::Version.new "4.0.0.beta1"
|
||||
end
|
||||
|
||||
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
||||
module VERSION #:nodoc:
|
||||
MAJOR, MINOR, TINY, PRE = ActionMailer.version.segments
|
||||
STRING = ActionMailer.version.to_s
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
module ActionPack
|
||||
module VERSION #:nodoc:
|
||||
MAJOR = 4
|
||||
MINOR = 0
|
||||
TINY = 0
|
||||
PRE = "beta1"
|
||||
# Returns the version of the currently loaded ActionPack as a Gem::Version
|
||||
def self.version
|
||||
Gem::Version.new "4.0.0.beta1"
|
||||
end
|
||||
|
||||
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
||||
module VERSION #:nodoc:
|
||||
MAJOR, MINOR, TINY, PRE = ActionPack.version.segments
|
||||
STRING = ActionPack.version.to_s
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
module ActiveModel
|
||||
module VERSION #:nodoc:
|
||||
MAJOR = 4
|
||||
MINOR = 0
|
||||
TINY = 0
|
||||
PRE = "beta1"
|
||||
# Returns the version of the currently loaded ActiveModel as a Gem::Version
|
||||
def self.version
|
||||
Gem::Version.new "4.0.0.beta1"
|
||||
end
|
||||
|
||||
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
||||
module VERSION #:nodoc:
|
||||
MAJOR, MINOR, TINY, PRE = ActiveModel.version.segments
|
||||
STRING = ActiveModel.version.to_s
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
module ActiveRecord
|
||||
module VERSION #:nodoc:
|
||||
MAJOR = 4
|
||||
MINOR = 0
|
||||
TINY = 0
|
||||
PRE = "beta1"
|
||||
# Returns the version of the currently loaded ActiveRecord as a Gem::Version
|
||||
def self.version
|
||||
Gem::Version.new "4.0.0.beta1"
|
||||
end
|
||||
|
||||
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
||||
module VERSION #:nodoc:
|
||||
MAJOR, MINOR, TINY, PRE = ActiveRecord.version.segments
|
||||
STRING = ActiveRecord.version.to_s
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
module ActiveSupport
|
||||
module VERSION #:nodoc:
|
||||
MAJOR = 4
|
||||
MINOR = 0
|
||||
TINY = 0
|
||||
PRE = "beta1"
|
||||
# Returns the version of the currently loaded ActiveSupport as a Gem::Version
|
||||
def self.version
|
||||
Gem::Version.new "4.0.0.beta1"
|
||||
end
|
||||
|
||||
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
||||
module VERSION #:nodoc:
|
||||
MAJOR, MINOR, TINY, PRE = ActiveSupport.version.segments
|
||||
STRING = ActiveSupport.version.to_s
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
module Rails
|
||||
module VERSION #:nodoc:
|
||||
MAJOR = 4
|
||||
MINOR = 0
|
||||
TINY = 0
|
||||
PRE = "beta1"
|
||||
# Returns the version of the currently loaded Rails as a Gem::Version
|
||||
def self.version
|
||||
Gem::Version.new "4.0.0.beta1"
|
||||
end
|
||||
|
||||
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
||||
module VERSION #:nodoc:
|
||||
MAJOR, MINOR, TINY, PRE = Rails.version.segments
|
||||
STRING = Rails.version.to_s
|
||||
end
|
||||
end
|
||||
|
|
12
version.rb
12
version.rb
|
@ -1,10 +1,10 @@
|
|||
module Rails
|
||||
module VERSION #:nodoc:
|
||||
MAJOR = 4
|
||||
MINOR = 0
|
||||
TINY = 0
|
||||
PRE = "beta1"
|
||||
def self.version
|
||||
Gem::Version.new "4.0.0.beta1"
|
||||
end
|
||||
|
||||
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
||||
module VERSION #:nodoc:
|
||||
MAJOR, MINOR, TINY, PRE = Rails.version.segments
|
||||
STRING = Rails.version.to_s
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue