aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/gem_version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/lib/active_job/gem_version.rb')
-rw-r--r--activejob/lib/active_job/gem_version.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/activejob/lib/active_job/gem_version.rb b/activejob/lib/active_job/gem_version.rb
new file mode 100644
index 0000000000..c166020b28
--- /dev/null
+++ b/activejob/lib/active_job/gem_version.rb
@@ -0,0 +1,15 @@
+module ActiveJob
+ # Returns the version of the currently loaded ActiveJob 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