transparency_data 0.0.2 → 0.0.3
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.
- data/lib/transparency_data/client.rb +5 -5
- data/lib/transparency_data.rb +2 -2
- metadata +3 -3
@@ -200,12 +200,12 @@ module TransparencyData
|
|
200
200
|
end
|
201
201
|
|
202
202
|
def self.process_party_breakdown(breakdown)
|
203
|
-
TransparencyData::Client.mashize_key(breakdown, "
|
204
|
-
TransparencyData::Client.mashize_key(breakdown, "
|
203
|
+
TransparencyData::Client.mashize_key(breakdown, "Democrats", "dem")
|
204
|
+
TransparencyData::Client.mashize_key(breakdown, "Republicans", "rep")
|
205
205
|
TransparencyData::Client.mashize_key(breakdown, "L", "lib")
|
206
206
|
TransparencyData::Client.mashize_key(breakdown, "I", "ind")
|
207
207
|
TransparencyData::Client.mashize_key(breakdown, "U", "unknown")
|
208
|
-
TransparencyData::Client.mashize_key(breakdown, "
|
208
|
+
TransparencyData::Client.mashize_key(breakdown, "Other", "other")
|
209
209
|
TransparencyData::Client.mashize_key(breakdown, "3", "third")
|
210
210
|
breakdown
|
211
211
|
end
|
@@ -216,7 +216,7 @@ module TransparencyData
|
|
216
216
|
TransparencyData::Client.mashize_key(breakdown, "L", "lib")
|
217
217
|
TransparencyData::Client.mashize_key(breakdown, "I", "ind")
|
218
218
|
TransparencyData::Client.mashize_key(breakdown, "U", "unknown")
|
219
|
-
TransparencyData::Client.mashize_key(breakdown, "
|
219
|
+
TransparencyData::Client.mashize_key(breakdown, "Other", "other")
|
220
220
|
TransparencyData::Client.mashize_key(breakdown, "3", "third")
|
221
221
|
breakdown
|
222
222
|
end
|
@@ -230,7 +230,7 @@ module TransparencyData
|
|
230
230
|
def self.mashize_key(breakdown, api_key, mash_key)
|
231
231
|
if breakdown[api_key]
|
232
232
|
breakdown["#{mash_key}_count"] = breakdown[api_key][0].to_i
|
233
|
-
breakdown["#{mash_key}_amount"]
|
233
|
+
breakdown["#{mash_key}_amount"] = breakdown[api_key][1].to_f
|
234
234
|
end
|
235
235
|
end
|
236
236
|
|
data/lib/transparency_data.rb
CHANGED
@@ -8,7 +8,7 @@ Hash.send :include, Hashie::HashExtensions
|
|
8
8
|
|
9
9
|
module TransparencyData
|
10
10
|
|
11
|
-
VERSION = "0.0.
|
11
|
+
VERSION = "0.0.3".freeze
|
12
12
|
|
13
13
|
# config/initializers/transparency_data.rb (for instance)
|
14
14
|
#
|
@@ -49,4 +49,4 @@ module TransparencyData
|
|
49
49
|
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
Dir.glob(File.dirname(__FILE__) + '/transparency_data/*.rb').each { |f| require f }
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Wynn Netherland
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-06-21 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|