From 113ade8f176f2665033cb9a36bbbbe2feac0b866 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 5 Dec 2023 11:23:47 +0900 Subject: [PATCH] Removed obsoleted version definition --- Rakefile | 4 +++- VERSION | 1 - json.gemspec | 1 - json_pure.gemspec | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 VERSION diff --git a/Rakefile b/Rakefile index c61016ef..1292d040 100644 --- a/Rakefile +++ b/Rakefile @@ -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" diff --git a/VERSION b/VERSION deleted file mode 100644 index 24ba9a38..00000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.7.0 diff --git a/json.gemspec b/json.gemspec index 33d21407..64d0c813 100644 --- a/json.gemspec +++ b/json.gemspec @@ -19,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", diff --git a/json_pure.gemspec b/json_pure.gemspec index 26f1fb3a..c0ebc41e 100644 --- a/json_pure.gemspec +++ b/json_pure.gemspec @@ -18,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,