federal_register 0.6.3 → 0.6.5

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: 07310071ed8c7162649fe203f1ec5952d667ad50
4
- data.tar.gz: ead9797b0cca785407c1e2c1ab32faa9dbfd09d5
3
+ metadata.gz: 9f223e6a0bab1224f3f6cbe9a9507922f4f06f90
4
+ data.tar.gz: 979f7dd4bf3cbfaca2ad71f58d92a0b8fb8ae6ba
5
5
  SHA512:
6
- metadata.gz: fd914539fc1c60d5dcd0fee3fa9ca5e81b3232442a4fb2c1c340d855d40a89c19a87826b064ecbce1267001acca3e664609748711544b73b3c868c24e6817ff4
7
- data.tar.gz: 901a99bfff40877e5ca5f59e5331ced7df01d7acdbdcd080e9f8b1b7a188310614a6084d675feecd866459571a0ad9370d571c097799f2464e58be424cf0e29e
6
+ metadata.gz: 2e6b27a8a3b9631aceff94330b08dbda1129821365418e9c9e109f49db475c2a0d5471ef96c2aa653c7e89539ce7bebf8191832c4611fc991e7eb4de5e3e26ba
7
+ data.tar.gz: 33f31c374d363e740f532d5c4ed92bc9eaa9b62b05b5432866a3526d131770fe56ffde370dc39928147f6e58ff2a6d5198483f7732a7c1c0c4ead6fac0aea99f
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- federal_register (0.6.2)
5
- httparty (>= 0.7.0)
4
+ federal_register (0.6.5)
5
+ httparty (~> 0.14.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -14,7 +14,7 @@ GEM
14
14
  concurrent-ruby (1.0.5)
15
15
  diff-lcs (1.2.5)
16
16
  fakeweb (1.3.0)
17
- httparty (0.15.6)
17
+ httparty (0.14.0)
18
18
  multi_xml (>= 0.5.2)
19
19
  i18n (0.9.1)
20
20
  concurrent-ruby (~> 1.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.3
1
+ 0.6.5
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "federal_register"
8
- s.version = "0.6.3"
8
+ s.version = "0.6.5"
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"]
@@ -84,7 +84,7 @@ Gem::Specification.new do |s|
84
84
  s.specification_version = 3
85
85
 
86
86
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
87
- s.add_runtime_dependency(%q<httparty>, [">= 0.7.0"])
87
+ s.add_runtime_dependency(%q<httparty>, ["~> 0.14.0"])
88
88
 
89
89
  s.add_development_dependency(%q<shoulda>, [">= 0"])
90
90
  s.add_development_dependency(%q<bundler>, [">= 0"])
@@ -102,7 +102,7 @@ Gem::Specification.new do |s|
102
102
  s.add_dependency(%q<rubocop>, [">= 0"])
103
103
  end
104
104
  else
105
- s.add_dependency(%q<httparty>, [">= 0.7.0"])
105
+ s.add_dependency(%q<httparty>, [">= 0.14.0"])
106
106
  s.add_dependency(%q<shoulda>, [">= 0"])
107
107
  s.add_dependency(%q<bundler>, [">= 0"])
108
108
  s.add_dependency(%q<rspec>, ["~> 2.6"])
@@ -18,7 +18,7 @@ class FederalRegister::Agency < FederalRegister::Base
18
18
  get_options = {}
19
19
  get_options.merge!(:query => {:fields => options[:fields]}) if options[:fields]
20
20
 
21
- response = get('/agencies.json', get_options)
21
+ response = get('/agencies.json', get_options).parsed_response
22
22
 
23
23
  response.map do |hsh|
24
24
  new(hsh, :full => true)
@@ -29,7 +29,7 @@ class FederalRegister::Agency < FederalRegister::Base
29
29
  slug = URI.encode(id_or_slug.to_s)
30
30
 
31
31
  if options[:fields].present?
32
- response = get("/agencies/#{slug}.json", :query => {:fields => options[:fields]})
32
+ response = get("/agencies/#{slug}.json", :query => {:fields => options[:fields]}).parsed_response
33
33
 
34
34
  if response.is_a?(Hash)
35
35
  new(response)
@@ -39,7 +39,7 @@ class FederalRegister::Agency < FederalRegister::Base
39
39
  end
40
40
  end
41
41
  else
42
- response = get("/agencies/#{slug}.json")
42
+ response = get("/agencies/#{slug}.json").parsed_response
43
43
 
44
44
  if response.is_a?(Hash)
45
45
  new(response, :full => true)
@@ -52,7 +52,7 @@ class FederalRegister::Agency < FederalRegister::Base
52
52
  end
53
53
 
54
54
  def self.suggestions(args={})
55
- response = get("/agencies/suggestions", query: args)
55
+ response = get("/agencies/suggestions", query: args).parsed_response
56
56
 
57
57
  response.map do |hsh|
58
58
  new(hsh, :full => true)
@@ -43,7 +43,7 @@ class FederalRegister::Base < FederalRegister::Client
43
43
  end
44
44
 
45
45
  def fetch_full
46
- @attributes = self.class.get(json_url)
46
+ @attributes = self.class.get(json_url).fetch_full
47
47
  @full = true
48
48
  self
49
49
  end
@@ -14,7 +14,7 @@ class FederalRegister::Client
14
14
  class RecordNotFound < ResponseError; end
15
15
  class BadRequest < ResponseError; end
16
16
  class ServerError < ResponseError; end
17
-
17
+
18
18
  base_uri 'https://www.federalregister.gov/api/v1'
19
19
 
20
20
  def self.get(url, *options)
@@ -58,10 +58,10 @@ class FederalRegister::Document < FederalRegister::Base
58
58
 
59
59
  def self.find(document_number, options={})
60
60
  if options[:fields].present?
61
- attributes = get("/documents/#{document_number}.json", :query => {:fields => options[:fields]})
61
+ attributes = get("/documents/#{document_number}.json", :query => {:fields => options[:fields]}).parsed_response
62
62
  new(attributes)
63
63
  else
64
- attributes = get("/documents/#{document_number}.json")
64
+ attributes = get("/documents/#{document_number}.json").parsed_response
65
65
  new(attributes, :full => true)
66
66
  end
67
67
  end
@@ -26,7 +26,7 @@ class FederalRegister::Facet::PublicInspectionIssue < FederalRegister::Base
26
26
  end
27
27
 
28
28
  def self.search(args={})
29
- response = get(url, query: args)
29
+ response = get(url, query: args).parsed_response
30
30
 
31
31
  response.map do |slug, attributes|
32
32
  attributes['slug'] = slug
@@ -15,7 +15,7 @@ class FederalRegister::FacetResultSet < FederalRegister::Client
15
15
 
16
16
  def self.fetch(url, options = {})
17
17
  result_class = options.delete(:result_class)
18
- response = get(url, options)
18
+ response = get(url, options).parsed_response
19
19
  new(response, result_class, options)
20
20
  end
21
21
 
@@ -31,7 +31,7 @@ class FederalRegister::PublicInspectionDocument < FederalRegister::Base
31
31
  end
32
32
 
33
33
  def self.find(document_number)
34
- attributes = get("/public-inspection-documents/#{document_number}.json")
34
+ attributes = get("/public-inspection-documents/#{document_number}.json").parsed_response
35
35
  new(attributes, :full => true)
36
36
  end
37
37
 
@@ -26,7 +26,7 @@ class FederalRegister::ResultSet < FederalRegister::Client
26
26
 
27
27
  def self.fetch(url, options = {})
28
28
  result_class = options.delete(:result_class)
29
- response = get(url, options)
29
+ response = get(url, options).parsed_response
30
30
  new(response, result_class)
31
31
  end
32
32
 
@@ -2,7 +2,7 @@ class FederalRegister::Section < FederalRegister::Base
2
2
  add_attribute :name
3
3
 
4
4
  def self.search(args={})
5
- response = get('/sections', query: args)
5
+ response = get('/sections', query: args).parsed_response
6
6
 
7
7
  responses = {}
8
8
  response.map do |section, attributes|
@@ -9,7 +9,7 @@ class FederalRegister::SuggestedSearch < FederalRegister::Base
9
9
  :title
10
10
 
11
11
  def self.search(args={})
12
- response = get('/suggested_searches', query: args)
12
+ response = get('/suggested_searches', query: args).parsed_response
13
13
 
14
14
  responses = {}
15
15
  response.map do |section, searches|
@@ -20,7 +20,7 @@ class FederalRegister::SuggestedSearch < FederalRegister::Base
20
20
  end
21
21
 
22
22
  def self.find(slug)
23
- response = get("/suggested_searches/#{URI.encode(slug.to_s)}")
23
+ response = get("/suggested_searches/#{URI.encode(slug.to_s)}").parsed_response
24
24
  new(response)
25
25
  end
26
26
  end
@@ -4,7 +4,7 @@ class FederalRegister::Topic < FederalRegister::Base
4
4
  :url
5
5
 
6
6
  def self.suggestions(args={})
7
- response = get("/topics/suggestions", query: args)
7
+ response = get("/topics/suggestions", query: args).parsed_response
8
8
 
9
9
  response.map do |hsh|
10
10
  new(hsh, :full => true)
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.3
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Carpenter
@@ -15,16 +15,16 @@ dependencies:
15
15
  name: httparty
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 0.7.0
20
+ version: 0.14.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 0.7.0
27
+ version: 0.14.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: shoulda
30
30
  requirement: !ruby/object:Gem::Requirement