Add version method to top level modules

This commit is contained in:
Charlie Somerville 2013-03-20 20:42:05 +11:00
parent 70d0537d55
commit c07e1515f7
7 changed files with 48 additions and 42 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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