rkd 0.1.0 → 0.2.0
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/.gitignore +1 -0
- data/.gitlab-ci.yml +37 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +74 -0
- data/README.md +33 -7
- data/Rakefile +1 -1
- data/docs/first query.sparql +38 -0
- data/docs/fourth_query.sparql +63 -0
- data/docs/second_query.sparql +22 -0
- data/docs/third_query.sparql +53 -0
- data/lib/r_k_d/artist.rb +252 -0
- data/lib/r_k_d/config.rb +27 -0
- data/lib/r_k_d/date_span.rb +42 -0
- data/lib/r_k_d/helpers/date_parsing.rb +17 -0
- data/lib/r_k_d/imprecise_date.rb +47 -0
- data/lib/r_k_d/institution.rb +28 -0
- data/lib/r_k_d/performance.rb +32 -0
- data/lib/r_k_d/place.rb +38 -0
- data/lib/r_k_d/query/elastic_search.rb +64 -0
- data/lib/r_k_d/query/file_cache.rb +40 -0
- data/lib/r_k_d/query/http.rb +24 -0
- data/lib/r_k_d/query/sparql.rb +77 -0
- data/lib/r_k_d/type.rb +11 -0
- data/lib/r_k_d/version.rb +3 -0
- data/lib/r_k_d.rb +24 -0
- data/lib/rkd.rb +1 -6
- data/rkd.gemspec +16 -14
- metadata +63 -13
- data/lib/rkd/version.rb +0 -3
data/lib/r_k_d/config.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
module RKD
|
2
|
+
module Config
|
3
|
+
def self.api_endpoint
|
4
|
+
@api_endpoint || "https://api.rkd.triply.cc/datasets/rkd/RKD-Search-Graph/services/Elasticsearch/_search"
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.api_endpoint=(api_endpoint)
|
8
|
+
@api_endpoint = api_endpoint
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.file_cache_enabled=(file_cache_enabled)
|
12
|
+
@file_cache_enabled = !!file_cache_enabled
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.file_cache_enabled?
|
16
|
+
!!@file_cache_enabled
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.file_cache_dir=(file_cache_dir)
|
20
|
+
@file_cache_dir = file_cache_dir
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.file_cache_dir
|
24
|
+
@file_cache_dir || Dir.tmpdir
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module RKD
|
2
|
+
class DateSpan
|
3
|
+
include ::RKD::Helpers::DateParsing
|
4
|
+
|
5
|
+
attr_reader :begin
|
6
|
+
attr_reader :end
|
7
|
+
|
8
|
+
class << self
|
9
|
+
def parse(string)
|
10
|
+
if string && (years_match = string.match(/(\d\d\d\d).*-.*(\d\d\d\d)/))
|
11
|
+
new(years_match[1].to_i, years_match[2].to_i)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def initialize(date_begin_or_range = nil, date_end = nil)
|
17
|
+
if date_begin_or_range.is_a?(Range)
|
18
|
+
self.begin = date_begin_or_range.begin
|
19
|
+
self.end = date_begin_or_range.end
|
20
|
+
else
|
21
|
+
self.begin = date_begin_or_range
|
22
|
+
self.end = date_end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def nilly?
|
27
|
+
self.begin.nil? && self.end.nil?
|
28
|
+
end
|
29
|
+
|
30
|
+
def == other
|
31
|
+
other && @begin == other.begin && @end == other.end
|
32
|
+
end
|
33
|
+
|
34
|
+
def begin= date
|
35
|
+
@begin = parse_date(date)
|
36
|
+
end
|
37
|
+
|
38
|
+
def end= date
|
39
|
+
@end = parse_date(date)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RKD
|
2
|
+
module Helpers
|
3
|
+
module DateParsing
|
4
|
+
private
|
5
|
+
|
6
|
+
def parse_date(date)
|
7
|
+
if date.is_a?(String) || date.is_a?(Integer)
|
8
|
+
RKD::ImpreciseDate.parse(date)
|
9
|
+
elsif date.is_a?(Date)
|
10
|
+
date
|
11
|
+
end
|
12
|
+
rescue Date::Error
|
13
|
+
nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module RKD
|
2
|
+
class ImpreciseDate
|
3
|
+
attr_reader :year, :month, :precision
|
4
|
+
|
5
|
+
def initialize(year, month = nil)
|
6
|
+
if month
|
7
|
+
@precision = :month
|
8
|
+
@month = month.to_i
|
9
|
+
else
|
10
|
+
@precision = :year
|
11
|
+
end
|
12
|
+
@year = year.to_i
|
13
|
+
end
|
14
|
+
|
15
|
+
def ==other
|
16
|
+
other &&
|
17
|
+
year == other.year &&
|
18
|
+
month == other.month &&
|
19
|
+
precision == other.precision
|
20
|
+
end
|
21
|
+
|
22
|
+
def to_date
|
23
|
+
if precision == :year
|
24
|
+
nil
|
25
|
+
else
|
26
|
+
Date.new(year, month, 1)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
class << self
|
31
|
+
def parse(value)
|
32
|
+
if value.is_a?(Date)
|
33
|
+
value
|
34
|
+
elsif value.is_a? Integer
|
35
|
+
new(value)
|
36
|
+
elsif value.is_a?(String) && (value.count("-") == 2 || value.count("/") == 2)
|
37
|
+
Date.parse(value)
|
38
|
+
elsif value.is_a?(String) && (value.count("-") == 1 || value.count("/") == 1)
|
39
|
+
year, month = value.split(/[-\/]/)
|
40
|
+
new(year, month)
|
41
|
+
elsif value.is_a?(String) && value.count("-") == 0 && value.count("/") == 0 && value.strip.match(/\A\d+$/)
|
42
|
+
new(value.to_i)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module RKD
|
2
|
+
class Institution
|
3
|
+
attr_accessor :label
|
4
|
+
attr_accessor :place
|
5
|
+
attr_accessor :id
|
6
|
+
|
7
|
+
class << self
|
8
|
+
def initialize_from_label string
|
9
|
+
if (match = string.match(/(.*)\((.*)\)/))
|
10
|
+
concept = new
|
11
|
+
concept.label = match[1].strip
|
12
|
+
concept.place = Place.new(label: match[2].strip)
|
13
|
+
concept
|
14
|
+
elsif (match = string.match(/(.*)\s(of|van)\s(.*)/))
|
15
|
+
concept = new
|
16
|
+
concept.label = match[0].strip
|
17
|
+
concept.place = Place.new(label: match[3].strip)
|
18
|
+
concept
|
19
|
+
elsif (match = string.match(/\AUniversit\w*\s(\w*)$/))
|
20
|
+
concept = new
|
21
|
+
concept.label = match[0].strip
|
22
|
+
concept.place = Place.new(label: match[1].strip)
|
23
|
+
concept
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# "http://www.cidoc-crm.org/cidoc-crm/P14i_performed"
|
2
|
+
module RKD
|
3
|
+
class Performance
|
4
|
+
attr_accessor :date_span
|
5
|
+
attr_accessor :place
|
6
|
+
attr_accessor :comments
|
7
|
+
attr_accessor :institution
|
8
|
+
|
9
|
+
def initialize(place:, date_span:, institution: nil, comments: nil)
|
10
|
+
@date_span = date_span
|
11
|
+
@place = place
|
12
|
+
@comments = comments
|
13
|
+
@institution = institution
|
14
|
+
end
|
15
|
+
|
16
|
+
class Work < Performance
|
17
|
+
end
|
18
|
+
|
19
|
+
class Study < Performance
|
20
|
+
end
|
21
|
+
|
22
|
+
class Collection < Array
|
23
|
+
def work
|
24
|
+
self.select { |a| a.is_a?(Work) }
|
25
|
+
end
|
26
|
+
|
27
|
+
def study
|
28
|
+
self.select { |a| a.is_a?(Study) }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/r_k_d/place.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
module RKD
|
2
|
+
class Place
|
3
|
+
attr_reader :geoname_id
|
4
|
+
attr_reader :label
|
5
|
+
attr_reader :lat
|
6
|
+
attr_reader :lon
|
7
|
+
attr_reader :refs
|
8
|
+
|
9
|
+
def initialize(label:, geoname_id: nil, point: nil, refs: [], lat: nil, lon: nil)
|
10
|
+
@lon, @lat = parse_point(point).values if point
|
11
|
+
@lat ||= lat
|
12
|
+
@lon ||= lon
|
13
|
+
@geoname_id = Integer(geoname_id) if geoname_id
|
14
|
+
@refs = refs.compact
|
15
|
+
|
16
|
+
geoname_ref = @refs.find { |ref| ref.start_with?("https://sws.geonames.org/") }&.sub("https://sws.geonames.org/", "")
|
17
|
+
@geoname_id ||= Integer(geoname_ref) if geoname_ref
|
18
|
+
@label = label
|
19
|
+
end
|
20
|
+
|
21
|
+
def nilly?
|
22
|
+
geoname_id.nil? && label.nil? && lat.nil? && lon.nil? && refs.empty?
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def parse_point(point_raw)
|
28
|
+
if point_raw.is_a?(String) && point_raw.start_with?("POINT(")
|
29
|
+
point_parsed = point_raw.sub("POINT(", "").sub(")", "").split(" ").map(&:to_f)
|
30
|
+
{lat: point_parsed[0], lon: point_parsed[1]}
|
31
|
+
elsif point_raw.is_a?(Array) && point_raw.count == 2
|
32
|
+
{lat: point_raw[0].to_f, lon: point_raw[1].to_f}
|
33
|
+
elsif point_raw.is_a?(Hash) && point_raw.key?(:lat)
|
34
|
+
point_raw
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
module RKD
|
2
|
+
module Query
|
3
|
+
class ElasticSearch
|
4
|
+
ELASTIC_SEARCH_ENDPOINT = "https://api.rkd.triply.cc/datasets/rkd/RKD-Search-Graph/services/Elasticsearch/_search"
|
5
|
+
|
6
|
+
class << self
|
7
|
+
def query(dataset:, name: nil, id: nil)
|
8
|
+
base_query = {
|
9
|
+
query: {
|
10
|
+
bool: {
|
11
|
+
filter: [
|
12
|
+
{
|
13
|
+
match: {"https://data rkd nl/search#datasetName": dataset}
|
14
|
+
}
|
15
|
+
],
|
16
|
+
must: [],
|
17
|
+
should: []
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
if name
|
23
|
+
base_query[:query][:bool][:should] << {
|
24
|
+
simple_query_string: {
|
25
|
+
query: name,
|
26
|
+
fields: [
|
27
|
+
"http://www w3 org/2000/01/rdf-schema#label"
|
28
|
+
]
|
29
|
+
}
|
30
|
+
}
|
31
|
+
base_query[:query][:bool][:must] << {
|
32
|
+
simple_query_string: {query: name}
|
33
|
+
}
|
34
|
+
end
|
35
|
+
if id
|
36
|
+
base_query[:query][:bool][:must] << {
|
37
|
+
match: {
|
38
|
+
_id: "https://data.rkd.nl/artists/#{id}"
|
39
|
+
}
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
base_query
|
44
|
+
end
|
45
|
+
|
46
|
+
def search(name, dataset: "artists")
|
47
|
+
data = FileCache.cache("es-#{dataset}-search-#{name}") do
|
48
|
+
HTTP.post_json ELASTIC_SEARCH_ENDPOINT, query(name:, dataset:)
|
49
|
+
end
|
50
|
+
|
51
|
+
JSON.parse(data)["hits"]["hits"].map { |hit| hit["_source"] }
|
52
|
+
end
|
53
|
+
|
54
|
+
def find(id, dataset: "artists")
|
55
|
+
data = FileCache.cache("es-#{dataset}-find-#{id}") do
|
56
|
+
HTTP.post_json ELASTIC_SEARCH_ENDPOINT, query(id:, dataset:)
|
57
|
+
end
|
58
|
+
|
59
|
+
JSON.parse(data)["hits"]["hits"].map { |hit| hit["_source"] }.first
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module RKD
|
2
|
+
module Query
|
3
|
+
class FileCache
|
4
|
+
class << self
|
5
|
+
def cache(key)
|
6
|
+
new(key).cache { yield }
|
7
|
+
end
|
8
|
+
end
|
9
|
+
def initialize(key)
|
10
|
+
@key = key
|
11
|
+
end
|
12
|
+
|
13
|
+
def cache
|
14
|
+
if present?
|
15
|
+
File.read(file_path)
|
16
|
+
else
|
17
|
+
response = yield
|
18
|
+
File.write(file_path, response)
|
19
|
+
response
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def present?
|
24
|
+
@present ||= RKD::Config.file_cache_enabled? && File.exist?(file_path) && (File.ctime(file_path) > (Time.now - 86400))
|
25
|
+
end
|
26
|
+
|
27
|
+
def flush
|
28
|
+
File.delete(file_path)
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def file_path
|
34
|
+
return @file_path if @file_path
|
35
|
+
namekey = (Digest::SHA256.new << @key.to_s.downcase)
|
36
|
+
@file_path = File.join(RKD::Config.file_cache_dir, "rkd-query-file-cache-#{namekey}.json")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module RKD
|
2
|
+
module Query
|
3
|
+
class HTTP
|
4
|
+
class Error < StandardError
|
5
|
+
end
|
6
|
+
class << self
|
7
|
+
def post_json(url, data)
|
8
|
+
uri = URI(url)
|
9
|
+
headers = {"Content-Type" => "application/json; charset=utf-8", "Accept-Charset" => "utf-8"}
|
10
|
+
req = Net::HTTP::Post.new(uri, headers)
|
11
|
+
req.body = data.to_json
|
12
|
+
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
|
13
|
+
http.request(req)
|
14
|
+
end
|
15
|
+
if [200, 201].include? res.code.to_i
|
16
|
+
res.body.force_encoding("utf-8")
|
17
|
+
else
|
18
|
+
raise Error, res.code
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module RKD
|
2
|
+
module Query
|
3
|
+
class Sparql
|
4
|
+
ENDPOINT = "https://rkd.triply.cc/_api/datasets/rkd/RKD-Knowledge-Graph/services/SPARQL/sparql"
|
5
|
+
BASE_QUERY = <<~SPARQL
|
6
|
+
PREFIX rkd: <https://data.rkd.nl/def#>
|
7
|
+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
8
|
+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
9
|
+
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
|
10
|
+
prefix la: <https://linked.art/ns/terms/>
|
11
|
+
|
12
|
+
SELECT ?property ?propertyLabel ?value ?symbolicContent ?prefLabel ?tookPlaceAt ?tookPlaceAtTimeSpan ?tookPlaceAtTimeSpanBegin ?tookPlaceAtTimeSpanEnd ?placePoint ?placeLabel ?placeRef ?timeSpan ?start ?end ?domain ?range ?studyLabel ?studyReference ?referenceContent
|
13
|
+
WHERE {
|
14
|
+
<https://data.rkd.nl/artists/{{rkd_id}}> ?property ?value.
|
15
|
+
FILTER (
|
16
|
+
!(?property in (crm:P67i_is_referred_to_by, crm:P1_is_identified_by, crm:P62i_is_depicted_by, la:member_of))
|
17
|
+
)
|
18
|
+
OPTIONAL {
|
19
|
+
?property rdfs:label ?propertyLabel.
|
20
|
+
FILTER (lang(?propertyLabel) = "en")
|
21
|
+
}
|
22
|
+
OPTIONAL {
|
23
|
+
?value crm:P190_has_symbolic_content ?symbolicContent
|
24
|
+
}
|
25
|
+
OPTIONAL {
|
26
|
+
?value skos:prefLabel ?prefLabel
|
27
|
+
FILTER (lang(?prefLabel) = "en")
|
28
|
+
}
|
29
|
+
OPTIONAL {
|
30
|
+
?value crm:P7_took_place_at ?tookPlaceAt.
|
31
|
+
?value crm:P4_has_time-span ?timeSpan.
|
32
|
+
?tookPlaceAt crm:P168_place_is_defined_by ?placePoint.
|
33
|
+
?tookPlaceAt rdfs:label ?placeLabel.
|
34
|
+
?tookPlaceAt skos:exactMatch ?placeRef.
|
35
|
+
?timeSpan crm:P82a_begin_of_the_begin ?start.
|
36
|
+
?timeSpan crm:P82b_end_of_the_end ?end.
|
37
|
+
}
|
38
|
+
OPTIONAL {
|
39
|
+
?value crm:P7_took_place_at ?tookPlaceAt.
|
40
|
+
?tookPlaceAt rdfs:label ?placeLabel.
|
41
|
+
?tookPlaceAt skos:exactMatch ?placeRef.
|
42
|
+
}
|
43
|
+
OPTIONAL {
|
44
|
+
?value crm:P01i_is_domain_of ?domain.
|
45
|
+
?domain crm:P02_has_range ?range.
|
46
|
+
?range skos:prefLabel ?studyLabel.
|
47
|
+
}
|
48
|
+
OPTIONAL {
|
49
|
+
?value crm:P01i_is_domain_of ?domain.
|
50
|
+
?domain crm:P02_has_range ?range.
|
51
|
+
?value crm:P67i_is_referred_to_by ?studyReference.
|
52
|
+
?studyReference crm:P190_has_symbolic_content ?referenceContent
|
53
|
+
}
|
54
|
+
OPTIONAL {
|
55
|
+
?value crm:P4_has_time-span ?tookPlaceAtTimeSpan.
|
56
|
+
?tookPlaceAtTimeSpan crm:P82a_begin_of_the_begin ?tookPlaceAtTimeSpanBegin.
|
57
|
+
?tookPlaceAtTimeSpan crm:P82b_end_of_the_end ?tookPlaceAtTimeSpanEnd.
|
58
|
+
}
|
59
|
+
}
|
60
|
+
SPARQL
|
61
|
+
|
62
|
+
class << self
|
63
|
+
def query id
|
64
|
+
BASE_QUERY.sub("{{rkd_id}}", id.to_i.to_s)
|
65
|
+
end
|
66
|
+
|
67
|
+
def find id
|
68
|
+
data = FileCache.cache("sparql-#{id}") do
|
69
|
+
HTTP.post_json ENDPOINT, {query: query(id)}
|
70
|
+
end
|
71
|
+
|
72
|
+
JSON.parse(data)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
data/lib/r_k_d/type.rb
ADDED
data/lib/r_k_d.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require "digest"
|
2
|
+
require "json"
|
3
|
+
require "net/http"
|
4
|
+
require "date"
|
5
|
+
|
6
|
+
require "r_k_d/helpers/date_parsing"
|
7
|
+
require "r_k_d/version"
|
8
|
+
require "r_k_d/artist"
|
9
|
+
require "r_k_d/performance"
|
10
|
+
require "r_k_d/place"
|
11
|
+
require "r_k_d/imprecise_date"
|
12
|
+
require "r_k_d/institution"
|
13
|
+
require "r_k_d/type"
|
14
|
+
require "r_k_d/date_span"
|
15
|
+
require "r_k_d/query/http"
|
16
|
+
require "r_k_d/query/file_cache"
|
17
|
+
require "r_k_d/query/elastic_search"
|
18
|
+
require "r_k_d/query/sparql"
|
19
|
+
require "r_k_d/config"
|
20
|
+
|
21
|
+
module RKD
|
22
|
+
class Error < StandardError; end
|
23
|
+
# Your code goes here...
|
24
|
+
end
|
data/lib/rkd.rb
CHANGED
data/rkd.gemspec
CHANGED
@@ -1,18 +1,17 @@
|
|
1
|
-
|
2
1
|
lib = File.expand_path("../lib", __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "
|
3
|
+
require "r_k_d/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name
|
8
|
-
spec.version
|
9
|
-
spec.authors
|
10
|
-
spec.email
|
6
|
+
spec.name = "rkd"
|
7
|
+
spec.version = RKD::VERSION
|
8
|
+
spec.authors = ["murb"]
|
9
|
+
spec.email = ["git@murb.nl"]
|
11
10
|
|
12
|
-
spec.summary
|
13
|
-
spec.description
|
14
|
-
spec.homepage
|
15
|
-
spec.license
|
11
|
+
spec.summary = "Unoficial Gem that abstracts away RKD's APIs"
|
12
|
+
spec.description = "Search the RKD (Netherlands Institute for Art History) API for artists"
|
13
|
+
spec.homepage = "https://murb.nl/blog?tag=rkd,gem"
|
14
|
+
spec.license = "MIT"
|
16
15
|
|
17
16
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
17
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
@@ -27,14 +26,17 @@ Gem::Specification.new do |spec|
|
|
27
26
|
|
28
27
|
# Specify which files should be added to the gem when it is released.
|
29
28
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
30
|
-
spec.files
|
29
|
+
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
31
30
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
32
31
|
end
|
33
|
-
spec.bindir
|
34
|
-
spec.executables
|
32
|
+
spec.bindir = "exe"
|
33
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
34
|
spec.require_paths = ["lib"]
|
35
|
+
spec.required_ruby_version = ">3"
|
36
36
|
|
37
|
-
spec.add_development_dependency "bundler", "
|
37
|
+
spec.add_development_dependency "bundler", "> 1"
|
38
38
|
spec.add_development_dependency "rake", "~> 10.0"
|
39
39
|
spec.add_development_dependency "minitest", "~> 5.0"
|
40
|
+
spec.add_development_dependency "standard", "~> 1"
|
41
|
+
spec.add_development_dependency "simplecov", "~> 0.22"
|
40
42
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rkd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- murb
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +52,34 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: standard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.22'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.22'
|
55
83
|
description: Search the RKD (Netherlands Institute for Art History) API for artists
|
56
84
|
email:
|
57
85
|
- git@murb.nl
|
@@ -60,16 +88,38 @@ extensions: []
|
|
60
88
|
extra_rdoc_files: []
|
61
89
|
files:
|
62
90
|
- ".gitignore"
|
91
|
+
- ".gitlab-ci.yml"
|
92
|
+
- ".ruby-version"
|
63
93
|
- ".travis.yml"
|
94
|
+
- CHANGELOG.md
|
64
95
|
- CODE_OF_CONDUCT.md
|
65
96
|
- Gemfile
|
97
|
+
- Gemfile.lock
|
66
98
|
- LICENSE.txt
|
67
99
|
- README.md
|
68
100
|
- Rakefile
|
69
101
|
- bin/console
|
70
102
|
- bin/setup
|
103
|
+
- docs/first query.sparql
|
104
|
+
- docs/fourth_query.sparql
|
105
|
+
- docs/second_query.sparql
|
106
|
+
- docs/third_query.sparql
|
107
|
+
- lib/r_k_d.rb
|
108
|
+
- lib/r_k_d/artist.rb
|
109
|
+
- lib/r_k_d/config.rb
|
110
|
+
- lib/r_k_d/date_span.rb
|
111
|
+
- lib/r_k_d/helpers/date_parsing.rb
|
112
|
+
- lib/r_k_d/imprecise_date.rb
|
113
|
+
- lib/r_k_d/institution.rb
|
114
|
+
- lib/r_k_d/performance.rb
|
115
|
+
- lib/r_k_d/place.rb
|
116
|
+
- lib/r_k_d/query/elastic_search.rb
|
117
|
+
- lib/r_k_d/query/file_cache.rb
|
118
|
+
- lib/r_k_d/query/http.rb
|
119
|
+
- lib/r_k_d/query/sparql.rb
|
120
|
+
- lib/r_k_d/type.rb
|
121
|
+
- lib/r_k_d/version.rb
|
71
122
|
- lib/rkd.rb
|
72
|
-
- lib/rkd/version.rb
|
73
123
|
- rkd.gemspec
|
74
124
|
homepage: https://murb.nl/blog?tag=rkd,gem
|
75
125
|
licenses:
|
@@ -78,23 +128,23 @@ metadata:
|
|
78
128
|
homepage_uri: https://murb.nl/blog?tag=rkd,gem
|
79
129
|
source_code_uri: https://gitlab.com/murb/rkd
|
80
130
|
changelog_uri: https://gitlab.com/murb/rkd/changelog.md
|
81
|
-
post_install_message:
|
131
|
+
post_install_message:
|
82
132
|
rdoc_options: []
|
83
133
|
require_paths:
|
84
134
|
- lib
|
85
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
86
136
|
requirements:
|
87
|
-
- - "
|
137
|
+
- - ">"
|
88
138
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
139
|
+
version: '3'
|
90
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
141
|
requirements:
|
92
142
|
- - ">="
|
93
143
|
- !ruby/object:Gem::Version
|
94
144
|
version: '0'
|
95
145
|
requirements: []
|
96
|
-
rubygems_version: 3.
|
97
|
-
signing_key:
|
146
|
+
rubygems_version: 3.5.11
|
147
|
+
signing_key:
|
98
148
|
specification_version: 4
|
99
149
|
summary: Unoficial Gem that abstracts away RKD's APIs
|
100
150
|
test_files: []
|