civic_aide 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/civic_aide.gemspec +1 -1
- data/lib/civic_aide.rb +1 -0
- data/lib/civic_aide/client.rb +1 -0
- data/lib/civic_aide/version.rb +1 -1
- data/spec/civic_aide/civic_aide_spec.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60a38db65e4248b8b9c45ba8f9831fcdf361664f
|
4
|
+
data.tar.gz: 6aa987b8a4b247b538331a65121185fa142958bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5ecf45f288071d1274b775a30defc96b3bce25f676b27c2babfb3be93ea21eac3fe982356c887c8bb1833d4f7599b2357e1dd3277befc5daee8ae3db8e085ae
|
7
|
+
data.tar.gz: 1c5762b7732f5862b9fadea2d3a5eceab67a80bd6a43ca48ae71a85b1d87acb00103e6804b21e9ff38b64df6a06137e66fb1648cb6514fc2d62b01d8e69026d8
|
data/README.md
CHANGED
@@ -65,7 +65,9 @@ client.official_sources = true
|
|
65
65
|
|
66
66
|
To fetch a list of all available elections and their ids.
|
67
67
|
|
68
|
-
|
68
|
+
```ruby
|
69
|
+
client.elections.all
|
70
|
+
```
|
69
71
|
|
70
72
|
##### Sample response
|
71
73
|
|
@@ -119,9 +121,11 @@ To fetch a list of all available elections and their ids.
|
|
119
121
|
|
120
122
|
#### Find election info by address
|
121
123
|
|
122
|
-
After finding the id for the election you want, pass the election id and the voter's registered address.
|
124
|
+
After finding the id for the election you want, pass the election id and the voter's registered address. `election` is an alias for `elections`.
|
123
125
|
|
124
|
-
|
126
|
+
```ruby
|
127
|
+
client.election(4015).at('4910 Willet Drive, Annandale, VA 22003')
|
128
|
+
```
|
125
129
|
|
126
130
|
##### Sample Response
|
127
131
|
|
@@ -259,7 +263,9 @@ After finding the id for the election you want, pass the election id and the vot
|
|
259
263
|
|
260
264
|
Retrieve political geography and representative information based on an address.
|
261
265
|
|
262
|
-
|
266
|
+
```ruby
|
267
|
+
client.representatives.at('118 E. Main St. Carrboro, NC 27510')
|
268
|
+
```
|
263
269
|
|
264
270
|
##### Response (shortened some to save space)
|
265
271
|
|
data/civic_aide.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = CivicAide::VERSION
|
9
9
|
spec.authors = ["Tyler Pearson"]
|
10
10
|
spec.email = ["ty.pearson@gmail.com"]
|
11
|
-
spec.summary = %q{A Ruby wrapper
|
11
|
+
spec.summary = %q{A Ruby wrapper to interact with the Google Civic Information API}
|
12
12
|
spec.description = spec.summary
|
13
13
|
spec.homepage = "https://github.com/tylerpearson/civic_aide"
|
14
14
|
spec.license = "MIT"
|
data/lib/civic_aide.rb
CHANGED
data/lib/civic_aide/client.rb
CHANGED
data/lib/civic_aide/version.rb
CHANGED
@@ -26,6 +26,12 @@ describe CivicAide do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
describe ".election" do
|
30
|
+
it "should include elections" do
|
31
|
+
expect(CivicAide).to respond_to(:election)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
29
35
|
describe ".official_only" do
|
30
36
|
it "should default to false" do
|
31
37
|
expect(CivicAide.official_only).to eq(false)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: civic_aide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Pearson
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description: A Ruby wrapper
|
111
|
+
description: A Ruby wrapper to interact with the Google Civic Information API
|
112
112
|
email:
|
113
113
|
- ty.pearson@gmail.com
|
114
114
|
executables: []
|
@@ -165,7 +165,7 @@ rubyforge_project:
|
|
165
165
|
rubygems_version: 2.0.3
|
166
166
|
signing_key:
|
167
167
|
specification_version: 4
|
168
|
-
summary: A Ruby wrapper
|
168
|
+
summary: A Ruby wrapper to interact with the Google Civic Information API
|
169
169
|
test_files:
|
170
170
|
- spec/civic_aide/civic_aide_spec.rb
|
171
171
|
- spec/civic_aide/client_spec.rb
|