ahl_scraper 0.3.6 → 0.3.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 +4 -4
- data/.github/workflows/ci.yml +31 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/lib/ahl_scraper/resources/playoff_brackets/series.rb +11 -1
- data/lib/ahl_scraper/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19ac0b14d0b335af57c72d9a95ddbe1ed7c674990f56a52962e01ecd6112d4f5
|
4
|
+
data.tar.gz: 27eb465a69a64ee0c5171edbed58bea880901c5b9953dc91f6aacd75d01141b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81e272f8523db112eabe3c4f1127b83e83593f8685eb567d851941f7f1d81411d5ffabd270a6afc86573af6426d247c83292dbd09e1e71f241d4d93ca3edfcff
|
7
|
+
data.tar.gz: '084d82bd3ca33d37aab4af2fd15a37508af4a67422069a5bed32466ee14bd9b28a194ec8e40dd39c37e42029bb5e55a6f6ba5aa4bf9e00c14eeb5881cc46209d'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
|
6
|
+
# GitHub recommends pinning actions to a commit SHA.
|
7
|
+
# To get a newer version, you will need to update the SHA.
|
8
|
+
# You can also reference a tag or branch, but the action may change without warning.
|
9
|
+
|
10
|
+
name: Tests
|
11
|
+
|
12
|
+
on:
|
13
|
+
push:
|
14
|
+
branches: [ main ]
|
15
|
+
pull_request:
|
16
|
+
branches: [ '*' ]
|
17
|
+
|
18
|
+
jobs:
|
19
|
+
test:
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v3
|
24
|
+
- name: Set up Ruby
|
25
|
+
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
|
26
|
+
with:
|
27
|
+
ruby-version: '2.7.3'
|
28
|
+
- name: Install dependencies
|
29
|
+
run: bundle install
|
30
|
+
- name: Run tests
|
31
|
+
run: bundle exec rspec
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -14,6 +14,8 @@ module AhlScraper
|
|
14
14
|
"69" => { "1" => 4 },
|
15
15
|
"72" => { "1" => 1, "2" => 1, "3" => 2, "4" => 2 },
|
16
16
|
"76" => { "1" => 2, "2" => 3, "3" => 4, "4" => 4, "5" => 4 },
|
17
|
+
"80" => { "1" => 2, "2" => 3, "3" => 3, "4" => 4, "5" => 4 },
|
18
|
+
"default" => { "1" => 2, "2" => 3, "3" => 3, "4" => 4, "5" => 4 },
|
17
19
|
}.freeze
|
18
20
|
|
19
21
|
def id
|
@@ -85,7 +87,7 @@ module AhlScraper
|
|
85
87
|
end
|
86
88
|
|
87
89
|
def wins_needed
|
88
|
-
@wins_needed ||=
|
90
|
+
@wins_needed ||= find_wins_needed
|
89
91
|
end
|
90
92
|
|
91
93
|
def finished?
|
@@ -95,6 +97,14 @@ module AhlScraper
|
|
95
97
|
|
96
98
|
private
|
97
99
|
|
100
|
+
def find_wins_needed
|
101
|
+
return OVERRIDE_WINS_NEEDED.dig(season_id.to_s, round.to_s) unless OVERRIDE_WINS_NEEDED.dig(season_id.to_s, round.to_s).nil?
|
102
|
+
|
103
|
+
return (round == 1 ? 3 : 4) if season_id.to_i < OVERRIDE_WINS_NEEDED.keys.map(&:to_i).max
|
104
|
+
|
105
|
+
OVERRIDE_WINS_NEEDED.dig("default", round.to_s)
|
106
|
+
end
|
107
|
+
|
98
108
|
def find_season_id
|
99
109
|
dig_season_id = @opts.dig(:bracket_data, :rounds, round - 1, :season_id)
|
100
110
|
|
data/lib/ahl_scraper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ahl_scraper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jefftcraig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -185,6 +185,7 @@ executables: []
|
|
185
185
|
extensions: []
|
186
186
|
extra_rdoc_files: []
|
187
187
|
files:
|
188
|
+
- ".github/workflows/ci.yml"
|
188
189
|
- ".gitignore"
|
189
190
|
- ".rspec"
|
190
191
|
- ".rubocop.yml"
|