From 5672fee51f4c5e85ce40cf72bce3c63f6023bc2b Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Tue, 5 Nov 2024 16:30:35 +0100 Subject: [PATCH] Remove final references to json_pure --- Gemfile | 2 +- README-json-jruby.md | 1 - README.md | 24 ------------------------ Rakefile | 4 +--- json_pure.gemspec | 41 ----------------------------------------- lib/json/pure.rb | 4 ---- 6 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 json_pure.gemspec delete mode 100644 lib/json/pure.rb diff --git a/Gemfile b/Gemfile index 4a76a6f9..98956c7e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gemspec name: 'json' +gemspec group :development do gem "ruby_memcheck" if RUBY_PLATFORM =~ /linux/i diff --git a/README-json-jruby.md b/README-json-jruby.md index 7ea4f0f8..a66ebd62 100644 --- a/README-json-jruby.md +++ b/README-json-jruby.md @@ -3,7 +3,6 @@ JSON-JRuby JSON-JRuby is a port of Florian Frank's native [`json` library](http://json.rubyforge.org/) to JRuby. -It aims to be a perfect drop-in replacement for `json_pure`. Development version diff --git a/README.md b/README.md index 29624e8c..d76e9899 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,6 @@ endpoint. ## Installation -It's recommended to use the extension variant of JSON, because it's faster than -the pure ruby variant. If you cannot build it on your system, you can settle -for the latter. - Install the gem and add to the application's Gemfile by executing: $ bundle add json @@ -33,12 +29,6 @@ If bundler is not being used to manage dependencies, install the gem by executin $ gem install json - -There is also a pure ruby json only variant of the gem, that can be installed -with: - - $ gem install json_pure - ## Usage To use JSON you can @@ -47,20 +37,6 @@ To use JSON you can require 'json' ``` -to load the installed variant (either the extension `'json'` or the pure -variant `'json_pure'`). If you have installed the extension variant, you can -pick either the extension variant or the pure variant by typing - -```ruby -require 'json/ext' -``` - -or - -```ruby -require 'json/pure' -``` - Now you can parse a JSON document into a ruby data structure by calling ```ruby diff --git a/Rakefile b/Rakefile index e16fc8d3..c5b518a1 100644 --- a/Rakefile +++ b/Rakefile @@ -284,13 +284,11 @@ else desc "Create the gem packages" task :package do sh "gem build json.gemspec" - sh "gem build json_pure.gemspec" mkdir_p 'pkg' mv "json-#{PKG_VERSION}.gem", 'pkg' - mv "json_pure-#{PKG_VERSION}.gem", 'pkg' end - desc "Build all gems and archives for a new release of json and json_pure." + desc "Build all gems and archives for a new release of json" task :build => [ :clean, :package ] task :release => :build diff --git a/json_pure.gemspec b/json_pure.gemspec deleted file mode 100644 index 21d39d02..00000000 --- a/json_pure.gemspec +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -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" - s.version = version - - s.summary = "JSON Implementation for Ruby" - s.description = "This is a JSON implementation in pure Ruby." - s.licenses = ["Ruby"] - s.authors = ["Florian Frank"] - s.email = "flori@ping.de" - - s.extra_rdoc_files = ["README.md"] - s.rdoc_options = ["--title", "JSON implementation for ruby", "--main", "README.md"] - s.files = [ - "CHANGES.md", - "COPYING", - "BSDL", - "LEGAL", - "README.md", - "json_pure.gemspec", - "lib/json/pure.rb", - ] - s.homepage = "https://ruby.github.io/json" - s.metadata = { - 'bug_tracker_uri' => 'https://github.com/ruby/json/issues', - 'changelog_uri' => 'https://github.com/ruby/json/blob/master/CHANGES.md', - 'documentation_uri' => 'https://ruby.github.io/json/doc/index.html', - 'homepage_uri' => s.homepage, - 'source_code_uri' => 'https://github.com/ruby/json', - 'wiki_uri' => 'https://github.com/ruby/json/wiki' - } - - s.add_dependency "json" - - s.required_ruby_version = Gem::Requirement.new(">= 2.7") -end diff --git a/lib/json/pure.rb b/lib/json/pure.rb deleted file mode 100644 index 78a6d9dc..00000000 --- a/lib/json/pure.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true - -warn "`json_pure` is deprecated and has no effect, just use `json`" -require "json"