everypolitician 0.6.0 → 0.6.1
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/lib/everypolitician.rb +8 -2
- data/lib/everypolitician/version.rb +1 -1
- 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: 70bd3480dd8c6504c3c21701dd0c705f75346f5b
|
4
|
+
data.tar.gz: bc7a9c59bdef1a226ca281b5dc5fb8b322a6f034
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cf500912b6c6541ef12d35ee1f702082bef9c6bf1fa70fa466ec3ba0e21612f130ecfdd8f749672f2192806eae0d03f8208d899b0ee4905304d065a385c2472
|
7
|
+
data.tar.gz: 3d0c46815af909d5986eeb3c947cb34b2edfb1a636ea05d9d62b87f3a0ea3a3c16bcbee76673f02d7d5895a34b4b2b9a6ea30734e7a4b485b9a09b4c346dbd03
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## [0.6.1] - 2016-05-23
|
7
|
+
|
8
|
+
## Fixed
|
9
|
+
|
10
|
+
- `start_date` and `end_date` for a legislative period now work correctly for a partial date, e.g. `2010`.
|
11
|
+
|
6
12
|
## [0.6.0] - 2016-01-29
|
7
13
|
|
8
14
|
### Added
|
@@ -55,3 +61,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
55
61
|
[0.4.0]: https://github.com/everypolitician/everypolitician-ruby/compare/v0.3.0...v0.4.0
|
56
62
|
[0.5.0]: https://github.com/everypolitician/everypolitician-ruby/compare/v0.4.0...v0.5.0
|
57
63
|
[0.6.0]: https://github.com/everypolitician/everypolitician-ruby/compare/v0.5.0...v0.6.0
|
64
|
+
[0.6.1]: https://github.com/everypolitician/everypolitician-ruby/compare/v0.6.0...v0.6.1
|
data/lib/everypolitician.rb
CHANGED
@@ -132,11 +132,11 @@ module Everypolitician
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def start_date
|
135
|
-
@start_date ||=
|
135
|
+
@start_date ||= parse_partial_date(raw_data[:start_date])
|
136
136
|
end
|
137
137
|
|
138
138
|
def end_date
|
139
|
-
@end_date ||=
|
139
|
+
@end_date ||= parse_partial_date(raw_data[:end_date])
|
140
140
|
end
|
141
141
|
|
142
142
|
def csv_url
|
@@ -151,6 +151,12 @@ module Everypolitician
|
|
151
151
|
def [](key)
|
152
152
|
raw_data[key]
|
153
153
|
end
|
154
|
+
|
155
|
+
private
|
156
|
+
|
157
|
+
def parse_partial_date(date)
|
158
|
+
Date.new(*date.split('-').map(&:to_i))
|
159
|
+
end
|
154
160
|
end
|
155
161
|
end
|
156
162
|
|
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.6.
|
4
|
+
version: 0.6.1
|
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-
|
11
|
+
date: 2016-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: everypolitician-popolo
|