Skip to content

Commit 189ef11

Browse files
committed
Provide a better interface to gem version
1 parent 450b1d1 commit 189ef11

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

ajax-datatables-rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require_relative 'lib/ajax-datatables-rails/version'
44

55
Gem::Specification.new do |s|
66
s.name = 'ajax-datatables-rails'
7-
s.version = AjaxDatatablesRails::VERSION
7+
s.version = AjaxDatatablesRails::VERSION::STRING
88
s.platform = Gem::Platform::RUBY
99
s.authors = ['Joel Quenneville', 'Antonio Antillon']
1010
s.email = ['joel.quenneville@collegeplus.org', 'antillas21@gmail.com']

lib/ajax-datatables-rails/version.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# frozen_string_literal: true
22

33
module AjaxDatatablesRails
4-
VERSION = '1.1.0'
4+
5+
def self.gem_version
6+
Gem::Version.new VERSION::STRING
7+
end
8+
9+
module VERSION
10+
MAJOR = 1
11+
MINOR = 1
12+
TINY = 0
13+
PRE = nil
14+
15+
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
16+
end
517
end

0 commit comments

Comments
 (0)