Skip to content

Commit 1093e1a

Browse files
committed
Add some JRuby test workarounds, and README notification on feature.
1 parent 76a0332 commit 1093e1a

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ rvm:
77
- 1.9.3
88
- 2.0
99
- 2.1
10-
- 2.2
10+
- 2.2.1
1111
- jruby
1212
cache: bundler
1313
sudo: false
1414
matrix:
1515
allow_failures:
16-
- rvm: 2.2
1716
- rbx-2
1817

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ If the [jsonlint][] gem is installed, it will be used when validating an input d
1616

1717
Install with `gem install json-ld`
1818

19+
### MultiJson parser
20+
The [MultiJson](https://rubygems.org/gems/multi_json) gem is used for parsing JSON; this defaults to the native JSON parser, but will use a more performant parser if one is available. A specific parser can be specified by adding the `:adapter` option to any API call. See [MultiJson](https://rubygems.org/gems/multi_json) for more information.
21+
1922
### JSON-LD Streaming Profile
2023
This gem implements an optimized streaming writer used for generating JSON-LD from large repositories. Such documents result in the JSON-LD Streaming Profile:
2124

json-ld.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Gem::Specification.new do |gem|
3030
gem.add_runtime_dependency 'rdf', '~> 1.1', '>= 1.1.7'
3131
gem.add_runtime_dependency 'multi_json', '~> 1.11'
3232
gem.add_development_dependency 'jsonlint', '~> 0.1.0' unless RUBY_ENGINE == "jruby"
33-
gem.add_development_dependency 'oj', '~> 2.12'
34-
gem.add_development_dependency 'yajl-ruby', '~> 1.2.1'
33+
gem.add_development_dependency 'oj', '~> 2.12' unless RUBY_ENGINE == "jruby"
34+
gem.add_development_dependency 'yajl-ruby', '~> 1.2.1' unless RUBY_ENGINE == "jruby"
3535
gem.add_development_dependency "rack-cache", '~> 1.2'
3636
gem.add_development_dependency "rest-client", '~> 1.8'
3737
gem.add_development_dependency "rest-client-components", '~> 1.4'

spec/api_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
expanded = filename.sub(/-input\..*$/, '-expanded.json')
7777
ttl = filename.sub(/-input\..*$/, '-rdf.ttl')
7878

79-
context test do
79+
context test, skip: ("Not supported in JRuby" if RUBY_ENGINE == "jruby" && %w(oj yajl).include?(adapter.to_s)) do
8080
it "expands" do
8181
options = {debug: @debug, adapter: adapter}
8282
options[:expandContext] = File.open(context) if context

0 commit comments

Comments
 (0)