everypolitician 0.16.0 → 0.17.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 +6 -0
- data/lib/everypolitician/version.rb +1 -1
- data/lib/everypolitician.rb +2 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53e74c64bd7576aa98501922b02abfdf58ce5996
|
4
|
+
data.tar.gz: d57337142f105a4e5b01959ec6b93510200ad9f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 611b9052bc7dbee75d6514d6c665c3440ebbfbe774da31fe6fbdec5b45500c06ac1add3f3dba46bb85f7aa780e10a918d2ba0eb9555559cef287dd4931df1c26
|
7
|
+
data.tar.gz: 42eacfc02b5268f974d3c40769335ec8386bded77a7917592739f291f0521ee270b0c0316380c5a7a22d272222571ee10f88c89b75382856e017ebb87cebbb18
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## Unreleased
|
7
7
|
|
8
|
+
## [0.17.0] - 2016-08-23
|
8
9
|
|
10
|
+
### Changed
|
11
|
+
|
12
|
+
- The code now uses the `csv_url` field from the data, so the url
|
13
|
+
host has changed from `raw.githubusercontent.com` to `cdn.rawgit.com`.
|
9
14
|
|
10
15
|
## [0.16.0] - 2016-08-22
|
11
16
|
|
@@ -150,3 +155,4 @@ a string with the time in seconds.
|
|
150
155
|
[0.14.0]: https://github.com/everypolitician/everypolitician-ruby/compare/v0.13.0...v0.14.0
|
151
156
|
[0.15.0]: https://github.com/everypolitician/everypolitician-ruby/compare/v0.14.0...v0.15.0
|
152
157
|
[0.16.0]: https://https://github.com/everypolitician/everypolitician-ruby/compare/v0.15.0...v0.16.0
|
158
|
+
[0.17.0]: https://https://github.com/everypolitician/everypolitician-ruby/compare/v0.16.0...v0.17.0
|
data/lib/everypolitician.rb
CHANGED
@@ -172,11 +172,13 @@ module Everypolitician
|
|
172
172
|
attr_reader :legislature
|
173
173
|
attr_reader :country
|
174
174
|
attr_reader :raw_data
|
175
|
+
attr_reader :csv_url
|
175
176
|
|
176
177
|
def initialize(legislative_period_data, legislature, country)
|
177
178
|
@id = legislative_period_data[:id]
|
178
179
|
@name = legislative_period_data[:name]
|
179
180
|
@slug = legislative_period_data[:slug]
|
181
|
+
@csv_url = legislative_period_data[:csv_url]
|
180
182
|
@legislature = legislature
|
181
183
|
@country = country
|
182
184
|
@raw_data = legislative_period_data
|
@@ -190,11 +192,6 @@ module Everypolitician
|
|
190
192
|
@end_date ||= parse_partial_date(raw_data[:end_date])
|
191
193
|
end
|
192
194
|
|
193
|
-
def csv_url
|
194
|
-
@csv_url ||= 'https://raw.githubusercontent.com/everypolitician' \
|
195
|
-
"/everypolitician-data/#{legislature.sha}/#{raw_data[:csv]}"
|
196
|
-
end
|
197
|
-
|
198
195
|
def csv
|
199
196
|
CSV.parse(open(csv_url).read, headers: true, header_converters: :symbol, converters: nil)
|
200
197
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: everypolitician
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.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: 2016-08-
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: everypolitician-popolo
|