rdf-json 2.0.0.beta1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 154e7fa55e959df970398bc70f9a7053a7b67750
4
- data.tar.gz: 2dcf9417e9175cfd8d6dde901b64fa200debee48
2
+ SHA256:
3
+ metadata.gz: 4a46c6cd5c11e9a7dc64b394761e4d0fe2f8f51bb93f3f898e50fc354045a61e
4
+ data.tar.gz: 5d8b697c801deac9009878d346241e9ec7a67f058390e4faac36dc4c542784cc
5
5
  SHA512:
6
- metadata.gz: 46232f5d84a8cca3aeabc3f40af9f163a331d5534d6d15ad51fa32d2bbc3aa488e5956560d4c14721aabde2dc9e536aa394cb2d0b1eea518f8f510308758930d
7
- data.tar.gz: e930686197617083944f30d154468f6856de21be4b88a704c44cb565349763722009ba40a51a3acee113c5965e36021ea52e0e0ddf9047f98835b8db73ed39ea
6
+ metadata.gz: cf05d0c7b75514b5feb1e3e77f2717e8ffa7a56a010bd820cad9adf2a47846ba272c3d9faec7dfec997607824bd7e3d89c09f7d7571108c00cc65a788a3ed734
7
+ data.tar.gz: 59c4511b7b8301e20f1086f127a7328406c83cade324d318cc6526a7bcbd99ad9a09968147a4a367657f7244a70a27d91139dabe932e892174846e91e4e188d8
data/README.md CHANGED
@@ -4,11 +4,10 @@ RDF/JSON Support for RDF.rb
4
4
  This is an [RDF.rb][] extension that adds support for parsing/serializing
5
5
  [RDF/JSON][], a simple JSON-based RDF serialization format.
6
6
 
7
- * <http://github.com/bendiken/rdf-json>
8
- * <http://blog.datagraph.org/2010/04/parsing-rdf-with-ruby>
9
-
10
- [![Gem Version](https://badge.fury.io/rb/rdf-json.png)](http://badge.fury.io/rb/rdf-json)
11
- [![Build Status](https://travis-ci.org/ruby-rdf/rdf-json.png)](https://travis-ci.org/ruby-rdf/rdf-json)
7
+ [![Gem Version](https://badge.fury.io/rb/rdf-json.png)](https://badge.fury.io/rb/rdf-json)
8
+ [![Build Status](https://github.com/ruby-rdf/rdf-json/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-json/actions?query=workflow%3ACI)
9
+ [![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-json/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-json?branch=develop)
10
+ [![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)
12
11
 
13
12
  Documentation
14
13
  -------------
@@ -22,7 +21,7 @@ Documentation
22
21
  Dependencies
23
22
  ------------
24
23
 
25
- * [RDF.rb](http://rubygems.org/gems/rdf) (>= 1.1)
24
+ * [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.2)
26
25
 
27
26
  Installation
28
27
  ------------
@@ -37,12 +36,12 @@ Download
37
36
 
38
37
  To get a local working copy of the development repository, do:
39
38
 
40
- % git clone git://github.com/bendiken/rdf-json.git
39
+ % git clone git://github.com/ruby-rdf/rdf-json.git
41
40
 
42
41
  Alternatively, download the latest development version as a tarball as
43
42
  follows:
44
43
 
45
- % wget http://github.com/bendiken/rdf-json/tarball/master
44
+ % wget http://github.com/ruby-rdf/rdf-json/tarball/master
46
45
 
47
46
  Mailing List
48
47
  ------------
@@ -52,7 +51,7 @@ Mailing List
52
51
  Author
53
52
  ------
54
53
 
55
- * [Arto Bendiken](http://github.com/bendiken) - <http://ar.to/>
54
+ * [Arto Bendiken](http://github.com/ruby-rdf) - <http://ar.to/>
56
55
 
57
56
  Contributors
58
57
  ------------
@@ -76,15 +75,17 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
76
75
  enough, be assured we will eventually add you in there.
77
76
  * Do note that in order for us to merge any non-trivial changes (as a rule
78
77
  of thumb, additions larger than about 15 lines of code), we need an
79
- explicit [public domain dedication][PDD] on record from you.
78
+ explicit [public domain dedication][PDD] on record from you,
79
+ which you will be asked to agree to on the first commit to a repo within the organization.
80
+ Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.
80
81
 
81
82
  ## License
82
83
 
83
84
  This is free and unencumbered public domain software. For more information,
84
85
  see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
85
86
 
86
- [RDF.rb]: http://rdf.rubyforge.org/
87
+ [RDF.rb]: http://www.rubydoc.info/github/ruby-rdf/rdf/
87
88
  [RDF/JSON]: http://www.w3.org/TR/2013/NOTE-rdf-json-20131107/
88
89
  [YARD]: http://yardoc.org/
89
90
  [YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
90
- [PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
91
+ [PDD]: https://unlicense.org/#unlicensing-contributions
data/UNLICENSE CHANGED
@@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
21
  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
22
  OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
- For more information, please refer to <http://unlicense.org/>
24
+ For more information, please refer to <https://unlicense.org/>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.beta1
1
+ 3.2.0
data/etc/doap.rj CHANGED
@@ -6,12 +6,6 @@
6
6
  "value": "http://xmlns.com/foaf/0.1/Person"
7
7
  }
8
8
  ],
9
- "http://www.w3.org/2000/01/rdf-schema#isDefinedBy": [
10
- {
11
- "type": "uri",
12
- "value": "http://datagraph.org/bendiken/foaf"
13
- }
14
- ],
15
9
  "http://xmlns.com/foaf/0.1/made": [
16
10
  {
17
11
  "type": "uri",
@@ -42,16 +36,12 @@
42
36
  {
43
37
  "type": "uri",
44
38
  "value": "http://ar.to/"
45
- },
46
- {
47
- "type": "uri",
48
- "value": "http://blog.datagraph.org/"
49
39
  }
50
40
  ],
51
41
  "http://usefulinc.com/ns/doap#bug-database": [
52
42
  {
53
43
  "type": "uri",
54
- "value": "http://github.com/bendiken/rdf-json/issues"
44
+ "value": "https://github.com/ruby-rdf/rdf-json/issues"
55
45
  }
56
46
  ],
57
47
  "http://usefulinc.com/ns/doap#created": [
@@ -82,13 +72,13 @@
82
72
  "http://usefulinc.com/ns/doap#download-page": [
83
73
  {
84
74
  "type": "uri",
85
- "value": "http://rubyforge.org/projects/rdf/"
75
+ "value": "http://rubygems.org/gems/rdf-json"
86
76
  }
87
77
  ],
88
78
  "http://usefulinc.com/ns/doap#homepage": [
89
79
  {
90
80
  "type": "uri",
91
- "value": "http://rdf.rubyforge.org/json/"
81
+ "value": "https://rubygems.org/gems/rdf-json/"
92
82
  }
93
83
  ],
94
84
  "http://usefulinc.com/ns/doap#implements": [
@@ -100,7 +90,7 @@
100
90
  "http://usefulinc.com/ns/doap#license": [
101
91
  {
102
92
  "type": "uri",
103
- "value": "http://creativecommons.org/licenses/publicdomain/"
93
+ "value": "https://unlicense.org/1.0/"
104
94
  }
105
95
  ],
106
96
  "http://usefulinc.com/ns/doap#maintainer": [
@@ -115,7 +105,7 @@
115
105
  "value": "RDF::JSON"
116
106
  }
117
107
  ],
118
- "http://usefulinc.com/ns/doap#platform": [
108
+ "http://usefulinc.com/ns/doap#programming-language": [
119
109
  {
120
110
  "type": "literal",
121
111
  "value": "Ruby"
@@ -1,6 +1,6 @@
1
1
  module RDF::JSON
2
2
  ##
3
- # RDF/JSON extensions for [RDF.rb](http://rdf.rubyforge.org/) core classes
3
+ # RDF/JSON extensions for [RDF.rb](https://github.com/ruby-rdf/rdf) core classes
4
4
  # and mixins.
5
5
  #
6
6
  # Classes are extended with two new instance methods:
@@ -12,7 +12,7 @@ module RDF::JSON
12
12
  # RDF::Node.new(id).to_rdf_json.to_json
13
13
  #
14
14
  # @example Serializing URI references into RDF/JSON format
15
- # RDF::URI.new("http://rdf.rubyforge.org/").to_rdf_json.to_json
15
+ # RDF::URI.new("https://rubygems.org/gems/rdf/").to_rdf_json.to_json
16
16
  #
17
17
  # @example Serializing plain literals into RDF/JSON format
18
18
  # RDF::Literal.new("Hello, world!").to_rdf_json.to_json
@@ -6,21 +6,21 @@ module RDF::JSON
6
6
  # require 'rdf/json'
7
7
  #
8
8
  # @example Obtaining an RDF/JSON reader class
9
- # RDF::Reader.for(:json) #=> RDF::JSON::Reader
10
- # RDF::Reader.for("etc/doap.json")
11
- # RDF::Reader.for(:file_name => "etc/doap.json")
12
- # RDF::Reader.for(:file_extension => "json")
13
- # RDF::Reader.for(:content_type => "application/json")
9
+ # RDF::Reader.for(:rj) #=> RDF::JSON::Reader
10
+ # RDF::Reader.for("etc/doap.rj")
11
+ # RDF::Reader.for(:file_name => "etc/doap.rj")
12
+ # RDF::Reader.for(:file_extension => "rj")
13
+ # RDF::Reader.for(:content_type => "application/rj")
14
14
  #
15
15
  # @example Parsing RDF statements from an RDF/JSON file
16
- # RDF::JSON::Reader.open("etc/doap.json") do |reader|
16
+ # RDF::JSON::Reader.open("etc/doap.rj") do |reader|
17
17
  # reader.each_statement do |statement|
18
18
  # puts statement.inspect
19
19
  # end
20
20
  # end
21
21
  #
22
22
  # @example Parsing RDF statements from an RDF/JSON string
23
- # data = StringIO.new(File.read("etc/doap.json"))
23
+ # data = StringIO.new(File.read("etc/doap.rj"))
24
24
  # RDF::JSON::Reader.new(data) do |reader|
25
25
  # reader.each_statement do |statement|
26
26
  # puts statement.inspect
@@ -47,7 +47,7 @@ module RDF::JSON
47
47
  # @yield [reader] `self`
48
48
  # @yieldparam [RDF::Reader] reader
49
49
  # @yieldreturn [void] ignored
50
- def initialize(input = $stdin, options = {}, &block)
50
+ def initialize(input = $stdin, **options, &block)
51
51
  super do
52
52
  if block_given?
53
53
  case block.arity
@@ -95,10 +95,10 @@ module RDF::JSON
95
95
  when 'uri'
96
96
  parse_uri(object['value'])
97
97
  when 'literal'
98
- literal = RDF::Literal.new(object['value'], {
99
- :language => object['lang'],
100
- :datatype => object['datatype'],
101
- })
98
+ literal = RDF::Literal.new(object['value'],
99
+ language: object['lang'],
100
+ datatype: object['datatype'],
101
+ )
102
102
  literal.validate! if validate?
103
103
  literal.canonicalize! if canonicalize?
104
104
  literal
@@ -130,7 +130,7 @@ module RDF::JSON
130
130
  # @option options [Boolean] :intern (false)
131
131
  # @return [RDF::URI]
132
132
  # @since 0.3.0
133
- def parse_uri(string, options = {})
133
+ def parse_uri(string, **options)
134
134
  uri = RDF::URI.send(intern = intern? && options[:intern] ? :intern : :new, string)
135
135
  uri.validate! if validate?
136
136
  uri.canonicalize! if canonicalize? && !intern
@@ -7,13 +7,13 @@ module RDF::JSON
7
7
  #
8
8
  # @example Obtaining an RDF/JSON writer class
9
9
  # RDF::Writer.for(:json) #=> RDF::JSON::Writer
10
- # RDF::Writer.for("etc/test.json")
11
- # RDF::Writer.for(:file_name => "etc/test.json")
12
- # RDF::Writer.for(:file_extension => "json")
13
- # RDF::Writer.for(:content_type => "application/json")
10
+ # RDF::Writer.for("etc/test.rj")
11
+ # RDF::Writer.for(:file_name => "etc/test.rj")
12
+ # RDF::Writer.for(:file_extension => "rj")
13
+ # RDF::Writer.for(:content_type => "application/rdf+json")
14
14
  #
15
15
  # @example Serializing RDF statements into an RDF/JSON file
16
- # RDF::JSON::Writer.open("etc/test.json") do |writer|
16
+ # RDF::JSON::Writer.open("etc/test.rj") do |writer|
17
17
  # graph.each_statement do |statement|
18
18
  # writer << statement
19
19
  # end
@@ -64,7 +64,7 @@ module RDF::JSON
64
64
  # @param [RDF::Node] value
65
65
  # @param [Hash{Symbol => Object}] options
66
66
  # @return [String]
67
- def format_node(value, options = {})
67
+ def format_node(value, **options)
68
68
  value.to_rdf_json.to_json
69
69
  end
70
70
 
@@ -74,7 +74,7 @@ module RDF::JSON
74
74
  # @param [RDF::URI] value
75
75
  # @param [Hash{Symbol => Object}] options
76
76
  # @return [String]
77
- def format_uri(value, options = {})
77
+ def format_uri(value, **options)
78
78
  value.to_rdf_json.to_json
79
79
  end
80
80
 
@@ -84,7 +84,7 @@ module RDF::JSON
84
84
  # @param [RDF::Literal, String, #to_s] value
85
85
  # @param [Hash{Symbol => Object}] options
86
86
  # @return [String]
87
- def format_literal(value, options = {})
87
+ def format_literal(value, **options)
88
88
  case value
89
89
  when RDF::Literal then value.to_rdf_json.to_json
90
90
  else RDF::Literal.new(value).to_rdf_json.to_json
data/lib/rdf/json.rb CHANGED
@@ -8,14 +8,14 @@ module RDF
8
8
  # require 'rdf/json'
9
9
  #
10
10
  # @example Parsing RDF statements from an RDF/JSON file
11
- # RDF::JSON::Reader.open("etc/doap.json") do |reader|
11
+ # RDF::JSON::Reader.open("etc/doap.rj") do |reader|
12
12
  # reader.each_statement do |statement|
13
13
  # puts statement.inspect
14
14
  # end
15
15
  # end
16
16
  #
17
17
  # @example Serializing RDF statements into an RDF/JSON file
18
- # RDF::JSON::Writer.open("etc/test.json") do |writer|
18
+ # RDF::JSON::Writer.open("etc/test.rj") do |writer|
19
19
  # graph.each_statement do |statement|
20
20
  # writer << statement
21
21
  # end
@@ -23,14 +23,14 @@ module RDF
23
23
  #
24
24
  # @example Serializing RDF values into RDF/JSON strings
25
25
  # RDF::Node.new('foobar').to_rdf_json.to_json
26
- # RDF::URI.new("http://rdf.rubyforge.org/").to_rdf_json.to_json
26
+ # RDF::URI.new("https://rubygems.org/gems/rdf/").to_rdf_json.to_json
27
27
  # RDF::Literal.new("Hello, world!").to_rdf_json
28
28
  # RDF::Literal.new("Hello, world!", :language => 'en-US').to_rdf_json.to_json
29
29
  # RDF::Literal.new(3.1415).to_rdf_json.to_json
30
30
  # RDF::Literal.new('true', :datatype => RDF::XSD.boolean).to_rdf_json.to_json
31
31
  # RDF::Statement.new(s, p, o).to_rdf_json.to_json
32
32
  #
33
- # @see http://rdf.rubyforge.org/
33
+ # @see http://www.rubydoc.info/github/ruby-rdf/rdf/
34
34
  # @see http://n2.talis.com/wiki/RDF_JSON_Specification
35
35
  # @see http://en.wikipedia.org/wiki/JSON
36
36
  #
metadata CHANGED
@@ -1,117 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arto Bendiken
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-22 00:00:00.000000000 Z
11
+ date: 2021-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 2.0.0.beta
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '3'
19
+ version: '3.2'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 2.0.0.beta
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '3'
26
+ version: '3.2'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: rdf-spec
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: 2.0.0.beta
40
- - - "<"
31
+ - - "~>"
41
32
  - !ruby/object:Gem::Version
42
- version: '3'
33
+ version: '3.2'
43
34
  type: :development
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
46
37
  requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: 2.0.0.beta
50
- - - "<"
38
+ - - "~>"
51
39
  - !ruby/object:Gem::Version
52
- version: '3'
40
+ version: '3.2'
53
41
  - !ruby/object:Gem::Dependency
54
42
  name: rdf-isomorphic
55
43
  requirement: !ruby/object:Gem::Requirement
56
44
  requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: 2.0.0.beta
60
- - - "<"
45
+ - - "~>"
61
46
  - !ruby/object:Gem::Version
62
- version: '3'
47
+ version: '3.2'
63
48
  type: :development
64
49
  prerelease: false
65
50
  version_requirements: !ruby/object:Gem::Requirement
66
51
  requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: 2.0.0.beta
70
- - - "<"
52
+ - - "~>"
71
53
  - !ruby/object:Gem::Version
72
- version: '3'
54
+ version: '3.2'
73
55
  - !ruby/object:Gem::Dependency
74
56
  name: rspec
75
57
  requirement: !ruby/object:Gem::Requirement
76
58
  requirements:
77
59
  - - "~>"
78
60
  - !ruby/object:Gem::Version
79
- version: '3.0'
61
+ version: '3.10'
80
62
  type: :development
81
63
  prerelease: false
82
64
  version_requirements: !ruby/object:Gem::Requirement
83
65
  requirements:
84
66
  - - "~>"
85
67
  - !ruby/object:Gem::Version
86
- version: '3.0'
68
+ version: '3.10'
87
69
  - !ruby/object:Gem::Dependency
88
70
  name: rspec-its
89
71
  requirement: !ruby/object:Gem::Requirement
90
72
  requirements:
91
73
  - - "~>"
92
74
  - !ruby/object:Gem::Version
93
- version: '1.0'
75
+ version: '1.3'
94
76
  type: :development
95
77
  prerelease: false
96
78
  version_requirements: !ruby/object:Gem::Requirement
97
79
  requirements:
98
80
  - - "~>"
99
81
  - !ruby/object:Gem::Version
100
- version: '1.0'
82
+ version: '1.3'
101
83
  - !ruby/object:Gem::Dependency
102
84
  name: yard
103
85
  requirement: !ruby/object:Gem::Requirement
104
86
  requirements:
105
87
  - - "~>"
106
88
  - !ruby/object:Gem::Version
107
- version: '0.8'
89
+ version: '0.9'
108
90
  type: :development
109
91
  prerelease: false
110
92
  version_requirements: !ruby/object:Gem::Requirement
111
93
  requirements:
112
94
  - - "~>"
113
95
  - !ruby/object:Gem::Version
114
- version: '0.8'
96
+ version: '0.9'
115
97
  description: RDF.rb extension for parsing/serializing RDF/JSON data.
116
98
  email: public-rdf-ruby@w3.org
117
99
  executables: []
@@ -134,7 +116,7 @@ homepage: http://ruby-rdf.github.com/rdf-json
134
116
  licenses:
135
117
  - Unlicense
136
118
  metadata: {}
137
- post_install_message:
119
+ post_install_message:
138
120
  rdoc_options: []
139
121
  require_paths:
140
122
  - lib
@@ -142,17 +124,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
124
  requirements:
143
125
  - - ">="
144
126
  - !ruby/object:Gem::Version
145
- version: '2.0'
127
+ version: '2.6'
146
128
  required_rubygems_version: !ruby/object:Gem::Requirement
147
129
  requirements:
148
- - - ">"
130
+ - - ">="
149
131
  - !ruby/object:Gem::Version
150
- version: 1.3.1
132
+ version: '0'
151
133
  requirements: []
152
- rubyforge_project: rdf
153
- rubygems_version: 2.5.1
154
- signing_key:
134
+ rubygems_version: 3.3.3
135
+ signing_key:
155
136
  specification_version: 4
156
137
  summary: RDF/JSON support for RDF.rb.
157
138
  test_files: []
158
- has_rdoc: false