fsp_harvester 0.1.17 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec_status +54 -53
- data/Gemfile.lock +5 -5
- data/lib/fsp_harvester/version.rb +1 -1
- data/lib/harvester.rb +1 -1
- data/lib/harvester_utils.rb +1 -1
- data/lib/metadata_object.rb +7 -3
- metadata +4 -5
- data/example_test.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72df31c63580f2b47676bb719c860cd26cab4290346f20bd481f67d18b29f765
|
4
|
+
data.tar.gz: 477bfe524de0a1822790eac1caefb642a5e881734e8f1bc3c8f46c1a91b3e1e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 328b1bf4531034b38f325ec7c2dfb682007ed8ef5fb4f9ea72a4776ffdb49bbdde280bd959f9adddcfb93f6a065b77af68ab6d5222942bc16b5d50901f771770
|
7
|
+
data.tar.gz: d5bc1e2e88be865c17aa12bca0a4308f3bc8e476bc0f49f40ca7a48a4e92142d8613c8e12823d9bb5e2735ea4d4cc492d6740481fdbebd513cb4f0be0c8114c8
|
data/.rspec_status
CHANGED
@@ -1,56 +1,57 @@
|
|
1
1
|
example_id | status | run_time |
|
2
2
|
---------------------------------- | ------ | --------------- |
|
3
|
-
./spec/cite-as_spec.rb[1:1:1] | passed | 1.
|
4
|
-
./spec/cite-as_spec.rb[1:1:2] | passed | 1.
|
5
|
-
./spec/cite-as_spec.rb[1:1:3] | passed | 1.
|
6
|
-
./spec/cite-as_spec.rb[1:1:4] | passed | 1.
|
7
|
-
./spec/cite-as_spec.rb[1:1:5] | passed | 2.
|
8
|
-
./spec/cite-as_spec.rb[1:1:6] | passed | 2.
|
9
|
-
./spec/cite-as_spec.rb[1:1:7] | passed |
|
10
|
-
./spec/cite-as_spec.rb[1:1:8] | passed | 2.
|
11
|
-
./spec/cite-as_spec.rb[1:1:9] | passed | 2.
|
12
|
-
./spec/cite-as_spec.rb[1:1:10] | passed | 2.
|
13
|
-
./spec/cite-as_spec.rb[1:1:11] | passed | 3.
|
14
|
-
./spec/cite-as_spec.rb[1:1:12] | passed |
|
15
|
-
./spec/cite-as_spec.rb[1:1:13] | passed | 2.
|
16
|
-
./spec/cite-as_spec.rb[1:1:14] | passed | 2.
|
17
|
-
./spec/cite-as_spec.rb[1:1:15] | passed | 1.
|
18
|
-
./spec/cite-as_spec.rb[1:1:16] | passed | 1.
|
19
|
-
./spec/cite-as_spec.rb[1:1:17] | passed | 1.
|
20
|
-
./spec/cite-as_spec.rb[1:1:18] | passed | 1.
|
21
|
-
./spec/cite-as_spec.rb[1:1:19] | passed | 1.
|
22
|
-
./spec/cite-as_spec.rb[1:1:20] | passed | 1.
|
23
|
-
./spec/cite-as_spec.rb[1:1:21] | passed | 2.
|
24
|
-
./spec/cite-as_spec.rb[1:1:22] | passed | 1.
|
25
|
-
./spec/cite-as_spec.rb[1:1:23] | passed | 1.
|
26
|
-
./spec/cite-as_spec.rb[1:1:24] | failed | 1.
|
27
|
-
./spec/cite-as_spec.rb[1:1:25] | passed | 0.
|
28
|
-
./spec/describedby_spec.rb[1:1:1] | passed | 3.
|
29
|
-
./spec/describedby_spec.rb[1:1:2] | passed | 1.
|
3
|
+
./spec/cite-as_spec.rb[1:1:1] | passed | 1.36 seconds |
|
4
|
+
./spec/cite-as_spec.rb[1:1:2] | passed | 1.31 seconds |
|
5
|
+
./spec/cite-as_spec.rb[1:1:3] | passed | 1.53 seconds |
|
6
|
+
./spec/cite-as_spec.rb[1:1:4] | passed | 1.84 seconds |
|
7
|
+
./spec/cite-as_spec.rb[1:1:5] | passed | 2.77 seconds |
|
8
|
+
./spec/cite-as_spec.rb[1:1:6] | passed | 2.06 seconds |
|
9
|
+
./spec/cite-as_spec.rb[1:1:7] | passed | 2.96 seconds |
|
10
|
+
./spec/cite-as_spec.rb[1:1:8] | passed | 2.28 seconds |
|
11
|
+
./spec/cite-as_spec.rb[1:1:9] | passed | 2.83 seconds |
|
12
|
+
./spec/cite-as_spec.rb[1:1:10] | passed | 2.14 seconds |
|
13
|
+
./spec/cite-as_spec.rb[1:1:11] | passed | 3.19 seconds |
|
14
|
+
./spec/cite-as_spec.rb[1:1:12] | passed | 3.06 seconds |
|
15
|
+
./spec/cite-as_spec.rb[1:1:13] | passed | 2.77 seconds |
|
16
|
+
./spec/cite-as_spec.rb[1:1:14] | passed | 2.2 seconds |
|
17
|
+
./spec/cite-as_spec.rb[1:1:15] | passed | 1.19 seconds |
|
18
|
+
./spec/cite-as_spec.rb[1:1:16] | passed | 1.1 seconds |
|
19
|
+
./spec/cite-as_spec.rb[1:1:17] | passed | 1.31 seconds |
|
20
|
+
./spec/cite-as_spec.rb[1:1:18] | passed | 1.14 seconds |
|
21
|
+
./spec/cite-as_spec.rb[1:1:19] | passed | 1.68 seconds |
|
22
|
+
./spec/cite-as_spec.rb[1:1:20] | passed | 1.69 seconds |
|
23
|
+
./spec/cite-as_spec.rb[1:1:21] | passed | 2.35 seconds |
|
24
|
+
./spec/cite-as_spec.rb[1:1:22] | passed | 1.12 seconds |
|
25
|
+
./spec/cite-as_spec.rb[1:1:23] | passed | 1.16 seconds |
|
26
|
+
./spec/cite-as_spec.rb[1:1:24] | failed | 1.45 seconds |
|
27
|
+
./spec/cite-as_spec.rb[1:1:25] | passed | 0.72571 seconds |
|
28
|
+
./spec/describedby_spec.rb[1:1:1] | passed | 3.09 seconds |
|
29
|
+
./spec/describedby_spec.rb[1:1:2] | passed | 1.13 seconds |
|
30
30
|
./spec/describedby_spec.rb[1:1:3] | passed | 1.22 seconds |
|
31
|
-
./spec/describedby_spec.rb[1:1:4] | passed | 1.
|
32
|
-
./spec/describedby_spec.rb[1:1:5] | passed | 1.
|
33
|
-
./spec/describedby_spec.rb[1:1:6] | passed | 1.
|
34
|
-
./spec/describedby_spec.rb[1:1:7] | passed | 1.
|
35
|
-
./spec/describedby_spec.rb[1:1:8] | passed | 2.
|
36
|
-
./spec/describedby_spec.rb[1:1:9] | passed |
|
37
|
-
./spec/describedby_spec.rb[1:1:10] | passed | 2.
|
38
|
-
./spec/describedby_spec.rb[1:1:11] | passed |
|
39
|
-
./spec/describedby_spec.rb[1:1:12] | passed |
|
40
|
-
./spec/describedby_spec.rb[1:1:13] | passed | 1.
|
41
|
-
./spec/describedby_spec.rb[1:1:14] | passed | 2.
|
42
|
-
./spec/describedby_spec.rb[1:1:15] | passed | 2.
|
43
|
-
./spec/fsp_harvester_spec.rb[1:1] | passed | 0.
|
44
|
-
./spec/fsp_harvester_spec.rb[1:2] | passed |
|
45
|
-
./spec/fsp_harvester_spec.rb[1:3] | passed |
|
46
|
-
./spec/
|
47
|
-
./spec/item_spec.rb[1:1:
|
48
|
-
./spec/item_spec.rb[1:1:
|
49
|
-
./spec/item_spec.rb[1:1:
|
50
|
-
./spec/item_spec.rb[1:1:
|
51
|
-
./spec/item_spec.rb[1:1:
|
52
|
-
./spec/item_spec.rb[1:1:
|
53
|
-
./spec/item_spec.rb[1:1:
|
54
|
-
./spec/
|
55
|
-
./spec/type_spec.rb[1:1:
|
56
|
-
./spec/type_spec.rb[1:1:
|
31
|
+
./spec/describedby_spec.rb[1:1:4] | passed | 1.11 seconds |
|
32
|
+
./spec/describedby_spec.rb[1:1:5] | passed | 1.21 seconds |
|
33
|
+
./spec/describedby_spec.rb[1:1:6] | passed | 1.24 seconds |
|
34
|
+
./spec/describedby_spec.rb[1:1:7] | passed | 1.53 seconds |
|
35
|
+
./spec/describedby_spec.rb[1:1:8] | passed | 2.53 seconds |
|
36
|
+
./spec/describedby_spec.rb[1:1:9] | passed | 1.74 seconds |
|
37
|
+
./spec/describedby_spec.rb[1:1:10] | passed | 2.59 seconds |
|
38
|
+
./spec/describedby_spec.rb[1:1:11] | passed | 3.49 seconds |
|
39
|
+
./spec/describedby_spec.rb[1:1:12] | passed | 3.82 seconds |
|
40
|
+
./spec/describedby_spec.rb[1:1:13] | passed | 1.65 seconds |
|
41
|
+
./spec/describedby_spec.rb[1:1:14] | passed | 2.19 seconds |
|
42
|
+
./spec/describedby_spec.rb[1:1:15] | passed | 2.16 seconds |
|
43
|
+
./spec/fsp_harvester_spec.rb[1:1] | passed | 0.00015 seconds |
|
44
|
+
./spec/fsp_harvester_spec.rb[1:2] | passed | 2.49 seconds |
|
45
|
+
./spec/fsp_harvester_spec.rb[1:3] | passed | 7.06 seconds |
|
46
|
+
./spec/fsp_harvester_spec.rb[1:4] | passed | 2.74 seconds |
|
47
|
+
./spec/item_spec.rb[1:1:1] | passed | 3.41 seconds |
|
48
|
+
./spec/item_spec.rb[1:1:2] | passed | 2.84 seconds |
|
49
|
+
./spec/item_spec.rb[1:1:3] | passed | 1.15 seconds |
|
50
|
+
./spec/item_spec.rb[1:1:4] | passed | 1.74 seconds |
|
51
|
+
./spec/item_spec.rb[1:1:5] | passed | 2.6 seconds |
|
52
|
+
./spec/item_spec.rb[1:1:6] | passed | 2.32 seconds |
|
53
|
+
./spec/item_spec.rb[1:1:7] | passed | 2.81 seconds |
|
54
|
+
./spec/item_spec.rb[1:1:8] | passed | 0.49717 seconds |
|
55
|
+
./spec/type_spec.rb[1:1:1] | passed | 1.25 seconds |
|
56
|
+
./spec/type_spec.rb[1:1:2] | passed | 1.18 seconds |
|
57
|
+
./spec/type_spec.rb[1:1:3] | passed | 1.58 seconds |
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fsp_harvester (0.1.
|
4
|
+
fsp_harvester (0.1.20)
|
5
5
|
json (~> 2.0)
|
6
6
|
linkeddata (~> 3.2)
|
7
|
-
linkheaders-processor (~> 0.1.
|
7
|
+
linkheaders-processor (~> 0.1.18)
|
8
8
|
metainspector (~> 5.11.2)
|
9
9
|
parseconfig (~> 1.1)
|
10
10
|
rake (~> 13.0)
|
@@ -127,7 +127,7 @@ GEM
|
|
127
127
|
sparql (~> 3.2, >= 3.2.4)
|
128
128
|
sparql-client (~> 3.2, >= 3.2.1)
|
129
129
|
yaml-ld (~> 0.0)
|
130
|
-
linkheaders-processor (0.1.
|
130
|
+
linkheaders-processor (0.1.18)
|
131
131
|
json (~> 2.0)
|
132
132
|
json-ld (~> 3.2)
|
133
133
|
json-ld-preloaded (~> 3.2)
|
@@ -252,14 +252,14 @@ GEM
|
|
252
252
|
diff-lcs (>= 1.2.0, < 2.0)
|
253
253
|
rspec-support (~> 3.11.0)
|
254
254
|
rspec-support (3.11.0)
|
255
|
-
rubocop (1.
|
255
|
+
rubocop (1.35.0)
|
256
256
|
json (~> 2.3)
|
257
257
|
parallel (~> 1.10)
|
258
258
|
parser (>= 3.1.2.1)
|
259
259
|
rainbow (>= 2.2.2, < 4.0)
|
260
260
|
regexp_parser (>= 1.8, < 3.0)
|
261
261
|
rexml (>= 3.2.5, < 4.0)
|
262
|
-
rubocop-ast (>= 1.20.
|
262
|
+
rubocop-ast (>= 1.20.1, < 2.0)
|
263
263
|
ruby-progressbar (~> 1.7)
|
264
264
|
unicode-display_width (>= 1.4.0, < 3.0)
|
265
265
|
rubocop-ast (1.21.0)
|
data/lib/harvester.rb
CHANGED
data/lib/harvester_utils.rb
CHANGED
@@ -11,7 +11,7 @@ module HarvesterTools
|
|
11
11
|
links = Array.new
|
12
12
|
if type
|
13
13
|
links = resolve_url(url: url, metadata: @meta)
|
14
|
-
@meta.links = @meta.links
|
14
|
+
@meta.links = @meta.links.append(*links)
|
15
15
|
else
|
16
16
|
@meta.add_warning(['006', guid, ''])
|
17
17
|
@meta.comments << "FATAL: GUID type not recognized.\n"
|
data/lib/metadata_object.rb
CHANGED
@@ -1,17 +1,21 @@
|
|
1
1
|
module HarvesterTools
|
2
2
|
class MetadataObject
|
3
|
-
attr_accessor :hash, :graph, :comments, :links, :warnings, :guidtype, :full_response, :all_uris, :
|
3
|
+
attr_accessor :id, :hash, :graph, :comments, :links, :warnings, :guidtype, :full_response, :all_uris, :tested_guid, :score, :version, :date # a hash of metadata # a RDF.rb graph of metadata # an array of comments # the type of GUID that was detected # will be an array of Net::HTTP::Response
|
4
4
|
|
5
|
-
def initialize(
|
5
|
+
def initialize(id: "unidentified_metadata") # get a name from the "new" call, or set a default
|
6
|
+
@id = id
|
6
7
|
@hash = {}
|
7
8
|
@graph = RDF::Graph.new
|
8
9
|
@comments = []
|
9
10
|
@warnings = []
|
10
11
|
@full_response = []
|
11
12
|
@links = []
|
13
|
+
@guidtype = ""
|
12
14
|
@all_uris = []
|
13
|
-
@
|
15
|
+
@tested_guid = ""
|
14
16
|
@score = 0
|
17
|
+
@version = '0.0'
|
18
|
+
@date = Time.now.strftime('%Y-%m-%dT%H:%M:%S.%L%z')
|
15
19
|
w = RestClient.get("https://raw.githubusercontent.com/markwilkinson/FAIR-Signposting-Harvester/master/lib/warnings.json")
|
16
20
|
#@warn = File.read("./lib/warnings.json")
|
17
21
|
@warn = JSON.parse(w)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fsp_harvester
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Wilkinson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.18
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.
|
54
|
+
version: 0.1.18
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: metainspector
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,7 +180,6 @@ files:
|
|
180
180
|
- Rakefile
|
181
181
|
- bin/console
|
182
182
|
- bin/setup
|
183
|
-
- example_test.rb
|
184
183
|
- launch.json
|
185
184
|
- lib/constants.rb
|
186
185
|
- lib/external_tools.rb
|
data/example_test.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen string literal = false
|
2
|
-
require 'cgi'
|
3
|
-
require 'json'
|
4
|
-
require 'uri'
|
5
|
-
require 'rdf'
|
6
|
-
require 'rdf/turtle'
|
7
|
-
require 'sparql'
|
8
|
-
require 'fsp_harvester'
|
9
|
-
|
10
|
-
def test_guid(guid:)
|
11
|
-
_links, metadata = FspHarvester::Utils.resolve_guid(guid: guid) # [LinkHeader::Link], FspHarvester::MetadataObject
|
12
|
-
|
13
|
-
metadata.comments << if metadata.guidtype == 'unknown'
|
14
|
-
"FAILURE: The identifier #{guid} did not match any known identification system.\n"
|
15
|
-
else
|
16
|
-
"SUCCESS: The identifier #{guid} matched known GUID type system #{metadata.guidtype}.\n"
|
17
|
-
end
|
18
|
-
metadata.comments
|
19
|
-
end
|
20
|
-
|
21
|
-
guid = ARGV[0] || 'https://s11.no/2022/a2a-fair-metrics/07-http-describedby-citeas-linkset-json/'
|
22
|
-
response = test_guid(guid: guid)
|
23
|
-
|
24
|
-
puts response
|