From c25becd3a898d5a2afc02f9aeb92a0cfa2412eb3 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Thu, 19 Dec 2019 15:43:04 -0800 Subject: [PATCH] Update to version 16 of the spec (no functional changes). Change minimum ruby version to 2.4. Version 0.2.0. --- .travis.yml | 7 +------ Gemfile | 4 ++-- README.md | 9 +++++---- VERSION | 2 +- json-canonicalization.gemspec | 4 ++-- spec/number_spec.rb | 1 + 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index eaa3bed..6b3dc1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,12 @@ language: ruby -bundler_args: --without debug script: "bundle exec rspec spec" -before_install: - - 'gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)' - - 'gem update bundler --conservative' env: - CI=true rvm: - - 2.2.2 - - 2.3 - 2.4 - 2.5 - 2.6 + - 2.7 - jruby - rbx-3 cache: bundler diff --git a/Gemfile b/Gemfile index b89315d..fb415cd 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" gemspec group :development, :test do - gem 'simplecov', require: false, platform: :mri - gem 'coveralls', require: false, platform: :mri + gem 'simplecov', platforms: :mri + gem 'coveralls', '~> 0.8', platforms: :mri gem 'benchmark-ips' gem 'rake' end diff --git a/README.md b/README.md index 2ff47dc..bc52540 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ constraining JSON data to the
I-JSON [[RFC7493](https://tools.ietf.org/html// and through a platform independent property sorting scheme. Working document: https://cyberphone.github.io/ietf-json-canon
-Published IETF Draft: https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-05 +Published IETF Draft: https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-16 The JSON Canonicalization Scheme concept in a nutshell: - Serialization of primitive JSON data types using methods compatible with ECMAScript's `JSON.stringify()` @@ -30,7 +30,8 @@ The JSON Canonicalization Scheme concept in a nutshell: ### Sample Input: ```code { - "numbers": [333333333.33333329, 1E30, 4.50, 2e-3, 0.000000000000000000000000001], + "numbers": [333333333.33333329, 1E30, 4.50, + 2e-3, 0.000000000000000000000000001], "string": "\u20ac$\u000F\u000aA'\u0042\u0022\u005c\\\"\/", "literals": [null, true, false] } @@ -66,8 +67,8 @@ Full documentation available on [RubyDoc](http://rubydoc.info/gems/json-canonica * {JSON::Canonicalization} ## Dependencies -* [Ruby](http://ruby-lang.org/) (>= 2.2.2) -* [JSON](https://rubygems.org/gems/json) (>= 2.1) +* [Ruby](http://ruby-lang.org/) (>= 2.4) +* [JSON](https://rubygems.org/gems/json) (>= 2.3) ## Author * [Gregg Kellogg](http://github.com/gkellogg) - diff --git a/VERSION b/VERSION index 6e8bf73..0ea3a94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0 +0.2.0 diff --git a/json-canonicalization.gemspec b/json-canonicalization.gemspec index 4ea94ae..efbb1e2 100755 --- a/json-canonicalization.gemspec +++ b/json-canonicalization.gemspec @@ -17,9 +17,9 @@ Gem::Specification.new do |gem| gem.files = %w(AUTHORS README.md LICENSE VERSION) + Dir.glob('lib/**/*.rb') gem.test_files = Dir.glob('spec/**/*.rb') + Dir.glob('spec/**/*.json') - gem.required_ruby_version = '>= 2.2.2' + gem.required_ruby_version = '>= 2.4' gem.requirements = [] - gem.add_development_dependency 'rspec', '~> 3.8' + gem.add_development_dependency 'rspec', '~> 3.9' gem.add_development_dependency 'yard' , '~> 0.9' gem.post_install_message = nil diff --git a/spec/number_spec.rb b/spec/number_spec.rb index 5624477..29f3d8e 100644 --- a/spec/number_spec.rb +++ b/spec/number_spec.rb @@ -16,6 +16,7 @@ 9007199254740996 => '9007199254740996', 999999999999999700000 => '999999999999999700000', 999999999999999900000 => '999999999999999900000', + 333333333.33333329 => '333333333.3333333', # -5e-324 => '-5e-324', # Outside Ruby Range # 1.0000000000000001e+23 => '1.0000000000000001e+23', # Outside Ruby Range # 295147905179352830000 => '295147905179352830000', # Outside Ruby Range