y_fantasy 0.1.0 → 0.1.1
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/CHANGELOG.md +4 -0
- data/Gemfile.lock +29 -29
- data/lib/y_fantasy/resources/pickem_team.rb +20 -1
- data/lib/y_fantasy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c2a942239c407036e420e5c547b046b0c42e78d543b8e8179b806679b0ae614
|
4
|
+
data.tar.gz: c9a83075fedb911b3c82e6b162c63127053af49d77a55fb7abc42229912cffa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62d5c578ec803af53a53b05a44b0fb8e8e6a4da2695d5a33995a4dd67e21fbd55ad6630a0ed08a29d2f0741738fdb51fb631f00e4402fb95ed04f61392094de1
|
7
|
+
data.tar.gz: 0dd9d30b22b70fb28eae8d190c1b2a27d0357b408236494122ffb6cb8ff845b4fc216769692439b9e85c55a06cf9417b446280885d871827c6c58b3486df832f
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
y_fantasy (0.1.
|
4
|
+
y_fantasy (0.1.1)
|
5
5
|
dry-configurable (~> 1.0)
|
6
6
|
dry-initializer (~> 3.0)
|
7
7
|
dry-transformer (~> 1.0)
|
@@ -44,40 +44,42 @@ GEM
|
|
44
44
|
docile (1.4.1)
|
45
45
|
domain_name (0.6.20240107)
|
46
46
|
drb (2.2.1)
|
47
|
-
dry-configurable (1.
|
48
|
-
dry-core (~> 1.
|
47
|
+
dry-configurable (1.3.0)
|
48
|
+
dry-core (~> 1.1)
|
49
49
|
zeitwerk (~> 2.6)
|
50
|
-
dry-core (1.0
|
50
|
+
dry-core (1.1.0)
|
51
51
|
concurrent-ruby (~> 1.0)
|
52
|
+
logger
|
52
53
|
zeitwerk (~> 2.6)
|
53
|
-
dry-inflector (1.
|
54
|
-
dry-initializer (3.
|
55
|
-
dry-logic (1.
|
54
|
+
dry-inflector (1.2.0)
|
55
|
+
dry-initializer (3.2.0)
|
56
|
+
dry-logic (1.6.0)
|
57
|
+
bigdecimal
|
56
58
|
concurrent-ruby (~> 1.0)
|
57
|
-
dry-core (~> 1.
|
59
|
+
dry-core (~> 1.1)
|
58
60
|
zeitwerk (~> 2.6)
|
59
|
-
dry-schema (1.
|
61
|
+
dry-schema (1.14.1)
|
60
62
|
concurrent-ruby (~> 1.0)
|
61
63
|
dry-configurable (~> 1.0, >= 1.0.1)
|
62
|
-
dry-core (~> 1.
|
63
|
-
dry-initializer (~> 3.
|
64
|
-
dry-logic (
|
65
|
-
dry-types (
|
64
|
+
dry-core (~> 1.1)
|
65
|
+
dry-initializer (~> 3.2)
|
66
|
+
dry-logic (~> 1.5)
|
67
|
+
dry-types (~> 1.8)
|
66
68
|
zeitwerk (~> 2.6)
|
67
69
|
dry-transformer (1.0.1)
|
68
70
|
zeitwerk (~> 2.6)
|
69
|
-
dry-types (1.
|
71
|
+
dry-types (1.8.3)
|
70
72
|
bigdecimal (~> 3.0)
|
71
73
|
concurrent-ruby (~> 1.0)
|
72
74
|
dry-core (~> 1.0)
|
73
75
|
dry-inflector (~> 1.0)
|
74
76
|
dry-logic (~> 1.4)
|
75
77
|
zeitwerk (~> 2.6)
|
76
|
-
dry-validation (1.
|
78
|
+
dry-validation (1.11.1)
|
77
79
|
concurrent-ruby (~> 1.0)
|
78
|
-
dry-core (~> 1.
|
79
|
-
dry-initializer (~> 3.
|
80
|
-
dry-schema (
|
80
|
+
dry-core (~> 1.1)
|
81
|
+
dry-initializer (~> 3.2)
|
82
|
+
dry-schema (~> 1.14)
|
81
83
|
zeitwerk (~> 2.6)
|
82
84
|
factory_bot (6.5.0)
|
83
85
|
activesupport (>= 5.0.0)
|
@@ -104,21 +106,19 @@ GEM
|
|
104
106
|
webrick (~> 1.7)
|
105
107
|
webrobots (~> 0.1.2)
|
106
108
|
method_source (1.1.0)
|
107
|
-
mime-types (3.
|
109
|
+
mime-types (3.7.0)
|
108
110
|
logger
|
109
|
-
mime-types-data (~> 3.
|
110
|
-
mime-types-data (3.2025.
|
111
|
+
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
112
|
+
mime-types-data (3.2025.0722)
|
111
113
|
minitest (5.25.4)
|
112
114
|
mutex_m (0.3.0)
|
113
115
|
net-http-digest_auth (1.4.1)
|
114
|
-
net-http-persistent (4.0.
|
115
|
-
connection_pool (~> 2.2)
|
116
|
+
net-http-persistent (4.0.6)
|
117
|
+
connection_pool (~> 2.2, >= 2.2.4)
|
116
118
|
nkf (0.2.0)
|
117
|
-
nokogiri (1.18.
|
118
|
-
racc (~> 1.4)
|
119
|
-
nokogiri (1.18.2-x86_64-darwin)
|
119
|
+
nokogiri (1.18.9-arm64-darwin)
|
120
120
|
racc (~> 1.4)
|
121
|
-
ox (2.14.
|
121
|
+
ox (2.14.23)
|
122
122
|
bigdecimal (>= 3.0)
|
123
123
|
parallel (1.26.3)
|
124
124
|
parser (3.3.7.0)
|
@@ -186,7 +186,7 @@ GEM
|
|
186
186
|
standard-performance (1.6.0)
|
187
187
|
lint_roller (~> 1.1)
|
188
188
|
rubocop-performance (~> 1.23.0)
|
189
|
-
thor (1.
|
189
|
+
thor (1.4.0)
|
190
190
|
tzinfo (2.0.6)
|
191
191
|
concurrent-ruby (~> 1.0)
|
192
192
|
unicode-display_width (3.1.4)
|
@@ -198,7 +198,7 @@ GEM
|
|
198
198
|
hashdiff (>= 0.4.0, < 2.0.0)
|
199
199
|
webrick (1.9.1)
|
200
200
|
webrobots (0.1.2)
|
201
|
-
zeitwerk (2.
|
201
|
+
zeitwerk (2.7.3)
|
202
202
|
|
203
203
|
PLATFORMS
|
204
204
|
arm64-darwin-21
|
@@ -92,7 +92,26 @@ module YFantasy
|
|
92
92
|
# Returns the group this PickemTeam belongs to
|
93
93
|
# @return [Group] the group object
|
94
94
|
def group
|
95
|
-
@group ||= Group.find(group_key)
|
95
|
+
@group ||= Group.find(group_key, with: :settings)
|
96
|
+
end
|
97
|
+
|
98
|
+
# Returns the week picks up to and including the group end week
|
99
|
+
# For some reason, Yahoo's API can return more weeks than the group settings allow, and they are always strikes.
|
100
|
+
# @return [Array<WeekPick>] the weekly picks for this team
|
101
|
+
def true_week_picks
|
102
|
+
@true_week_picks = week_picks.slice(0, group.settings.end_week)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Returns the "true" total strikes, based on the group end week.
|
106
|
+
# If the group allows two picks per week, fall back to `total_strikes` from the PickemTeam.
|
107
|
+
# @return [Integer] the "true" total strikes for this team
|
108
|
+
def true_total_strikes
|
109
|
+
return total_strikes if group.settings.two_pick_start_week != 0
|
110
|
+
|
111
|
+
strikes = true_week_picks.count { |wp| wp.picks.first.result == "strike" }
|
112
|
+
return group.settings.max_strikes if strikes > group.settings.max_strikes
|
113
|
+
|
114
|
+
strikes
|
96
115
|
end
|
97
116
|
end
|
98
117
|
end
|
data/lib/y_fantasy/version.rb
CHANGED