pyr 0.3.4 → 0.3.5
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 +4 -4
- data/README.md +2 -3
- data/lib/pyr.rb +4 -1
- data/lib/pyr/response_objects/rep.rb +1 -1
- data/lib/pyr/version.rb +1 -1
- metadata +1 -9
- data/.gitignore +0 -12
- data/.rspec +0 -2
- data/.rubocop.yml +0 -8
- data/Gemfile +0 -13
- data/Rakefile +0 -4
- data/bin/console +0 -15
- data/bin/setup +0 -8
- data/pyr.gemspec +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06dabb456b098d36fcdd56f8e2ca411081cdb6d9
|
4
|
+
data.tar.gz: e09dc5d6924736a814728202502dcfb7914b069f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97b7a826450b221c83eee3695bc9d942a9b1930b21f3ac751e872305ca246ecf9a546b3761adf3d941a9cf401a4e837ba6a49e26f0059befce4625e27d8a4692
|
7
|
+
data.tar.gz: 14f9b4d09aaf1c2b260db07c54684e590f076ab7337da24d6183d011481653c539a84a747d2c9508938638b5bb458bd5d0825c264bbe1dda517623055b9df3ff
|
data/README.md
CHANGED
@@ -74,13 +74,13 @@ reps = response.objects
|
|
74
74
|
reps.count
|
75
75
|
=> 536
|
76
76
|
|
77
|
-
reps.
|
77
|
+
reps.democrat.count
|
78
78
|
=> 243
|
79
79
|
|
80
80
|
reps.senators.count
|
81
81
|
=> 100
|
82
82
|
|
83
|
-
reps.
|
83
|
+
reps.democrat.senators.count
|
84
84
|
=> 46
|
85
85
|
|
86
86
|
reps.where official_full: 'Bernard Sanders'
|
@@ -136,4 +136,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/msimon
|
|
136
136
|
## License
|
137
137
|
|
138
138
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
139
|
-
|
data/lib/pyr.rb
CHANGED
@@ -151,7 +151,10 @@ module PYR
|
|
151
151
|
# Call the :office_locations resource.
|
152
152
|
#
|
153
153
|
# @example
|
154
|
-
# PYR.office_locations
|
154
|
+
# PYR.office_locations do |r|
|
155
|
+
# r.address = '123 Main St, USA 12345'
|
156
|
+
# r.radius = 50
|
157
|
+
# end
|
155
158
|
#
|
156
159
|
# @return [PYR::Response]
|
157
160
|
def self.office_locations(id = nil, &config_block)
|
@@ -7,7 +7,7 @@ module PYR
|
|
7
7
|
lr_has_many :office_locations
|
8
8
|
|
9
9
|
lr_scope :republican, -> { where party: 'Republican' }
|
10
|
-
lr_scope :
|
10
|
+
lr_scope :democrat, -> { where party: 'Democrat' }
|
11
11
|
lr_scope :independent, -> { where party: 'Independent' }
|
12
12
|
lr_scope :senators, -> { where role: 'United States Senator' }
|
13
13
|
lr_scope :representatives, -> { where role: 'United States Representative' }
|
data/lib/pyr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pyr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. Simon Borg
|
@@ -76,15 +76,8 @@ executables: []
|
|
76
76
|
extensions: []
|
77
77
|
extra_rdoc_files: []
|
78
78
|
files:
|
79
|
-
- ".gitignore"
|
80
|
-
- ".rspec"
|
81
|
-
- ".rubocop.yml"
|
82
|
-
- Gemfile
|
83
79
|
- LICENSE.txt
|
84
80
|
- README.md
|
85
|
-
- Rakefile
|
86
|
-
- bin/console
|
87
|
-
- bin/setup
|
88
81
|
- lib/pyr.rb
|
89
82
|
- lib/pyr/geo_findable.rb
|
90
83
|
- lib/pyr/param.rb
|
@@ -104,7 +97,6 @@ files:
|
|
104
97
|
- lib/pyr/response_objects/state.rb
|
105
98
|
- lib/pyr/response_objects/zcta.rb
|
106
99
|
- lib/pyr/version.rb
|
107
|
-
- pyr.gemspec
|
108
100
|
homepage: https://www.github.com/msimonborg/pyr
|
109
101
|
licenses:
|
110
102
|
- MIT
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/Gemfile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in pyr.gemspec
|
6
|
-
gemspec
|
7
|
-
|
8
|
-
group :test, :development do
|
9
|
-
gem 'pry', '~> 0.10.0'
|
10
|
-
gem 'rake', '~> 10.0'
|
11
|
-
gem 'rspec', '~> 3.5.0'
|
12
|
-
gem 'rubocop', '~> 0.48.0'
|
13
|
-
end
|
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'pyr'
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
require 'pry'
|
12
|
-
Pry.start
|
13
|
-
|
14
|
-
# require 'irb'
|
15
|
-
# IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/pyr.gemspec
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
lib = File.expand_path('../lib', __FILE__)
|
5
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
|
-
require 'pyr/version'
|
7
|
-
|
8
|
-
Gem::Specification.new do |spec|
|
9
|
-
spec.name = 'pyr'
|
10
|
-
spec.version = PYR::VERSION
|
11
|
-
spec.authors = ['M. Simon Borg']
|
12
|
-
spec.email = ['msimonborg@gmail.com']
|
13
|
-
|
14
|
-
spec.summary = 'Make requests to the Phone Your Rep API and get '\
|
15
|
-
'Ruby objects in return'
|
16
|
-
spec.description = 'Wraps the Phone Your Rep API up with an idiomatic Ruby'\
|
17
|
-
' bow. Easily construct requests with block syntax and receive a response '\
|
18
|
-
'with http status, headers, raw body, and ActiveRecord-esque objects that '\
|
19
|
-
'make data-querying easy (using the lazy_record gem).'
|
20
|
-
spec.homepage = 'https://www.github.com/msimonborg/pyr'
|
21
|
-
spec.license = 'MIT'
|
22
|
-
|
23
|
-
if spec.respond_to?(:metadata)
|
24
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
25
|
-
else
|
26
|
-
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
27
|
-
'public gem pushes.'
|
28
|
-
end
|
29
|
-
|
30
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
31
|
-
f.match(%r{^(test|spec|features|doc)/})
|
32
|
-
end
|
33
|
-
spec.bindir = 'exe'
|
34
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
|
-
spec.require_paths = ['lib']
|
36
|
-
|
37
|
-
spec.required_ruby_version = '>= 2.3.0'
|
38
|
-
spec.add_dependency 'faraday', '~> 0.12.0'
|
39
|
-
spec.add_dependency 'faraday_middleware', '~> 0.11.0'
|
40
|
-
spec.add_dependency 'lazy_record', '~> 0.6.0'
|
41
|
-
spec.add_development_dependency 'bundler', '~> 1.14'
|
42
|
-
end
|