bolognese 1.5.13 → 1.5.14

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
2
  SHA256:
3
- metadata.gz: 5d6db0a7c6030ca3d89eeabea17c1ca24927a3d4acad142a6d4d81f4cee1ba0c
4
- data.tar.gz: 17c8cf5338cc599f64eb6f8b84dc6f169907bc28cbdadd862c45f0f92935f585
3
+ metadata.gz: d5de9f57a9ed6c40f7187f42cfc979ab6fb0c565f4e2ebcb4f80279163befcad
4
+ data.tar.gz: 0f78b0cb00691d1a4b01943022956105e4fe0e4da03333b21a1f0757496fdf93
5
5
  SHA512:
6
- metadata.gz: 0da9157830bb1309c9388b245e1c87537e437fcf940f093a4ca0bb9e9592f8bb0665a1d66ce1b2e6192fa13e16f775e236c7f8df8c24e987ca7154fb0e8f6682
7
- data.tar.gz: 9ba70627bff49c84af11e17f60c75bfe1db2efe2ea4ae04e99c5e44c068e97804500a83df32df8b2f45c62cc4faec768a5081d549878e74d2c0b8364e1361b31
6
+ metadata.gz: 4ba85d8b48378f9dbc69a58818f5e7684a8677e4b3f114ae1981f59928d0c4df9b9644bc010354cb59357ef0d8cf77e2778c41d96d9a4a501726770738d61a54
7
+ data.tar.gz: 221ed783cb5430be487099f3e386dc3bbcce1251f4d7d65cca9d35d763be1907da23032dbeebd8a7fdfd6cf35d89489c443ed2044efcf8dabda7a725b86da0bb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.5.13)
4
+ bolognese (1.5.14)
5
5
  activesupport (>= 4.2.5)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (>= 5.1.0)
@@ -121,7 +121,15 @@ module Bolognese
121
121
  end
122
122
 
123
123
  def graph
124
+ # preload schema_org context
125
+ JSON::LD::Context.add_preloaded(
126
+ 'http://schema.org/',
127
+ JSON::LD::Context.new.parse('resources/schema_org/jsonldcontext.json')
128
+ )
129
+
124
130
  RDF::Graph.new << JSON::LD::API.toRdf(schema_hsh)
131
+ rescue NameError
132
+ nil
125
133
  end
126
134
 
127
135
  def citeproc_hsh
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.5.13"
2
+ VERSION = "1.5.14"
3
3
  end
@@ -1,16 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "json/ld"
4
-
5
3
  module Bolognese
6
4
  module Writers
7
5
  module RdfXmlWriter
8
- # preload schema_org context
9
- ::JSON::LD::Context.add_preloaded(
10
- 'http://schema.org/',
11
- ::JSON::LD::Context.new.parse('resources/schema_org/jsonldcontext.json')
12
- )
13
-
14
6
  def rdf_xml
15
7
  graph.dump(:rdfxml, prefixes: { schema: "http://schema.org/" })
16
8
  end
@@ -1,16 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "json/ld"
4
-
5
3
  module Bolognese
6
4
  module Writers
7
5
  module TurtleWriter
8
- # preload schema_org context
9
- ::JSON::LD::Context.add_preloaded(
10
- 'http://schema.org/',
11
- ::JSON::LD::Context.new.parse('resources/schema_org/jsonldcontext.json')
12
- )
13
-
14
6
  def turtle
15
7
  graph.dump(:ttl, prefixes: { schema: "http://schema.org/" })
16
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolognese
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.13
4
+ version: 1.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner