congress_forms 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 511a14df45a39ea5d0ec33cc0508b301f43ebdf9
4
- data.tar.gz: 6c94d1b1e1cee5254c7079ca890638ce757230e2
3
+ metadata.gz: 85cf0c5a2d1e3b221e7674267da900b5eb66be99
4
+ data.tar.gz: cea9f9f04b41c702ff8345f3a58a94dc08b2f52d
5
5
  SHA512:
6
- metadata.gz: f615b6a22e8ec1b9ce816c0b54c89cdc5a28741cb2d190dbb5b39430669b7f171606da8ed1fa0c96181ea246b0d858bd37a41460ec881602489b741c4c9553e5
7
- data.tar.gz: ba60c49d93426e5674ebd59e41159601502b2d10dbd799b7d66febf1b708de8cca75e136730f998d41f456b61fefe23986a934723fd5f1f16b3f3713d200fecf
6
+ metadata.gz: 6bfec00df54bf57b544fb32078f32e25d5250d914826b8e67b7fd48931bd85db830bdfd9fc3d568da5785ff2ec68243bad33076dc8e52dd66e057c47359ad02e
7
+ data.tar.gz: 9082fb873f2a9a33402a31a98b1d11876d036f6c2766d20f26a71a84025a85065e8758b7961dec9b72d30b3b3139f11f7523ce79564f6f8d588ab03d3103c245
data/README.md CHANGED
@@ -104,7 +104,7 @@ A `git pull` is performed every now and then in this direcory, to keep the form
104
104
  CongressForms.auto_update_contact_congress = false
105
105
  ```
106
106
 
107
- House messages are submitted through the [Communicating with Congress](https://www.house.gov/doing-business-with-the-house/communicating-with-congress-cwc) API. You will need to complete the vendor application process, then configure the API client with
107
+ House messages are submitted through the [Communicating with Congress](https://www.house.gov/doing-business-with-the-house/communicating-with-congress-cwc) API. To send messages to the House of Representatives, You will need to complete the vendor application process, then configure the API client with
108
108
 
109
109
  ```ruby
110
110
  Cwc::Client.configure(
@@ -11,7 +11,13 @@ module CongressForms
11
11
  end
12
12
 
13
13
  def self.find(form_id)
14
- if Cwc::Client.new.office_supported?(form_id)
14
+ begin
15
+ cwc_client = Cwc::Client.new
16
+ rescue KeyError => _
17
+ nil
18
+ end
19
+
20
+ if cwc_client&.office_supported?(form_id)
15
21
  CwcForm.new(form_id)
16
22
  else
17
23
  content, timestamp = repo.find("members/#{form_id}.yaml")
@@ -1,3 +1,3 @@
1
1
  module CongressForms
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: congress_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Woo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-04 00:00:00.000000000 Z
11
+ date: 2019-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry