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 +4 -4
- data/VERSION +1 -1
- data/federal_register.gemspec +2 -2
- data/lib/federal_register/document.rb +7 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0b5538d1935f58976f44fd23afb12bf04e19717
|
4
|
+
data.tar.gz: 2fd0e6fd0aa437b72c185bbc985141a51287b50d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7022b44d7e377f1832cd647aabe333397997b14130d9efae5fb4ee4822144ad101f3d7fdd5f0edebb6d6ab2c42ed86740adffffd48a76f7226d29e988991be1f
|
7
|
+
data.tar.gz: 86d1f7f9bb16a7a0b023b69a600004d8850cad71291cc5d306129b8227794364c35eada5e0d27438760e4e9a98926619bd577901b7fc8a4dc7479d6f328db7d7
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.2
|
data/federal_register.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "federal_register"
|
8
|
-
s.version = "0.6.
|
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 = "
|
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,
|
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
|
-
|
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
|
80
|
-
|
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/#{
|
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.
|
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:
|
12
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|