sleeper_api 1.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7343fb5de26fd02795df2ef4c91322eec909026cb792e52fcb24299c83cff901
4
+ data.tar.gz: 5036b7dfa94981abe61d3204e6a1d265164e846961c1450eb92b03614a942ec9
5
+ SHA512:
6
+ metadata.gz: ca60a9cfad9925c86afd87b1f2e219405dad22d80849130ee9b70c7b71321903e9cc27cb539ed9feb4b900b73b42cfcd6c0a284e3b8009b9578a900f7888f052
7
+ data.tar.gz: 5559a1bffa0cbe150be4aff3789cc4ecc298e568c9c5e3f518293921efd0965b50ed6c440a56c98683ec62fed12707af16f51cef30c849ead3b34e76beeca8c2
data/.editorconfig ADDED
@@ -0,0 +1,17 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_size = 2
9
+
10
+ [*.rb]
11
+ indent_style = tab
12
+
13
+ [*.md]
14
+ trim_trailing_whitespace = false
15
+
16
+ [*.yml]
17
+ indent_style = tab
@@ -0,0 +1,30 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ ruby-version: [3.2]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+ bundler-cache: true
25
+
26
+ - name: Install dependencies
27
+ run: bundle install
28
+
29
+ - name: Run CI (rubocop + rspec)
30
+ run: bundle exec rake ci
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /coverage/
3
+ /pkg/
4
+ /spec/reports/
5
+ /tmp/
6
+ *.bundle
7
+ *.so
8
+ *.o
9
+ *.a
10
+ mkmf.log
11
+ *.gem
12
+ .rspec_status
13
+ Gemfile.lock
data/.rubocop.yml ADDED
@@ -0,0 +1,114 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ inherit_mode:
4
+ merge:
5
+ - Exclude
6
+
7
+ plugins:
8
+ - rubocop-performance
9
+ - rubocop-rspec
10
+
11
+ AllCops:
12
+ NewCops: enable
13
+ TargetRubyVersion: 2.6
14
+ Exclude:
15
+ - "bin/**/*"
16
+ - "vendor/**/*"
17
+ - "tmp/**/*"
18
+ - ".bundle/**/*"
19
+ - "Gemfile.lock"
20
+ - "*.gemspec"
21
+
22
+ # Style
23
+ Style/StringLiterals:
24
+ EnforcedStyle: double_quotes
25
+
26
+ Style/StringLiteralsInInterpolation:
27
+ EnforcedStyle: double_quotes
28
+
29
+ Style/Documentation:
30
+ Enabled: false
31
+
32
+ Style/SymbolArray:
33
+ Enabled: true
34
+
35
+ Style/WordArray:
36
+ Enabled: true
37
+
38
+ Style/FrozenStringLiteralComment:
39
+ Enabled: false
40
+
41
+ # Layout
42
+ Layout/LineLength:
43
+ Max: 133
44
+ Exclude:
45
+ - "spec/**/*"
46
+
47
+ Layout/MultilineMethodCallIndentation:
48
+ EnforcedStyle: indented
49
+
50
+ # Metrics
51
+ Metrics/MethodLength:
52
+ Max: 20
53
+ Exclude:
54
+ - "spec/**/*"
55
+
56
+ Metrics/ClassLength:
57
+ Enabled: false
58
+
59
+ Metrics/ModuleLength:
60
+ Enabled: false
61
+
62
+ Metrics/BlockLength:
63
+ Enabled: false
64
+
65
+ Metrics/AbcSize:
66
+ Enabled: false
67
+
68
+ Metrics/CyclomaticComplexity:
69
+ Enabled: false
70
+
71
+ Metrics/PerceivedComplexity:
72
+ Enabled: false
73
+
74
+ # Performance
75
+ Performance/RedundantStringChars:
76
+ Enabled: true
77
+
78
+ Performance/StringInclude:
79
+ Enabled: true
80
+
81
+ # RSpec
82
+ RSpec/MultipleExpectations:
83
+ Max: 5
84
+
85
+ RSpec/ExampleLength:
86
+ Max: 15
87
+
88
+ RSpec/DescribeClass:
89
+ Enabled: true
90
+
91
+ RSpec/SpecFilePathFormat:
92
+ Enabled: true
93
+
94
+ RSpec/SpecFilePathSuffix:
95
+ Enabled: true
96
+
97
+ RSpec/MultipleMemoizedHelpers:
98
+ Enabled: false
99
+
100
+ # Naming
101
+ Naming/FileName:
102
+ Exclude:
103
+ - "lib/sleeper_api.rb"
104
+
105
+ Naming/MemoizedInstanceVariableName:
106
+ Enabled: false
107
+
108
+ # Security
109
+ Security/Eval:
110
+ Enabled: true
111
+
112
+ # Bundler
113
+ Bundler/GemComment:
114
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,26 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-09-18 04:10:57 UTC using RuboCop version 1.80.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: 6
10
+ # Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
11
+ Metrics/MethodLength:
12
+ Exclude:
13
+ - 'lib/sleeper_api/client.rb'
14
+ - 'lib/sleeper_api/league.rb'
15
+
16
+ # Offense count: 2
17
+ # Configuration parameters: Max, CountAsOne.
18
+ RSpec/ExampleLength:
19
+ Exclude:
20
+ - 'spec/sleeper_api/helpers_spec.rb'
21
+
22
+ # Offense count: 1
23
+ # Configuration parameters: Max.
24
+ RSpec/MultipleExpectations:
25
+ Exclude:
26
+ - 'spec/sleeper_api/draft_spec.rb'
data/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ ## [1.0.0] - 2025-01-17
2
+
3
+ ### Added
4
+
5
+ - Complete Sleeper API coverage (users, leagues, drafts, players, matchups, transactions)
6
+ - Smart caching system for player data (24-hour TTL)
7
+ - Comprehensive error handling with automatic retries
8
+ - Configurable timeouts and logging
9
+ - Type signatures (RBS) for better IDE support
10
+ - Extensive test suite with 90%+ coverage
11
+ - CI/CD pipeline with GitHub Actions
12
+ - Code quality tools (RuboCop, SimpleCov)
13
+
14
+ ### Features
15
+
16
+ - League management with roster and matchup data
17
+ - User profiles with league and draft history
18
+ - Draft analysis with picks and traded picks
19
+ - Player data with trending statistics
20
+ - Performance optimizations and rate limiting
21
+ - Comprehensive inline documentation
22
+
23
+ ### Development
24
+
25
+ - RSpec test suite
26
+ - RuboCop code quality
27
+ - SimpleCov test coverage
28
+ - GitHub Actions CI/CD
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source "https://rubygems.org"
2
+ gemspec
3
+
4
+ gem "httparty", "~> 0.21"
5
+
6
+ group :development do
7
+ gem "rake"
8
+ gem "rspec", "~> 3.13"
9
+ gem "rubocop", "~> 1.80"
10
+ gem "rubocop-performance", "~> 1.26"
11
+ gem "rubocop-rspec", "~> 3.7"
12
+ gem "simplecov", "~> 0.21"
13
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Ethan Ruitenberg
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.