pyr 0.3.4 → 0.3.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: 38e39c4009939ac2aeebaa972f147bf2d8cc9a75
4
- data.tar.gz: 22fcfbe77d163fba7efdc6a9079ef9b7d0dda0f3
3
+ metadata.gz: 06dabb456b098d36fcdd56f8e2ca411081cdb6d9
4
+ data.tar.gz: e09dc5d6924736a814728202502dcfb7914b069f
5
5
  SHA512:
6
- metadata.gz: 4f93053da22ae238b21e805c366fd10eb672da945600bbac528ae92b7eb1a53e617027ea6c3cdddd321690260a3c22a3458828353cc84d73a0b1e7ff6021c91e
7
- data.tar.gz: 78a38d8a378ca65c0291fd61832a7cdb5262c8db8a9c789a8c5e05de67e0d614f29642afee444ac1b093d6b02c7609eae9f96b2cfe738abfe8777400ec761600
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.democratic.count
77
+ reps.democrat.count
78
78
  => 243
79
79
 
80
80
  reps.senators.count
81
81
  => 100
82
82
 
83
- reps.democratic.senators.count
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 { |r| r.address = '123 Main St, USA 12345' }
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 :democratic, -> { where party: 'Democrat' }
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' }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PYR
4
- VERSION = '0.3.4' # :nodoc:
4
+ VERSION = '0.3.5' # :nodoc:
5
5
  end
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
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
@@ -1,12 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- /.idea/
11
- /.ruby-*
12
- /vendor/
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
@@ -1,8 +0,0 @@
1
- Lint/AmbiguousBlockAssociation:
2
- Enabled: false
3
-
4
- Metrics/BlockLength:
5
- Exclude:
6
- - 'pyr.gemspec'
7
- - 'spec/**/*'
8
- - 'Rakefile'
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
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- task default: :spec
@@ -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
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -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