wikidata_position_history 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/query_service.rb +9 -1
- data/lib/wikidata_position_history/output_row.rb +6 -7
- data/lib/wikidata_position_history/version.rb +1 -1
- data/wikidata_position_history.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e59634d8233371767e5a151e60d8bb5f3c8f5703302654c59f5db407faea4a4
|
4
|
+
data.tar.gz: 763b5794f41ad395b045fedfb7b132fc6139698e3514df0caf96a47bd5d224d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ad33ca550ad0a5a83ffd42bc03ce8de8df93f77b932ec8ae74d21c528160e8b47d55ff8569641d34801e7f181f0b3b9c856e2d27f5aef91914d73522e5e63de
|
7
|
+
data.tar.gz: 7dba23307f13045710a4bc3b7c0869e024fcf206b023e9740c3c8c5366ea7aa260a1dcc342cf7c0875ed1b635c2bc3b96e350720e32c01e35051b1bc1d37e747
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
# [1.11.0] 2020-09-14
|
4
|
+
|
5
|
+
## Enhancements
|
6
|
+
|
7
|
+
* Wikidata now has a new {{QB}} template to link to _both_ an Item and
|
8
|
+
its Talk page. As the PositionHolderHistory template for a position
|
9
|
+
often lives on its Talk page, any link to a position item now uses
|
10
|
+
this template, for easier of access to that. (Requested by Tagishsimon:
|
11
|
+
https://twitter.com/Tagishsimon/status/1304363879322079233)
|
12
|
+
|
13
|
+
* The change to how warnings templates work from the last release (i.e.
|
14
|
+
using on-wiki templates, so they can be improved or translated, or used
|
15
|
+
to look for problems via backlinks) definitely seems to have been a good
|
16
|
+
idea, so now the warnings for having an unexpected number of inception
|
17
|
+
or abolition dates have also been adjusted to work the same way.
|
18
|
+
|
3
19
|
# [1.10.0] 2020-09-13
|
4
20
|
|
5
21
|
## Enhancements
|
data/lib/query_service.rb
CHANGED
@@ -49,8 +49,16 @@ module QueryService
|
|
49
49
|
"{{Q|#{id}}}" if id
|
50
50
|
end
|
51
51
|
|
52
|
+
def qblink
|
53
|
+
"{{QB|#{id}}}" if id
|
54
|
+
end
|
55
|
+
|
52
56
|
def qlink_i
|
53
|
-
"''{
|
57
|
+
"''#{qlink}''" if qlink
|
58
|
+
end
|
59
|
+
|
60
|
+
def qblink_i
|
61
|
+
"''#{qblink}''" if qblink
|
54
62
|
end
|
55
63
|
|
56
64
|
private
|
@@ -62,8 +62,8 @@ module WikidataPositionHistory
|
|
62
62
|
|
63
63
|
attr_reader :metadata
|
64
64
|
|
65
|
-
def
|
66
|
-
metadata.position.
|
65
|
+
def position_id
|
66
|
+
metadata.position.id
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
@@ -72,10 +72,9 @@ module WikidataPositionHistory
|
|
72
72
|
def warnings
|
73
73
|
count = dates.count
|
74
74
|
return [] if count == 1
|
75
|
+
return [Warning.new('Missing field', "{{PositionHolderHistory/warning_no_inception_date|item=#{position_id}}}")] if count.zero?
|
75
76
|
|
76
|
-
|
77
|
-
|
78
|
-
[Warning.new('Multiple values', "#{qlink} has more than one {{P|571}}")]
|
77
|
+
[Warning.new('Multiple values', "{{PositionHolderHistory/warning_multiple_inception_dates|item=#{position_id}}}")]
|
79
78
|
end
|
80
79
|
|
81
80
|
private
|
@@ -90,7 +89,7 @@ module WikidataPositionHistory
|
|
90
89
|
def warnings
|
91
90
|
return [] unless dates.count > 1
|
92
91
|
|
93
|
-
[Warning.new('Multiple values', "
|
92
|
+
[Warning.new('Multiple values', "{{PositionHolderHistory/warning_multiple_abolition_dates|item=#{position_id}}}")]
|
94
93
|
end
|
95
94
|
|
96
95
|
private
|
@@ -109,7 +108,7 @@ module WikidataPositionHistory
|
|
109
108
|
def position
|
110
109
|
return if implied_list.empty?
|
111
110
|
|
112
|
-
(implied_list.direct.map(&:
|
111
|
+
(implied_list.direct.map(&:qblink) + implied_list.indirect_only.map(&:qblink_i)).join(', ')
|
113
112
|
end
|
114
113
|
|
115
114
|
def warnings
|
@@ -36,5 +36,5 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency 'rubocop-performance', '~> 1.8.0'
|
37
37
|
spec.add_development_dependency 'rubocop-rspec', '~> 1.43.2'
|
38
38
|
spec.add_development_dependency 'warning', '~> 1.1'
|
39
|
-
spec.add_development_dependency 'webmock', '~> 3.
|
39
|
+
spec.add_development_dependency 'webmock', '~> 3.9.1'
|
40
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wikidata_position_history
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Bowden
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-09-
|
12
|
+
date: 2020-09-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mediawiki-replaceable-content
|
@@ -171,14 +171,14 @@ dependencies:
|
|
171
171
|
requirements:
|
172
172
|
- - "~>"
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version: 3.
|
174
|
+
version: 3.9.1
|
175
175
|
type: :development
|
176
176
|
prerelease: false
|
177
177
|
version_requirements: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
179
|
- - "~>"
|
180
180
|
- !ruby/object:Gem::Version
|
181
|
-
version: 3.
|
181
|
+
version: 3.9.1
|
182
182
|
description:
|
183
183
|
email:
|
184
184
|
- tony@tmtm.com
|