wikidata_position_history 1.3.4 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '018cdd5d51eee83b0738a0b84f32d92259bf4665fe25894b2d005f308c033466'
4
- data.tar.gz: bf630179eacfe1e68b88dacd268ae4c1e35efdabfc0149963338cf9de3a20567
3
+ metadata.gz: 3cc474575654a299ceef536c692402288d072d7caf3d9bd62de17d9027bcd287
4
+ data.tar.gz: 2e6324cc0e272b5b747d65eab1aaa32f1c621a6e672487312f616afd9449d374
5
5
  SHA512:
6
- metadata.gz: cb6dd44e9a746bf425a5ef8199d7bd10891ea887d3f61dab6fff676ecdb21ceec19da22ac585c0ac3c61d70a4deeb26c5fd1f602ab45d49aaa6595ca4aa0dccd
7
- data.tar.gz: 583747329e14ed0f7292c5f7e71e1e4bafe63ca83dd028786449fa582af0b68880e90287e1028b249eeef28f125f54d3b7ae0d6940048cc122901f57b52e2aa5
6
+ metadata.gz: 709a0916f16fd2a890df7ae3e2873968a23f0640945cf756785eb59bf8d7589b578fb2bd51e6263b36de729e20ea2a200cfcd9731ee6957a2e539169cacb0cbf
7
+ data.tar.gz: 3dbe5d81f0fe77f6487ce0109b91205d3b4361e13c70b48f93464ea4a323d06f3c07b70ea263e4817592cedf1b632e10b10be832dd03a92114f59505b53dae5a
@@ -1,3 +1,7 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rspec
4
+
1
5
  AllCops:
2
6
  Exclude:
3
7
  - 'Vagrantfile'
@@ -29,6 +33,13 @@ Lint/AssignmentInCondition:
29
33
  Naming/ClassAndModuleCamelCase:
30
34
  Enabled: false
31
35
 
36
+ RSpec/DescribedClass:
37
+ Enabled: false
38
+
39
+ # TODO: remove this?
40
+ RSpec/MultipleExpectations:
41
+ Max: 2
42
+
32
43
  Style/CollectionMethods:
33
44
  Enabled: true
34
45
 
@@ -52,3 +63,6 @@ Style/TrailingCommaInHashLiteral:
52
63
 
53
64
  Style/TrailingCommaInArrayLiteral:
54
65
  EnforcedStyleForMultiline: no_comma
66
+
67
+ Layout/ClassStructure:
68
+ Enabled: true
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ # [1.5.0] 2020-09-06
4
+
5
+ ## Enhancements
6
+
7
+ * When showing the results for a position from long long ago (such as
8
+ the High Kings of Ireland), display the dates as "862 – 879" not as
9
+ "862 – 879"
10
+ * If we only know that someone took (or left) office sometime in a given
11
+ decade (i.e. at date precision 8), display that as (say) "1930s"
12
+
13
+ ## Fixes
14
+
15
+ * No longer blows up when a P39 has a start date, but no end date
16
+
17
+ # [1.4.2] 2020-09-05
18
+
19
+ ## Fixes
20
+
21
+ * Bring back the warnings when start or end dates are missing.
22
+
23
+ # [1.4.1] 2020-09-04
24
+
25
+ ## Fixes
26
+
27
+ * Work around template deployment issue.
28
+
29
+ # [1.4.0] 2020-09-04
30
+
31
+ ## Enhancements
32
+
33
+ * Add an image column.
34
+ * Improve the warning for inconsistent successor/predecessor values.
35
+
3
36
  # [1.3.4] - 2020-09-01
4
37
 
5
38
  ## Fixes
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'rubocop/rake_task'
8
8
  Rake::TestTask.new(:test) do |t|
9
9
  t.libs << 'test'
10
10
  t.libs << 'lib'
11
- t.test_files = FileList['test/**/*_test.rb']
11
+ t.test_files = FileList['test/**/*_{spec,test}.rb']
12
12
  end
13
13
 
14
14
  desc 'Run rubocop'
@@ -54,6 +54,8 @@ module QueryService
54
54
  class WikidataDate
55
55
  include Comparable
56
56
 
57
+ DATELEN = { '11' => 10, '10' => 7, '9' => 4, '8' => 4 }.freeze
58
+
57
59
  def initialize(str, precision)
58
60
  @str = str
59
61
  @raw_precision = precision.to_s
