about summary refs log tree commit diff
path: root/lib/mastodon
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-04-27 15:22:19 +0200
committerGitHub <noreply@github.com>2017-04-27 15:22:19 +0200
commitb48c9013aa790b28e3427257e0e62f419bce2ddc (patch)
treeb56b0c9ec6516075216ceea8070edee49faec3e0 /lib/mastodon
parentb48f2cbc8b6b260a8d9b51a26e484a7da1694851 (diff)
Bump version, improve how version is stored for better commit history (#2526)
Diffstat (limited to 'lib/mastodon')
-rw-r--r--lib/mastodon/version.rb28
1 files changed, 27 insertions, 1 deletions
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index 51cf2e5f8..4ea9bab36 100644
--- a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -1,5 +1,31 @@
 # frozen_string_literal: true
 
 module Mastodon
-  VERSION = '1.2.2'
+  module Version
+    module_function
+
+    def major
+      1
+    end
+
+    def minor
+      3
+    end
+
+    def patch
+      0
+    end
+
+    def pre
+      nil
+    end
+
+    def to_a
+      [major, minor, patch, pre].compact
+    end
+
+    def to_s
+      to_a.join('.')
+    end
+  end
 end