json-ld 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -213,9 +213,9 @@ Full documentation available on [RubyDoc](http://rubydoc.info/gems/json-ld/file/
213
213
  * {JSON::LD::EvaluationContext}
214
214
  * {JSON::LD::Format}
215
215
  * {JSON::LD::Frame}
216
- * {JSON::LD::FromTriples}
216
+ * {JSON::LD::FromRDF}
217
217
  * {JSON::LD::Reader}
218
- * {JSON::LD::Triples}
218
+ * {JSON::LD::ToRDF}
219
219
  * {JSON::LD::Writer}
220
220
 
221
221
  ## Dependencies
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -19,11 +19,15 @@ module JSON::LD
19
19
  class API
20
20
  include Expand
21
21
  include Compact
22
- include Triples
22
+ include ToRDF
23
23
  include Flatten
24
- include FromTriples
24
+ include FromRDF
25
25
  include Frame
26
26
 
27
+ # Options used for open_file
28
+ OPEN_OPTS = {
29
+ :headers => %w(Accept: application/ld+json, application/json)
30
+ }
27
31
  attr_accessor :value
28
32
  attr_accessor :context
29
33
 
@@ -31,7 +35,7 @@ module JSON::LD
31
35
  # Initialize the API, reading in any document and setting global options
32
36
  #
33
37
  # @param [String, #read, Hash, Array] input
34
- # @param [String, #read,, Hash, Array] context
38
+ # @param [String, #read,, Hash, Array, JSON::LD::EvaluationContext] context
35
39
  # An external context to use additionally to the context embedded in input when expanding the input.
36
40
  # @param [Hash{Symbol => Object}] options
37
41
  # @option options [Boolean] :base
@@ -57,10 +61,11 @@ module JSON::LD
57
61
  when IO, StringIO then JSON.parse(input.read)
58
62
  when String
59
63
  content = nil
60
- RDF::Util::File.open_file(input) {|f| content = JSON.parse(f.read)}
64
+ @options = {:base => input}.merge(@options)
65
+ RDF::Util::File.open_file(input, OPEN_OPTS) {|f| content = JSON.parse(f.read)}
61
66
  content
62
67
  end
63
- @context = EvaluationContext.new(options)
68
+ @context = EvaluationContext.new(@options)
64
69
  @context = @context.parse(context) if context
65
70
 
66
71
  if block_given?
@@ -81,12 +86,12 @@ module JSON::LD
81
86
  #
82
87
  # @param [String, #read, Hash, Array] input
83
88
  # The JSON-LD object to copy and perform the expansion upon.
84
- # @param [String, #read, Hash, Array] context
89
+ # @param [String, #read, Hash, Array, JSON::LD::EvaluationContext] context
85
90
  # An external context to use additionally to the context embedded in input when expanding the input.
86
91
  # @param [Proc] callback (&block)
87
92
  # Alternative to using block, with same parameters.
88
93
  # @param [Hash{Symbol => Object}] options
89
- # See options in {#initialize}
94
+ # See options in {JSON::LD::API#initialize}
90
95
  # @raise [InvalidContext]
91
96
  # @yield jsonld
92
97
  # @yieldparam [Array<Hash>] jsonld
@@ -123,13 +128,13 @@ module JSON::LD
123
128
  #
124
129
  # @param [String, #read, Hash, Array] input
125
130
  # The JSON-LD object to copy and perform the compaction upon.
126
- # @param [String, #read, Hash, Array] context
131
+ # @param [String, #read, Hash, Array, JSON::LD::EvaluationContext] context
127
132
  # The base context to use when compacting the input.
128
133
  # @param [Proc] callback (&block)
129
134
  # Alternative to using block, with same parameters.
130
135
  # @param [Hash{Symbol => Object}] options
131
- # See options in {#initialize}
132
- # Other options passed to {#expand}
136
+ # See options in {JSON::LD::API#initialize}
137
+ # Other options passed to {JSON::LD::API.expand}
133
138
  # @yield jsonld
134
139
  # @yieldparam [Hash] jsonld
135
140
  # The compacted JSON-LD document
@@ -175,13 +180,13 @@ module JSON::LD
175
180
  # The JSON-LD object or array of JSON-LD objects to flatten or an IRI referencing the JSON-LD document to flatten.
176
181
  # @param [String, RDF::URI] graph
177
182
  # The graph in the document that should be flattened. To return the default graph @default has to be passed, for the merged graph @merged and for any other graph the IRI identifying the graph has to be passed. The default value is @merged.
178
- # @param [String, #read, Hash, Array] context
183
+ # @param [String, #read, Hash, Array, JSON::LD::EvaluationContext] context
179
184
  # An optional external context to use additionally to the context embedded in input when expanding the input.
180
185
  # @param [Proc] callback (&block)
181
186
  # Alternative to using block, with same parameters.
182
187
  # @param [Hash{Symbol => Object}] options
183
- # See options in {#initialize}
184
- # Other options passed to {#expand}
188
+ # See options in {JSON::LD::API#initialize}
189
+ # Other options passed to {JSON::LD::API.expand}
185
190
  # @yield jsonld
186
191
  # @yieldparam [Hash] jsonld
187
192
  # The framed JSON-LD document
@@ -243,8 +248,8 @@ module JSON::LD
243
248
  # @param [Proc] callback (&block)
244
249
  # Alternative to using block, with same parameters.
245
250
  # @param [Hash{Symbol => Object}] options
246
- # See options in {#initialize}
247
- # Other options passed to {#expand}
251
+ # See options in {JSON::LD::API#initialize}
252
+ # Other options passed to {JSON::LD::API.expand}
248
253
  # @option options [Boolean] :embed (true)
249
254
  # a flag specifying that objects should be directly embedded in the output,
250
255
  # instead of being referred to by their IRI.
@@ -280,7 +285,7 @@ module JSON::LD
280
285
  when IO, StringIO then JSON.parse(frame.read)
281
286
  when String
282
287
  content = nil
283
- RDF::Util::File.open_file(frame) {|f| content = JSON.parse(f.read)}
288
+ RDF::Util::File.open_file(frame, OPEN_OPTS) {|f| content = JSON.parse(f.read)}
284
289
  content
285
290
  end
286
291
 
@@ -337,13 +342,13 @@ module JSON::LD
337
342
  #
338
343
  # @param [String, #read, Hash, Array] input
339
344
  # The JSON-LD object to process when outputting statements.
340
- # @param [String, #read, Hash, Array] context
345
+ # @param [String, #read, Hash, Array, JSON::LD::EvaluationContext] context
341
346
  # An external context to use additionally to the context embedded in input when expanding the input.
342
347
  # @param [Proc] callback (&block)
343
348
  # Alternative to using block, with same parameteres.
344
349
  # @param [{Symbol,String => Object}] options
345
- # See options in {#initialize}
346
- # Options passed to {#expand}
350
+ # See options in {JSON::LD::API#initialize}
351
+ # Options passed to {JSON::LD::API.expand}
347
352
  # @raise [InvalidContext]
348
353
  # @yield statement
349
354
  # @yieldparam [RDF::Statement] statement
@@ -373,7 +378,7 @@ module JSON::LD
373
378
  # @param [Proc] callback (&block)
374
379
  # Alternative to using block, with same parameteres.
375
380
  # @param [Hash{Symbol => Object}] options
376
- # See options in {#initialize}
381
+ # See options in {JSON::LD::API#initialize}
377
382
  # @yield jsonld
378
383
  # @yieldparam [Hash] jsonld
379
384
  # The JSON-LD document in expanded form
@@ -3,87 +3,76 @@ require 'json'
3
3
  require 'bigdecimal'
4
4
 
5
5
  module JSON::LD
6
- class EvaluationContext # :nodoc:
6
+ class EvaluationContext
7
7
  include Utils
8
8
 
9
9
  # The base.
10
10
  #
11
- # The document base IRI, used for expanding relative IRIs.
12
- #
13
- # @attr_reader [RDF::URI]
11
+ # @!attribute [rw] base
12
+ # @return [RDF::URI] Document base IRI, used for expanding relative IRIs.
14
13
  attr_reader :base
15
14
 
16
- # The base IRI of the context, if loaded remotely.
17
- #
18
- # @attr_accessor [RDF::URI]
15
+ # @!attribute [rw] context_base
16
+ # @return [RDF::URI] base IRI of the context, if loaded remotely.
19
17
  attr_accessor :context_base
20
18
 
21
- # A list of current, in-scope mappings from term to IRI.
22
- #
23
- # @attr_accessor [Hash{String => String}]
19
+ # @!attribute [rw] mappings
20
+ # @return [Hash{String => String}] A list of current, in-scope mappings from term to IRI.
24
21
  attr_accessor :mappings
25
22
 
26
- # Reverse mappings from IRI to a term or CURIE
27
- #
28
- # @attr_accessor [Hash{RDF::URI => String}]
23
+ # @!attribute [rw] iri_to_curie
24
+ # @return [Hash{RDF::URI => String}] Reverse mappings from IRI to a term or CURIE
29
25
  attr_accessor :iri_to_curie
30
26
 
31
- # Reverse mappings from IRI to term only for terms, not CURIEs
32
- #
33
- # @attr_accessor [Hash{RDF::URI => String}]
27
+ # @!attribute [rw] iri_to_term
28
+ # @return [Hash{RDF::URI => String}] Reverse mappings from IRI to term only for terms, not CURIEs
34
29
  attr_accessor :iri_to_term
35
30
 
36
31
  # Type coersion
37
32
  #
38
- # The @type keyword is used to specify type coersion rules for the data. For each key in the map, the
39
- # key is a String representation of the property for which String values will be coerced and
40
- # the value is the datatype (or @id) to coerce to. Type coersion for
41
- # the value `@id` asserts that all vocabulary terms listed should undergo coercion to an IRI,
42
- # including CURIE processing for compact IRI Expressions like `foaf:homepage`.
33
+ # The @type keyword is used to specify type coersion rules for the data. For each key in the map, the key is a String representation of the property for which String values will be coerced and the value is the datatype (or @id) to coerce to. Type coersion for the value `@id` asserts that all vocabulary terms listed should undergo coercion to an IRI, including CURIE processing for compact IRI Expressions like `foaf:homepage`.
43
34
  #
44
- # @attr_accessor [Hash{String => String}]
35
+ # @!attribute [rw] coercions
36
+ # @return [Hash{String => String}]
45
37
  attr_accessor :coercions
46
38
 
47
39
  # List coercion
48
40
  #
49
- # The @container keyword is used to specify how arrays are to be treated.
50
- # A value of @list indicates that arrays of values are to be treated as an ordered list.
51
- # A value of @set indicates that arrays are to be treated as unordered and that
52
- # singular values are always coerced to an array form on expansion and compaction.
53
- # @attr_accessor [Hash{String => String}]
41
+ # The @container keyword is used to specify how arrays are to be treated. A value of @list indicates that arrays of values are to be treated as an ordered list. A value of @set indicates that arrays are to be treated as unordered and that singular values are always coerced to an array form on expansion and compaction.
42
+ # @!attribute [rw] containers
43
+ # @return [Hash{String => String}]
54
44
  attr_accessor :containers
55
45
 
56
46
  # Language coercion
57
47
  #
58
- # The @language keyword is used to specify language coercion rules for the data. For each key in the map, the
59
- # key is a String representation of the property for which String values will be coerced and
60
- # the value is the language to coerce to. If no property-specific language is given,
61
- # any default language from the context is used.
48
+ # The @language keyword is used to specify language coercion rules for the data. For each key in the map, the key is a String representation of the property for which String values will be coerced and the value is the language to coerce to. If no property-specific language is given, any default language from the context is used.
62
49
  #
63
- # @attr_accessor [Hash{String => String}]
50
+ # @!attribute [rw] languages
51
+ # @return [Hash{String => String}]
64
52
  attr_accessor :languages
65
53
 
66
54
  # Default language
67
55
  #
68
56
  #
69
57
  # This adds a language to plain strings that aren't otherwise coerced
70
- # @attr_accessor [String]
58
+ # @!attribute [rw] default_language
59
+ # @return [String]
71
60
  attr_accessor :default_language
72
61
 
73
62
  # Default vocabulary
74
63
  #
75
- #
76
64
  # Sets the default vocabulary used for expanding terms which
77
65
  # aren't otherwise absolute IRIs
78
- # @attr_accessor [String]
66
+ # @!attribute [rw] vocab
67
+ # @return [String]
79
68
  attr_accessor :vocab
80
69
 
81
- # Global options used in generating IRIs
82
- # @attr_accessor [Hash] options
70
+ # @!attribute [rw] options
71
+ # @return [Hash{Symbol => Object}] Global options used in generating IRIs
83
72
  attr_accessor :options
84
73
 
85
- # A context provided to us that we can use without re-serializing
86
- # @attr_accessor [EvaluationContext]
74
+ # @!attribute [rw] provided_context
75
+ # @return [EvaluationContext] A context provided to us that we can use without re-serializing
87
76
  attr_accessor :provided_context
88
77
 
89
78
  ##
@@ -143,7 +132,7 @@ module JSON::LD
143
132
  # Load context document, if it is a string
144
133
  ec = EvaluationContext.new(options)
145
134
  when String
146
- debug("parse") {"remote: #{context}"}
135
+ debug("parse") {"remote: #{context}, base: #{context_base || base}"}
147
136
  # Load context document, if it is a string
148
137
  ec = nil
149
138
  begin
@@ -5,12 +5,12 @@ module RDF
5
5
  # Properties arranged as a hash with the predicate Term as index to an array of resources or literals
6
6
  #
7
7
  # Example:
8
- # graph.load(':foo a :bar; rdfs:label "An example" .', "http://example.com/")
9
- # graph.resources(URI.new("http://example.com/subject")) =>
10
- # {
11
- # "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" => [<http://example.com/#bar>],
12
- # "http://example.com/#label" => ["An example"]
13
- # }
8
+ # graph.load(':foo a :bar; rdfs:label "An example" .', "http://example.com/")
9
+ # graph.resources(URI.new("http://example.com/subject")) =>
10
+ # {
11
+ # "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" => \[<http://example.com/#bar>\],
12
+ # "http://example.com/#label" => \["An example"\]
13
+ # }
14
14
  def properties(subject, recalc = false)
15
15
  @properties ||= {}
16
16
  @properties.delete(subject.to_s) if recalc
@@ -1,7 +1,7 @@
1
1
  require 'rdf/nquads'
2
2
 
3
3
  module JSON::LD
4
- module FromTriples
4
+ module FromRDF
5
5
  include Utils
6
6
 
7
7
  ##
@@ -2,19 +2,16 @@ module JSON::LD
2
2
  # Simple Ruby reflector class to provide native
3
3
  # access to JSON-LD objects
4
4
  class Resource
5
- # Object representation of resource
6
- #
7
- # @attr_reader [Hash<String => Object] attributes
5
+ # @!attribute [r] attributes
6
+ # @return [Hash<String => Object] Object representation of resource
8
7
  attr_reader :attributes
9
8
 
10
- # ID of this resource
11
- #
12
- # @attr_reader [String] id
9
+ # @!attribute [r] id
10
+ # @return [String] ID of this resource
13
11
  attr_reader :id
14
12
 
15
- # Context associated with this resource
16
- #
17
- # @attr_reader [JSON::LD::EvaluationContext] context
13
+ # @!attribute [r] context
14
+ # @return [JSON::LD::EvaluationContext] Context associated with this resource
18
15
  attr_reader :context
19
16
 
20
17
  # Is this resource clean (i.e., saved to mongo?)
@@ -1,7 +1,7 @@
1
1
  require 'rdf/nquads'
2
2
 
3
3
  module JSON::LD
4
- module Triples
4
+ module ToRDF
5
5
  include Utils
6
6
 
7
7
  ##
@@ -17,8 +17,8 @@ module JSON::LD
17
17
  # @param [RDF::Node] name
18
18
  # Inherited inherited graph name
19
19
  # @return [RDF::Resource] defined by this element
20
- # @yield :statement
21
- # @yieldparam [RDF::Statement] :statement
20
+ # @yield statement
21
+ # @yieldparam [RDF::Statement] statement
22
22
  def statements(path, element, subject, property, name, &block)
23
23
  debug(path) {"statements: e=#{element.inspect}, s=#{subject.inspect}, p=#{property.inspect}, n=#{name.inspect}"}
24
24
  @node_seq = "t0" unless subject || property
@@ -127,8 +127,8 @@ module JSON::LD
127
127
  # @param [RDF::Resource] name
128
128
  # Inherited named graph context
129
129
  # @return [RDF::Resource] BNode or nil for head of list
130
- # @yield :statement
131
- # @yieldparam [RDF::Statement] :statement
130
+ # @yield statement
131
+ # @yieldparam [RDF::Statement] statement
132
132
  def parse_list(path, list, property, name, &block)
133
133
  debug(path) {"list: #{list.inspect}, p=#{property.inspect}, n=#{name.inspect}"}
134
134
 
@@ -167,8 +167,8 @@ module JSON::LD
167
167
  # @param [RDF::URI] predicate the predicate of the statement
168
168
  # @param [RDF::Term] object the object of the statement
169
169
  # @param [RDF::Resource] name the named graph context of the statement
170
- # @yield :statement
171
- # @yieldparam [RDF::Statement] :statement
170
+ # @yield statement
171
+ # @yieldparam [RDF::Statement] statement
172
172
  def add_quad(path, subject, predicate, object, name)
173
173
  predicate = RDF.type if predicate == '@type'
174
174
  object = context.expand_iri(object.to_s, :quiet => true) if object.literal? && predicate == RDF.type
@@ -54,10 +54,12 @@ module JSON::LD
54
54
  include Utils
55
55
  format Format
56
56
 
57
- # @attr_reader [RDF::Graph] Graph of statements serialized
57
+ # @!attribute [r] graph
58
+ # @return [RDF::Graph] Graph of statements serialized
58
59
  attr_reader :graph
59
60
 
60
- # @attr_reader [EvaluationContext] context used to load and administer contexts
61
+ # @!attribute [r] context
62
+ # @return [EvaluationContext] context used to load and administer contexts
61
63
  attr_reader :context
62
64
 
63
65
  ##
@@ -8,7 +8,7 @@ describe JSON::LD::Format do
8
8
  @format_class = JSON::LD::Format
9
9
  end
10
10
 
11
- it_should_behave_like RDF_Format
11
+ include RDF_Format
12
12
 
13
13
  describe ".for" do
14
14
  formats = [
@@ -8,7 +8,7 @@ describe JSON::LD::Reader do
8
8
  @reader = JSON::LD::Reader.new(StringIO.new(""))
9
9
  end
10
10
 
11
- it_should_behave_like RDF_Reader
11
+ include RDF_Reader
12
12
 
13
13
  describe ".for" do
14
14
  formats = [
@@ -8,7 +8,7 @@ describe JSON::LD::Writer do
8
8
  @writer = JSON::LD::Writer.new(StringIO.new(""))
9
9
  end
10
10
 
11
- it_should_behave_like RDF_Writer
11
+ include RDF_Writer
12
12
 
13
13
  describe ".for" do
14
14
  formats = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-ld
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-06 00:00:00.000000000 Z
12
+ date: 2012-12-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.3.5
21
+ version: 0.3.11
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.3.5
29
+ version: 0.3.11
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: json
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
- version: 1.6.5
37
+ version: 1.7.5
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: 1.6.5
45
+ version: 1.7.5
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: equivalent-xml
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - ! '>='
84
84
  - !ruby/object:Gem::Version
85
- version: 0.7.4
85
+ version: 0.8.3
86
86
  type: :development
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - ! '>='
92
92
  - !ruby/object:Gem::Version
93
- version: 0.7.4
93
+ version: 0.8.3
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: spira
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -114,7 +114,7 @@ dependencies:
114
114
  requirements:
115
115
  - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
- version: 2.8.0
117
+ version: 2.12.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
@@ -122,7 +122,7 @@ dependencies:
122
122
  requirements:
123
123
  - - ! '>='
124
124
  - !ruby/object:Gem::Version
125
- version: 2.8.0
125
+ version: 2.12.0
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: rdf-spec
128
128
  requirement: !ruby/object:Gem::Requirement
@@ -130,7 +130,7 @@ dependencies:
130
130
  requirements:
131
131
  - - ! '>='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.3.5
133
+ version: 0.3.11
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ dependencies:
138
138
  requirements:
139
139
  - - ! '>='
140
140
  - !ruby/object:Gem::Version
141
- version: 0.3.5
141
+ version: 0.3.11
142
142
  - !ruby/object:Gem::Dependency
143
143
  name: rdf-turtle
144
144
  requirement: !ruby/object:Gem::Requirement
@@ -146,7 +146,7 @@ dependencies:
146
146
  requirements:
147
147
  - - ! '>='
148
148
  - !ruby/object:Gem::Version
149
- version: 0.1.1
149
+ version: 0.3.2
150
150
  type: :development
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ dependencies:
154
154
  requirements:
155
155
  - - ! '>='
156
156
  - !ruby/object:Gem::Version
157
- version: 0.1.1
157
+ version: 0.3.2
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: rdf-trig
160
160
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +162,7 @@ dependencies:
162
162
  requirements:
163
163
  - - ! '>='
164
164
  - !ruby/object:Gem::Version
165
- version: 0.1.1
165
+ version: 0.1.4
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
@@ -170,7 +170,7 @@ dependencies:
170
170
  requirements:
171
171
  - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
- version: 0.1.1
173
+ version: 0.1.4
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: rdf-isomorphic
176
176
  requirement: !ruby/object:Gem::Requirement
@@ -194,7 +194,7 @@ dependencies:
194
194
  requirements:
195
195
  - - ! '>='
196
196
  - !ruby/object:Gem::Version
197
- version: 0.3.7
197
+ version: 0.3.8
198
198
  type: :development
199
199
  prerelease: false
200
200
  version_requirements: !ruby/object:Gem::Requirement
@@ -202,7 +202,7 @@ dependencies:
202
202
  requirements:
203
203
  - - ! '>='
204
204
  - !ruby/object:Gem::Version
205
- version: 0.3.7
205
+ version: 0.3.8
206
206
  - !ruby/object:Gem::Dependency
207
207
  name: backports
208
208
  requirement: !ruby/object:Gem::Requirement
@@ -229,7 +229,6 @@ extra_rdoc_files: []
229
229
  files:
230
230
  - AUTHORS
231
231
  - README.markdown
232
- - History.markdown
233
232
  - UNLICENSE
234
233
  - VERSION
235
234
  - lib/json/ld/api.rb
@@ -1,74 +0,0 @@
1
- === 0.3.0
2
- * Fix regression on opening self-relative contexts.
3
- * When generating RDF, allow @type to be a BNode. This fixes issue #2
4
- * Add {JSON::LD::Resource} class for simple ruby-like management of JSON-LD nodes.
5
- * Term Rank and IRI compaction updates.
6
-
7
- === 0.1.6
8
- * Added flattening API, and updated algorithm.
9
- * Fixed framing issues using updated flattening.
10
-
11
- === 0.1.5
12
- * Added support for @vocab.
13
-
14
- === 0.1.4.1
15
- * Include rdf-xsd for some specs.
16
- * Refactor #expand_value to deal with previous matching on RDF::Literal::Integer for sub-types.
17
-
18
- === 0.1.4
19
- * Added bin/jsonld for command-line manipulation of JSON-LD files and to perform RDF transformations.
20
-
21
- === 0.1.3
22
- * Progress release syncing with the spec. Most expansion and compaction tests pass. RDF is okay, framing has many issues.
23
-
24
- === 0.1.1
25
- * Changed @literal to @value.
26
- * Change expanded double format to %1.6e
27
- * Only recognize application/ld+json and :jsonld.
28
-
29
- === 0.1.0
30
- * New @context processing rules.
31
- * @iri and @subject changed to @id.
32
- * @datatype changed to @type.
33
- * @coerce keys can be CURIEs or IRIs (not spec'd).
34
- * @language in @context.
35
- * Implemented JSON::LD::API for .compact and .expand.
36
- * Support relative IRI expansion based on document location.
37
- * Make sure that keyword aliases are fully considered on both input and output and used when compacting.
38
-
39
- === 0.0.8
40
- * RDF.rb 0.3.4 compatibility.
41
- * Format detection.
42
- * Use new @list syntax for parsing ordered collections.
43
- * Separate normalize from canonicalize
44
-
45
-
46
- === 0.0.7
47
- * Change MIME Type and extension from application/json, .json to application/ld+json, .jsonld.
48
- * Also added application/x-ld+json
49
- * Process a remote @context
50
- * Updated to current state of spec, including support for aliased keywords
51
- * Update Writer to output consistent with current spec.
52
-
53
- === 0.0.6
54
- * Another order problem (in literals)
55
-
56
- === 0.0.5
57
- * Fix @literal, @language, @datatype, and @iri serialization
58
- * Use InsertOrderPreservingHash for Ruby 1.8
59
-
60
- === 0.0.4
61
- * Fixed ruby 1.8 hash-order problem when parsing @context.
62
- * Add .jsonld file extention and format
63
- * JSON-LD Writer
64
- * Use test suite from json.org
65
- * Use '@type' instead of 'a' and '@subject' instead of '@'
66
-
67
- === 0.0.3
68
- * Downgrade RDF.rb requirement from 0.4.0 to 0.3.3.
69
-
70
- === 0.0.2
71
- * Functional Reader with reasonable test coverage.
72
-
73
- === 0.0.1
74
- * First release of project scaffold.