Skip to content

Commit

Permalink
Modernize gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 26, 2024
1 parent 3724dff commit 64f3c7f
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 10 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/documentation-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Documentation Coverage

on: [push, pull_request]

permissions:
contents: read

env:
CONSOLE_OUTPUT: XTerm
COVERAGE: PartialSummary

jobs:
validate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true

- name: Validate coverage
timeout-minutes: 5
run: bundle exec bake decode:index:coverage lib
24 changes: 24 additions & 0 deletions .github/workflows/rubocop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: RuboCop

on: [push, pull_request]

permissions:
contents: read

env:
CONSOLE_OUTPUT: XTerm

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
bundler-cache: true

- name: Run RuboCop
timeout-minutes: 10
run: bundle exec rubocop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Coverage
name: Test Coverage

on: [push, pull_request]

Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Run tests
timeout-minutes: 5
run: bundle exec bake test

- uses: actions/upload-artifact@v3
with:
name: coverage-${{matrix.os}}-${{matrix.ruby}}
Expand Down
49 changes: 49 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
AllCops:
DisabledByDefault: true

Layout/IndentationStyle:
Enabled: true
EnforcedStyle: tabs

Layout/InitialIndentation:
Enabled: true

Layout/IndentationWidth:
Enabled: true
Width: 1

Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: normal

Layout/BlockAlignment:
Enabled: true

Layout/EndAlignment:
Enabled: true
EnforcedStyleAlignWith: start_of_line

Layout/BeginEndAlignment:
Enabled: true
EnforcedStyleAlignWith: start_of_line

Layout/ElseAlignment:
Enabled: true

Layout/DefEndAlignment:
Enabled: true

Layout/CaseIndentation:
Enabled: true

Layout/CommentIndentation:
Enabled: true

Layout/EmptyLinesAroundClassBody:
Enabled: true

Layout/EmptyLinesAroundModuleBody:
Enabled: true

Style/FrozenStringLiteralComment:
Enabled: true
4 changes: 3 additions & 1 deletion gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
end

group :test do
gem "covered"
gem "sus"
gem "covered"
gem "decode"
gem "rubocop"

gem "bake-test"
gem "bake-test-external"
Expand Down
4 changes: 1 addition & 3 deletions lib/protocol/http1/body/fixed.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2019-2024, by Samuel Williams.

require 'protocol/http/body/readable'

Expand Down Expand Up @@ -39,8 +39,6 @@ def read
@remaining -= chunk.bytesize

return chunk
# else
# raise EOFError, "Stream closed with #{@remaining} bytes remaining!"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/protocol/http1/error.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2019-2024, by Samuel Williams.

require 'protocol/http/error'

Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ We welcome contributions to this project.

### Developer Certificate of Origin

This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.

### Contributor Covenant
### Community Guidelines

This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.

0 comments on commit 64f3c7f

Please sign in to comment.