json-ld 1.1.6 → 1.1.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/bin/jsonld +4 -4
  4. data/spec/context_spec.rb +2 -2
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efe1ae3742a83e43c9d36afb4aa6c1538a7eab4d
4
- data.tar.gz: d78e142b4f1576090ada71c7ecb7e6e002834251
3
+ metadata.gz: 7fee10018378978dc0a87102e4c783208b1613cf
4
+ data.tar.gz: 9cde4a421857ee6a66cd9e0978ec168046d2675b
5
5
  SHA512:
6
- metadata.gz: 18cab81a39bdb983a404cd67e98bc26fb8d447300a9a0d7c971e068c3246bb243cbf5943e5965b3806a015c0c71c1ac489606a6beb62ee7f366d56618bf53282
7
- data.tar.gz: 383e350f9300be24e6a6ad5e21e3c41253de440628207de0190aba959524da3d28d672965c96b5a7b03c5ec44657886229fe2c43eec1d6da9b64ef4c617f3f1d
6
+ metadata.gz: a85611f4cd46ca52b6a75bdb2cddb6185e603848c3bea5caf1719936f9f96d32ee05fbd5bf4c55c1b41fdebef51d9fad450797a64f8bc73a37b47097a2ee341f
7
+ data.tar.gz: df6233a9715ce191085f38a4b21f158dc0fdc36efca5db1fd3eee9049925d5117101ed96717c93cfab1544d058ce99f2df284a9b37d903d62e387c958d944e08
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.6
1
+ 1.1.6.1
data/bin/jsonld CHANGED
@@ -47,11 +47,11 @@ def run(input, options)
47
47
  options[:output].puts output.to_json(JSON::LD::JSON_STATE)
48
48
  STDERR.puts "Framed in #{secs} seconds." unless options[:quiet]
49
49
  else
50
- r = reader_class.new(input, options[:parser_options])
51
- g = RDF::Repository.new << r
50
+ options = options.merge(:expandContext => options.delete(:context)) if options.has_key?(:context)
51
+ g = JSON::LD::API.toRdf(input, options)
52
52
  secs = Time.new - start
53
53
  num = g.count
54
- parser_options = options[:parser_options].merge(:prefixes => r.prefixes, :standard_prefixes => true)
54
+ parser_options = options[:parser_options].merge(:standard_prefixes => true)
55
55
  options[:output].puts g.dump(options[:output_format], parser_options)
56
56
  STDERR.puts "\nParsed #{num} statements in #{secs} seconds @ #{num/secs} statements/second." unless options[:quiet]
57
57
  end
@@ -136,7 +136,7 @@ if ARGV.empty?
136
136
  run(StringIO.new(s), options)
137
137
  else
138
138
  ARGV.each do |file|
139
- run(Kernel.open(file), options)
139
+ run(file, options)
140
140
  end
141
141
  end
142
142
  puts
@@ -1021,7 +1021,7 @@ describe JSON::LD::Context do
1021
1021
  "native boolean" => ["foo", true, {"@value" => true}],
1022
1022
  "native integer" => ["foo", 1, {"@value" => 1}],
1023
1023
  "native double" => ["foo", 1.1e1, {"@value" => 1.1E1}],
1024
- "native date" => ["foo", Date.parse("2011-12-27Z"), {"@value" => "2011-12-27Z", "@type" => RDF::XSD.date.to_s}],
1024
+ "native date" => ["foo", Date.parse("2011-12-27"), {"@value" => "2011-12-27", "@type" => RDF::XSD.date.to_s}],
1025
1025
  "native time" => ["foo", Time.parse("10:11:12Z"), {"@value" => "10:11:12Z", "@type" => RDF::XSD.time.to_s}],
1026
1026
  "native dateTime" =>["foo", DateTime.parse("2011-12-27T10:11:12Z"), {"@value" => "2011-12-27T10:11:12Z", "@type" => RDF::XSD.dateTime.to_s}],
1027
1027
  "rdf boolean" => ["foo", RDF::Literal(true), {"@value" => "true", "@type" => RDF::XSD.boolean.to_s}],
@@ -1029,7 +1029,7 @@ describe JSON::LD::Context do
1029
1029
  "rdf decimal" => ["foo", RDF::Literal::Decimal.new(1.1), {"@value" => "1.1", "@type" => RDF::XSD.decimal.to_s}],
1030
1030
  "rdf double" => ["foo", RDF::Literal::Double.new(1.1), {"@value" => "1.1E0", "@type" => RDF::XSD.double.to_s}],
1031
1031
  "rdf URI" => ["foo", RDF::URI("foo"), {"@id" => "foo"}],
1032
- "rdf date " => ["foo", RDF::Literal(Date.parse("2011-12-27Z")), {"@value" => "2011-12-27Z", "@type" => RDF::XSD.date.to_s}],
1032
+ "rdf date " => ["foo", RDF::Literal(Date.parse("2011-12-27")), {"@value" => "2011-12-27", "@type" => RDF::XSD.date.to_s}],
1033
1033
  "rdf nonNeg" => ["foo", RDF::Literal::NonNegativeInteger.new(1), {"@value" => "1", "@type" => RDF::XSD.nonNegativeInteger}],
1034
1034
  "rdf float" => ["foo", RDF::Literal::Float.new(1.0), {"@value" => "1.0", "@type" => RDF::XSD.float}],
1035
1035
  }.each do |title, (key, compacted, expanded)|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-ld
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-27 00:00:00.000000000 Z
11
+ date: 2014-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf