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

support json 2.0 #168

Closed
pravi opened this issue Aug 18, 2017 · 2 comments
Closed

support json 2.0 #168

pravi opened this issue Aug 18, 2017 · 2 comments
Labels
Milestone

Comments

@pravi
Copy link

pravi commented Aug 18, 2017

One test failing with json 2.1.0. We would like to use json 2.1.0 in debian.

$ bundle install
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.5.0
Using hashie 3.5.6
Fetching json 2.1.0
Installing json 2.1.0 with native extensions
Using multi_xml 0.6.0
Using rack 1.6.8
Using simple_oauth 0.2.0
Using safe_yaml 1.0.4
Using rspec-support 3.6.0
Using diff-lcs 1.3
Using docile 1.1.5
Using simplecov-html 0.10.2
Using addressable 2.3.8
Using hashdiff 0.3.5
Using multipart-post 2.0.0
Using bundler 1.15.1
Using rash_alt 0.4.3
Using rack-cache 1.2
Using crack 0.4.3
Using rspec-core 3.6.0
Using rspec-expectations 3.6.0
Using rspec-mocks 3.6.0
Using simplecov 0.12.0
Using faraday 0.13.0
Using webmock 1.24.6
Using rspec 3.6.0
Using faraday_middleware 0.12.2 from source at `.`
Bundle complete! 17 Gemfile dependencies, 26 gems now installed.
Bundled gems are installed into ./vendor/bundle.
The latest bundler is 1.15.3, but you are currently running 1.15.1.
To update, run `gem install bundler`
pravi@nishumbha:~/forge/debian/git/pkg-ruby-extras/ruby-faraday-middleware$ bundle exec rake
warning: cane not available; skipping quality checks.
/usr/bin/ruby2.3 -I/home/pravi/forge/debian/git/pkg-ruby-extras/ruby-faraday-middleware/vendor/bundle/gems/rspec-core-3.6.0/lib:/home/pravi/forge/debian/git/pkg-ruby-extras/ruby-faraday-middleware/vendor/bundle/gems/rspec-support-3.6.0/lib /home/pravi/forge/debian/git/pkg-ruby-extras/ruby-faraday-middleware/vendor/bundle/gems/rspec-core-3.6.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

Randomized with seed 31925
................................................................................................................................F................................................................................................................................................

Failures:

  1) FaradayMiddleware::ParseJson chokes on invalid json
     Failure/Error: expect{ process(data) }.to raise_error(Faraday::Error::ParsingError)
       expected Faraday::ParsingError but nothing was raised
     # ./spec/unit/parse_json_spec.rb:65:in `block (3 levels) in <top (required)>'
     # ./spec/unit/parse_json_spec.rb:64:in `each'
     # ./spec/unit/parse_json_spec.rb:64:in `block (2 levels) in <top (required)>'

Finished in 0.3817 seconds (files took 0.54887 seconds to load)
273 examples, 1 failure

Failed examples:

rspec ./spec/unit/parse_json_spec.rb:63 # FaradayMiddleware::ParseJson chokes on invalid json

Randomized with seed 31925
@iMacTia
Copy link
Member

iMacTia commented Aug 18, 2017

Hi @pravi, thanks for bringing this to our attention.
I can see son 2.0 has been released around one year ago. Supporting it will require for sure some changes. I'll try to have a look 👍

@iMacTia iMacTia added this to the v0.13.0 milestone Aug 18, 2017
@iMacTia
Copy link
Member

iMacTia commented Aug 18, 2017

So, basically the "issue" is that json 2.0 complies to the newest JSON RFC 7159.
This means that primitive values are now supported (e.g. 'a', '1').
I don't think we need any code change, I'll simply remove these examples from tests and amend the Gemfile to use json, "< 3"

iMacTia added a commit that referenced this issue Aug 18, 2017
Fixes incompatibility with jruby by isolating brotli
Fixes #168
iMacTia added a commit that referenced this issue Sep 7, 2017
Fixes incompatibility with jruby by isolating brotli
Fixes #168
iMacTia added a commit that referenced this issue Sep 7, 2017
Fixes incompatibility with jruby by isolating brotli
Fixes #168
iMacTia added a commit that referenced this issue Sep 7, 2017
* Adds support for JSON 2
Fixes #168

* Adds instruction into .travis.yml to keep bundler up-to-date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants