Skip to content

Commit ff22d5b

Browse files
committed
Finish 3.0.3
2 parents 946a526 + bb68200 commit ff22d5b

26 files changed

+430
-180
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ build-iPhoneSimulator/
4949
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
5050
.rvmrc
5151
/Gemfile.lock
52+
/.byebug_history

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
language: ruby
22
bundler_args: --without debug
33
script: "bundle exec rspec spec"
4-
before_install: "gem update --system"
4+
before_install:
5+
- 'gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)'
6+
- 'gem update bundler --conservative'
57
env:
68
- CI=true
79
rvm:
810
- 2.2
911
- 2.3
1012
- 2.4
1113
- 2.5
14+
- 2.6
1215
- jruby-9
1316
- rbx-3
1417
cache: bundler

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* Gregg Kellogg <gregg@kellogg-assoc.com>
1+
* Gregg Kellogg <gregg@greggkellogg.net>

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Community contributions are essential for keeping Ruby RDF great. We want to kee
66

77
This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration.
88

9-
* create or respond to an issue on the [Github Repository](http://github.com/ruby-rdf/json-ld/issues)
9+
* create or respond to an issue on the [Github Repository](https://github.com/ruby-rdf/json-ld/issues)
1010
* Fork and clone the repo:
1111
`git clone git@github.com:your-username/json-ld.git`
1212
* Install bundle:
@@ -30,7 +30,7 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
3030
of thumb, additions larger than about 15 lines of code), we need an
3131
explicit [public domain dedication][PDD] on record from you.
3232

33-
[YARD]: http://yardoc.org/
34-
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
35-
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
33+
[YARD]: https://yardoc.org/
34+
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
35+
[PDD]: https://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
3636
[pr]: https://github.com/ruby-rdf/json-ld/compare/

Gemfile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,9 @@ group 'development' do
99
gem 'rdf-isomorphic', github: "ruby-rdf/rdf-isomorphic", branch: "develop"
1010
gem 'rdf-vocab', github: "ruby-rdf/rdf-vocab", branch: "develop"
1111
gem 'sxp', github: "dryruby/sxp.rb", branch: "develop"
12+
gem 'nokogiri', '~> 1.8'
1213
end
1314

1415
group :debug do
1516
gem "byebug", platforms: :mri
1617
end
17-
18-
platforms :rbx do
19-
gem 'rubysl', '~> 2.0'
20-
gem 'rubinius', '~> 2.0'
21-
end
22-
23-
platforms :jruby do
24-
gem 'gson', '~> 0.6'
25-
end

README.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# JSON-LD Preloaded
22
JSON-LD with preloaded contexts.
33

4-
[![Gem Version](https://badge.fury.io/rb/json-ld-preloaded.png)](http://badge.fury.io/rb/json-ld-preloaded)
5-
[![Build Status](https://secure.travis-ci.org/ruby-rdf/json-ld-preloaded.png?branch=master)](http://travis-ci.org/ruby-rdf/json-ld-preloaded)
4+
[![Gem Version](https://badge.fury.io/rb/json-ld-preloaded.png)](https://badge.fury.io/rb/json-ld-preloaded)
5+
[![Build Status](https://secure.travis-ci.org/ruby-rdf/json-ld-preloaded.png?branch=master)](https://travis-ci.org/ruby-rdf/json-ld-preloaded)
66

77
## Features
88

@@ -57,13 +57,13 @@ Contexts are taken from https://github.com/json-ld/json-ld.org/wiki/existing-con
5757
require 'rdf/vocab'
5858

5959
input = JSON.parse %({
60-
"@context": "http://schema.org/",
60+
"@context": "https://schema.org/",
6161
"@id": "https://github.com/ruby-rdf/json-ld-preloaded",
6262
"@type": "SoftwareApplication",
6363
"name": "JSON-LD Preloaded",
6464
"description": "A meta-release of the json-ld gem including preloaded vocabularies.",
6565
"author": {
66-
"@id": "http://greggkellogg.net/foaf#me",
66+
"@id": "https://greggkellogg.net/foaf#me",
6767
"@type": "Person",
6868
"name": "Gregg Kellogg"
6969
}
@@ -74,14 +74,14 @@ Contexts are taken from https://github.com/json-ld/json-ld.org/wiki/existing-con
7474
end
7575

7676
## Dependencies
77-
* [Ruby](http://ruby-lang.org/) (>= 2.2.2)
78-
* [JSON::LD](http://rubygems.org/gems/json-ld) (>= 2.2)
77+
* [Ruby](https://ruby-lang.org/) (>= 2.2.2)
78+
* [JSON::LD](https://rubygems.org/gems/json-ld) (>= 2.2)
7979

8080
## Mailing List
81-
* <http://lists.w3.org/Archives/Public/public-rdf-ruby/>
81+
* <https://lists.w3.org/Archives/Public/public-rdf-ruby/>
8282

8383
## Author
84-
* [Gregg Kellogg](http://github.com/gkellogg) - <http://kellogg-assoc.com/>
84+
* [Gregg Kellogg](https://github.com/gkellogg) - <https://greggkellogg.net/>
8585

8686
## Contributing
8787
* Do your best to adhere to the existing coding conventions and idioms.
@@ -96,21 +96,18 @@ Contexts are taken from https://github.com/json-ld/json-ld.org/wiki/existing-con
9696
of thumb, additions larger than about 15 lines of code), we need an
9797
explicit [public domain dedication][PDD] on record from you.
9898

99-
License
100-
-------
99+
## License
101100

102101
This is free and unencumbered public domain software. For more information,
103-
see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
104-
105-
[Ruby]: http://ruby-lang.org/
106-
[RDF]: http://www.w3.org/RDF/
107-
[YARD]: http://yardoc.org/
108-
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
109-
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
110-
[RDF.rb]: http://rubygems.org/gems/rdf
111-
[Backports]: http://rubygems.org/gems/backports
112-
[JSON-LD]: http://www.w3.org/TR/json-ld/ "JSON-LD 1.0"
113-
[JSON-LD API]: http://www.w3.org/TR/json-ld-api/ "JSON-LD 1.0 Processing Algorithms and API"
114-
[JSON-LD Framing]: http://json-ld.org/spec/latest/json-ld-framing/ "JSON-LD Framing 1.0"
102+
see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
103+
104+
[Ruby]: https://ruby-lang.org/
105+
[RDF]: https://www.w3.org/RDF/
106+
[YARD]: https://yardoc.org/
107+
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
108+
[PDD]: https://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
109+
[RDF.rb]: https://rubygems.org/gems/rdf
110+
[Backports]: https://rubygems.org/gems/backports
111+
[JSON-LD]: https://www.w3.org/TR/json-ld11/ "JSON-LD 1.1"
115112
[Promises]: http://dom.spec.whatwg.org/#promises
116113
[jsonlint]: https://rubygems.org/gems/jsonlint

Rakefile

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env ruby
2-
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), 'lib')))
2+
$:.unshift(File.expand_path("../lib", __FILE__))
33
require 'rubygems'
44
require 'bundler/setup'
55
require 'json/ld'
@@ -19,23 +19,34 @@ namespace :gem do
1919
end
2020

2121
CONTEXTS = {
22-
activitystreams: "https://www.w3.org/ns/activitystreams",
23-
csvw: "https://www.w3.org/ns/csvw",
24-
datacube: "http://pebbie.org/context/qb",
25-
entityfacts: "http://hub.culturegraph.org/entityfacts/context/v1/entityfacts.jsonld",
26-
foaf: "http://xmlns.com/foaf/context",
27-
geojson: "http://geojson.org/geojson-ld/geojson-context.jsonld",
28-
hydra: "http://www.w3.org/ns/hydra/core",
22+
activitystreams: ["http://www.w3.org/ns/activitystreams", "https://www.w3.org/ns/activitystreams"],
23+
csvw: ["http://www.w3.org/ns/csvw", "https://www.w3.org/ns/csvw"],
24+
datacube: ["http://pebbie.org/context/qb", "https://pebbie.org/context/qb"],
25+
entityfacts: [
26+
"http://hub.culturegraph.org/entityfacts/context/v1/entityfacts.jsonld",
27+
"https://hub.culturegraph.org/entityfacts/context/v1/entityfacts.jsonld"
28+
],
29+
foaf: ["http://xmlns.com/foaf/context", "https://xmlns.com/foaf/context"],
30+
geojson: [
31+
"http://geojson.org/geojson-ld/geojson-context.jsonld",
32+
"https://geojson.org/geojson-ld/geojson-context.jsonld"
33+
],
34+
hydra: ["http://www.w3.org/ns/hydra/core", "https://www.w3.org/ns/hydra/core"],
2935
identity: "https://w3id.org/identity/v1",
30-
iiif: "http://iiif.io/api/image/2/context.json",
31-
lov: "http://lov.okfn.org/dataset/lov/context",
32-
oa: "http://www.w3.org/ns/oa",
33-
prefix: "http://prefix.cc/context",
34-
presentation: "http://iiif.io/api/presentation/2/context.json",
35-
rdfa: "http://www.w3.org/2013/json-ld-context/rdfa11",
36-
research: "https://w3id.org/bundle/context",
37-
schema: "http://schema.org/",
38-
vcard: "http://www.w3.org/2006/vcard/ns",
36+
iiif: ["http://iiif.io/api/image/2/context.json", "https://iiif.io/api/image/2/context.json"],
37+
lov: ["http://lov.okfn.org/dataset/lov/context", "https://lov.okfn.org/dataset/lov/context"],
38+
oa: ["http://www.w3.org/ns/oa", "https://www.w3.org/ns/oa"],
39+
prefix: ["http://prefix.cc/context", "https://prefix.cc/context"],
40+
presentation: ["http://iiif.io/api/presentation/2/context.json", "https://iiif.io/api/presentation/2/context.json"],
41+
rdfa: ["http://www.w3.org/2013/json-ld-context/rdfa11", "https://www.w3.org/2013/json-ld-context/rdfa11"],
42+
research: ["https://w3id.org/bundle/context", "https://w3id.org/bundle/context"],
43+
schema: [
44+
"http://schema.org/",
45+
"https://schema.org/",
46+
"http://schema.org",
47+
"https://schema.org"
48+
],
49+
vcard: ["http://www.w3.org/2006/vcard/ns", "https://www.w3.org/2006/vcard/ns"],
3950
}
4051
desc "Generate Contexts"
4152
task :gen_contexts => CONTEXTS.keys.map {|v| "lib/json/ld/preloaded/#{v}.rb"} do
@@ -51,8 +62,9 @@ CONTEXTS.each do |id, url|
5162
file "lib/json/ld/preloaded/#{id}.rb" => :do_build do
5263
puts "Generate lib/json/ld/preloaded/#{id}.rb"
5364
File.open("lib/json/ld/preloaded/#{id}.rb", "w") do |f|
54-
c = JSON::LD::Context.new().parse(url)
55-
f.write c.to_rb
65+
url, *aliases = Array(url)
66+
c = JSON::LD::Context.parse(url, headers: {'Accept' => 'application/ld+json'})
67+
f.write c.to_rb(*aliases)
5668
end
5769
end
5870
end

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.2
1+
3.0.3

json-ld-preloaded.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
2222
gem.required_ruby_version = '>= 2.2.2'
2323
gem.requirements = []
2424
gem.add_runtime_dependency 'rdf', '~> 3.0'
25-
gem.add_runtime_dependency 'json-ld', '~> 3.0'
25+
gem.add_runtime_dependency 'json-ld', '~> 3.0' #, '>= 3.0.3'
2626
gem.add_runtime_dependency 'multi_json', '~> 1.12'
2727
gem.add_development_dependency 'oj', '~> 2.18' unless RUBY_ENGINE == "jruby"
2828
gem.add_development_dependency 'rdf-turtle', '~> 3.0'

lib/json/ld/preloaded/actions.rb

Whitespace-only changes.

0 commit comments

Comments
 (0)