diff options
Diffstat (limited to 'lib/active_storage')
-rw-r--r-- | lib/active_storage/gem_version.rb | 15 | ||||
-rw-r--r-- | lib/active_storage/version.rb | 8 |
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/active_storage/gem_version.rb b/lib/active_storage/gem_version.rb new file mode 100644 index 0000000000..cde112a006 --- /dev/null +++ b/lib/active_storage/gem_version.rb @@ -0,0 +1,15 @@ +module ActiveStorage + # Returns the version of the currently loaded Active Storage as a <tt>Gem::Version</tt> + def self.gem_version + Gem::Version.new VERSION::STRING + end + + module VERSION + MAJOR = 0 + MINOR = 1 + TINY = 0 + PRE = "alpha" + + STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") + end +end diff --git a/lib/active_storage/version.rb b/lib/active_storage/version.rb new file mode 100644 index 0000000000..8f45480712 --- /dev/null +++ b/lib/active_storage/version.rb @@ -0,0 +1,8 @@ +require_relative "gem_version" + +module ActiveStorage + # Returns the version of the currently loaded ActiveStorage as a <tt>Gem::Version</tt> + def self.version + gem_version + end +end |