lita-espn-fantasy-football 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +41 -0
- data/Gemfile +1 -1
- data/README.md +3 -3
- data/Rakefile +2 -2
- data/lib/lita-espn-fantasy-football.rb +5 -5
- data/lib/lita/handlers/espn_fantasy_football.rb +88 -90
- data/lita-espn-fantasy-football.gemspec +29 -25
- data/spec/coverage/coveralls.rb +9 -0
- data/spec/linters/rubocop_spec.rb +9 -0
- data/spec/lita/handlers/espn_fantasy_football_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -10
- metadata +67 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae22a1897e3925c8c1f7a0e12a642ed7bdee441e
|
4
|
+
data.tar.gz: 9c1a6c0c0b577e0fb704157ad3f87a248875cb5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adcdd34bbe8c68f33f6600ed75de51014016beea28823dca149f5ce557dcd799e3197af5ed650d6b3601097178f1dd9153181007fce48165e11d1fb854c626a9
|
7
|
+
data.tar.gz: 04820b659d7e386e3151036470428a4e12b93e4c77256f0640b09ba3de950a48b04573ba554e94da6a7609b97c9a30ee90283431395b0576dad0bc33e2eddfe6
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2017-09-05 22:37:21 -0500 using RuboCop version 0.49.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 4
|
10
|
+
Metrics/AbcSize:
|
11
|
+
Max: 39
|
12
|
+
|
13
|
+
# Offense count: 2
|
14
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
15
|
+
Metrics/BlockLength:
|
16
|
+
Max: 28
|
17
|
+
|
18
|
+
# Offense count: 1
|
19
|
+
# Configuration parameters: CountComments.
|
20
|
+
Metrics/ClassLength:
|
21
|
+
Max: 165
|
22
|
+
|
23
|
+
# Offense count: 1
|
24
|
+
Metrics/CyclomaticComplexity:
|
25
|
+
Max: 8
|
26
|
+
|
27
|
+
# Offense count: 3
|
28
|
+
# Configuration parameters: CountComments.
|
29
|
+
Metrics/MethodLength:
|
30
|
+
Max: 48
|
31
|
+
|
32
|
+
# Offense count: 1
|
33
|
+
Metrics/PerceivedComplexity:
|
34
|
+
Max: 9
|
35
|
+
|
36
|
+
# Offense count: 1
|
37
|
+
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
38
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
39
|
+
Style/FileName:
|
40
|
+
Exclude:
|
41
|
+
- 'lib/lita-espn-fantasy-football.rb'
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[![Build Status](https://travis-ci.org/kevinreedy/lita-espn-fantasy-football.png?branch=master)](https://travis-ci.org/kevinreedy/lita-espn-fantasy-football)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/kevinreedy/lita-espn-fantasy-football/badge.png)](https://coveralls.io/r/kevinreedy/lita-espn-fantasy-football)
|
5
5
|
|
6
|
-
This handler is used to scrape data from ESPN's Fantasy Football Site. Right now, it is very limited, so PRs are very welcome!
|
6
|
+
This [Lita](https://www.lita.io/) handler is used to scrape data from ESPN's Fantasy Football Site. Right now, it is very limited, so PRs are very welcome!
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
@@ -15,12 +15,12 @@ gem "lita-espn-fantasy-football"
|
|
15
15
|
|
16
16
|
## Configuration
|
17
17
|
|
18
|
-
Set your `league_id`, and optionally `season_id` (defaults to
|
18
|
+
Set your `league_id`, and optionally `season_id` (defaults to 2017)
|
19
19
|
|
20
20
|
```ruby
|
21
21
|
Lita.configure do |config|
|
22
22
|
config.handlers.espn_fantasy_football.league_id = "123456"
|
23
|
-
config.handlers.espn_fantasy_football.season_id = "
|
23
|
+
config.handlers.espn_fantasy_football.season_id = "2017"
|
24
24
|
end
|
25
25
|
```
|
26
26
|
|
data/Rakefile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
require
|
1
|
+
require 'lita'
|
2
2
|
|
3
3
|
Lita.load_locales Dir[File.expand_path(
|
4
|
-
File.join(
|
4
|
+
File.join('..', '..', 'locales', '*.yml'), __FILE__
|
5
5
|
)]
|
6
6
|
|
7
|
-
require
|
7
|
+
require 'lita/handlers/espn_fantasy_football'
|
8
8
|
|
9
9
|
Lita::Handlers::EspnFantasyFootball.template_root File.expand_path(
|
10
|
-
File.join(
|
11
|
-
|
10
|
+
File.join('..', '..', 'templates'),
|
11
|
+
__FILE__
|
12
12
|
)
|
@@ -1,22 +1,23 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'terminal-table'
|
3
|
+
require 'open-uri'
|
4
4
|
|
5
5
|
module Lita
|
6
6
|
module Handlers
|
7
|
+
# Lita Handler for scraping ESPN's Fantasy Football site
|
7
8
|
class EspnFantasyFootball < Handler
|
8
9
|
# configs
|
9
10
|
config :league_id, required: true
|
10
|
-
config :season_id,
|
11
|
+
config :season_id, default: '2017'
|
11
12
|
|
12
13
|
# routes
|
13
14
|
route(/^player\s+(.+)/, :command_player, command: true, help: {
|
14
|
-
|
15
|
-
|
15
|
+
'player PLAYER NAME' => 'Replies information about this football player'
|
16
|
+
})
|
16
17
|
|
17
18
|
route(/^score(board)*\s*(\d*)/, :command_scoreboard, command: true, help: {
|
18
|
-
|
19
|
-
|
19
|
+
'score WEEK' => 'Replies with the scoreboard for the specified week. If WEEK is empty, the current scoreboard is returned'
|
20
|
+
})
|
20
21
|
|
21
22
|
route(/^sup/, :command_sup, command: true)
|
22
23
|
def command_sup(response)
|
@@ -26,93 +27,93 @@ module Lita
|
|
26
27
|
# chat controllers
|
27
28
|
def command_player(response)
|
28
29
|
player = response.matches.first.first
|
29
|
-
Lita.logger.debug("#{
|
30
|
+
Lita.logger.debug("#{response.user.name} asked about player #{player}")
|
30
31
|
|
31
32
|
results = espn_player_search(player)
|
32
33
|
|
33
|
-
if results[
|
34
|
+
if results['rows'].any?
|
34
35
|
response.reply(format_results(results))
|
35
36
|
else
|
36
|
-
response.reply("No results found for '#{
|
37
|
+
response.reply("No results found for '#{player}'")
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
40
41
|
def command_scoreboard(response)
|
41
42
|
week = response.matches.first[1]
|
42
|
-
Lita.logger.debug("#{
|
43
|
+
Lita.logger.debug("#{response.user.name} requested scoreboard for week '#{week}'")
|
43
44
|
|
44
45
|
if week.empty? || (week.to_i >= 1 && week.to_i <= 13)
|
45
46
|
matchups = espn_scoreboard_scrape(week)
|
46
47
|
response.reply(format_results(matchups))
|
47
48
|
else
|
48
|
-
response.reply(
|
49
|
+
response.reply('Please specify a week from 1 - 13')
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
52
53
|
# constants
|
53
54
|
ESPN_POSITION_MAP = {
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
}
|
55
|
+
'qb' => 0,
|
56
|
+
'rb' => 2,
|
57
|
+
'wr' => 4,
|
58
|
+
'te' => 6,
|
59
|
+
'flex' => 23,
|
60
|
+
'd' => 16,
|
61
|
+
'k' => 17
|
62
|
+
}.freeze
|
62
63
|
|
63
64
|
ESPN_STATUS_MAP = {
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}
|
65
|
+
'ir' => 'injured',
|
66
|
+
'o' => 'out',
|
67
|
+
'p' => 'probable',
|
68
|
+
'q' => 'questionable',
|
69
|
+
'sspd' => 'suspended'
|
70
|
+
}.freeze
|
70
71
|
|
71
72
|
# helper methods
|
72
|
-
def
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
73
|
+
def troll_response
|
74
|
+
[
|
75
|
+
'Your request was bad and you should feel bad.',
|
76
|
+
'Stop wasting my time with your bullshit.',
|
77
|
+
'Was that even English?'
|
77
78
|
].sample
|
78
79
|
end
|
79
80
|
|
80
|
-
def espn_player_search(query, position=
|
81
|
+
def espn_player_search(query, position = '')
|
81
82
|
resp = {
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
83
|
+
'headers' => %w[
|
84
|
+
player
|
85
|
+
team
|
86
|
+
position
|
87
|
+
owner
|
88
|
+
projection
|
89
|
+
note
|
89
90
|
],
|
90
|
-
|
91
|
+
'rows' => []
|
91
92
|
}
|
92
93
|
|
93
|
-
url = "http://games.espn.go.com/ffl/freeagency?leagueId=#{
|
94
|
+
url = "http://games.espn.go.com/ffl/freeagency?leagueId=#{config.league_id}&seasonId=#{config.season_id}&avail=-1&search=#{query}"
|
94
95
|
|
95
96
|
if position && ESPN_POSITION_MAP[position]
|
96
|
-
url += "&position=#{
|
97
|
+
url += "&position=#{ESPN_POSITION_MAP[position]}&slotCategoryId=2"
|
97
98
|
end
|
98
99
|
|
99
|
-
Lita.logger.debug("Searching for player at #{
|
100
|
+
Lita.logger.debug("Searching for player at #{url}")
|
100
101
|
|
101
102
|
page = Nokogiri::HTML(open(url))
|
102
|
-
players = page.css(
|
103
|
+
players = page.css('table.playerTableTable.tableBody tr.pncPlayerRow')
|
103
104
|
|
104
105
|
players.each do |p|
|
105
|
-
bio_cell = p.css(
|
106
|
+
bio_cell = p.css('td.playertablePlayerName')
|
106
107
|
|
107
108
|
# skip blank cells
|
108
109
|
next unless bio_cell
|
109
110
|
|
110
111
|
# extract info
|
111
|
-
name, bio = bio_cell.text.split(
|
112
|
+
name, bio = bio_cell.text.split(', ')
|
112
113
|
chunks = bio.split(/[[:space:]]+/)
|
113
114
|
|
114
115
|
if chunks.length < 2
|
115
|
-
Lita.logger.warn("Got a weird cell for player query #{
|
116
|
+
Lita.logger.warn("Got a weird cell for player query #{query}")
|
116
117
|
next
|
117
118
|
end
|
118
119
|
|
@@ -123,22 +124,21 @@ module Lita
|
|
123
124
|
if ESPN_STATUS_MAP.include?(note)
|
124
125
|
note = ESPN_STATUS_MAP[note]
|
125
126
|
else
|
126
|
-
Lita.logger.warn("Status #{
|
127
|
+
Lita.logger.warn("Status #{note} missing from status map")
|
127
128
|
end
|
128
129
|
end
|
129
130
|
|
130
|
-
owner = p.css(
|
131
|
-
proj = p.css(
|
131
|
+
owner = p.css('td')[2].text
|
132
|
+
proj = p.css('td')[13].text
|
132
133
|
|
133
|
-
resp[
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
134
|
+
resp['rows'] << {
|
135
|
+
'player' => name,
|
136
|
+
'team' => team,
|
137
|
+
'position' => position,
|
138
|
+
'owner' => owner,
|
139
|
+
'projection' => proj,
|
140
|
+
'note' => note
|
140
141
|
}
|
141
|
-
|
142
142
|
end
|
143
143
|
|
144
144
|
resp
|
@@ -146,41 +146,39 @@ module Lita
|
|
146
146
|
|
147
147
|
def espn_scoreboard_scrape(week)
|
148
148
|
resp = {
|
149
|
-
|
150
|
-
|
151
|
-
|
149
|
+
'headers' => %w[
|
150
|
+
team
|
151
|
+
score
|
152
152
|
],
|
153
|
-
|
153
|
+
'rows' => []
|
154
154
|
}
|
155
155
|
|
156
156
|
params = {
|
157
|
-
|
158
|
-
|
157
|
+
'leagueId' => config.league_id,
|
158
|
+
'seasonId' => config.season_id
|
159
159
|
}
|
160
160
|
|
161
161
|
# If no period (aka, week) is specified, ESPN defaults to the
|
162
162
|
# most recent (aka, current) matchup period
|
163
|
-
unless week.empty?
|
164
|
-
params["matchupPeriodId"] = week
|
165
|
-
end
|
163
|
+
params['matchupPeriodId'] = week unless week.empty?
|
166
164
|
|
167
|
-
param_string = params.map { |key, val| "#{key}=#{val}" }.join(
|
165
|
+
param_string = params.map { |key, val| "#{key}=#{val}" }.join('&')
|
168
166
|
url = "http://games.espn.go.com/ffl/scoreboard?#{param_string}"
|
169
|
-
Lita.logger.debug("Searching for score at #{
|
167
|
+
Lita.logger.debug("Searching for score at #{url}")
|
170
168
|
|
171
169
|
page = Nokogiri::HTML(open(url))
|
172
170
|
matchups = page.xpath('//*[@class="ptsBased matchup"]')
|
173
171
|
|
174
|
-
resp[
|
175
|
-
rows = m.css(
|
176
|
-
team_top
|
177
|
-
team_bottom = rows[1].css(
|
178
|
-
score_top
|
179
|
-
score_bottom = rows[1].css(
|
172
|
+
resp['rows'] = matchups.map do |m|
|
173
|
+
rows = m.css('tr')
|
174
|
+
team_top = rows[0].css('td.team div.name a').text
|
175
|
+
team_bottom = rows[1].css('td.team div.name a').text
|
176
|
+
score_top = rows[0].css('td.score').text
|
177
|
+
score_bottom = rows[1].css('td.score').text
|
180
178
|
|
181
179
|
{
|
182
|
-
|
183
|
-
|
180
|
+
'team' => "#{team_top}\n#{team_bottom}\n ",
|
181
|
+
'score' => "#{score_top}\n#{score_bottom}\n "
|
184
182
|
}
|
185
183
|
end
|
186
184
|
|
@@ -190,13 +188,13 @@ module Lita
|
|
190
188
|
def espn_activity_scrape
|
191
189
|
resp = []
|
192
190
|
params = {
|
193
|
-
|
194
|
-
|
191
|
+
'leagueId' => config.league_id,
|
192
|
+
'seasonId' => config.season_id
|
195
193
|
}
|
196
194
|
|
197
|
-
param_string = params.map { |key, val| "#{key}=#{val}" }.join(
|
195
|
+
param_string = params.map { |key, val| "#{key}=#{val}" }.join('&')
|
198
196
|
url = "http://games.espn.go.com/ffl/recentactivity?#{param_string}"
|
199
|
-
Lita.logger.debug("Searching for league activity at #{
|
197
|
+
Lita.logger.debug("Searching for league activity at #{url}")
|
200
198
|
page = Nokogiri::HTML(open(url))
|
201
199
|
|
202
200
|
# get activity and remove header rows
|
@@ -205,20 +203,20 @@ module Lita
|
|
205
203
|
activity.each do |a|
|
206
204
|
# TODO: check time stamps
|
207
205
|
# TODO: timer instead of command
|
208
|
-
line = a.css(
|
206
|
+
line = a.css('td')[2].inner_html
|
209
207
|
|
210
208
|
# remove asterisks, as they'll conflict with markdown
|
211
|
-
line.
|
209
|
+
line.delete!('*')
|
212
210
|
|
213
211
|
# convert bold formatting
|
214
|
-
line.gsub!(
|
212
|
+
line.gsub!(%r{<(/)?b>}, '*')
|
215
213
|
|
216
214
|
# convert breaks to newlines
|
217
215
|
line.gsub!(/<br>/, "\n")
|
218
216
|
|
219
217
|
# add emoji
|
220
|
-
line.gsub!(/(\S+\sadded)/,
|
221
|
-
line.gsub!(/(\S+\sdropped)/,
|
218
|
+
line.gsub!(/(\S+\sadded)/, ':green_heart: \\1')
|
219
|
+
line.gsub!(/(\S+\sdropped)/, ':broken_heart: \\1')
|
222
220
|
|
223
221
|
resp << line
|
224
222
|
end
|
@@ -227,9 +225,9 @@ module Lita
|
|
227
225
|
end
|
228
226
|
|
229
227
|
def format_results(raw)
|
230
|
-
rows = raw[
|
231
|
-
table = Terminal::Table.new(:
|
232
|
-
"```\n#{
|
228
|
+
rows = raw['rows'].map { |r| r.map { |_k, v| v } }
|
229
|
+
table = Terminal::Table.new(headings: raw['headers'], rows: rows)
|
230
|
+
"```\n#{table}\n```"
|
233
231
|
end
|
234
232
|
|
235
233
|
Lita.register_handler(self)
|
@@ -1,29 +1,33 @@
|
|
1
|
-
Gem::Specification.new do |
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'lita-espn-fantasy-football'
|
3
|
+
s.version = '0.2.0'
|
4
|
+
s.authors = ['Kevin Reedy', 'Miles Evenson']
|
5
|
+
s.email = ['kevinreedy@gmail.com', 'miles.evenson@gmail.com']
|
6
|
+
s.description = 'Lita handler for ESPN Fantasy Football'
|
7
|
+
s.summary = <<-EOF
|
8
|
+
This Lita handler is used to scrape data from ESPN's Fantasy Football Site.
|
9
|
+
Right now, it is very limited, so PRs are very welcome!
|
10
|
+
EOF
|
11
|
+
s.homepage = 'https://github.com/kevinreedy/lita-espn-fantasy-football'
|
12
|
+
s.license = 'Apache-2.0'
|
13
|
+
s.metadata = { 'lita_plugin_type' => 'handler' }
|
11
14
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
15
|
+
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
16
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
18
|
+
s.require_paths = ['lib']
|
16
19
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
+
s.add_runtime_dependency 'lita', '~> 4.7'
|
21
|
+
s.add_runtime_dependency 'nokogiri', '~> 1.8'
|
22
|
+
s.add_runtime_dependency 'terminal-table', '~> 1.8'
|
20
23
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
s.add_development_dependency 'bundler', '~> 1.14'
|
25
|
+
s.add_development_dependency 'pry-byebug', '~> 3.5'
|
26
|
+
s.add_development_dependency 'rake', '~> 12.0'
|
27
|
+
s.add_development_dependency 'rack-test', '~> 0.7'
|
28
|
+
s.add_development_dependency 'rspec', '~> 3.6'
|
29
|
+
s.add_development_dependency 'simplecov', '~> 0.9'
|
30
|
+
s.add_development_dependency 'coveralls', '~> 0.8'
|
31
|
+
s.add_development_dependency 'lita-console', '~> 0.0'
|
32
|
+
s.add_development_dependency 'rubocop', '~> 0.49'
|
29
33
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,13 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
4
|
-
SimpleCov::Formatter::HTMLFormatter,
|
5
|
-
Coveralls::SimpleCov::Formatter
|
6
|
-
]
|
7
|
-
SimpleCov.start { add_filter "/spec/" }
|
8
|
-
|
9
|
-
require "lita-espn-fantasy-football"
|
10
|
-
require "lita/rspec"
|
1
|
+
require 'lita-espn-fantasy-football'
|
2
|
+
require 'lita/rspec'
|
11
3
|
|
12
4
|
# A compatibility mode is provided for older plugins upgrading from Lita 3. Since this plugin
|
13
5
|
# was generated with Lita 4, the compatibility mode should be left disabled.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-espn-fantasy-football
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Reedy
|
@@ -9,162 +9,176 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-09-
|
12
|
+
date: 2017-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: lita
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '4.
|
20
|
+
version: '4.7'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '4.
|
27
|
+
version: '4.7'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: nokogiri
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '1.
|
34
|
+
version: '1.8'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '1.
|
41
|
+
version: '1.8'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: terminal-table
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '1.
|
48
|
+
version: '1.8'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - "
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '1.
|
55
|
+
version: '1.8'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: bundler
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '1.
|
62
|
+
version: '1.14'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '1.
|
69
|
+
version: '1.14'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: pry-byebug
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - "
|
74
|
+
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '3.5'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- - "
|
81
|
+
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '3.5'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: rake
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - "
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '0'
|
90
|
+
version: '12.0'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - "
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '0'
|
97
|
+
version: '12.0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rack-test
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '0'
|
104
|
+
version: '0.7'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - "
|
109
|
+
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '0'
|
111
|
+
version: '0.7'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: rspec
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - "
|
116
|
+
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 3.
|
118
|
+
version: '3.6'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - "
|
123
|
+
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 3.
|
125
|
+
version: '3.6'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: simplecov
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- - "
|
130
|
+
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '0'
|
132
|
+
version: '0.9'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- - "
|
137
|
+
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: '0'
|
139
|
+
version: '0.9'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: coveralls
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- - "
|
144
|
+
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: '0'
|
146
|
+
version: '0.8'
|
147
147
|
type: :development
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- - "
|
151
|
+
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: '0'
|
153
|
+
version: '0.8'
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: lita-console
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- - "
|
158
|
+
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: '0'
|
160
|
+
version: '0.0'
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
|
-
- - "
|
165
|
+
- - "~>"
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0.0'
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: rubocop
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - "~>"
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0.49'
|
175
|
+
type: :development
|
176
|
+
prerelease: false
|
177
|
+
version_requirements: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - "~>"
|
166
180
|
- !ruby/object:Gem::Version
|
167
|
-
version: '0'
|
181
|
+
version: '0.49'
|
168
182
|
description: Lita handler for ESPN Fantasy Football
|
169
183
|
email:
|
170
184
|
- kevinreedy@gmail.com
|
@@ -174,6 +188,8 @@ extensions: []
|
|
174
188
|
extra_rdoc_files: []
|
175
189
|
files:
|
176
190
|
- ".gitignore"
|
191
|
+
- ".rubocop.yml"
|
192
|
+
- ".rubocop_todo.yml"
|
177
193
|
- ".travis.yml"
|
178
194
|
- Gemfile
|
179
195
|
- LICENSE
|
@@ -183,12 +199,14 @@ files:
|
|
183
199
|
- lib/lita/handlers/espn_fantasy_football.rb
|
184
200
|
- lita-espn-fantasy-football.gemspec
|
185
201
|
- locales/en.yml
|
202
|
+
- spec/coverage/coveralls.rb
|
203
|
+
- spec/linters/rubocop_spec.rb
|
186
204
|
- spec/lita/handlers/espn_fantasy_football_spec.rb
|
187
205
|
- spec/spec_helper.rb
|
188
206
|
- templates/.gitkeep
|
189
207
|
homepage: https://github.com/kevinreedy/lita-espn-fantasy-football
|
190
208
|
licenses:
|
191
|
-
- Apache
|
209
|
+
- Apache-2.0
|
192
210
|
metadata:
|
193
211
|
lita_plugin_type: handler
|
194
212
|
post_install_message:
|
@@ -210,7 +228,10 @@ rubyforge_project:
|
|
210
228
|
rubygems_version: 2.6.13
|
211
229
|
signing_key:
|
212
230
|
specification_version: 4
|
213
|
-
summary: Lita handler
|
231
|
+
summary: This Lita handler is used to scrape data from ESPN's Fantasy Football Site.
|
232
|
+
Right now, it is very limited, so PRs are very welcome!
|
214
233
|
test_files:
|
234
|
+
- spec/coverage/coveralls.rb
|
235
|
+
- spec/linters/rubocop_spec.rb
|
215
236
|
- spec/lita/handlers/espn_fantasy_football_spec.rb
|
216
237
|
- spec/spec_helper.rb
|