@@ -66,12 +68,7 @@ module QueryService
66
68
  end
67
69
 
68
70
  def to_s
69
- return str if precision == '11'
70
- return str[0..6] if precision == '10'
71
- return str[0..3] if precision == '9'
72
-
73
- warn "Cannot handle precision #{precision} for #{str}"
74
- str
71
+ precisioned_string.delete_prefix('0')
75
72
  end
76
73
 
77
74
  def empty?
@@ -99,5 +96,18 @@ module QueryService
99
96
  def parts
100
97
  to_s.split('-')
101
98
  end
99
+
100
+ def truncated_string
101
+ return str[0...DATELEN[precision]] if DATELEN.key?(precision)
102
+
103
+ warn "Cannot handle precision #{precision} for #{str}"
104
+ str
105
+ end
106
+
107
+ def precisioned_string
108
+ return "#{truncated_string}s" if precision == '8'
109
+
110
+ truncated_string
111
+ end
102
112
  end
103
113
  end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WikidataPositionHistory
4
+ module SPARQL
5
+ # SPARQL for fetching biographical about all holders of a position
6
+ #
7
+ # This is distinct from the mandate query itself to avoid complex
8
+ # GROUP BY scenarios where people have multiple values for
9
+ # biographical properties.
10
+ class BioData < ItemQuery
11
+ def raw_sparql
12
+ <<~SPARQL
13
+ # holder-biodata
14
+
15
+ SELECT DISTINCT ?item ?image
16
+ WHERE {
17
+ ?item wdt:P31 wd:Q5 ; p:P39/ps:P39 wd:%s .
18
+ OPTIONAL { ?item wdt:P18 ?image }
19
+ }
20
+ ORDER BY ?item
21
+ SPARQL
22
+ end
23
+ end
24
+ end
25
+
26
+ # Represents a single row returned from the Position query
27
+ class BioData
28
+ def initialize(row)
29
+ @row = row
30
+ end
31
+
32
+ def person
33
+ QueryService::WikidataItem.new(row.dig(:item, :value))
34
+ end
35
+
36
+ def image_title
37
+ return if image_url.to_s.empty?
38
+
39
+ image_url.split('/').last
40
+ end
41
+
42
+ def image_link(size = 75)
43
+ return '' unless image_title
44
+
45
+ "[[File:#{image_title}|#{size}px]]"
46
+ end
47
+
48
+ private
49
+
50
+ attr_reader :row
51
+
52
+ def image_url
53
+ row.dig(:image, :value)
54
+ end
55
+ end
56
+ end
@@ -7,6 +7,7 @@ module WikidataPositionHistory
7
7
  def raw_sparql
8
8
  <<~SPARQL
9
9
  # position-mandates
10
+
10
11
  SELECT DISTINCT ?ordinal ?item ?start_date ?start_precision ?end_date ?end_precision ?prev ?next ?nature
11
12
  WHERE {
12
13
  ?item wdt:P31 wd:Q5 ; p:P39 ?posn .
@@ -19,7 +20,6 @@ module WikidataPositionHistory
19
20
  OPTIONAL { ?posn pq:P1366|pq:P156 ?next }
20
21
  OPTIONAL { ?posn pq:P1545 ?ordinal }
21
22
  OPTIONAL { ?posn pq:P5102 ?nature }
22
- OPTIONAL { ?posn pq:P5102 ?nature }
23
23
  }
24
24
  ORDER BY DESC(?start_date)
25
25
  SPARQL
@@ -37,8 +37,13 @@ module WikidataPositionHistory
37
37
  row.dig(:ordinal, :value)
38
38
  end
39
39
 
40
+ def officeholder
41
+ QueryService::WikidataItem.new(row.dig(:item, :value))
42
+ end
43
+
44
+ # TODO: rename or remove. 'item' is meaningless/ambiguous
40
45
  def item
41
- QueryService::WikidataItem.new(row.dig(:item, :value)).qlink
46
+ officeholder.qlink
42
47
  end
43
48
 
44
49
  def prev
@@ -58,10 +63,14 @@ module WikidataPositionHistory
58
63
  end
59
64
 
60
65
  def start_date
66
+ return if start_date_raw.empty?
67
+
61
68
  QueryService::WikidataDate.new(start_date_raw, start_date_precision)
62
69
  end
63
70
 
64
71
  def end_date
72
+ return if end_date_raw.empty?
73
+
65
74
  QueryService::WikidataDate.new(end_date_raw, end_date_precision)
