diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index e0306e37..73bd7e54 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -9,8 +9,6 @@ jobs: strategy: matrix: - experimental: [false] - os: - ubuntu - macos @@ -20,41 +18,31 @@ jobs: - 2.6 - 2.7 + experimental: [false] + env: [""] + include: - # - experimental: true - # os: ubuntu - # ruby: truffleruby - # - experimental: true - # os: ubuntu - # ruby: jruby - - experimental: true - os: ubuntu + - os: ubuntu + ruby: truffleruby + experimental: true + - os: ubuntu + ruby: jruby + experimental: true + - os: ubuntu ruby: head - - experimental: true - os: ubuntu - ruby: 2.7 - env: BUNDLE_GEMFILE=gems/rack-v1.rb - - experimental: true - os: ubuntu - ruby: 2.7 - env: BUNDLE_GEMFILE=gems/rack-head.rb - - experimental: true - os: ubuntu - ruby: 2.6 - env: COVERAGE=PartialSummary,Coveralls + experimental: true steps: - - uses: actions/checkout@v1 - - uses: ruby/setup-ruby@v1 + - uses: actions/checkout@v2 + - uses: ioquatix/setup-ruby@master with: ruby-version: ${{matrix.ruby}} + bundler-cache: true - name: Installing packages (ubuntu) if: matrix.os == 'ubuntu' run: sudo apt-get install apache2-utils - - name: Install dependencies - run: ${{matrix.env}} bundle install - - name: Run tests + timeout-minutes: 5 run: ${{matrix.env}} bundle exec rspec diff --git a/.github/workflows/rack-head.yml b/.github/workflows/rack-head.yml new file mode 100644 index 00000000..1b5613d6 --- /dev/null +++ b/.github/workflows/rack-head.yml @@ -0,0 +1,35 @@ +name: Rack Head + +on: [push, pull_request] + +jobs: + test: + runs-on: ${{matrix.os}}-latest + continue-on-error: ${{matrix.experimental}} + + strategy: + matrix: + os: + - ubuntu + + ruby: + - 2.7 + + env: + BUNDLE_GEMFILE: gems/rack-head.rb + + steps: + - uses: actions/checkout@v2 + - uses: ioquatix/setup-ruby@master + env: ${{matrix.env}} + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + + - name: Installing packages (ubuntu) + if: matrix.os == 'ubuntu' + run: sudo apt-get install apache2-utils + + - name: Run tests + timeout-minutes: 5 + run: bundle exec rspec diff --git a/.github/workflows/rack-v1.yml b/.github/workflows/rack-v1.yml new file mode 100644 index 00000000..2bd60369 --- /dev/null +++ b/.github/workflows/rack-v1.yml @@ -0,0 +1,35 @@ +name: Rack V1 + +on: [push, pull_request] + +jobs: + test: + runs-on: ${{matrix.os}}-latest + continue-on-error: ${{matrix.experimental}} + + strategy: + matrix: + os: + - ubuntu + + ruby: + - 2.7 + + env: + BUNDLE_GEMFILE: gems/rack-v1.rb + + steps: + - uses: actions/checkout@v2 + - uses: ioquatix/setup-ruby@master + env: ${{matrix.env}} + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + + - name: Installing packages (ubuntu) + if: matrix.os == 'ubuntu' + run: sudo apt-get install apache2-utils + + - name: Run tests + timeout-minutes: 5 + run: bundle exec rspec diff --git a/README.md b/README.md index f163333d..8c275411 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,12 @@ # ![Falcon](logo.svg) -Falcon is a multi-process, multi-fiber rack-compatible HTTP server built on top of [async], [async-io], [async-container] and [async-http]. Each request is executed within a lightweight fiber and can block on up-stream requests without stalling the entire server process. Falcon supports HTTP/1 and HTTP/2 natively. +Falcon is a multi-process, multi-fiber rack-compatible HTTP server built on top of [async](https://github.com/socketry/async), [async-io](https://github.com/socketry/async-io), [async-container](https://github.com/socketry/async-container) and [async-http](https://github.com/socketry/async-http). Each request is executed within a lightweight fiber and can block on up-stream requests without stalling the entire server process. Falcon supports HTTP/1 and HTTP/2 natively. -[![Actions Status](https://github.com/socketry/falcon/workflows/Development/badge.svg)](https://github.com/socketry/falcon/actions?workflow=Development) -[![Code Climate](https://codeclimate.com/github/socketry/falcon.svg)](https://codeclimate.com/github/socketry/falcon) -[![Coverage Status](https://coveralls.io/repos/socketry/falcon/badge.svg)](https://coveralls.io/r/socketry/falcon) -[![Gitter](https://badges.gitter.im/join.svg)](https://gitter.im/socketry/falcon) -[![Open Source Helpers](https://www.codetriage.com/socketry/falcon/badges/users.svg)](https://www.codetriage.com/socketry/falcon) - -[async]: https://github.com/socketry/async -[async-io]: https://github.com/socketry/async-io -[async-container]: https://github.com/socketry/async-container -[async-http]: https://github.com/socketry/async-http +[![Development Status](https://github.com/socketry/falcon/workflows/Development/badge.svg)](https://github.com/socketry/falcon/actions?workflow=Development) ## Motivation -Initially, when I developed [async], I saw an opportunity to implement [async-http]: providing both client and server components. After experimenting with these ideas, I decided to build an actual web server for comparing and validating performance primarily out of interest. Falcon grew out of those experiments and permitted the ability to test existing real-world code on top of [async]. +Initially, when I developed [async](https://github.com/socketry/async), I saw an opportunity to implement [async-http](https://github.com/socketry/async-http): providing both client and server components. After experimenting with these ideas, I decided to build an actual web server for comparing and validating performance primarily out of interest. Falcon grew out of those experiments and permitted the ability to test existing real-world code on top of [async](https://github.com/socketry/async). Once I had something working, I saw an opportunity to simplify my development, testing and production environments, replacing production (Nginx+Passenger) and development (Puma) with Falcon. Not only does this simplify deployment, it helps minimize environment-specific bugs. @@ -27,10 +18,10 @@ As web development is something I'm passionate about, having a server like Falco Falcon can be an important part of your business or project, both improving performance and saving money. As such, priority business support is available to make every project a success. The support agreement will give you: -- Direct support and assistance via Slack and email. -- Advance notification of bugs and security issues. -- Priority consideration of feature requests and bug reports. -- Better software by funding development and testing. + - Direct support and assistance via Slack and email. + - Advance notification of bugs and security issues. + - Priority consideration of feature requests and bug reports. + - Better software by funding development and testing. Please visit [Socketry.io](https://socketry.io) to register and subscribe. @@ -42,11 +33,11 @@ Please see the project documentatio We welcome contributions to this project. -1. Fork it -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request ### Responsible Disclosure @@ -56,9 +47,9 @@ We take the security of our systems seriously, and we value input from the secur Websites below are listed in alphabetical order. -- iCook - [https://icook.tw](https://icook.tw) -- RubyAPI - [https://rubyapi.org](https://rubyapi.org) -- YonderBook - [https://www.yonderbook.com/](https://www.yonderbook.com/) + - iCook - + - RubyAPI - + - YonderBook - You're welcome to file a PR if you want to add your sites here. diff --git a/falcon.gemspec b/falcon.gemspec index 27ffa734..ff2a356d 100644 --- a/falcon.gemspec +++ b/falcon.gemspec @@ -1,42 +1,38 @@ -require_relative 'lib/falcon/version' +require_relative "lib/falcon/version" Gem::Specification.new do |spec| spec.name = "falcon" spec.version = Falcon::VERSION - spec.authors = ["Samuel Williams"] - spec.email = ["samuel.williams@oriontransfer.co.nz"] spec.summary = "A fast, asynchronous, rack-compatible web server." + spec.authors = ["Samuel Williams"] + spec.license = "MIT" + spec.homepage = "https://github.com/socketry/falcon" - spec.required_ruby_version = "~> 2.5" + spec.files = Dir.glob('{bake,bin,lib}/**/*', File::FNM_DOTMATCH, base: __dir__) - spec.files = Dir['{bake,bin,lib}/**/*', base: __dir__] - spec.require_paths = ['lib'] + spec.executables = ["falcon", "falcon-host"] - spec.executables = ['falcon', 'falcon-host'] + spec.required_ruby_version = ">= 2.5" spec.add_dependency "async", "~> 1.13" - spec.add_dependency "async-io", "~> 1.22" + spec.add_dependency "async-container", "~> 0.16.0" spec.add_dependency "async-http", "~> 0.52.0" spec.add_dependency "async-http-cache", "~> 0.2.0" - spec.add_dependency "async-container", "~> 0.16.0" - + spec.add_dependency "async-io", "~> 1.22" + spec.add_dependency "build-environment", "~> 1.13" + spec.add_dependency "bundler" + spec.add_dependency "localhost", "~> 1.1" + spec.add_dependency "process-metrics", "~> 0.2.0" spec.add_dependency "rack", ">= 1.0" + spec.add_dependency "samovar", "~> 2.1" - spec.add_dependency 'samovar', "~> 2.1" - spec.add_dependency 'localhost', "~> 1.1" - spec.add_dependency 'build-environment', '~> 1.13' - - spec.add_dependency 'process-metrics', '~> 0.2.0' - + spec.add_development_dependency "async-process", "~> 1.1" spec.add_development_dependency "async-rspec", "~> 1.7" spec.add_development_dependency "async-websocket", "~> 0.14.0" - spec.add_development_dependency "async-process", "~> 1.1" - spec.add_development_dependency "bake" spec.add_development_dependency "covered" - spec.add_development_dependency "bundler" spec.add_development_dependency "rspec", "~> 3.6" end