Skip to content

Commit 7b9bd94

Browse files
committed
1st commit
0 parents  commit 7b9bd94

27 files changed

+1026
-0
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EditorConfig: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# ruby
12+
[*.rb]
13+
charset = utf-8
14+
indent_style = space
15+
indent_size = 2
16+
trim_trailing_whitespace = true

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github: noraj
2+
issuehunt: noraj
3+
ko_fi: noraj
4+
liberapay: noraj

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "bundler"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
12+
labels:
13+
- "dependency::update"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
pages: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Git checkout
17+
uses: actions/checkout@v4 # https://github.com/actions/checkout
18+
- name: Setup Pages
19+
uses: actions/configure-pages@v5
20+
- name: Build Jekyll documentation
21+
uses: actions/jekyll-build-pages@v1 # https://github.com/actions/jekyll-build-pages
22+
with:
23+
destination: output/
24+
- name: Ruby setup
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
bundler-cache: true
28+
- name: Build YARD documentation
29+
id: build
30+
run: bundle exec yard doc
31+
- name: Upload static files as artifact
32+
id: deployment
33+
uses: actions/upload-pages-artifact@v3 # https://github.com/actions/upload-pages-artifact
34+
with:
35+
path: output/
36+
deploy:
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
runs-on: ubuntu-latest
41+
needs: build
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4 # https://github.com/actions/deploy-pages

.github/workflows/tests.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: Tests
9+
10+
on:
11+
push:
12+
branches: [ master ]
13+
pull_request:
14+
branches: [ master ]
15+
16+
jobs:
17+
test:
18+
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
ruby-version: ['3.4', '3.3', '3.2', '3.1']
23+
env:
24+
BUNDLE_WITHOUT: docs development # https://bundler.io/v1.5/groups.html
25+
steps:
26+
- uses: actions/checkout@v4 # https://github.com/actions/checkout
27+
- name: Set up Ruby
28+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
29+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
30+
uses: ruby/setup-ruby@v1
31+
with:
32+
ruby-version: ${{ matrix.ruby-version }}
33+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34+
- name: Run tests
35+
run: bundle exec rake test
36+
- name: Run lint
37+
run: bundle exec rubocop

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
playground/
2+
output/
3+
*.gem

.rubocop.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
inherit_mode:
2+
merge:
3+
- Exclude
4+
AllCops:
5+
TargetRubyVersion: 3.1
6+
NewCops: enable
7+
Exclude:
8+
- 'playground/*.rb'
9+
- 'test/*.rb'
10+
Gemspec/AddRuntimeDependency:
11+
Enabled: false # https://github.com/rubocop/rubocop/pull/13030#discussion_r1674791776
12+
Layout/HashAlignment:
13+
Exclude:
14+
- '*.gemspec'
15+
Layout/SpaceAroundOperators:
16+
Exclude:
17+
- '*.gemspec'
18+
Metrics/AbcSize:
19+
Enabled: false
20+
Metrics/CyclomaticComplexity:
21+
Enabled: false
22+
Metrics/MethodLength:
23+
Enabled: false
24+
Metrics/ModuleLength:
25+
Enabled: false
26+

.tool-versions

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

.yardopts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--output-dir output/yard
2+
--markup markdown
3+
--markup-provider commonmarker
4+
--plugin coderay
5+
-
6+
--main README.md
7+
LICENSE

Gemfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
# Specify your gem's dependencies in .gemspec
6+
# gemspec
7+
8+
# Needed for the CLI only
9+
group :runtime, :cli do
10+
gem 'docopt', '~> 0.6' # for argument parsing
11+
end
12+
13+
# Needed for the CLI & library
14+
group :runtime, :all do
15+
end
16+
17+
# Needed to install dependencies
18+
group :development, :install do
19+
gem 'bundler', '~> 2.1'
20+
end
21+
22+
# Needed to run tests
23+
group :development, :test do
24+
gem 'minitest', '~> 5.25'
25+
gem 'rake', '~> 13.2'
26+
end
27+
28+
# Needed for linting
29+
group :development, :lint do
30+
gem 'rubocop', '~> 1.75'
31+
end
32+
33+
group :development, :docs do
34+
gem 'commonmarker', '~> 2.0' # for markdown support in YARD
35+
gem 'webrick', '~> 1.9' # for yard server
36+
# gem 'yard', ['>= 0.9.27', '< 0.10']
37+
# https://github.com/lsegal/yard/issues/1528
38+
gem 'yard', github: 'ParadoxV5/yard', ref: '9e869c940859570b07b81c5eadd6070e76f6291e', branch: 'commonmarker-1.0'
39+
gem 'yard-coderay', '~> 0.1' # for syntax highlight support in YARD
40+
end

0 commit comments

Comments
 (0)