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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ae4a622cfd518c0129d07db8829419441cea136
4
- data.tar.gz: c688b4f5eb3ca0a5d7f16ef4cc46ddfa1ccc31e4
3
+ metadata.gz: 60a38db65e4248b8b9c45ba8f9831fcdf361664f
4
+ data.tar.gz: 6aa987b8a4b247b538331a65121185fa142958bb
5
5
  SHA512:
6
- metadata.gz: e6a27854b2aa259cae4b768c5aac3757001d0e4a20492ea37568b309929c7ab427412f35e9f3f70f287b4a50762e64697774379235b49aad846ad070e914a972
7
- data.tar.gz: 8819fd8df652eb375581110ec3b4e177fdfca25c9f287e8ead4cfe111fe3f70822ce8687a15ad1cdb3d45111092d390720a4ed114b8dc5ae17384c1561ac0572
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
- `client.elections.all`
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
- `client.elections(4015).at('4910 Willet Drive, Annandale, VA 22003')`
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
- `client.representatives.at('118 E. Main St. Carrboro, NC 27510')`
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
 
@@ -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 for the Google Civic Information API}
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"
@@ -28,6 +28,7 @@ module CivicAide
28
28
 
29
29
  delegate [
30
30
  :elections,
31
+ :election,
31
32
  :representatives
32
33
  ] => :client
33
34
 
@@ -39,6 +39,7 @@ module CivicAide
39
39
  def elections(election_id=nil)
40
40
  CivicAide::Elections.new(self, election_id)
41
41
  end
42
+ alias :election :elections
42
43
 
43
44
  def representatives
44
45
  CivicAide::Representatives.new(self)
@@ -1,3 +1,3 @@
1
1
  module CivicAide
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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.0
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 for the Google Civic Information API
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 for the Google Civic Information API
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