Skip to content

Commit 45ca210

Browse files
committed
Modernize code.
1 parent 55f5854 commit 45ca210

71 files changed

Lines changed: 2324 additions & 1939 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# GitHub Copilot Instructions
2+
3+
## Use Agent Context
4+
5+
When working on this project, consult the `agents.md` file for project-specific guidelines, architecture decisions, and development patterns. This file contains curated information that will help you make better decisions aligned with the project's goals and standards.
6+
7+
If the file does not exist, you will need to install it, by running the following command:
8+
9+
```bash
10+
$ bundle install
11+
$ bundle exec bake agent:context:install
12+
```
13+
14+
This command will set up the necessary context files that help you understand the project structure, dependencies, and conventions.
15+
16+
## Ignoring Files
17+
18+
The `.gitignore` file is split into two sections, separated by a blank line. The first section is automatically generated, while the second section is user controlled.
19+
20+
While working on pull requests, you should not add unrelated changes to the `.gitignore` file as part of the pull request.

.github/workflows/documentation-coverage.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ permissions:
66
contents: read
77

88
env:
9-
CONSOLE_OUTPUT: XTerm
109
COVERAGE: PartialSummary
1110

1211
jobs:
@@ -17,7 +16,7 @@ jobs:
1716
- uses: actions/checkout@v4
1817
- uses: ruby/setup-ruby@v1
1918
with:
20-
ruby-version: "3.4"
19+
ruby-version: ruby
2120
bundler-cache: true
2221

2322
- name: Validate coverage

.github/workflows/documentation.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ concurrency:
1717
cancel-in-progress: true
1818

1919
env:
20-
CONSOLE_OUTPUT: XTerm
2120
BUNDLE_WITH: maintenance
2221

2322
jobs:
@@ -29,7 +28,7 @@ jobs:
2928

3029
- uses: ruby/setup-ruby@v1
3130
with:
32-
ruby-version: "3.4"
31+
ruby-version: ruby
3332
bundler-cache: true
3433

3534
- name: Installing packages

.github/workflows/rubocop.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: RuboCop
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: ruby
17+
bundler-cache: true
18+
19+
- name: Run RuboCop
20+
timeout-minutes: 10
21+
run: bundle exec rubocop

.github/workflows/test.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ on: [push, pull_request]
55
permissions:
66
contents: read
77

8-
env:
9-
CONSOLE_OUTPUT: XTerm
10-
118
jobs:
129
test:
1310
name: ${{matrix.ruby}} on ${{matrix.os}}

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
/.bundle/
2-
/pkg/
1+
/agents.md
2+
/.context
3+
/.bundle
4+
/pkg
35
/gems.locked
46
/.covered.db
57
/external

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Michael Metivier <michael.metivier@gentex.com>
66
Dominic Sisnero <dsisnero@users.noreply.github.com>
77
Motonori Iwamuro <vmi@nifty.com>
88
Zete Lui <zete@odigo.jp> Luikore <masked>
9+
Charlie Savage <cfis@savagexi.com>

.rubocop.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
plugins:
2+
- rubocop-md
3+
- rubocop-socketry
4+
5+
AllCops:
6+
DisabledByDefault: true
7+
8+
Layout/ConsistentBlankLineIndentation:
9+
Enabled: true
10+
11+
Layout/IndentationStyle:
12+
Enabled: true
13+
EnforcedStyle: tabs
14+
15+
Layout/InitialIndentation:
16+
Enabled: true
17+
18+
Layout/IndentationWidth:
19+
Enabled: true
20+
Width: 1
21+
22+
Layout/IndentationConsistency:
23+
Enabled: true
24+
EnforcedStyle: normal
25+
26+
Layout/BlockAlignment:
27+
Enabled: true
28+
29+
Layout/EndAlignment:
30+
Enabled: true
31+
EnforcedStyleAlignWith: start_of_line
32+
33+
Layout/BeginEndAlignment:
34+
Enabled: true
35+
EnforcedStyleAlignWith: start_of_line
36+
37+
Layout/RescueEnsureAlignment:
38+
Enabled: true
39+
40+
Layout/ElseAlignment:
41+
Enabled: true
42+
43+
Layout/DefEndAlignment:
44+
Enabled: true
45+
46+
Layout/CaseIndentation:
47+
Enabled: true
48+
EnforcedStyle: end
49+
50+
Layout/CommentIndentation:
51+
Enabled: true
52+
53+
Layout/FirstHashElementIndentation:
54+
Enabled: true
55+
56+
Layout/EmptyLinesAroundClassBody:
57+
Enabled: true
58+
59+
Layout/EmptyLinesAroundModuleBody:
60+
Enabled: true
61+
62+
Layout/EmptyLineAfterMagicComment:
63+
Enabled: true
64+
65+
Layout/SpaceInsideBlockBraces:
66+
Enabled: true
67+
EnforcedStyle: no_space
68+
SpaceBeforeBlockParameters: false
69+
70+
Layout/SpaceAroundBlockParameters:
71+
Enabled: true
72+
EnforcedStyleInsidePipes: no_space
73+
74+
Style/FrozenStringLiteralComment:
75+
Enabled: true
76+
77+
Style/StringLiterals:
78+
Enabled: true
79+
EnforcedStyle: double_quotes

examples/docs.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
# frozen_string_literal: true
33

44
# Released under the MIT License.
5-
# Copyright, 2016-2022, by Samuel Williams.
5+
# Copyright, 2016-2025, by Samuel Williams.
66

7-
require 'rainbow'
8-
require 'ffi/clang'
7+
require "rainbow"
8+
require "ffi/clang"
99

1010
index = FFI::Clang::Index.new
1111

1212
# clang -Xclang -ast-dump -fsyntax-only ./examples/docs.cpp
1313

1414
def title(declaration)
15-
puts ["Symbol:", Rainbow(declaration.spelling).blue.bright, "Type:", Rainbow(declaration.type.spelling).green, declaration.kind.to_s].join(' ')
15+
puts ["Symbol:", Rainbow(declaration.spelling).blue.bright, "Type:", Rainbow(declaration.type.spelling).green, declaration.kind.to_s].join(" ")
1616
end
1717

1818
ARGV.each do |path|

ext/rakefile.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# frozen_string_literal: true
22

33
# Released under the MIT License.
4-
# Copyright, 2013-2022, by Samuel Williams.
4+
# Copyright, 2013-2025, by Samuel Williams.
55

6-
require 'teapot'
6+
require "teapot"
77

88
task :default do
99
controller = Teapot::Controller.new(__dir__)

0 commit comments

Comments
 (0)