Skip to content

Commit

Permalink
[flori/json] Detect json version from version.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 5, 2023
1 parent 84654bf commit bf53684
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 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."
Expand Down

0 comments on commit bf53684

Please sign in to comment.