wikidata_position_history 2.1.0 → 2.2.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: '08b127d4fefeb6c622042af063ab7574afb3b54f0c1c6dc3cb5329304b6b7c84'
4
- data.tar.gz: 72f0be64974066b3b8988f23ac5dde2e5897b8aaa611ff379997053f890b3011
3
+ metadata.gz: 8f9b65df015932c64b9995789de132f401400b8641fe6da6d34529ee08a897f7
4
+ data.tar.gz: 8eb66f80771e638a76e477db20e48c20cf10aa69843e20660c49a995e7040126
5
5
  SHA512:
6
- metadata.gz: c914cfaa9abc6412f04e0482b91facf33d52db8f4b49adea721bbdb5cb7dcd31c9e404f87bd58a09e7843ee8d985f2c2cd30f89953fdeffb54dc3b2749e11e85
7
- data.tar.gz: 131ef009d921f4fa974411295f913b8b9df0800f326caf9125e7524d60e627e29e3bf8f7d7303e1a4b258dca4a679568ea3f17944795bd4d68e408c4f8c023c0
6
+ metadata.gz: 84464bf1eb62fad5dfe9287baa7988ed1e27024b3dce9ceefd1b2a74a79b7ea4fe472151c9b04bc10ed8bba846694553e929ce6f0bd316cff86aee4f09806ec4
7
+ data.tar.gz: 1b8813db12384488d4719a6858fa31b3dd69b9692b2df9c62c4d861a7c46ab533715fc374bd5b7fd2441b07108257cd782369175318e89afdbb7f5cdea106945
@@ -1,7 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ # [2.2.0] 2020-09-18
4
+
5
+ ## Enhancements
6
+
7
+ * Every position came into existence at _some_ point, and so should have
8
+ a P571 inception date. If that's missing, a warning will now be
9
+ displayed.
10
+
11
+ ## Improvements
12
+
13
+ * When a position has more than one successor or prdecessor, those will
14
+ now be displayed as a proper Mediawiki list, rather than one long line
15
+ of text. As these are in a table cell, this should stop those growing
16
+ unnecessarily wide, and should generally make everything look a little
17
+ nicer.
18
+
3
19
  # [2.1.0] 2020-09-16
4
20
 
21
+ ## Enhancements
22
+
5
23
  * When displaying a list of members for a constituency, also include
6
24
  a 'parliamentary group' (P4100) column, and if there's a
7
25
  'parliamentary term' (P2937) qualifier, use it for the ordinal.
@@ -112,7 +112,10 @@ module WikidataPositionHistory
112
112
  def position
113
113
  return if implied_list.empty?
114
114
 
115
- (implied_list.direct.map(&:qblink) + implied_list.indirect_only.map(&:qblink_i)).join(', ')
115
+ list = (implied_list.direct.map(&:qblink) + implied_list.indirect_only.map(&:qblink_i))
116
+ return list.first if list.count == 1
117
+
118
+ list.map { |item| "\n* #{item}" }.join
116
119
  end
117
120
 
118
121
  def warnings
@@ -33,8 +33,8 @@ module WikidataPositionHistory
33
33
  <% end -%>
34
34
  <% if metadata.successor.position -%>
35
35
  |-
36
- | colspan="2" style="border: none; background: #fff; font-size: 1.15em; text-align: right;" | '''Replaced by''':
37
- | style=" border: none; background: #fff; text-align: left;" | <%= metadata.successor.position %>
36
+ | colspan="2" style="border: none; background: #fff; font-size: 1.15em; vertical-align: baseline; text-align: right;" | '''Replaced by''':
37
+ | style=" border: none; background: #fff; vertical-align: baseline; text-align: left;" | <%= metadata.successor.position %>
38
38
  | style=" border: none; background: #fff; text-align: left;" | \
39
39
  <% metadata.successor.warnings.each do |warning| -%>
40
40
  <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>\
@@ -63,7 +63,7 @@ module WikidataPositionHistory
63
63
  | colspan="3" style="padding:0.5em; border: none; background: #fff"> |&nbsp;
64
64
  | colspan="1" style="padding:0.5em; border: none; background: #fff"> |&nbsp;
65
65
  <% end -%>
66
- <% if metadata.inception.date -%>
66
+ <% if metadata.inception.date || metadata.inception.warnings.any? -%>
67
67
  |-
68
68
  | colspan="2" style="border: none; background: #fff; font-size: 1.15em; text-align: right;" | '''Position created''':
69
69
  | style="border: none; background: #fff; text-align: left;" | <%= metadata.inception.date %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WikidataPositionHistory
4
- VERSION = '2.1.0'
4
+ VERSION = '2.2.0'
5
5
  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: 2.1.0
4
+ version: 2.2.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-16 00:00:00.000000000 Z
12
+ date: 2020-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mediawiki-replaceable-content