federal_register 0.6.1 → 0.6.2

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: f829dbc3ccb42d80e5a2e55818b2aa14e37b3d05
4
- data.tar.gz: bd18f644d61e370dd3978d128a36647caaec2002
3
+ metadata.gz: b0b5538d1935f58976f44fd23afb12bf04e19717
4
+ data.tar.gz: 2fd0e6fd0aa437b72c185bbc985141a51287b50d
5
5
  SHA512:
6
- metadata.gz: 593d03eb9e00025167a3147a2d8d35c78ff9b5962adbb50ada6da849dca228814885c9148cae5d6b365b1b7eadcb9f30ba5d5d384e6ef448318f90acbe137cbb
7
- data.tar.gz: 83ba1f4cc2ec66d5c43e6811f2038febd4b9d80307af61eb11fc27428cb70e78b641fe011005356dbf75bbae79c97d156a6b2329f5b6b36923b1fe3e5e5601f2
6
+ metadata.gz: 7022b44d7e377f1832cd647aabe333397997b14130d9efae5fb4ee4822144ad101f3d7fdd5f0edebb6d6ab2c42ed86740adffffd48a76f7226d29e988991be1f
7
+ data.tar.gz: 86d1f7f9bb16a7a0b023b69a600004d8850cad71291cc5d306129b8227794364c35eada5e0d27438760e4e9a98926619bd577901b7fc8a4dc7479d6f328db7d7
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.1
1
+ 0.6.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "federal_register"
8
- s.version = "0.6.1"
8
+ s.version = "0.6.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Carpenter", "Bob Burbach"]
12
- s.date = "2016-11-03"
12
+ s.date = "2017-11-15"
13
13
  s.description = "Ruby API Client for FederalRegister.gov that handles searching documents and getting information about agencies"
14
14
  s.email = "andrew@criticaljuncture.org"
15
15
  s.extra_rdoc_files = [
@@ -66,21 +66,23 @@ class FederalRegister::Document < FederalRegister::Base
66
66
  end
67
67
  end
68
68
 
69
+ # supports values like: '2016-26522', '2016-26522,2016-26594', '81 FR 76496', '81 FR 76496,81 FR 76685'
70
+ # note: no space after comma
69
71
  def self.find_all(*args)
70
- options, document_numbers = extract_options(args)
72
+ options, document_numbers_or_citations = extract_options(args)
71
73
 
72
74
  fetch_options = {:result_class => self}
73
75
  fetch_options.merge!(:query => {:fields => options[:fields]}) if options[:fields]
74
76
 
75
- document_numbers = document_numbers.flatten
77
+ document_numbers_or_citations = document_numbers_or_citations.flatten
76
78
 
77
79
  #TODO: fix this gross hack to ensure that find_all with a single document number
78
80
  # is returned in the same way multiple document numbers are
79
- if document_numbers.size == 1
80
- document_numbers << " "
81
+ if document_numbers_or_citations.size == 1
82
+ document_numbers_or_citations << " "
81
83
  end
82
84
 
83
- result_set = FederalRegister::ResultSet.fetch("/documents/#{document_numbers.join(',').strip}.json", fetch_options)
85
+ result_set = FederalRegister::ResultSet.fetch("/documents/#{URI.encode(document_numbers_or_citations.join(',').strip)}.json", fetch_options)
84
86
  end
85
87
 
86
88
  def agencies
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: federal_register
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Carpenter
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-03 00:00:00.000000000 Z
12
+ date: 2017-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty