From 4c11a40c1f0de83b5c39877f40143fe8a5e512cd Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 30 Jun 2020 20:19:48 +0900 Subject: [PATCH 1/4] Removed task for json_pure.gemspec --- Rakefile | 44 -------------------------------------------- json_pure.gemspec | 2 -- 2 files changed, 46 deletions(-) diff --git a/Rakefile b/Rakefile index 0945a67c..8e9fd7ca 100644 --- a/Rakefile +++ b/Rakefile @@ -78,50 +78,6 @@ task :install_ext => [ :compile, :install_pure, :install_ext_really ] desc "Installing library (extension)" task :install => :install_ext -if defined?(Gem) and defined?(Gem::PackageTask) - spec_pure = Gem::Specification.new do |s| - s.name = 'json_pure' - s.version = PKG_VERSION - s.summary = PKG_TITLE - s.description = "This is a JSON implementation in pure Ruby." - - s.files = PKG_FILES - - s.require_path = 'lib' - s.add_development_dependency 'rake' - s.add_development_dependency 'test-unit', '>= 2.0', '< 4.0' - - s.extra_rdoc_files << 'README.md' - s.rdoc_options << - '--title' << 'JSON implemention for ruby' << '--main' << 'README.md' - s.test_files.concat Dir['./tests/test_*.rb'] - - s.author = "Florian Frank" - s.email = "flori@ping.de" - s.homepage = "http://flori.github.com/#{PKG_NAME}" - s.license = 'Ruby' - s.required_ruby_version = '>= 2.0' - end - - desc 'Creates a json_pure.gemspec file' - task :gemspec_pure => :version do - File.open('json_pure.gemspec', 'w') do |gemspec| - src = spec_pure.to_ruby - src.gsub!(/# stub:.*/, "# This gemspec is generated automatically using `rake gemspec`.\n" \ - "# Do not modify directly.") - gemspec.write src - end - end - - Gem::PackageTask.new(spec_pure) do |pkg| - pkg.need_tar = true - pkg.package_files = PKG_FILES - end - - desc 'Alias for gemspec_pure' - task :gemspec => [ :gemspec_pure ] -end - desc m = "Writing version information for #{PKG_VERSION}" task :version do puts m diff --git a/json_pure.gemspec b/json_pure.gemspec index 7b4114af..ecd18314 100644 --- a/json_pure.gemspec +++ b/json_pure.gemspec @@ -1,6 +1,4 @@ # -*- encoding: utf-8 -*- -# This gemspec is generated automatically using `rake gemspec`. -# Do not modify directly. Gem::Specification.new do |s| s.name = "json_pure".freeze From dc90bcf240fe8059157e6e37cd52944e64523266 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 30 Jun 2020 20:21:16 +0900 Subject: [PATCH 2/4] Removed explicitly date field in gemspec, it will assign by rubygems.org --- json_pure.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/json_pure.gemspec b/json_pure.gemspec index ecd18314..8203a7fc 100644 --- a/json_pure.gemspec +++ b/json_pure.gemspec @@ -7,7 +7,6 @@ Gem::Specification.new do |s| s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Florian Frank".freeze] - s.date = "2020-06-25" s.description = "This is a JSON implementation in pure Ruby.".freeze s.email = "flori@ping.de".freeze s.extra_rdoc_files = ["README.md".freeze] From 9fd637107f1267726acee108e88e21dc773f137e Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 30 Jun 2020 20:23:49 +0900 Subject: [PATCH 3/4] Use VERSION file instead of hard-coded value --- json_pure.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json_pure.gemspec b/json_pure.gemspec index 8203a7fc..007acd36 100644 --- a/json_pure.gemspec +++ b/json_pure.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = "json_pure".freeze - s.version = "2.3.0" + s.version = File.read("VERSION").chomp s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] From cee8020dc8a3c33936149667ada3f017d396ade7 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 30 Jun 2020 20:35:07 +0900 Subject: [PATCH 4/4] Removed gemspec task from default task on Rakefile --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 8e9fd7ca..5b422926 100644 --- a/Rakefile +++ b/Rakefile @@ -331,4 +331,4 @@ else end desc "Compile in the the source directory" -task :default => [ :clean, :gemspec, :test ] +task :default => [ :clean, :test ]