diff options
Diffstat (limited to 'ext/json/json.gemspec')
-rw-r--r-- | ext/json/json.gemspec | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/json/json.gemspec b/ext/json/json.gemspec index 9cd4ceee23..33d2140764 100644 --- a/ext/json/json.gemspec +++ b/ext/json/json.gemspec @@ -1,6 +1,10 @@ +version = File.foreach(File.join(__dir__, "lib/json/version.rb")) do |line| + /^\s*VERSION\s*=\s*'(.*)'/ =~ line and break $1 +end rescue nil + Gem::Specification.new do |s| s.name = "json" - s.version = File.read(File.expand_path('../VERSION', __FILE__)).chomp + s.version = version s.summary = "JSON Implementation for Ruby" s.description = "This is a JSON implementation as a Ruby extension in C." |