diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2017-07-24 14:20:55 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2017-07-24 14:20:55 -0500 |
commit | 0e9eb11772ec74cc4b27761d4611c73b66063db5 (patch) | |
tree | 79b24513e20503f2d48a28112b8ef7157151bca3 /lib | |
parent | ef92cb0f5c7c5249576da8a9fb656adbced2e58c (diff) | |
download | rails-0e9eb11772ec74cc4b27761d4611c73b66063db5.tar.gz rails-0e9eb11772ec74cc4b27761d4611c73b66063db5.tar.bz2 rails-0e9eb11772ec74cc4b27761d4611c73b66063db5.zip |
Add standard version setup
Diffstat (limited to 'lib')
-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 |