jekyll-everypolitician 0.3.0 → 0.4.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 +7 -0
- data/jekyll-everypolitician.gemspec +1 -0
- data/lib/jekyll/everypolitician/version.rb +1 -1
- data/lib/jekyll/everypolitician.rb +15 -5
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72ae121d8a732ae6e1eca70c23838772ef97df42
|
4
|
+
data.tar.gz: 45356441a9064e6166f9e67ae48e78124535dafc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd30320c8b95c7423ae6cd01a3010cd4b8aa94a778256a3587168179a3308e7ba94814e8a8b5d376212d3e1915aa930272a7e7c38830cbd917bc24912b28c47f
|
7
|
+
data.tar.gz: 0df4c37bb21ce8b8b97a68230af4502e1c3e66e3dba4419d3f0f8503e5d27a1d6e53ddfbf761272e56c1a57430493a6b1007bb4c61b2faa7fd3d0e26760bbc68
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [0.4.0] - 2015-12-03
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
- `Jekyll::Everypolitician::Generator` is now `:high` priority. This means it will get run before plugins that don't declare a priority. This should make it easier to make other plugins that depend on the data that `jekyll-everypolitician` adds to the `site` object.
|
10
|
+
|
5
11
|
## [0.3.0] - 2015-12-02
|
6
12
|
|
7
13
|
### Changed
|
@@ -26,3 +32,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
26
32
|
|
27
33
|
[0.2.0]: https://github.com/everypolitician/jekyll-everypolitician/compare/v0.1.0...v0.2.0
|
28
34
|
[0.3.0]: https://github.com/everypolitician/jekyll-everypolitician/compare/v0.2.0...v0.3.0
|
35
|
+
[0.4.0]: https://github.com/everypolitician/jekyll-everypolitician/compare/v0.3.0...v0.4.0
|
@@ -14,6 +14,8 @@ module Jekyll
|
|
14
14
|
'persons' => 'people'
|
15
15
|
}
|
16
16
|
|
17
|
+
priority :high
|
18
|
+
|
17
19
|
def generate(site)
|
18
20
|
return unless site.config.key?('everypolitician')
|
19
21
|
sources = site.config['everypolitician']['sources']
|
@@ -50,12 +52,20 @@ module Jekyll
|
|
50
52
|
site.collections[collection_name] = collection
|
51
53
|
end
|
52
54
|
|
55
|
+
membership_mapping = [
|
56
|
+
{ key: 'person', kind: 'persons', id: 'person_id' },
|
57
|
+
{ key: 'area', kind: 'areas', id: 'area_id' },
|
58
|
+
{ key: 'legislative_period', kind: 'events', id: 'legislative_period_id' },
|
59
|
+
{ key: 'organization', kind: 'organizations', id: 'organization_id' },
|
60
|
+
{ key: 'party', kind: 'organizations', id: 'on_behalf_of_id' }
|
61
|
+
]
|
53
62
|
memberships.each do |membership|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
63
|
+
membership_mapping.each do |mapping|
|
64
|
+
collection = site.collections[collection_name_for(mapping[:kind], prefix)]
|
65
|
+
membership[mapping[:key]] = collection.docs.find do |doc|
|
66
|
+
doc.data['id'] == membership[mapping[:id]]
|
67
|
+
end
|
68
|
+
end
|
59
69
|
end
|
60
70
|
end
|
61
71
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-everypolitician
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Mytton
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description:
|
98
112
|
email:
|
99
113
|
- chrismytton@gmail.com
|