sunlight-congress 0.0.1 → 1.0.0

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: 14b596efff0167886474b2e53744861023cafba6
4
- data.tar.gz: 034603db8d988f9d005154006047bd28cfb7cd4d
3
+ metadata.gz: 23996eb98d2ab8efb2afaf9473c06b476cdde19e
4
+ data.tar.gz: 555166c034e865f12ae8d3a82892e0df900b8fdf
5
5
  SHA512:
6
- metadata.gz: 5f66bce90f5960ee2072833395aac761219fdbae5c5a37957c7b327967f879fa50b1739cb46f3cb3b0d7bf1d3bfcce7171c47c9160dbd7e051341758db0f21e7
7
- data.tar.gz: f9588c53359d64dea2072bbb841da5162e2b0250f33eb00599ec09ad1ee182da9aaa1467a64c8eb061652db3a49472cbb389b06f25c5553fc117699b26d9b6e2
6
+ metadata.gz: 8023cc8e9bdab5d502e5ef337d4f033ac4683b40fdd10ab007f808a26a99cf577f53640e7724c05ec8459b075c39c3e2c30903aaec75c32010b76a52067180aa
7
+ data.tar.gz: 6f661c42cf18d0d1ee6a5303b653c6ca01c47dde09dd396797fc9f3587f51ce01368aeb79bb2b3a306443362b76a1fe9e78f80350f04423cd4c7fd0d96de64f8
@@ -7,10 +7,11 @@ module Sunlight
7
7
  end
8
8
 
9
9
  class Sunlight::Congress::Legislator
10
- attr_accessor :first_name
10
+ attr_accessor :first_name, :last_name
11
11
 
12
12
  def initialize(options)
13
13
  self.first_name = options["first_name"]
14
+ self.last_name = options["last_name"]
14
15
  end
15
16
 
16
17
  def self.by_zipcode(zipcode)
@@ -1,5 +1,5 @@
1
1
  module Sunlight
2
2
  module Congress
3
- VERSION = "0.0.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -7,7 +7,6 @@ class TestIntegrationCongress < MiniTest::Unit::TestCase
7
7
  end
8
8
 
9
9
  def test_legislators_by_zipcode
10
-
11
10
  stub_request(:get, "http://congress.api.sunlightfoundation.com/legislators/locate?apikey=thisismykey&zip=90210")
12
11
  .to_return(body: '{"results":[{"first_name":"Joe"}]}')
13
12
 
@@ -0,0 +1,10 @@
1
+ require 'sunlight/congress'
2
+
3
+ class TestIntegrationCongress < MiniTest::Unit::TestCase
4
+ ['first_name', 'last_name'].each do |attr|
5
+ define_method "test_#{attr}" do
6
+ l = Sunlight::Congress::Legislator.new(attr => "foo")
7
+ assert_equal "foo", l.send(attr)
8
+ end
9
+ end
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunlight-congress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Klabnik
@@ -70,6 +70,7 @@ files:
70
70
  - lib/sunlight/congress/version.rb
71
71
  - sunlight-congress.gemspec
72
72
  - test/integration/legislators_test.rb
73
+ - test/legislators_test.rb
73
74
  - test/test_helper.rb
74
75
  homepage: https://github.com/steveklabnik/sunlight-congress
75
76
  licenses:
@@ -97,5 +98,6 @@ specification_version: 4
97
98
  summary: A wrapper for the Sunlight Labs Congress API.
98
99
  test_files:
99
100
  - test/integration/legislators_test.rb
101
+ - test/legislators_test.rb
100
102
  - test/test_helper.rb
101
103
  has_rdoc: