jekyll-rdf 2.1.0.alpha.pre.186 → 2.1.0.alpha.pre.194
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/jekyll/drops/rdf_resource.rb +20 -19
- data/lib/jekyll-rdf.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78d39e5cd1af8bc2a7ec53b5e048c651b061b822
|
4
|
+
data.tar.gz: b935903c86930ab76c5e41a96a62a4a768ed0696
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 056948f57a367d4977e88acdef8bbcb5e54bf53f82bc2638ad7d57b6e54a26f4127cf35c4c60df79cf6c79bd4db8a28481e4bef677d6d9c067bc424e9dd87ed5
|
7
|
+
data.tar.gz: 28c850a074b305d25385c3beb8c7fab3c01b3ceb094449ab4334fd80421621b4c6c164c770be9fb62050e4347983a5268205e2e88dc0a38b194af853f09fe34a
|
@@ -214,38 +214,40 @@ module Jekyll #:nodoc:
|
|
214
214
|
file_name = "rdfsites/blanknode/#{term.to_s}/"
|
215
215
|
else
|
216
216
|
begin
|
217
|
-
uri = URI
|
217
|
+
uri = Addressable::URI.parse(term.to_s).to_hash
|
218
218
|
file_name = "rdfsites/" # in this directory all external RDF sites are stored
|
219
|
-
if (uri[
|
219
|
+
if (uri[:host] == domain_name)
|
220
220
|
file_name = ""
|
221
|
-
uri[
|
222
|
-
uri[
|
223
|
-
if(uri[
|
224
|
-
if(uri[
|
225
|
-
uri[
|
221
|
+
uri[:scheme] = nil
|
222
|
+
uri[:host] = nil
|
223
|
+
if(uri[:path].length > baseurl.length)
|
224
|
+
if(uri[:path][0..(baseurl.length)].eql? (baseurl + "/"))
|
225
|
+
uri[:path] = uri[:path][(baseurl.length)..-1]
|
226
226
|
end
|
227
|
-
elsif(uri[
|
228
|
-
uri[
|
227
|
+
elsif(uri[:path].eql?(baseurl))
|
228
|
+
uri[:path] = nil
|
229
229
|
end
|
230
230
|
end
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
231
|
+
key_field = [:scheme, :userinfo, :host, :port, :registry, :path, :opaque, :query, :fragment]
|
232
|
+
key_field.each do |index|
|
233
|
+
if !(uri[index].nil?)
|
234
|
+
case index
|
235
|
+
when :path
|
236
|
+
file_name += "#{uri[index][1..-1]}/"
|
237
|
+
when :fragment
|
238
|
+
file_name += "#/#{uri[index]}"
|
238
239
|
else
|
239
|
-
file_name += "#{uri[
|
240
|
+
file_name += "#{uri[index]}/"
|
240
241
|
end
|
241
242
|
end
|
242
243
|
end
|
243
244
|
unless file_name[-1] == '/'
|
244
245
|
file_name += '/'
|
245
246
|
end
|
246
|
-
rescue URI::InvalidURIError #unclean coding: blanknodes are recognized through errors
|
247
|
+
rescue URI::InvalidURIError => x #unclean coding: blanknodes are recognized through errors
|
247
248
|
file_name = "invalids/#{term.to_s}"
|
248
249
|
Jekyll.logger.error("Invalid resource found: #{term.to_s} is not a proper uri")
|
250
|
+
Jekyll.logger.error("URI parser exited with message: #{x.message}")
|
249
251
|
end
|
250
252
|
end
|
251
253
|
file_name = file_name.gsub('_','_u')
|
@@ -259,7 +261,6 @@ module Jekyll #:nodoc:
|
|
259
261
|
@render_path = file_name
|
260
262
|
file_name
|
261
263
|
end
|
262
|
-
|
263
264
|
end
|
264
265
|
end
|
265
266
|
end
|
data/lib/jekyll-rdf.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-rdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0.alpha.pre.
|
4
|
+
version: 2.1.0.alpha.pre.194
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elias Saalmann
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2017-07-
|
19
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: linkeddata
|