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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c734f5270dbb5bb015317c50984d2556901bb325
4
- data.tar.gz: 5f973a73b4e6f1bc867d8654e84ec170c6f84e55
3
+ metadata.gz: 70bd3480dd8c6504c3c21701dd0c705f75346f5b
4
+ data.tar.gz: bc7a9c59bdef1a226ca281b5dc5fb8b322a6f034
5
5
  SHA512:
6
- metadata.gz: 8ad9fece5fa48421aa809bbf5f749bf7cf87e053eb8d2def8ec77cef3672a5d37578639c7af7ce30fd4a27318ab274469d0ed3b440190a868ac2eb8bee7f1827
7
- data.tar.gz: 32188629d9022a9d7bdfe275869e612be058a20afaa6179c2f5c7e1222c62bf080b96be22d49b889fd06dcb9e827cdbeb733c01c377b2a0373fa61b4c01d4cea
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
@@ -132,11 +132,11 @@ module Everypolitician
132
132
  end
133
133
 
134
134
  def start_date
135
- @start_date ||= Date.parse(raw_data[: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 ||= Date.parse(raw_data[: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
 
@@ -1,3 +1,3 @@
1
1
  module Everypolitician
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  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.6.0
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-01-29 00:00:00.000000000 Z
11
+ date: 2016-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: everypolitician-popolo