summaryrefslogtreecommitdiff
path: root/ext/date/date.gemspec
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/date.gemspec')
-rw-r--r--ext/date/date.gemspec7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/date/date.gemspec b/ext/date/date.gemspec
index 6b775d6f7e..cf07696976 100644
--- a/ext/date/date.gemspec
+++ b/ext/date/date.gemspec
@@ -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.1.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."