Skip to content

Commit 6eae8fb

Browse files
committed
Initial commit
0 parents  commit 6eae8fb

File tree

20 files changed

+1129
-0
lines changed

20 files changed

+1129
-0
lines changed

.github/workflows/build.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
13+
lint:
14+
name: Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Setup project
18+
uses: actions/checkout@v4
19+
- name: Setup ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
bundler-cache: true
23+
ruby-version: 3.2
24+
- name: Lint ruby
25+
run: bundle exec rubocop
26+
27+
test:
28+
name: Test (ruby ${{ matrix.ruby_version }})
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Setup project
32+
uses: actions/checkout@v4
33+
- name: Setup ruby
34+
uses: ruby/setup-ruby@v1
35+
with:
36+
bundler-cache: true
37+
ruby-version: ${{ matrix.ruby_version }}
38+
- name: Run RSpec
39+
run: bin/test/unit
40+
strategy:
41+
matrix:
42+
ruby_version:
43+
- 3.2
44+
- 3.3
45+
- 3.4
46+
47+
package:
48+
name: Package
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Setup project
52+
uses: actions/checkout@v4
53+
- name: Setup ruby
54+
uses: ruby/setup-ruby@v1
55+
with:
56+
bundler-cache: true
57+
ruby-version: 3.2
58+
- name: Package gem
59+
run: bin/build

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
*.gem
2+
*.rbc
3+
/.config
4+
/coverage/
5+
/InstalledFiles
6+
/logs/*
7+
!/logs/.keep
8+
/pkg/
9+
/spec/reports/
10+
/spec/examples.txt
11+
/test/tmp/
12+
/test/version_tmp/
13+
/tmp/*
14+
!/tmp/.keep
15+
16+
# Used by dotenv library to load environment variables.
17+
# .env
18+
19+
# Ignore Byebug command history file.
20+
.byebug_history
21+
22+
## Documentation cache and generated files:
23+
/.yardoc/
24+
/_yardoc/
25+
/doc/
26+
/rdoc/
27+
28+
## Environment normalization:
29+
/.bundle/
30+
/vendor/bundle
31+
/lib/bundler/man/
32+
33+
# for a library or gem, you might want to ignore these files since the code is
34+
# intended to run in multiple environments; otherwise, check them in:
35+
# Gemfile.lock
36+
# .ruby-version
37+
# .ruby-gemset
38+
39+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
40+
.rvmrc
41+
42+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
43+
.rubocop-https?--*

.rubocop.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
require:
2+
- rubocop-ordered_methods
3+
- rubocop-yard
4+
5+
plugins:
6+
- rubocop-performance
7+
- rubocop-rspec
8+
- rubocop-thread_safety
9+
10+
AllCops:
11+
NewCops: enable
12+
TargetRubyVersion: 3.2
13+
14+
Layout/LeadingCommentSpace:
15+
AllowRBSInlineAnnotation: true
16+
AllowSteepAnnotation: true
17+
Exclude:
18+
- bin/**/*
19+
- '**/bin/**/*'
20+
21+
Metrics/AbcSize:
22+
Enabled: false
23+
24+
Metrics/BlockLength:
25+
Enabled: false
26+
27+
Metrics/ClassLength:
28+
CountAsOne:
29+
- array
30+
- hash
31+
- heredoc
32+
- method_call
33+
Max: 500
34+
35+
Metrics/CyclomaticComplexity:
36+
Enabled: false
37+
38+
Metrics/MethodLength:
39+
CountAsOne:
40+
- array
41+
- hash
42+
- heredoc
43+
- method_call
44+
Max: 100
45+
46+
Metrics/ModuleLength:
47+
CountAsOne:
48+
- array
49+
- hash
50+
- heredoc
51+
- method_call
52+
Max: 500
53+
54+
Metrics/ParameterLists:
55+
Max: 10
56+
57+
Metrics/PerceivedComplexity:
58+
Enabled: false
59+
60+
Naming/MethodParameterName:
61+
Enabled: false
62+
63+
Naming/VariableNumber:
64+
Enabled: false
65+
66+
RSpec/ExampleLength:
67+
Max: 15
68+
69+
RSpec/IncludeExamples:
70+
Enabled: false
71+
72+
RSpec/MultipleMemoizedHelpers:
73+
Max: 10
74+
75+
RSpec/NestedGroups:
76+
Enabled: false
77+
78+
Style/AccessorGrouping:
79+
Enabled: false
80+
81+
Style/CaseEquality:
82+
Enabled: false
83+
84+
Style/Documentation:
85+
Enabled: false
86+
87+
Style/DocumentDynamicEvalDefinition:
88+
Enabled: false
89+
90+
Style/TrailingCommaInArguments:
91+
EnforcedStyleForMultiline: comma
92+
93+
Style/TrailingCommaInArrayLiteral:
94+
EnforcedStyleForMultiline: diff_comma
95+
96+
Style/TrailingCommaInHashLiteral:
97+
EnforcedStyleForMultiline: diff_comma
98+
99+
ThreadSafety:
100+
Exclude:
101+
- bin/**/*
102+
- '*.gemspec'
103+
- '**/*.gemspec'
104+
105+
ThreadSafety/ClassInstanceVariable:
106+
Enabled: false

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.2.8

Gemfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# frozen_string_literal: true
2+
3+
require 'yaml'
4+
5+
source 'https://rubygems.org'
6+
7+
ruby '~> 3.2'
8+
9+
group :iro do
10+
YAML.load_file(File.expand_path('iro-gems.yml', File.dirname(__FILE__)))&.each_pair do |gem_name, config|
11+
gem gem_name, path: config['path'] if Dir.exist?(config['path'])
12+
end
13+
end
14+
15+
group :doc do
16+
gem 'github-markup', require: false
17+
gem 'redcarpet', require: false
18+
gem 'webrick', require: false
19+
gem 'yard', require: false
20+
gem 'yard-sitemap', require: false
21+
end
22+
23+
group :lint do
24+
gem 'rubocop', require: false
25+
gem 'rubocop-ordered_methods', require: false
26+
gem 'rubocop-performance', require: false
27+
gem 'rubocop-rspec', require: false
28+
gem 'rubocop-thread_safety', require: false
29+
gem 'rubocop-yard', require: false
30+
end
31+
32+
group :test do
33+
gem 'rspec', require: false
34+
gem 'simplecov', require: false
35+
gem 'simplecov-lcov', require: false
36+
end

Gemfile.lock

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
ast (2.4.3)
5+
diff-lcs (1.6.2)
6+
docile (1.4.1)
7+
github-markup (5.0.1)
8+
json (2.12.2)
9+
language_server-protocol (3.17.0.5)
10+
lint_roller (1.1.0)
11+
parallel (1.27.0)
12+
parser (3.3.8.0)
13+
ast (~> 2.4.1)
14+
racc
15+
prism (1.4.0)
16+
racc (1.8.1)
17+
rainbow (3.1.1)
18+
redcarpet (3.6.1)
19+
regexp_parser (2.10.0)
20+
rspec (3.13.1)
21+
rspec-core (~> 3.13.0)
22+
rspec-expectations (~> 3.13.0)
23+
rspec-mocks (~> 3.13.0)
24+
rspec-core (3.13.4)
25+
rspec-support (~> 3.13.0)
26+
rspec-expectations (3.13.5)
27+
diff-lcs (>= 1.2.0, < 2.0)
28+
rspec-support (~> 3.13.0)
29+
rspec-mocks (3.13.5)
30+
diff-lcs (>= 1.2.0, < 2.0)
31+
rspec-support (~> 3.13.0)
32+
rspec-support (3.13.4)
33+
rubocop (1.75.7)
34+
json (~> 2.3)
35+
language_server-protocol (~> 3.17.0.2)
36+
lint_roller (~> 1.1.0)
37+
parallel (~> 1.10)
38+
parser (>= 3.3.0.2)
39+
rainbow (>= 2.2.2, < 4.0)
40+
regexp_parser (>= 2.9.3, < 3.0)
41+
rubocop-ast (>= 1.44.0, < 2.0)
42+
ruby-progressbar (~> 1.7)
43+
unicode-display_width (>= 2.4.0, < 4.0)
44+
rubocop-ast (1.44.1)
45+
parser (>= 3.3.7.2)
46+
prism (~> 1.4)
47+
rubocop-ordered_methods (0.14)
48+
rubocop (>= 1.0)
49+
rubocop-performance (1.25.0)
50+
lint_roller (~> 1.1)
51+
rubocop (>= 1.75.0, < 2.0)
52+
rubocop-ast (>= 1.38.0, < 2.0)
53+
rubocop-rspec (3.6.0)
54+
lint_roller (~> 1.1)
55+
rubocop (~> 1.72, >= 1.72.1)
56+
rubocop-thread_safety (0.7.2)
57+
lint_roller (~> 1.1)
58+
rubocop (~> 1.72, >= 1.72.1)
59+
rubocop-yard (0.10.0)
60+
rubocop (~> 1.21)
61+
yard
62+
ruby-progressbar (1.13.0)
63+
simplecov (0.22.0)
64+
docile (~> 1.1)
65+
simplecov-html (~> 0.11)
66+
simplecov_json_formatter (~> 0.1)
67+
simplecov-html (0.13.1)
68+
simplecov-lcov (0.8.0)
69+
simplecov_json_formatter (0.1.4)
70+
unicode-display_width (3.1.4)
71+
unicode-emoji (~> 4.0, >= 4.0.4)
72+
unicode-emoji (4.0.4)
73+
webrick (1.9.1)
74+
yard (0.9.37)
75+
yard-sitemap (1.0.1)
76+
77+
PLATFORMS
78+
arm64-darwin-24
79+
ruby
80+
81+
DEPENDENCIES
82+
github-markup
83+
redcarpet
84+
rspec
85+
rubocop
86+
rubocop-ordered_methods
87+
rubocop-performance
88+
rubocop-rspec
89+
rubocop-thread_safety
90+
rubocop-yard
91+
simplecov
92+
simplecov-lcov
93+
webrick
94+
yard
95+
yard-sitemap
96+
97+
RUBY VERSION
98+
ruby 3.2.8p263
99+
100+
BUNDLED WITH
101+
2.6.8

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Aaron Allen
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.

0 commit comments

Comments
 (0)