governator 0.1.6 → 0.1.7

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: a54cbc572f205a119acb57bf0546ff422bd4d430
4
- data.tar.gz: 61f4feb76adf915a28131704f48054d9fde1e6c1
3
+ metadata.gz: b5a55c774019bf9aaccae4ebc1806ea18c9d2c61
4
+ data.tar.gz: '094566dc7e4311519180601081e172659296af75'
5
5
  SHA512:
6
- metadata.gz: 2cb65c51cc9394242e14744f5890f7552ef9426130a0a3da3ed3103a8e55e4edb21a314ef76e9bc428e2f0061753048ef939659ff87448e620b6b500efb29cc9
7
- data.tar.gz: 56dc48561762376bd16672cebcb71cf6604df3a0226a48834292c1d64c2956c7161b937c972f115121cbdaf87f637a2c998f3314fdc405e80eb792d5eafd2c05
6
+ metadata.gz: 5637782c305438a45c28d74705ac045566809de412ce8c0f32db461791da4174dc04c5beaa2ec377c370f643c02fa2d9fa14bd574e23e3204094681dd073fcba
7
+ data.tar.gz: 4e8adb8d20d38afe9ddfa8a3d5f3398102b0a885f1a490895507b2e6710d4ce1481c30c99d0627ff9467cf16fe34ec7e09f32efa841d56e255d57f1ff91cbd48
data/README.md CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- ```
23
+ ```ruby
24
24
  Governator.scrape!
25
25
 
26
26
  governors = Governator.governors
data/governator.gemspec CHANGED
@@ -16,9 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.homepage = 'https://github.com/msimonborg/governator'
17
17
  spec.license = 'MIT'
18
18
 
19
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
- f.match(%r{^(test|spec|features)/})
21
- end
19
+ spec.files = `git ls-files -z lib LICENSE.md README.md governator.gemspec`.split("\0")
22
20
  spec.bindir = 'exe'
23
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
22
  spec.require_paths = ['lib']
@@ -10,7 +10,7 @@ class Governator
10
10
  end
11
11
 
12
12
  def governors
13
- @_governors ||= nga_list_members + rga_list_members + cspan_list_members
13
+ @_governors ||= nga_list_members + rga_list_members + cspan_list_members + dga_list_members
14
14
  end
15
15
 
16
16
  def nga_list
@@ -29,6 +29,14 @@ class Governator
29
29
  @_rga_list_members ||= client.list_members(rga_list, count: 100).attrs[:users]
30
30
  end
31
31
 
32
+ def dga_list
33
+ @_dga_list ||= client.lists('DemGovs').detect { |l| l.name == 'Democratic Governors' }
34
+ end
35
+
36
+ def dga_list_members
37
+ @_dga_list_members ||= client.list_members(dga_list, count: 100).attrs[:users]
38
+ end
39
+
32
40
  def cspan_list
33
41
  @_cspan_list ||= client.lists('cspan').detect { |l| l.name == 'Governors' }
34
42
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Governator
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: governator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. Simon Borg
@@ -87,16 +87,8 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - ".gitignore"
91
- - ".rubocop.yml"
92
- - Gemfile
93
- - LICENSE.txt
94
90
  - README.md
95
- - Rakefile
96
- - bin/console
97
- - bin/setup
98
91
  - governator.gemspec
99
- - governator.png
100
92
  - lib/governator.rb
101
93
  - lib/governator/bio_page.rb
102
94
  - lib/governator/civil_services.rb
data/.gitignore DELETED
@@ -1,11 +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
- /vendor/
data/.rubocop.yml DELETED
@@ -1,5 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.4.1
3
-
4
- Metrics/LineLength:
5
- Max: 100
data/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- # Specify your gem's dependencies in governator.gemspec
6
- gemspec
7
-
8
- group :development, :test do
9
- gem 'pry'
10
- gem 'rspec'
11
- gem 'rubocop'
12
- end
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017 M. Simon Borg
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/Rakefile DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
-
5
- require 'rspec/core/rake_task'
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- require 'rubocop/rake_task'
9
- RuboCop::RakeTask.new
10
-
11
- task default: %i[spec rubocop]
data/bin/console DELETED
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'governator'
6
-
7
- Governator.config do |config|
8
- config.use_twitter = true
9
- config.twitter do |twitter|
10
- twitter.consumer_key = ENV['TWITTER_CONSUMER_KEY']
11
- twitter.consumer_secret = ENV['TWITTER_CONSUMER_SECRET']
12
- twitter.access_token = ENV['TWITTER_ACCESS_TOKEN']
13
- twitter.access_token_secret = ENV['TWITTER_ACCESS_TOKEN_SECRET']
14
- end
15
- end
16
-
17
- require 'pry'
18
- Pry.start
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
data/governator.png DELETED
Binary file