Skip to content

Commit

Permalink
Modernize gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Sep 19, 2020
1 parent 45fd751 commit f785c4d
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 70 deletions.
42 changes: 15 additions & 27 deletions .github/workflows/development.yml
Expand Up @@ -9,8 +9,6 @@ jobs:

strategy:
matrix:
experimental: [false]

os:
- ubuntu
- macos
Expand All @@ -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
33 changes: 33 additions & 0 deletions .github/workflows/rack-head.yml
@@ -0,0 +1,33 @@
name: Rack Head

on: [push, pull_request]

jobs:
test:
runs-on: ${{matrix.os}}-latest

strategy:
matrix:
os:
- ubuntu

ruby:
- 2.7

env:
BUNDLE_GEMFILE: gems/rack-head.rb

steps:
- 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: Run tests
timeout-minutes: 5
run: bundle exec rspec
33 changes: 33 additions & 0 deletions .github/workflows/rack-v1.yml
@@ -0,0 +1,33 @@
name: Rack V1

on: [push, pull_request]

jobs:
test:
runs-on: ${{matrix.os}}-latest

strategy:
matrix:
os:
- ubuntu

ruby:
- 2.7

env:
BUNDLE_GEMFILE: gems/rack-v1.rb

steps:
- 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: Run tests
timeout-minutes: 5
run: bundle exec rspec
39 changes: 15 additions & 24 deletions 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.

Expand All @@ -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.

Expand All @@ -42,11 +33,11 @@ Please see the <a href="https://socketry.github.io/falcon/">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

Expand All @@ -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 - <https://icook.tw>
- RubyAPI - <https://rubyapi.org>
- YonderBook - <https://www.yonderbook.com/>

You're welcome to file a PR if you want to add your sites here.

Expand Down
34 changes: 15 additions & 19 deletions 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

0 comments on commit f785c4d

Please sign in to comment.