Skip to content

Commit

Permalink
Merge pull request #42 from casperisfine/version
Browse files Browse the repository at this point in the history
Expose Date::VERSION
  • Loading branch information
hsbt authored Nov 17, 2021
2 parents d034d92 + fef7ec1 commit d5ddd76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion date.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# frozen_string_literal: true

version = File.foreach(File.expand_path("../lib/date.rb", __FILE__)).find do |line|
/^\s*VERSION\s*=\s*["'](.*)["']/ =~ line and break $1
end

Gem::Specification.new do |s|
s.name = "date"
s.version = '3.2.1'
s.version = version
s.summary = "A subclass of Object includes Comparable module for handling dates."
s.description = "A subclass of Object includes Comparable module for handling dates."

Expand Down
1 change: 1 addition & 0 deletions lib/date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require 'date_core'

class Date
VERSION = '3.2.1' # :nodoc:

def infinite?
false
Expand Down

0 comments on commit d5ddd76

Please sign in to comment.