ttl2html 2.0.4 → 2.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '084c5628298600b2db40243a0e60c72ca30c5779e8d8b2ad30457120775c9a59'
4
- data.tar.gz: 924185ab4a534bd855b296f33bb1de6f9c29bc68e2fc68fb116dba31e92da298
3
+ metadata.gz: c2ba13439ae39fd922568aa533324a67b761e7cccde1ec8f5d443fe7a0147d9a
4
+ data.tar.gz: e214ea7dd81f5bd44d20d7012ce0cfbebe3399987d2739bb028c99bd7a05369c
5
5
  SHA512:
6
- metadata.gz: 91a17540510ac5c330856096b23c982f5a8eae3cab21cf850341748876ad6d13129ee56ad7b4b895a50e124c7289b1c96f5b3617311b4b926d14a8db594cbb8d
7
- data.tar.gz: 462b686e9abd94a004208b776d59ea9cf386333d9334cb25c2a7c7c5cb5dd7b0c598f9db3bf48181dbbcbc9d645fb8779a89edf7a1c96bd358b8bed74d5aab03
6
+ metadata.gz: 7ea0403e8e26f58d089f60492c09ba40cf1bf61a4a0fae601f6721352e962f010b94cd92477940eb13d30cce5bad5c09aeac49e7c1a86a463fc9d24a61bc1979
7
+ data.tar.gz: 5af7c483a9568c8c1d289d4c5a9e5a824081193397425d19c517b5f7e52c9fd035bf04f46f8d73edefd9a1e703f251c321ede69aa3804175d532dc4f9d8e4a1c
@@ -1 +1 @@
1
- TTL2HTML::VERSION = "2.0.4"
1
+ TTL2HTML::VERSION = "2.0.6"
data/lib/ttl2html.rb CHANGED
@@ -9,6 +9,7 @@ require "ruby-progressbar"
9
9
 
10
10
  require "ttl2html/util"
11
11
  require "ttl2html/template"
12
+ require "ttl2html/version"
12
13
 
13
14
  module TTL2HTML
14
15
  class App
@@ -79,7 +80,7 @@ module TTL2HTML
79
80
  result << @data[subject.to_s].keys.sort.map do |predicate|
80
81
  str = "<#{predicate}> "
81
82
  str << @data[subject.to_s][predicate].sort.map do |object|
82
- if object.respond_to?(:resource?) and object.resource? and /^_:/ =~ object # blank node:
83
+ if /^_:/ =~ object.to_s # blank node:
83
84
  format_turtle(object, depth + 1)
84
85
  elsif RDF::URI::IRI =~ object.to_s
85
86
  turtle.format_uri(RDF::URI.new object)
@@ -25,6 +25,7 @@
25
25
  <%- if param[:logo] -%>
26
26
  <meta property="og:image" content="<%=h URI.parse(param[:base_uri]) + param[:logo] %>">
27
27
  <%- end -%>
28
+ <meta name="generator" content="ttl2html <%=h TTL2HTML::VERSION %>">
28
29
  <%- if param[:google_analytics] -%>
29
30
  <script async src="https://www.googletagmanager.com/gtag/js?id=<%=h param[:google_analytics] %>"></script>
30
31
  <script>
@@ -59,6 +60,10 @@
59
60
  <%- end -%>
60
61
  <%- end -%>
61
62
  </ul>
63
+ <%- if param[:google_custom_search_id] -%>
64
+ <script async src="https://cse.google.com/cse.js?cx=<%=h param[:google_custom_search_id] %>"></script>
65
+ <div class="gcse-search"></div>
66
+ <%- end -%>
62
67
  </div>
63
68
  </nav>
64
69
  <%= param[:content] %>
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: 2.0.4
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masao Takaku
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-08 00:00:00.000000000 Z
11
+ date: 2023-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri