Skip to content

Commit

Permalink
Modernize gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 17, 2024
1 parent fb2d89f commit b35de14
Show file tree
Hide file tree
Showing 21 changed files with 127 additions and 20 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
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: bundle exec bake utopia:project:static --force no

- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: docs

Expand All @@ -55,4 +55,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
uses: actions/deploy-pages@v4
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
2 changes: 1 addition & 1 deletion examples/benchmark/bake.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, 2018-2023, by Samuel Williams.
# Copyright, 2018-2024, by Samuel Williams.

require 'etc'

Expand Down
4 changes: 4 additions & 0 deletions examples/benchmark/config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ class Benchmark
@app = app
end

def hello(env)
[200, {'content-length' => 12}, ["Hello World\n"]]
end

PATH_INFO = 'PATH_INFO'.freeze

SMALL = [200, {}, ["Hello World\n" * 10] * 10].freeze
Expand Down
2 changes: 1 addition & 1 deletion examples/hello/falcon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

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

require 'falcon/environment/self_signed_tls'
require 'falcon/environment/rack'
Expand Down
2 changes: 1 addition & 1 deletion examples/server/standalone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

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

require 'async'
require 'async/http/endpoint'
Expand Down
4 changes: 2 additions & 2 deletions falcon.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
spec.version = Falcon::VERSION

spec.summary = "A fast, asynchronous, rack-compatible web server."
spec.authors = ["Samuel Williams", "Janko Marohnić", "Bryan Powell", "Trevor Turk", "Claudiu Garba", "Kyle Tam", "Mitsutaka Mimura", "Sho Ito", "Colby Swandale", "Daniel Evans", "Kent Gruber", "Michael Adams", "Mikel Kew", "Nick Janetakis", "Olle Jonsson", "Peter Schrammel", "Santiago Bartesaghi", "Sh Lin", "Tad Thorley", "Tasos Latsas", "dependabot[bot]"]
spec.authors = ["Samuel Williams", "Janko Marohnić", "Bryan Powell", "Trevor Turk", "Claudiu Garba", "Kyle Tam", "Mitsutaka Mimura", "Peter Schrammel", "Sho Ito", "Adam Daniels", "Colby Swandale", "Daniel Evans", "Kent Gruber", "Michael Adams", "Mikel Kew", "Nick Janetakis", "Olle Jonsson", "Santiago Bartesaghi", "Sh Lin", "Stefan Buhrmester", "Tad Thorley", "Tasos Latsas", "dependabot[bot]"]
spec.license = "MIT"

spec.cert_chain = ['release.cert']
Expand All @@ -28,7 +28,7 @@ Gem::Specification.new do |spec|

spec.add_dependency "async"
spec.add_dependency "async-container", "~> 0.18"
spec.add_dependency "async-http", "~> 0.66", ">= 0.66.3"
spec.add_dependency "async-http", ["~> 0.66", ">= 0.66.3"]
spec.add_dependency "async-http-cache", "~> 0.4.0"
spec.add_dependency "async-service", "~> 0.10"
spec.add_dependency "bundler"
Expand Down
2 changes: 2 additions & 0 deletions gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
group :test do
gem 'sus'
gem 'covered'
gem "decode"
gem "rubocop"

gem 'sus-fixtures-async'
gem 'sus-fixtures-async-http'
Expand Down
2 changes: 1 addition & 1 deletion lib/falcon/command/paths.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, 2020-2023, by Samuel Williams.
# Copyright, 2020-2024, by Samuel Williams.

require_relative '../configuration'

Expand Down
2 changes: 1 addition & 1 deletion lib/falcon/middleware/proxy.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, 2018-2023, by Samuel Williams.
# Copyright, 2018-2024, by Samuel Williams.

require 'async/http/client'
require 'protocol/http/headers'
Expand Down
2 changes: 1 addition & 1 deletion lib/falcon/proxy_endpoint.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 'io/endpoint/unix_endpoint'

Expand Down
2 changes: 1 addition & 1 deletion lib/falcon/rackup/handler.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, 2023, by Samuel Williams.
# Copyright, 2024, by Samuel Williams.

require 'rackup/handler'

Expand Down
3 changes: 2 additions & 1 deletion lib/rack/handler/falcon.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# frozen_string_literal: true

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

require 'rack/handler'

Expand Down
2 changes: 1 addition & 1 deletion lib/rackup/handler/falcon.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, 2023, by Samuel Williams.
# Copyright, 2023-2024, by Samuel Williams.

require 'rackup/handler'

Expand Down
2 changes: 2 additions & 0 deletions license.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Copyright, 2024, by Peter Schrammel.
Copyright, 2024, by Santiago Bartesaghi.
Copyright, 2024, by Trevor Turk.
Copyright, 2024, by dependabot[bot].
Copyright, 2024, by Adam Daniels.
Copyright, 2024, by Stefan Buhrmester.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,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.
2 changes: 1 addition & 1 deletion test/falcon/rackup/handler/falcon.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 'sus/fixtures/async'

Expand Down
2 changes: 1 addition & 1 deletion test/falcon/ssl_server.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, 2018-2023, by Samuel Williams.
# Copyright, 2018-2024, by Samuel Williams.
# Copyright, 2020, by Tasos Latsas.

require 'server_context'
Expand Down

0 comments on commit b35de14

Please sign in to comment.