66
75
  end
67
76
 
@@ -3,8 +3,10 @@
3
3
  require 'query_service'
4
4
  require 'sparql/item_query'
5
5
  require 'sparql/position_data'
6
+ require 'sparql/bio_data'
6
7
  require 'sparql/mandates'
7
8
  require 'wikidata_position_history/checks'
9
+ require 'wikidata_position_history/template'
8
10
  require 'wikidata_position_history/report'
9
11
  require 'wikidata_position_history/version'
10
12
 
@@ -20,6 +22,19 @@ module WikidataPositionHistory
20
22
  WIKI_USERNAME = ENV['WIKI_USERNAME']
21
23
  WIKI_PASSWORD = ENV['WIKI_PASSWORD']
22
24
 
25
+ NO_ID_ERROR = <<~WIKITEXT
26
+ '''#{WIKI_TEMPLATE_NAME} Error''': You must pass the <code>id</code>
27
+ parameter to the <code>#{WIKI_TEMPLATE_NAME}</code> template; e.g.
28
+ <nowiki>{{#{WIKI_TEMPLATE_NAME}|id=Q14211}}</nowiki>
29
+ WIKITEXT
30
+
31
+ MALFORMED_ID_ERROR = <<~WIKITEXT
32
+ '''#{WIKI_TEMPLATE_NAME} Error''': The <code>id</code> parameter was
33
+ malformed; it should be Q followed by a number of digits, e.g. as in:
34
+
35
+ <nowiki>{{#{WIKI_TEMPLATE_NAME}|id=Q14211}}</nowiki>
36
+ WIKITEXT
37
+
23
38
  def initialize(mediawiki_site:, page_title:)
24
39
  @mediawiki_site = mediawiki_site
25
40
  @page_title = page_title.tr('_', ' ')
@@ -31,7 +46,7 @@ module WikidataPositionHistory
31
46
 
32
47
  def new_content
33
48
  return [NO_ID_ERROR, 'The id parameter was missing'] if position_id.empty?
34
- return [MALFORMED_ID_ERROR, 'The id parameter was malformed'] unless position_id =~ /^Q\d+$/
49
+ return [MALFORMED_ID_ERROR, 'The id parameter was malformed'] unless position_id[/^Q\d+$/]
35
50
 
36
51
  [WikidataPositionHistory::Report.new(position_id).wikitext, "Successfully updated holders of #{position_id}"]
37
52
  end
@@ -40,19 +55,6 @@ module WikidataPositionHistory
40
55
 
41
56
  attr_reader :mediawiki_site, :page_title
42
57
 
43
- NO_ID_ERROR = <<~EOERROR
44
- '''#{WIKI_TEMPLATE_NAME} Error''': You must pass the <code>id</code>
45
- parameter to the <code>#{WIKI_TEMPLATE_NAME}</code> template; e.g.
46
- <nowiki>{{#{WIKI_TEMPLATE_NAME}|id=Q14211}}</nowiki>
47
- EOERROR
48
-
49
- MALFORMED_ID_ERROR = <<~EOERROR
50
- '''#{WIKI_TEMPLATE_NAME} Error''': The <code>id</code> parameter was
51
- malformed; it should be Q followed by a number of digits, e.g. as in:
52
-
53
- <nowiki>{{#{WIKI_TEMPLATE_NAME}|id=Q14211}}</nowiki>
54
- EOERROR
55
-
56
58
  def position_id
57
59
  return id_param unless id_param.empty?
58
60
 
@@ -100,7 +100,7 @@ module WikidataPositionHistory
100
100
  end
101
101
 
102
102
  def possible_explanation
103
- "#{current.item} has a {{P|1365}} of #{predecessor}, which differs from #{earlier.item}"
103
+ "#{current.item} has a {{P|1365}} of #{predecessor}, but follows #{earlier.item} here"
104
104
  end
105
105
  end
106
106
 
@@ -115,7 +115,7 @@ module WikidataPositionHistory
115
115
  end
116
116
 
117
117
  def possible_explanation
118
- "#{current.item} has a {{P|1366}} of #{successor}, which differs from #{later.item}"
118
+ "#{current.item} has a {{P|1366}} of #{successor}, but is followed by #{later.item} here"
119
119
  end
120
120
  end
121
121
 
@@ -124,10 +124,10 @@ module WikidataPositionHistory
124
124
  def problem?
125
125
  return false unless later
126
126
 
127
- ends = current.end_date
128
- return false if ends.empty?
127
+ next_starts = later.start_date or return false
128
+ ends = current.end_date or return false
129
129
 
130
- ends > later.start_date
130
+ ends > next_starts
131
131
  rescue ArgumentError
132
132
  true
133
133
  end
@@ -1,95 +1,62 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WikidataPositionHistory
4
- # A single output row of Wikitext for an officeholding
5
- class MandateReport
4
+ # Date for a single mandate row, to be passed to the report template
5
+ class MandateData
6
+ CHECKS = [Check::MissingFields, Check::WrongPredecessor, Check::WrongSuccessor, Check::Overlap].freeze
7
+
6
8
  def initialize(later, current, earlier)
7
9
  @later = later
8
10
  @current = current
9
11
  @earlier = earlier
10
12
  end
11
13
 
12
- def output
13
- [row_start, ordinal_cell, member_cell, warnings_cell].join("\n")
14
- end
15
-
16
- private
17
-
18
- CHECKS = [Check::MissingFields, Check::WrongPredecessor, Check::WrongSuccessor, Check::Overlap].freeze
19
-
20
- WARNING_LAYOUT = [
21
- '<span style="display: block">[[File:Pictogram voting comment.svg|15px|link=]]&nbsp;',
22
- '<span style="color: #d33; font-weight: bold; vertical-align: middle;">%s</span>&nbsp;',
23
- '<ref>%s</ref></span>'
24
- ].join
25
-
26
- attr_reader :later, :current, :earlier
27
-
28
- def row_start
29
- '|-'
30
- end
31
-
32
- def ordinal_cell
33
- %(| style="padding:0.5em 2em" | #{ordinal_string})
34
- end
35
-
36
14
  def ordinal_string
37
15
  ordinal = current.ordinal or return ''
38
- ordinal.concat('.')
16
+ "#{ordinal}."
39
17
  end
40
18
 
41
- def member_style
42
- return 'font-size: 1.25em; display: block; font-style: italic;' if current.acting?
43
-
44
- 'font-size: 1.5em; display: block;'
19
+ def person
20
+ current.item
45
21
  end
46
22
 
47
- def member_cell
48
- format('| style="padding:0.5em 2em" | <span style="%s">%s</span> %s',
49
- member_style, membership_person, membership_dates)
50
- end
23
+ def dates
24
+ dates = [current.start_date, current.end_date]
25
+ return '' if dates.compact.empty?
51
26
 
52
- def warnings_cell
53
- format('| style="padding:0.5em 2em 0.5em 1em; border: none; background: #fff; text-align: left;" | %s',
54
- combined_warnings)
27
+ dates.join(' – ')
55
28
  end
56
29
 
57
- def combined_warnings
58
- CHECKS.map do |check_class|
59
- check = check_class.new(later, current, earlier)
60
- format(WARNING_LAYOUT, check.headline, check.explanation) if check.problem?
61
- end.join
30
+ def acting?
31
+ current.acting?
62
32
  end
63
33
 
64
- def membership_person
65
- current.item
34
+ def warnings
35
+ CHECKS.map { |klass| klass.new(later, current, earlier) }.select(&:problem?)
66
36
  end
67
37
 
68
- def membership_dates
69
- dates = [current.start_date, current.end_date]
70
- # compact doesn't work here, even if we add #nil? to WikidataDate
71
- return '' if dates.reject(&:empty?).empty?
38
+ private
72
39
 
73
- dates.join(' ')
74
- end
40
+ attr_reader :later, :current, :earlier
75
41
  end
76
42
 
77
43
  # The entire wikitext generated for this report
78
44
  class Report
79
- def initialize(subject_item_id)
80
- @subject_item_id = subject_item_id
45
+ def initialize(position_id, template_class = ReportTemplate)
46
+ @position_id = position_id
47
+ @template_class = template_class
81
48
  end
82
49
 
83
- attr_reader :subject_item_id
50
+ attr_reader :position_id, :template_class
84
51
 
85
52
  def wikitext
86
53
  return no_items_output if mandates.empty?
87
54
 
88
- [table_header, table_rows, table_footer, wdqs_section].compact.join("\n")
55
+ output
89
56
  end
90
57
 
91
58
  def header
92
- "== {{Q|#{subject_item_id}}} officeholders #{position_dates} =="
59
+ "== {{Q|#{position_id}}} officeholders #{position_dates} =="
93
60
  end
94
61
 
95
62
  def position_dates
@@ -108,7 +75,15 @@ module WikidataPositionHistory
108
75
  def metadata
109
76
  # TODO: we might get more than one response, if a position has
110
77
  # multiple dates
111
- @metadata ||= SPARQL::PositionData.new(subject_item_id).results_as(PositionData).first
78
+ @metadata ||= SPARQL::PositionData.new(position_id).results_as(PositionData).first
79
+ end
80
+
81
+ def biodata
82
+ @biodata ||= SPARQL::BioData.new(position_id).results_as(BioData)
83
+ end
84
+
85
+ def biodata_for(officeholder)
86
+ biodata.select { |bio| bio.person.id == officeholder.id }
112
87
  end
113
88
 
114
89
  def padded_mandates
@@ -116,7 +91,7 @@ module WikidataPositionHistory
116
91
  end
117
92
 
118
93
  def sparql
119
- @sparql ||= SPARQL::Mandates.new(subject_item_id)
94
+ @sparql ||= SPARQL::Mandates.new(position_id)
120
95
  end
121
96
 
122
97
  def mandates
@@ -124,32 +99,26 @@ module WikidataPositionHistory
124
99
  end
125
100
 
126
101
  def no_items_output
127
- "\n{{PositionHolderHistory/error_no_holders|id=#{subject_item_id}}}\n"
102
+ "\n{{PositionHolderHistory/error_no_holders|id=#{position_id}}}\n"
128
103
  end
129
104
 
130
- def table_header
131
- '{| class="wikitable" style="text-align: center; border: none;"'
132
- end
133
-
134
- def table_footer
135
- "|}\n"
136
- end
137
-
138
- def wdqs_section
139
- wdqs_div % sparql.wdqs_url
105
+ def output
106
+ template_class.new(template_params).output
140
107
  end
141
108
 
142
- def wdqs_div
143
- <<~HTML
144
- <div style="margin-bottom:5px; border-bottom:3px solid #2f74d0; font-size:8pt">
145
- <div style="float:right">[%s WDQS]</div>
146
- </div>
147
- HTML
109
+ def template_params
110
+ {
111
+ table_rows: table_rows,
112
+ sparql_url: sparql.wdqs_url,
113
+ }
148
114
  end
149
115
 
150
116
  def table_rows
151
117
  padded_mandates.each_cons(3).map do |later, current, earlier|
152
- MandateReport.new(later, current, earlier).output
118
+ {
119
+ mandate: MandateData.new(later, current, earlier),
120
+ bio: biodata_for(current.officeholder),
121
+ }
153
122
  end
154
123
  end
155
124
  end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WikidataPositionHistory
4
+ # Interface to the ERB Template for the output
5
+ class ReportTemplate
6
+ def initialize(data)
7
+ @data = data
8
+ end
9
+
10
+ def output
11
+ template.result_with_hash(data)
12
+ end
13
+
14
+ private
15
+
16
+ attr_reader :data
17
+
18
+ def template
19
+ @template ||= ERB.new(template_text)
20
+ end
21
+
22
+ def template_text
23
+ <<~ERB
24
+ {| class="wikitable" style="text-align: center; border: none;"
25
+ <% table_rows.map(&:values).each do |mandate, bio| %>|-
26
+ | style="padding:0.5em 2em" | <%= mandate.ordinal_string %>
27
+ | style="padding:0.5em 2em" | <%= bio.map(&:image_link).first %>
28
+ | style="padding:0.5em 2em" | <span style="font-size: <%= mandate.acting? ? '1.25em; font-style: italic;' : '1.5em' %>; display: block;"><%= mandate.person %></span> <%= mandate.dates %>
29
+ | style="padding:0.5em 2em 0.5em 1em; border: none; background: #fff; text-align: left;" | <% mandate.warnings.each do |warning| %><span style="display: block">[[File:Pictogram voting comment.svg|15px|link=]]&nbsp;<span style="color: #d33; font-weight: bold; vertical-align: middle;"><%= warning.headline %></span>&nbsp;<ref><%= warning.explanation %></ref></span><% end %>
30
+ <% end %>|}
31
+
32
+ <div style="margin-bottom:5px; border-bottom:3px solid #2f74d0; font-size:8pt">
33
+ <div style="float:right">[<%= sparql_url %> WDQS]</div>
34
+ </div>
35
+ ERB
36
+ end
37
+ end
38
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WikidataPositionHistory
4
- VERSION = '1.3.4'
4
+ VERSION = '1.5.0'
5
5
  end
@@ -11,8 +11,8 @@ Gem::Specification.new do |spec|
11
11
  spec.authors = ['Tony Bowden', 'Mark Longair']
12
12
  spec.email = ['tony@tmtm.com']
13
13
 
14
- spec.summary = 'Generates a wikitext history of a holders of a position in Wikidata'
15
- spec.homepage = 'https://github.com/everypolitician/wikidata-position-history/'
14
+ spec.summary = 'Generates a table of historic holders of a Wikidata position'
15
+ spec.homepage = 'https://github.com/tmtmtmtm/wikidata-position-history/'
16
16
  spec.license = 'MIT'
17
17
 
18
18
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ['lib']
26
26
 
27
- spec.add_runtime_dependency 'mediawiki-replaceable-content', '0.2.1'
27
+ spec.add_runtime_dependency 'mediawiki-replaceable-content', '0.2.2'
28
28
  spec.add_runtime_dependency 'rest-client', '~> 2.0'
29
29
 
30
30
  spec.add_development_dependency 'bundler', '~> 2.1'
@@ -33,6 +33,8 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'rake', '~> 13.0'
34
34
  spec.add_development_dependency 'reek', '~> 6.0'
35
35
  spec.add_development_dependency 'rubocop', '~> 0.89'
36
+ spec.add_development_dependency 'rubocop-performance', '~> 1.8.0'
37
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.43.2'
36
38
  spec.add_development_dependency 'warning', '~> 1.1'
37
- spec.add_development_dependency 'webmock', '~> 3.0.0'
39
+ spec.add_development_dependency 'webmock', '~> 3.8.3'
38
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.3.4
4
+ version: 1.5.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-01 00:00:00.000000000 Z
12
+ date: 2020-09-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mediawiki-replaceable-content
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 0.2.1
20
+ version: 0.2.2
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 0.2.1
27
+ version: 0.2.2
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rest-client
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -123,6 +123,34 @@ dependencies:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0.89'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubocop-performance
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: 1.8.0
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: 1.8.0
140
+ - !ruby/object:Gem::Dependency
141
+ name: rubocop-rspec
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: 1.43.2
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: 1.43.2
126
154
  - !ruby/object:Gem::Dependency
127
155
  name: warning
128
156
  requirement: !ruby/object:Gem::Requirement
@@ -143,14 +171,14 @@ dependencies:
143
171
  requirements:
144
172
  - - "~>"
145
173
  - !ruby/object:Gem::Version
146
- version: 3.0.0
174
+ version: 3.8.3
147
175
  type: :development
148
176
  prerelease: false
149
177
  version_requirements: !ruby/object:Gem::Requirement
150
178
  requirements:
151
179
  - - "~>"
152
180
  - !ruby/object:Gem::Version
153
- version: 3.0.0
181
+ version: 3.8.3
154
182
  description:
155
183
  email:
156
184
  - tony@tmtm.com
@@ -176,15 +204,17 @@ files:
176
204
  - exe/position-history-for-item
177
205
  - exe/update_wikidata_page
178
206
  - lib/query_service.rb
207
+ - lib/sparql/bio_data.rb
179
208
  - lib/sparql/item_query.rb
180
209
  - lib/sparql/mandates.rb
181
210
  - lib/sparql/position_data.rb
182
211
  - lib/wikidata_position_history.rb
183
212
  - lib/wikidata_position_history/checks.rb
184
213
  - lib/wikidata_position_history/report.rb
214
+ - lib/wikidata_position_history/template.rb
185
215
  - lib/wikidata_position_history/version.rb
186
216
  - wikidata_position_history.gemspec
187
- homepage: https://github.com/everypolitician/wikidata-position-history/
217
+ homepage: https://github.com/tmtmtmtm/wikidata-position-history/
188
218
  licenses:
189
219
  - MIT
190
220
  metadata:
@@ -208,5 +238,5 @@ rubyforge_project:
208
238
  rubygems_version: 2.7.6.2
209
239
  signing_key:
210
240
  specification_version: 4
211
- summary: Generates a wikitext history of a holders of a position in Wikidata
241
+ summary: Generates a table of historic holders of a Wikidata position
212
242
  test_files: []