vegas_insider_scraper 0.0.3 → 0.0.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sports/scraper_league.rb +5 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a02df40a50546346abca93962a41e2db68b124b
4
- data.tar.gz: 9f5e27501aa14da7de8a49f840c4be1d85a8e21d
3
+ metadata.gz: 3b5e326669ebe27449ac3720449868e5f899c45f
4
+ data.tar.gz: d51d9cf641b6e871a3b000aa08890ae8568537f2
5
5
  SHA512:
6
- metadata.gz: 69cf0956935f1f629da5a9a65211fb9c3996bf22b80d0d17d7bd423d170b2cd5c9d52815e5b9588783780a80cd9aaad8ccd65ee7ebf9217c0752699dd7a7057b
7
- data.tar.gz: fe645dd5111a22ff77837e1c588c0b20805b59b1a2a5a54ec61368faa4d72e15f4cc4d354a9a7bf2f6a27f30ba4316f959b329f74a3f95f37465901124b7b1e7
6
+ metadata.gz: 5ada543878c491f39cdf85a255f95a9dd44f04a61c17501a7d1f69d42e8c1045780a7704466891a156342a8525362d23d236c257846425fe6536d5c8f727552d
7
+ data.tar.gz: 22d40123c6407930da35ca9204785b756c812b3ebaeae54e6084fb29f7e3743601f55efab589a691d1e04a2becc72a825ca4585d7b6c809d0cdd67dcb2d7a095
@@ -250,18 +250,17 @@ class ScraperLeague
250
250
  game_cell = game_row.at_css('td:first-child')
251
251
  teams = game_cell_parser(game_cell)
252
252
  game = Game.new(home_team: teams[1], away_team: teams[0])
253
+
253
254
  if game.teams_found?
254
255
  game.update(time: get_game_time(game_cell))
256
+ game.update(doubleheader: doubleheader_id(game_row.next&.next&.at_css('td:first-child')&.content))
255
257
  is_first_url ? (games.push game) : (game = game.find_equal(games))
256
258
  game.update(vegas_info: get_line(get_odds(game_row)))
257
259
  game.update(vegas_info: get_line(get_odds_inner_html(game_row)))
258
260
 
259
- else
261
+ elsif is_first_url
260
262
  last_game = games.last
261
- if last_game
262
- last_game.update(notes: game_cell.content)
263
- last_game.update(doubleheader: doubleheader_id(game_cell.content))
264
- end
263
+ if last_game then last_game.update(notes: (last_game.notes ? "#{last_game.notes} / " : '') + game_cell.content) end
265
264
  end
266
265
  end
267
266
  }
@@ -496,7 +495,7 @@ class ScraperLeague
496
495
  end
497
496
 
498
497
  def find_equal(games)
499
- games.each { |game| return game if game == self }
498
+ games.detect { |g| g == self }
500
499
  end
501
500
 
502
501
  def ==(other_game)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vegas_insider_scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Reitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-24 00:00:00.000000000 Z
11
+ date: 2017-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri