-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
86 changed files
with
361 additions
and
974 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Coverage | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
CONSOLE_OUTPUT: XTerm | ||
COVERAGE: PartialSummary | ||
|
||
jobs: | ||
test: | ||
name: ${{matrix.ruby}} on ${{matrix.os}} | ||
runs-on: ${{matrix.os}}-latest | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu | ||
- macos | ||
|
||
ruby: | ||
- "3.2" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{matrix.ruby}} | ||
bundler-cache: true | ||
|
||
- name: Run tests | ||
timeout-minutes: 5 | ||
run: bundle exec bake test | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage-${{matrix.os}}-${{matrix.ruby}} | ||
path: .covered.db | ||
|
||
validate: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2" | ||
bundler-cache: true | ||
|
||
- uses: actions/download-artifact@v3 | ||
|
||
- name: Validate coverage | ||
timeout-minutes: 5 | ||
run: bundle exec bake covered:validate --paths */.covered.db \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,61 @@ | ||
name: Documentation | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab: | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages: | ||
permissions: | ||
contents: write | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment: | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
env: | ||
CONSOLE_OUTPUT: XTerm | ||
BUNDLE_WITH: maintenance | ||
|
||
jobs: | ||
deploy: | ||
generate: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.1" | ||
ruby-version: "3.2" | ||
bundler-cache: true | ||
|
||
- name: Installing packages | ||
run: sudo apt-get install wget | ||
|
||
- name: Prepare GitHub Pages | ||
run: bundle exec bake github:pages:prepare --directory docs | ||
|
||
- name: Generate documentation | ||
timeout-minutes: 5 | ||
run: bundle exec bake utopia:project:static --force no | ||
|
||
- name: Deploy GitHub Pages | ||
run: bundle exec bake github:pages:commit --directory docs | ||
- name: Upload documentation artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: docs | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{steps.deployment.outputs.page_url}} | ||
|
||
needs: generate | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,9 @@ jobs: | |
- macos | ||
|
||
ruby: | ||
- "2.7" | ||
- "3.0" | ||
- "3.1" | ||
- "3.2" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
.tags | ||
/.bundle/ | ||
/pkg/ | ||
/gems.locked | ||
/.covered.db | ||
/external | ||
|
||
/.bundle/ | ||
/.yardoc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Mitsutaka Mimura <[email protected]> | ||
Kyle Tam <[email protected]> | ||
Claudiu Garba <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/usr/bin/env -S ./bin/falcon virtual | ||
# frozen_string_literal: true | ||
|
||
# Released under the MIT License. | ||
# Copyright, 2019-2020, by Samuel Williams. | ||
|
||
load :rack, :self_signed_tls, :supervisor | ||
|
||
rack 'benchmark.local', :self_signed_tls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class HelloWorld | ||
JSON_TYPE = "application/json".freeze | ||
PLAINTEXT_TYPE = "text/plain".freeze | ||
|
||
def respond(type, body) | ||
[200, { "Content-Type" => type }, [body]] | ||
end | ||
|
||
def call(env) | ||
case env["PATH_INFO"] | ||
when "/json" | ||
# Test type 1: JSON serialization | ||
return respond JSON_TYPE, | ||
Oj.dump({ message: "Hello, World!" }, { mode: :strict }) | ||
when "/plaintext" | ||
# Test type 6: Plaintext | ||
return respond PLAINTEXT_TYPE, "Hello, World!" | ||
end | ||
|
||
[200, {}, []] | ||
end | ||
end | ||
|
||
# run HelloWorld.new | ||
|
||
run do | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env -S falcon host | ||
# frozen_string_literal: true | ||
|
||
load :rack, :supervisor | ||
|
||
hostname = File.basename(__dir__) | ||
rack hostname do | ||
endpoint Async::HTTP::Endpoint.parse("http://0.0.0.0:8080").with( | ||
protocol: Async::HTTP::Protocol::HTTP11 | ||
) | ||
end | ||
|
||
supervisor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.