diff options
author | Jeremy Kemper <jeremykemper@gmail.com> | 2014-03-05 10:38:48 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremykemper@gmail.com> | 2014-03-05 10:38:48 -0700 |
commit | 9f84c7bc48dbcea3314943469358badc77b570b4 (patch) | |
tree | 238825fa3198c023afb6545693bfbedff6d917d8 /actionmailer/lib/action_mailer | |
parent | 058d3c6183ef6e0e878bea37f4fe3f8f0d6758e2 (diff) | |
parent | 2dd2fcf89673afbcf95240ecebaf34826a195164 (diff) | |
download | rails-9f84c7bc48dbcea3314943469358badc77b570b4.tar.gz rails-9f84c7bc48dbcea3314943469358badc77b570b4.tar.bz2 rails-9f84c7bc48dbcea3314943469358badc77b570b4.zip |
Merge pull request #14101 from sikachu/master-fix-versioning-task
Introduce `Rails.gem_version`
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r-- | actionmailer/lib/action_mailer/gem_version.rb | 15 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/version.rb | 11 |
2 files changed, 19 insertions, 7 deletions
diff --git a/actionmailer/lib/action_mailer/gem_version.rb b/actionmailer/lib/action_mailer/gem_version.rb new file mode 100644 index 0000000000..b564813ccf --- /dev/null +++ b/actionmailer/lib/action_mailer/gem_version.rb @@ -0,0 +1,15 @@ +module ActionMailer + # Returns the version of the currently loaded ActionMailer as a <tt>Gem::Version</tt> + def self.gem_version + Gem::Version.new VERSION::STRING + end + + module VERSION + MAJOR = 4 + MINOR = 2 + TINY = 0 + PRE = "alpha" + + STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") + end +end diff --git a/actionmailer/lib/action_mailer/version.rb b/actionmailer/lib/action_mailer/version.rb index 7b2cf305c2..a98aec913f 100644 --- a/actionmailer/lib/action_mailer/version.rb +++ b/actionmailer/lib/action_mailer/version.rb @@ -1,11 +1,8 @@ +require_relative 'gem_version' + module ActionMailer - # Returns the version of the currently loaded ActionMailer as a Gem::Version + # Returns the version of the currently loaded ActionMailer as a <tt>Gem::Version</tt> def self.version - Gem::Version.new "4.2.0.alpha" - end - - module VERSION #:nodoc: - MAJOR, MINOR, TINY, PRE = ActionMailer.version.segments - STRING = ActionMailer.version.to_s + gem_version end end |