ttl2html 0.0.1 → 0.0.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.
- checksums.yaml +4 -4
- data/lib/ttl2html/template.rb +2 -1
- data/lib/ttl2html/version.rb +1 -1
- data/lib/ttl2html.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d8e9b243f7b3fedc2e763b8c6bcce2ec517e032
|
4
|
+
data.tar.gz: 9148fdcd2b30cb2742b2f51f870a30469d50e10a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3418c27b8b4717bc1e47129c4053ff79ae60c3bb78fdbbf3b93026df614fd6291b2306ec7b2f702947704a1d2eecdd438f5f895cb3ac7f8c5b52ff657186aee3
|
7
|
+
data.tar.gz: 6f5e096d73d49da8b79543b01f7e197c472f31da5376ef0609bba88cc943ccdc0ab0d6d3bb7c7bed986a061f870beb518aa4307529474020ffd89df9c443dc85
|
data/lib/ttl2html/template.rb
CHANGED
@@ -12,6 +12,7 @@ module TTL2HTML
|
|
12
12
|
@template = template
|
13
13
|
@param = param
|
14
14
|
@template_path = [ Dir.pwd, File.join(Dir.pwd, "templates") ]
|
15
|
+
@template_path << File.join(File.dirname(__FILE__), "..", "..", "templates")
|
15
16
|
end
|
16
17
|
def output_to(file, param = {})
|
17
18
|
@param.update(param)
|
@@ -109,7 +110,7 @@ module TTL2HTML
|
|
109
110
|
end
|
110
111
|
def format_triples(triples)
|
111
112
|
param_local = @param.merge(data: triples)
|
112
|
-
to_html_raw("
|
113
|
+
to_html_raw("triples.html.erb", param_local)
|
113
114
|
end
|
114
115
|
end
|
115
116
|
end
|
data/lib/ttl2html/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
TTL2HTML::VERSION = "0.0.
|
1
|
+
TTL2HTML::VERSION = "0.0.2"
|
data/lib/ttl2html.rb
CHANGED
@@ -63,7 +63,7 @@ module TTL2HTML
|
|
63
63
|
str = "<#{predicate}> "
|
64
64
|
str << @graph.query([subject, predicate, nil]).objects.sort_by do |object|
|
65
65
|
if object.resource? and not object.iri? # blank node:
|
66
|
-
|
66
|
+
@graph.query([object, nil, nil]).statements.sort_by{|e|
|
67
67
|
[ e.predicate, e.object ]
|
68
68
|
}.map{|e|
|
69
69
|
[ e.predicate, e.object ]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttl2html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masao Takaku
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -108,7 +108,7 @@ files:
|
|
108
108
|
- templates/default.html.erb
|
109
109
|
- templates/layout.html.erb
|
110
110
|
- templates/triples.html.erb
|
111
|
-
homepage: https://github.
|
111
|
+
homepage: https://github.com/masao/ttl2html
|
112
112
|
licenses:
|
113
113
|
- MIT
|
114
114
|
metadata: {}
|