json-ld 1.1.0 → 1.1.1

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
- ---
2
- SHA1:
3
- metadata.gz: d4e4a50a70833e289162e3a731be70397461afcc
4
- data.tar.gz: 56202518a14330a4902b251efe156999fb75920a
5
- SHA512:
6
- metadata.gz: 90cba40641036135744c6f8109e59fd8d0660a6c71f162986627fe34f6bb97af416b048951706950933ef9b2d73b4f86837947a59be4cf2f9cc38c4937cad8b2
7
- data.tar.gz: 2e818d0cb8280d4a0be2cc64e51a66fd43c60ec2e6a35ebe47f10982f41ba64da76cfc6f8af9ba3f2fa52b3aba6e0682646ea0fa0430e0af899cdd8fbb139b25
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 40681daafe7cedbce21f62257a4ba28469da8f0d
4
+ data.tar.gz: 0d9ecb3af38b10bf0c568769bf40b2bc325d004a
5
+ SHA512:
6
+ metadata.gz: 9ee2cc6a336620c287ab5c04c3b726e8b7eed9ae6ac3ab53c28c05e522e6532adc38b0a44863badcddedf5ff64ba00bdbffabc9a5c0768e146d1576a36f45efb
7
+ data.tar.gz: 20427fde217f5853177a98d9f961c482c992e30767ff6a66e0054ae96682e8ce8bdccf7eb849e52c7b5a237eb8256382b57a9bfc4556fd0b315b45ecd382a01c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
data/lib/json/ld.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..')))
2
2
  require 'rdf' # @see http://rubygems.org/gems/rdf
3
- require 'backports' if RUBY_VERSION < "1.9"
4
3
 
5
4
  module JSON
6
5
  ##
data/lib/json/ld/api.rb CHANGED
@@ -80,7 +80,6 @@ module JSON::LD
80
80
  @options[:documentLoader] ||= self.class.method(:documentLoader)
81
81
  options[:rename_bnodes] ||= true
82
82
  @namer = options[:rename_bnodes] ? BlankNodeNamer.new("b") : BlankNodeMapper.new
83
- content_type = nil
84
83
  @value = case input
85
84
  when Array, Hash then input.dup
86
85
  when IO, StringIO
@@ -219,8 +218,7 @@ module JSON::LD
219
218
  debug(".flatten") {"expanded input: #{value.to_json(JSON_STATE)}"}
220
219
 
221
220
  # Initialize node map to a JSON object consisting of a single member whose key is @default and whose value is an empty JSON object.
222
- node_map = Hash.ordered
223
- node_map['@default'] = Hash.ordered
221
+ node_map = {'@default' => {}}
224
222
  self.generate_node_map(value, node_map)
225
223
 
226
224
  default_graph = node_map['@default']
@@ -281,7 +279,6 @@ module JSON::LD
281
279
  # @see http://json-ld.org/spec/latest/json-ld-api/#framing-algorithm
282
280
  def self.frame(input, frame, options = {})
283
281
  result = nil
284
- match_limit = 0
285
282
  framing_state = {
286
283
  :embed => true,
287
284
  :explicit => false,
@@ -319,7 +316,7 @@ module JSON::LD
319
316
  debug(".frame") {"expanded input: #{value.to_json(JSON_STATE)}"}
320
317
 
321
318
  # Get framing nodes from expanded input, replacing Blank Node identifiers as necessary
322
- all_nodes = Hash.ordered
319
+ all_nodes = {}
323
320
  old_dbg, @options[:debug] = @options[:debug], nil
324
321
  depth do
325
322
  generate_node_map(value, all_nodes)
@@ -360,15 +357,20 @@ module JSON::LD
360
357
  # @option options [Boolean] :produceGeneralizedRdf (false)
361
358
  # If true, output will include statements having blank node predicates, otherwise they are dropped.
362
359
  # @raise [JsonLdError]
363
- # @return [Array<RDF::Statement>] if no block given
364
360
  # @yield statement
365
361
  # @yieldparam [RDF::Statement] statement
366
362
  def self.toRdf(input, options = {}, &block)
367
- results = []
368
- results.extend(RDF::Enumerable)
363
+ unless block_given?
364
+ results = []
365
+ results.extend(RDF::Enumerable)
366
+ self.toRdf(input, options) do |stmt|
367
+ results << stmt
368
+ end
369
+ return results
370
+ end
369
371
 
370
372
  # Expand input to simplify processing
371
- expanded_input = API.expand(input, options)
373
+ expanded_input = API.expand(input, options.merge(:ordered => false))
372
374
 
373
375
  API.new(expanded_input, nil, options) do
374
376
  # 1) Perform the Expansion Algorithm on the JSON-LD input.
@@ -376,8 +378,7 @@ module JSON::LD
376
378
  debug(".toRdf") {"expanded input: #{expanded_input.to_json(JSON_STATE)}"}
377
379
 
378
380
  # Generate _nodeMap_
379
- node_map = Hash.ordered
380
- node_map['@default'] = Hash.ordered
381
+ node_map = {'@default' => {}}
381
382
  generate_node_map(expanded_input, node_map)
382
383
  debug(".toRdf") {"node map: #{node_map.to_json(JSON_STATE)}"}
383
384
 
@@ -390,7 +391,7 @@ module JSON::LD
390
391
  debug(".toRdf") {"drop relative graph_name: #{statement.to_ntriples}"}
391
392
  next
392
393
  end
393
- graph_to_rdf(graph).each do |statement|
394
+ graph_to_rdf(graph) do |statement|
394
395
  next if statement.predicate.node? && !options[:produceGeneralizedRdf]
395
396
  # Drop results with relative IRIs
396
397
  relative = statement.to_a.any? do |r|
@@ -156,9 +156,7 @@ module JSON::LD
156
156
  end
157
157
 
158
158
  # Re-order result keys
159
- r = Hash.ordered
160
- result.keys.kw_sort.each {|kk| r[kk] = result[kk]}
161
- r
159
+ result.keys.kw_sort.inject({}) {|map, kk| map[kk] = result[kk]; map}
162
160
  else
163
161
  # For other types, the compacted value is the element value
164
162
  debug("compact") {element.class.to_s}
@@ -11,8 +11,11 @@ module JSON::LD
11
11
  # @param [String] active_property
12
12
  # @param [Context] context
13
13
  # @param [Hash{Symbol => Object}] options
14
+ # @option options [Boolean] :ordered (true)
15
+ # Ensure output objects have keys ordered properly
14
16
  # @return [Array, Hash]
15
17
  def expand(input, active_property, context, options = {})
18
+ options = {:ordered => true}.merge(options)
16
19
  debug("expand") {"input: #{input.inspect}, active_property: #{active_property.inspect}, context: #{context.inspect}"}
17
20
  result = case input
18
21
  when Array
@@ -40,9 +43,10 @@ module JSON::LD
40
43
  end
41
44
 
42
45
  depth do
43
- output_object = Hash.ordered
46
+ output_object = {}
44
47
  # Then, proceed and process each property and value in element as follows:
45
- input.keys.kw_sort.each do |key|
48
+ keys = options[:ordered] ? input.keys.kw_sort : input.keys
49
+ keys.each do |key|
46
50
  # For each key and value in element, ordered lexicographically by key:
47
51
  value = input[key]
48
52
  expanded_property = context.expand_iri(key, :vocab => true, :depth => @depth)
@@ -199,7 +203,8 @@ module JSON::LD
199
203
  ary = []
200
204
 
201
205
  # For each key-value pair language-language value in value, ordered lexicographically by language
202
- value.keys.sort.each do |k|
206
+ keys = options[:ordered] ? value.keys.sort : value.keys
207
+ keys.each do |k|
203
208
  [value[k]].flatten.each do |item|
204
209
  # item must be a string, otherwise an invalid language map value error has been detected and processing is aborted.
205
210
  raise JsonLdError::InvalidLanguageMapValue,
@@ -221,7 +226,8 @@ module JSON::LD
221
226
  ary = []
222
227
 
223
228
  # For each key-value in the object:
224
- value.keys.sort.each do |k|
229
+ keys = options[:ordered] ? value.keys.sort : value.keys
230
+ keys.each do |k|
225
231
  # Initialize index value to the result of using this algorithm recursively, passing active context, key as active property, and index value as element.
226
232
  index_value = depth { expand([value[k]].flatten, key, context, options) }
227
233
  index_value.each do |item|
@@ -322,10 +328,12 @@ module JSON::LD
322
328
  return nil
323
329
  end
324
330
 
325
- # Re-order result keys
326
- r = Hash.ordered
327
- output_object.keys.kw_sort.each {|k| r[k] = output_object[k]}
328
- r
331
+ # Re-order result keys if ordering
332
+ if options[:ordered]
333
+ output_object.keys.kw_sort.inject({}) {|map, kk| map[kk] = output_object[kk]; map}
334
+ else
335
+ output_object
336
+ end
329
337
  end
330
338
  else
331
339
  # Otherwise, unless the value is a number, expand the value according to the Value Expansion rules, passing active property.
@@ -66,82 +66,3 @@ class Array
66
66
  end
67
67
  end
68
68
  end
69
-
70
- if RUBY_VERSION < "1.9"
71
- class InsertOrderPreservingHash < Hash
72
- include Enumerable
73
-
74
- def initialize(*args, &block)
75
- super
76
- @ordered_keys = []
77
- end
78
-
79
- def []=(key, val)
80
- @ordered_keys << key unless has_key? key
81
- super
82
- end
83
-
84
- def each
85
- @ordered_keys.each {|k| yield(k, self[k])}
86
- end
87
- alias :each_pair :each
88
-
89
- def each_value
90
- @ordered_keys.each {|k| yield(super[k])}
91
- end
92
-
93
- def each_key
94
- @ordered_keys.each {|k| yield k}
95
- end
96
-
97
- def keys
98
- @ordered_keys
99
- end
100
-
101
- def clear
102
- @ordered_keys.clear
103
- super
104
- end
105
-
106
- def delete(k, &block)
107
- @ordered_keys.delete(k)
108
- super
109
- end
110
-
111
- def reject!
112
- del = []
113
- each_pair {|k,v| del << k if yield k,v}
114
- del.each {|k| delete k}
115
- del.empty? ? nil : self
116
- end
117
-
118
- def delete_if(&block)
119
- reject!(&block)
120
- self
121
- end
122
-
123
- def merge!(other)
124
- new_keys = other.instance_variable_get(:@ordered_keys) || other.keys
125
- new_keys -= @ordered_keys
126
- @ordered_keys += new_keys
127
- super
128
- self
129
- end
130
-
131
- def merge(other)
132
- self.dup.merge!(other)
133
- end
134
- end
135
-
136
- class Hash
137
- def self.ordered(obj = nil, &block)
138
- InsertOrderPreservingHash.new(obj, &block)
139
- end
140
- end
141
- else
142
- class Hash
143
- def self.ordered(obj = nil, &block)
144
- Hash.new(obj, &block)
145
- end
146
- end
147
- end
@@ -147,7 +147,8 @@ module JSON::LD
147
147
  end
148
148
 
149
149
  # Finally, for each key-value pair property-value in element ordered by property perform the following steps:
150
- element.keys.sort.each do |property|
150
+ # Note: Not ordering doesn't seem to affect results and is more performant
151
+ element.keys.each do |property|
151
152
  value = element[property]
152
153
 
153
154
  # If property is a blank node identifier, replace it with a newly generated blank node identifier passing property for identifier.
data/lib/json/ld/frame.rb CHANGED
@@ -176,7 +176,7 @@ module JSON::LD
176
176
  # If, after replacement, an array contains only the value null remove the value, leaving an empty array.
177
177
  input.map {|o| cleanup_preserve(o)}.compact
178
178
  when Hash
179
- output = Hash.ordered
179
+ output = Hash.new(input.size)
180
180
  input.each do |key, value|
181
181
  if key == '@preserve'
182
182
  # replace all key-value pairs where the key is @preserve with the value from the key-pair
@@ -49,22 +49,15 @@ module JSON::LD
49
49
  # @private
50
50
  # @see RDF::Reader#each_statement
51
51
  def each_statement(&block)
52
- JSON::LD::API.toRdf(@doc, @options).each do |statement|
53
- # If RDF version is 1.0, fold literals with xsd:string to be just simple literals
54
- statement.object.datatype = nil if
55
- RDF::VERSION.to_s < "1.1" &&
56
- statement.object.literal? &&
57
- statement.object.datatype == RDF::XSD.string
58
- block.call(statement)
59
- end
52
+ JSON::LD::API.toRdf(@doc, @options, &block)
60
53
  end
61
54
 
62
55
  ##
63
56
  # @private
64
57
  # @see RDF::Reader#each_triple
65
- def each_triple(&block)
66
- each_statement do |statement|
67
- block.call(*statement.to_triple)
58
+ def each_triple
59
+ JSON::LD::API.toRdf(@doc, @options) do |statement|
60
+ yield *statement.to_triple
68
61
  end
69
62
  end
70
63
  end
@@ -9,64 +9,55 @@ module JSON::LD
9
9
  #
10
10
  # @param [Hash{String => Hash}] active_graph
11
11
  # A hash of IRI to Node definitions
12
- # @return [Array<RDF::Statement>] statements in this graph, without context
13
- def graph_to_rdf(active_graph)
12
+ # @yield statement
13
+ # @yieldparam [RDF::Statement] statement
14
+ def graph_to_rdf(active_graph, &block)
14
15
  debug('graph_to_rdf') {"graph_to_rdf: #{active_graph.inspect}"}
15
16
 
16
- # Initialize results as an empty array
17
- results = []
17
+ # For each id-node in active_graph
18
+ active_graph.each do |id, node|
19
+ # Initialize subject as the IRI or BNode representation of id
20
+ subject = as_resource(id)
21
+ debug("graph_to_rdf") {"subject: #{subject.to_ntriples} (id: #{id})"}
18
22
 
19
- depth do
20
- # For each id-node in active_graph
21
- active_graph.each do |id, node|
22
- # Initialize subject as the IRI or BNode representation of id
23
- subject = as_resource(id)
24
- debug("graph_to_rdf") {"subject: #{subject.to_ntriples} (id: #{id})"}
25
-
26
- # For each property-values in node
27
- node.each do |property, values|
28
- case property
29
- when '@type'
30
- # If property is @type, construct triple as an RDF Triple composed of id, rdf:type, and object from values where id and object are represented either as IRIs or Blank Nodes
31
- results += values.map do |value|
32
- object = as_resource(value)
33
- debug("graph_to_rdf") {"type: #{object.to_ntriples}"}
34
- RDF::Statement.new(subject, RDF.type, object)
35
- end
36
- when /^@/
37
- # Otherwise, if @type is any other keyword, skip to the next property-values pair
38
- else
39
- # Otherwise, property is an IRI or Blank Node identifier
40
- # Initialize predicate from property as an IRI or Blank node
41
- predicate = as_resource(property)
42
- debug("graph_to_rdf") {"predicate: #{predicate.to_ntriples}"}
23
+ # For each property-values in node
24
+ node.each do |property, values|
25
+ case property
26
+ when '@type'
27
+ # If property is @type, construct triple as an RDF Triple composed of id, rdf:type, and object from values where id and object are represented either as IRIs or Blank Nodes
28
+ values.each do |value|
29
+ object = as_resource(value)
30
+ debug("graph_to_rdf") {"type: #{object.to_ntriples}"}
31
+ yield RDF::Statement.new(subject, RDF.type, object)
32
+ end
33
+ when /^@/
34
+ # Otherwise, if @type is any other keyword, skip to the next property-values pair
35
+ else
36
+ # Otherwise, property is an IRI or Blank Node identifier
37
+ # Initialize predicate from property as an IRI or Blank node
38
+ predicate = as_resource(property)
39
+ debug("graph_to_rdf") {"predicate: #{predicate.to_ntriples}"}
43
40
 
44
- # For each item in values
45
- values.each do |item|
46
- if item.has_key?('@list')
47
- debug("graph_to_rdf") {"list: #{item.inspect}"}
48
- # If item is a list object, initialize list_results as an empty array, and object to the result of the List Conversion algorithm, passing the value associated with the @list key from item and list_results.
49
- list_results = []
50
- object = parse_list(item['@list'], list_results)
41
+ # For each item in values
42
+ values.each do |item|
43
+ if item.has_key?('@list')
44
+ debug("graph_to_rdf") {"list: #{item.inspect}"}
45
+ # If item is a list object, initialize list_results as an empty array, and object to the result of the List Conversion algorithm, passing the value associated with the @list key from item and list_results.
46
+ object = parse_list(item['@list']) {|stmt| yield stmt}
51
47
 
52
- # Append a triple composed of subject, prediate, and object to results and add all triples from list_results to results.
53
- results << RDF::Statement.new(subject, predicate, object)
54
- results += list_results
55
- else
56
- # Otherwise, item is a value object or a node definition. Generate object as the result of the Object Converstion algorithm passing item.
57
- object = parse_object(item)
58
- debug("graph_to_rdf") {"object: #{object.to_ntriples}"}
59
- # Append a triple composed of subject, prediate, and literal to results.
60
- results << RDF::Statement.new(subject, predicate, object)
61
- end
48
+ # Append a triple composed of subject, prediate, and object to results and add all triples from list_results to results.
49
+ yield RDF::Statement.new(subject, predicate, object)
50
+ else
51
+ # Otherwise, item is a value object or a node definition. Generate object as the result of the Object Converstion algorithm passing item.
52
+ object = parse_object(item)
53
+ debug("graph_to_rdf") {"object: #{object.to_ntriples}"}
54
+ # Append a triple composed of subject, prediate, and literal to results.
55
+ yield RDF::Statement.new(subject, predicate, object)
62
56
  end
63
57
  end
64
58
  end
65
59
  end
66
60
  end
67
-
68
- # Return results
69
- results
70
61
  end
71
62
 
72
63
  ##
@@ -96,10 +87,7 @@ module JSON::LD
96
87
 
97
88
  # Initialize literal as an RDF literal using value and datatype. If element has the key @language and datatype is xsd:string, then add the value associated with the @language key as the language of the object.
98
89
  language = item.fetch('@language', nil)
99
- literal = RDF::Literal.new(value, :datatype => datatype, :language => language)
100
-
101
- # Return literal
102
- literal
90
+ RDF::Literal.new(value, :datatype => datatype, :language => language)
103
91
  else
104
92
  # Otherwise, value must be a node definition containing only @id whos value is an IRI or Blank Node identifier
105
93
  raise "Expected node reference, got #{item.inspect}" unless item.keys == %w(@id)
@@ -115,27 +103,26 @@ module JSON::LD
115
103
  # The Array to serialize as a list
116
104
  # @param [Array<RDF::Statement>] list_results
117
105
  # Statements for each item in the list
118
- # @return [RDF::Resource] BNode or nil for head of list
119
- def parse_list(list, list_results)
106
+ # @yield statement
107
+ # @yieldparam [RDF::Resource] statement
108
+ def parse_list(list)
120
109
  debug('parse_list') {"list: #{list.inspect}"}
121
110
 
122
111
  last = list.pop
123
112
  result = first_bnode = last ? node : RDF.nil
124
113
 
125
- depth do
126
- list.each do |list_item|
127
- # Set first to the result of the Object Converstion algorithm passing item.
128
- object = parse_object(list_item)
129
- list_results << RDF::Statement.new(first_bnode, RDF.first, object)
130
- rest_bnode = node
131
- list_results << RDF::Statement.new(first_bnode, RDF.rest, rest_bnode)
132
- first_bnode = rest_bnode
133
- end
134
- if last
135
- object = parse_object(last)
136
- list_results << RDF::Statement.new(first_bnode, RDF.first, object)
137
- list_results << RDF::Statement.new(first_bnode, RDF.rest, RDF.nil)
138
- end
114
+ list.each do |list_item|
115
+ # Set first to the result of the Object Converstion algorithm passing item.
116
+ object = parse_object(list_item)
117
+ yield RDF::Statement.new(first_bnode, RDF.first, object)
118
+ rest_bnode = node
119
+ yield RDF::Statement.new(first_bnode, RDF.rest, rest_bnode)
120
+ first_bnode = rest_bnode
121
+ end
122
+ if last
123
+ object = parse_object(last)
124
+ yield RDF::Statement.new(first_bnode, RDF.first, object)
125
+ yield RDF::Statement.new(first_bnode, RDF.rest, RDF.nil)
139
126
  end
140
127
  result
141
128
  end
@@ -79,11 +79,11 @@ module JSON::LD
79
79
  # the encoding to use on the output stream (Ruby 1.9+)
80
80
  # @option options [Boolean] :canonicalize (false)
81
81
  # whether to canonicalize literals when serializing
82
- # @option options [Hash] :prefixes (Hash.ordered)
82
+ # @option options [Hash] :prefixes ({})
83
83
  # the prefix mappings to use (not supported by all writers)
84
84
  # @option options [Boolean] :standard_prefixes (false)
85
85
  # Add standard prefixes to @prefixes, if necessary.
86
- # @option options [IO, Array, Hash, String, Context] :context (Hash.ordered)
86
+ # @option options [IO, Array, Hash, String, Context] :context ({})
87
87
  # context to use when serializing. Constructed context for native serialization.
88
88
  # @yield [writer] `self`
89
89
  # @yieldparam [RDF::Writer] writer
metadata CHANGED
@@ -1,167 +1,130 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: json-ld
3
- version: !ruby/object:Gem::Version
4
- version: 1.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.1
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-11 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
11
+
12
+ date: 2014-01-10 00:00:00 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
14
15
  name: rdf
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: 1.0.8
20
- type: :runtime
21
16
  prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
17
+ requirement: &id001 !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
26
21
  version: 1.0.8
27
- - !ruby/object:Gem::Dependency
22
+ type: :runtime
23
+ version_requirements: *id001
24
+ - !ruby/object:Gem::Dependency
28
25
  name: equivalent-xml
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: 0.2.8
34
- type: :development
35
26
  prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
27
+ requirement: &id002 !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
40
31
  version: 0.2.8
41
- - !ruby/object:Gem::Dependency
42
- name: open-uri-cached
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: 0.0.5
48
32
  type: :development
33
+ version_requirements: *id002
34
+ - !ruby/object:Gem::Dependency
35
+ name: open-uri-cached
49
36
  prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
37
+ requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
54
41
  version: 0.0.5
55
- - !ruby/object:Gem::Dependency
56
- name: yard
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '>='
60
- - !ruby/object:Gem::Version
61
- version: 0.8.3
62
42
  type: :development
43
+ version_requirements: *id003
44
+ - !ruby/object:Gem::Dependency
45
+ name: yard
63
46
  prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '>='
67
- - !ruby/object:Gem::Version
47
+ requirement: &id004 !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
68
51
  version: 0.8.3
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: 2.12.0
76
52
  type: :development
53
+ version_requirements: *id004
54
+ - !ruby/object:Gem::Dependency
55
+ name: rspec
77
56
  prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
57
+ requirement: &id005 !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
82
61
  version: 2.12.0
83
- - !ruby/object:Gem::Dependency
84
- name: rdf-spec
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '>='
88
- - !ruby/object:Gem::Version
89
- version: '1.0'
90
62
  type: :development
63
+ version_requirements: *id005
64
+ - !ruby/object:Gem::Dependency
65
+ name: rdf-spec
91
66
  prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '>='
95
- - !ruby/object:Gem::Version
96
- version: '1.0'
97
- - !ruby/object:Gem::Dependency
98
- name: rdf-turtle
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '>='
102
- - !ruby/object:Gem::Version
103
- version: 1.0.7
67
+ requirement: &id006 !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: "1.0"
104
72
  type: :development
73
+ version_requirements: *id006
74
+ - !ruby/object:Gem::Dependency
75
+ name: rdf-turtle
105
76
  prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - '>='
109
- - !ruby/object:Gem::Version
77
+ requirement: &id007 !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
110
81
  version: 1.0.7
111
- - !ruby/object:Gem::Dependency
112
- name: rdf-trig
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - '>='
116
- - !ruby/object:Gem::Version
117
- version: 1.0.1
118
82
  type: :development
83
+ version_requirements: *id007
84
+ - !ruby/object:Gem::Dependency
85
+ name: rdf-trig
119
86
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - '>='
123
- - !ruby/object:Gem::Version
87
+ requirement: &id008 !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
124
91
  version: 1.0.1
125
- - !ruby/object:Gem::Dependency
126
- name: rdf-isomorphic
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
92
  type: :development
93
+ version_requirements: *id008
94
+ - !ruby/object:Gem::Dependency
95
+ name: rdf-isomorphic
133
96
  prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - '>='
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: rdf-xsd
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - '>='
144
- - !ruby/object:Gem::Version
145
- version: '0'
97
+ requirement: &id009 !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - &id010
100
+ - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: "0"
146
103
  type: :development
104
+ version_requirements: *id009
105
+ - !ruby/object:Gem::Dependency
106
+ name: rdf-xsd
147
107
  prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - '>='
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- description: JSON::LD parses and serializes JSON-LD into RDF and implements expansion,
154
- compaction and framing API interfaces.
108
+ requirement: &id011 !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - *id010
111
+ type: :development
112
+ version_requirements: *id011
113
+ description: JSON::LD parses and serializes JSON-LD into RDF and implements expansion, compaction and framing API interfaces.
155
114
  email: public-linked-json@w3.org
156
- executables:
115
+ executables:
157
116
  - jsonld
158
117
  extensions: []
118
+
159
119
  extra_rdoc_files: []
160
- files:
120
+
121
+ files:
161
122
  - AUTHORS
162
123
  - README.md
163
124
  - UNLICENSE
164
125
  - VERSION
126
+ - bin/jsonld
127
+ - lib/json/ld.rb
165
128
  - lib/json/ld/api.rb
166
129
  - lib/json/ld/compact.rb
167
130
  - lib/json/ld/context.rb
@@ -177,7 +140,6 @@ files:
177
140
  - lib/json/ld/utils.rb
178
141
  - lib/json/ld/version.rb
179
142
  - lib/json/ld/writer.rb
180
- - lib/json/ld.rb
181
143
  - spec/api_spec.rb
182
144
  - spec/compact_spec.rb
183
145
  - spec/context_spec.rb
@@ -200,8 +162,6 @@ files:
200
162
  - spec/suite_remote_doc_spec.rb
201
163
  - spec/suite_to_rdf_spec.rb
202
164
  - spec/support/extensions.rb
203
- - spec/to_rdf_spec.rb
204
- - spec/writer_spec.rb
205
165
  - spec/test-files/test-1-automatic.json
206
166
  - spec/test-files/test-1-compacted.json
207
167
  - spec/test-files/test-1-context.json
@@ -258,32 +218,34 @@ files:
258
218
  - spec/test-files/test-9-context.json
259
219
  - spec/test-files/test-9-expanded.json
260
220
  - spec/test-files/test-9-input.json
261
- - bin/jsonld
221
+ - spec/to_rdf_spec.rb
222
+ - spec/writer_spec.rb
262
223
  homepage: http://github.com/ruby-rdf/json-ld
263
- licenses:
224
+ licenses:
264
225
  - Public Domain
265
226
  metadata: {}
227
+
266
228
  post_install_message:
267
229
  rdoc_options: []
268
- require_paths:
230
+
231
+ require_paths:
269
232
  - lib
270
- required_ruby_version: !ruby/object:Gem::Requirement
271
- requirements:
272
- - - '>='
273
- - !ruby/object:Gem::Version
233
+ required_ruby_version: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
274
237
  version: 1.9.2
275
- required_rubygems_version: !ruby/object:Gem::Requirement
276
- requirements:
277
- - - '>='
278
- - !ruby/object:Gem::Version
279
- version: '0'
238
+ required_rubygems_version: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - *id010
280
241
  requirements: []
242
+
281
243
  rubyforge_project: json-ld
282
- rubygems_version: 2.1.11
244
+ rubygems_version: 2.2.1
283
245
  signing_key:
284
246
  specification_version: 4
285
247
  summary: JSON-LD reader/writer for Ruby.
286
- test_files:
248
+ test_files:
287
249
  - spec/api_spec.rb
288
250
  - spec/compact_spec.rb
289
251
  - spec/context_spec.rb
@@ -305,9 +267,9 @@ test_files:
305
267
  - spec/suite_helper.rb
306
268
  - spec/suite_remote_doc_spec.rb
307
269
  - spec/suite_to_rdf_spec.rb
308
- - spec/support/extensions.rb
309
270
  - spec/to_rdf_spec.rb
310
271
  - spec/writer_spec.rb
272
+ - spec/support/extensions.rb
311
273
  - spec/test-files/test-1-automatic.json
312
274
  - spec/test-files/test-1-compacted.json
313
275
  - spec/test-files/test-1-context.json