Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify versions #560

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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