get_your_rep 1.0.8 → 1.1.0

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: 6e469cbceacae4019cec6c90f04e195d732c5923
4
- data.tar.gz: 5005c96b87c83a3ad2e30b0bcc73283eb154700a
3
+ metadata.gz: edd6679eeba76ca59cc68de91dadad4ae1508a12
4
+ data.tar.gz: 62bfca1c1df86adc03f0a8ef762e3b858981173e
5
5
  SHA512:
6
- metadata.gz: d8f0ad64734f884437bf773d9504a491961f977a98d82271689a1cc6a4a935a3c2332b8254d6632911dc43b71c9b54c98219f759e5161bc41da79850096c2966
7
- data.tar.gz: e29752bb0c0c1997f572823463a8960928ce3432e4104f090c61c8bb19bb422786ab490a26cdae11ad6b5b1fafc4d447a2b6bb32a288e648d57d4fd57f061049
6
+ metadata.gz: 73543286e2682625a93909c8c2220fa3cd4cb7a3e206ee95a673d013021cfb762ac86eefa75c2a516bdb2f6f01d5b1de3d702134edbc37da520a31cd05b35551
7
+ data.tar.gz: 7d0c25329a29390f1a7265e20e08154170c89854b39b466bbb5070c4882dfbdebe755f49c14dd3690cb8b99c24c7a1851c701d09dc1b0395888accb4a9c78a3a
data/.codeclimate.yml ADDED
@@ -0,0 +1,32 @@
1
+ ---
2
+ engines:
3
+ duplication:
4
+ enabled: true
5
+ config:
6
+ languages:
7
+ - ruby
8
+ - javascript
9
+ - python
10
+ - php
11
+ fixme:
12
+ enabled: true
13
+ rubocop:
14
+ enabled: true
15
+ ratings:
16
+ paths:
17
+ - "**.inc"
18
+ - "**.js"
19
+ - "**.jsx"
20
+ - "**.module"
21
+ - "**.php"
22
+ - "**.py"
23
+ - "**.rb"
24
+ exclude_paths:
25
+ - test/
26
+ engines:
27
+ duplication:
28
+ enabled: true
29
+ exclude_fingerprints:
30
+ - 22a29fa4e280bb1db3328d8fbd7ce999
31
+ - 3b19680c91d1d2fb6975c8123604500b
32
+ - eaf137a514b338245998a14a6e85422b
data/get_your_rep.gemspec CHANGED
@@ -10,8 +10,6 @@ Gem::Specification.new do |s|
10
10
  s.version = GetYourRep::VERSION
11
11
  s.date = Date.today.to_s
12
12
  s.required_ruby_version = '>= 2.0.0'
13
- s.post_install_message = "If you are upgrading from get_your_rep ~> 0.1, version 1.0 may break your app. It is \
14
- a good idea to upgrade, but please read the documentation first!"
15
13
  s.add_dependency 'httparty', '~> 0'
16
14
  s.add_dependency 'geocoder', '~> 1.4', '>= 1.4.1'
17
15
  s.add_dependency 'colorize', '~> 0.8.1'
@@ -132,7 +132,7 @@ but you can try a zip code if you insist.".yellow
132
132
  elsif input == 'list'
133
133
  rep_list
134
134
 
135
- elsif (1..delegation.count).include?(num)
135
+ elsif (1..delegation.count).cover?(num)
136
136
  delegation.each_with_index do |rep, index|
137
137
  next if index + 1 != num
138
138
  rep.cli_display
@@ -14,6 +14,8 @@ module GetYourRep
14
14
  attr_accessor :line_2
15
15
  # City, state and zip.
16
16
  attr_accessor :city, :state, :zip
17
+ # Office phone
18
+ attr_accessor :phone
17
19
 
18
20
  # Construct a new instance, setting attributes from an options hash.
19
21
  def initialize(office_hash = {})
@@ -8,7 +8,7 @@ module GetYourRep
8
8
  def initialize(options = {})
9
9
  options.each do |attr, value|
10
10
  # Recent responses from OpenStates have had '+' appended to some keys. Trim that off or it throws an error.
11
- attr = attr.gsub('+', '')
11
+ attr = attr.delete('+')
12
12
  create_setters_from_opts(attr)
13
13
  create_getters_from_opts(attr)
14
14
  add_value_to_attr(attr, value)
@@ -34,7 +34,8 @@ module GetYourRep
34
34
  line_2: line_2,
35
35
  city: city,
36
36
  state: state,
37
- zip: zip }
37
+ zip: zip,
38
+ phone: phone }
38
39
  end
39
40
  end
40
41
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GetYourRep
3
- VERSION = '1.0.8' # :nodoc:
3
+ VERSION = '1.1.0' # :nodoc:
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: get_your_rep
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - msimonborg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-24 00:00:00.000000000 Z
11
+ date: 2017-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -134,6 +134,7 @@ executables:
134
134
  extensions: []
135
135
  extra_rdoc_files: []
136
136
  files:
137
+ - ".codeclimate.yml"
137
138
  - ".gitignore"
138
139
  - ".rubocop.yml"
139
140
  - Gemfile
@@ -166,9 +167,7 @@ homepage: https://github.com/msimonborg/get-your-rep
166
167
  licenses:
167
168
  - MIT
168
169
  metadata: {}
169
- post_install_message: If you are upgrading from get_your_rep ~> 0.1, version 1.0 may
170
- break your app. It is a good idea to upgrade, but please read the documentation
171
- first!
170
+ post_install_message:
172
171
  rdoc_options: []
173
172
  require_paths:
174
173
  - lib