Skip to content

Commit

Permalink
Merge pull request #560 from flori/unify-versions
Browse files Browse the repository at this point in the history
Unify versions
  • Loading branch information
hsbt committed Dec 5, 2023
2 parents da84ab4 + 113ade8 commit ed59dbb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ which = lambda { |c|
MAKE = ENV['MAKE'] || %w[gmake make].find(&which)
BUNDLE = ENV['BUNDLE'] || %w[bundle].find(&which)

PKG_VERSION = File.read('VERSION').chomp
PKG_VERSION = version = File.foreach(File.join(__dir__, "lib/json/version.rb")) do |line|
/^\s*VERSION\s*=\s*'(.*)'/ =~ line and break $1
end rescue nil

EXT_ROOT_DIR = 'ext/json/ext'
EXT_PARSER_DIR = "#{EXT_ROOT_DIR}/parser"
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

6 changes: 5 additions & 1 deletion json-java.gemspec
Original file line number Diff line number Diff line change
@@ -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

spec = Gem::Specification.new do |s|
s.name = "json"
s.version = File.read("VERSION").chomp
s.version = version

s.summary = "JSON Implementation for Ruby"
s.description = "A JSON implementation as a JRuby extension."
Expand Down
7 changes: 5 additions & 2 deletions json.gemspec
Original file line number Diff line number Diff line change
@@ -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 All @@ -15,7 +19,6 @@ Gem::Specification.new do |s|
"CHANGES.md",
"LICENSE",
"README.md",
"VERSION",
"ext/json/ext/fbuffer/fbuffer.h",
"ext/json/ext/generator/depend",
"ext/json/ext/generator/extconf.rb",
Expand Down
7 changes: 5 additions & 2 deletions json_pure.gemspec
Original file line number Diff line number Diff line change
@@ -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_pure".freeze
s.version = File.read("VERSION").chomp
s.version = version

s.summary = "JSON Implementation for Ruby".freeze
s.description = "This is a JSON implementation in pure Ruby.".freeze
Expand All @@ -14,7 +18,6 @@ Gem::Specification.new do |s|
"CHANGES.md".freeze,
"LICENSE".freeze,
"README.md".freeze,
"VERSION".freeze,
"json_pure.gemspec".freeze,
"lib/json.rb".freeze,
"lib/json/add/bigdecimal.rb".freeze,
Expand Down

0 comments on commit ed59dbb

Please sign in to comment.