Skip to content

Commit

Permalink
Semantic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
tawan committed Feb 6, 2016
1 parent 16e1a1f commit 0f6d04e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion active-elastic-job.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require 'active_elastic_job/version'
Gem::Specification.new do |spec|
spec.platform = Gem::Platform::RUBY
spec.name = 'active_elastic_job'
spec.version = ActiveElasticJob::VERSION
spec.version = ActiveElasticJob.version
spec.authors = ['Tawan Sierek']
spec.email = ['tawan@sierek.com']
spec.summary = 'Active Elastic Job is a simple to use Active Job backend for Rails applications deployed on the Amazon Elastic Beanstalk platform.'
Expand Down
17 changes: 16 additions & 1 deletion lib/active_elastic_job/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
module ActiveElasticJob
VERSION = '1.2.1'
module VERSION
MAJOR = 1
MINOR = 2
TINY = 1
PRE = nil

STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')

def self.to_s
STRING
end
end

def self.version
VERSION::STRING
end
end
2 changes: 1 addition & 1 deletion spec/active_elastic_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

describe ActiveElasticJob do
it 'has a version' do
expect(ActiveElasticJob::VERSION).to be_a(String)
expect(ActiveElasticJob.version).to be_a(String)
end
end

0 comments on commit 0f6d04e

Please sign in to comment.