governator 0.1.8 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cf59a741d31745790537c7c2ab6bf20529d2610
4
- data.tar.gz: 2d4eea603daedaed189ffcd96ee13e46b347f9bb
3
+ metadata.gz: 74a7686c22cba09e8aa50f5d696b063ab79f1720
4
+ data.tar.gz: cf8c6c80b7ba5c53ac84ba2841b645f9d156fc52
5
5
  SHA512:
6
- metadata.gz: 1e6fafd8efdee596619a71510fd4ae3fea2dbf2ef7417969d13e48b183fb7e728ca3e779062e64b09faae1182cfa3cf98cf3c8322333008a6b0b8f5d8e89ad82
7
- data.tar.gz: 13b4cfdbde4da4aa383ca4ac634cae6951c1a654dcb924fc914088d8e8dd0c92bc92872c85c261980b3cfd360f84b3fa62fd70ebe41e3c6217499770569e9919
6
+ metadata.gz: 8d8dd89e1fbbbb6824ef258143836d045598b67c6212d8a74d0ffea008ee4e4cd0d9403e058799a62129d544002a962bab74a8fc3ab31ef6c2b42ad509d42419
7
+ data.tar.gz: 1489ec8eadcedd71e9b0310d13bdbde1e59960eb7e2d70bff6a44e4abb876c3d6448df313fd483f5de150489f9f7bd98e0ddb758275e63a1b61143700b02de56
data/README.md CHANGED
@@ -28,7 +28,7 @@ governors = Governator.governors
28
28
 
29
29
  ## Twitter
30
30
 
31
- If you want to scrape Twitter handles you will need to initialize the client. Add this to your code (in a Rails app it should probably go in a file called `governator.rb` in `./config/initializers/`)
31
+ If you want to scrape Twitter for Twitter handles (recommended for best data results) you will need to initialize the client. Add this to your code (in a Rails app it should probably go in a file called `governator.rb` in `./config/initializers/`).
32
32
 
33
33
  ```ruby
34
34
  Governator.config do |config|
@@ -42,6 +42,7 @@ Governator.config do |config|
42
42
  end
43
43
  end
44
44
  ```
45
+ More info can be found [here](https://github.com/sferik/twitter#configuration). When configured you can access the full Twitter gem client API with `Governator.twitter_client`.
45
46
 
46
47
  As with everything, secrets should never be stored anywhere public, like version control. Set these values as variables on your system.
47
48
 
data/governator.gemspec CHANGED
@@ -21,6 +21,8 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
+ spec.required_ruby_version = '>= 2.3'
25
+
24
26
  spec.add_dependency 'faraday', '~> 0.11.0'
25
27
  spec.add_dependency 'twitter', '~> 6.1.0'
26
28
  spec.add_dependency 'nokogiri', '~> 1.8.0'
@@ -13,7 +13,7 @@ class Governator
13
13
  end
14
14
 
15
15
  def check_for_alt_office
16
- @alt_office_present = if raw.css('address')[2].to_s.match?(/Phone|Address|Fax/)
16
+ @alt_office_present = if raw.css('address')[2].to_s.match(/Phone|Address|Fax/)
17
17
  true
18
18
  else
19
19
  false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Governator
4
- VERSION = '0.1.8'
4
+ VERSION = '0.1.9'
5
5
  end
data/lib/governator.rb CHANGED
@@ -144,8 +144,8 @@ class Governator
144
144
  def fetch_twitter_handle
145
145
  if self.class.use_twitter == true
146
146
  twitter_governor = TwitterClient.governors.detect do |tg|
147
- tg[:name].match?(last) && (
148
- tg[:location].match?(state_name) || tg[:description].match?(state_name)
147
+ tg[:name].match(last) && (
148
+ tg[:location].match(state_name) || tg[:description].match(state_name)
149
149
  )
150
150
  end
151
151
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: governator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. Simon Borg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-21 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - ">="
112
112
  - !ruby/object:Gem::Version
113
- version: '0'
113
+ version: '2.3'
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ">="
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.6.11
121
+ rubygems_version: 2.5.1
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Scraper for data on US Governors