jekyll-everypolitician 0.6.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 029f25fb8dbc24206f2745bca89a518a0b4de6d8
4
- data.tar.gz: 919c84e92527e1ed99747a1adcc83b56f14be716
3
+ metadata.gz: 917387a360b34d42b3d76bca4f0e526299f26b90
4
+ data.tar.gz: 5f92bbc93be2a8157ffb503fa884163d3d1d5568
5
5
  SHA512:
6
- metadata.gz: 701d46ff16c622ff767d26b38d5598269fd3cbf89dffc5a90f1b58ebb8761409e873c7a6f7d12bd7953583d563ddf6916cf0b45edae4b7a3febcd47e35cb8822
7
- data.tar.gz: af93febd80f78063b0ca610ac304d5074d86d616c02c694c944a1b5c3d31f536569c918b132367aad86a4168971236a9eba5a8778d313d39edbfdec39f1c4e59
6
+ metadata.gz: e768443c04c694167ff5ce37bb5ae01e261b1c17ad23c7d3c399da53eb45a53a5247d3bfb36dbbefba2191e99c4d117b6eef8dcc6a6e706034c3bb49d437dcaa
7
+ data.tar.gz: 1fa4496176a2474003251bc260c6251f99936ae6683f7fbcb7d66e53bcb451db2f420f6bdb3a6b7f65d4dee92474892d0bdfbad69e6d04a6c968e1a8224a0a71
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
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.7.0] - 2015-12-16
6
+
7
+ ### Changed
8
+
9
+ - Switched to using Jekyll 3.0's new hook system. We now add EveryPolitician data using a `:site` `:post_read` hook, which means that collections will be populated before any of the generators get run. This makes it easier to write a generator that does something with the EveryPolitician generated collections.
10
+
11
+ ## [0.6.0] - 2015-12-03
12
+
13
+ ### Removed
14
+
15
+ - Removed the dependency on Active Support - it turned out to not be necessary as Jekyll already has slug related functions built in.
16
+
5
17
  ## [0.5.0] - 2015-12-03
6
18
 
7
19
  ### Added
@@ -41,3 +53,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
41
53
  [0.4.0]: https://github.com/everypolitician/jekyll-everypolitician/compare/v0.3.0...v0.4.0
42
54
  [0.5.0]: https://github.com/everypolitician/jekyll-everypolitician/compare/v0.4.0...v0.5.0
43
55
  [0.6.0]: https://github.com/everypolitician/jekyll-everypolitician/compare/v0.5.0...v0.6.0
56
+ [0.7.0]: https://github.com/everypolitician/jekyll-everypolitician/compare/v0.6.0...v0.7.0
@@ -7,14 +7,18 @@ require 'jekyll'
7
7
 
8
8
  module Jekyll
9
9
  module Everypolitician
10
- class Generator < Jekyll::Generator
10
+ class PopoloFetcher
11
11
  COLLECTION_MAPPING = {
12
12
  'persons' => 'people'
13
13
  }
14
14
 
15
- priority :high
15
+ attr_reader :site
16
16
 
17
- def generate(site)
17
+ def initialize(site)
18
+ @site = site
19
+ end
20
+
21
+ def read!
18
22
  return unless site.config.key?('everypolitician')
19
23
  sources = site.config['everypolitician']['sources']
20
24
  if sources.is_a?(Array)
@@ -90,3 +94,7 @@ module Jekyll
90
94
  end
91
95
  end
92
96
  end
97
+
98
+ Jekyll::Hooks.register :site, :post_read do |site|
99
+ Jekyll::Everypolitician::PopoloFetcher.new(site).read!
100
+ end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Everypolitician
3
- VERSION = '0.6.0'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
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.6.0
4
+ version: 0.7.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-03 00:00:00.000000000 Z
11
+ date: 2015-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll