falcon 0.18.1 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f2d485da7f1a0f5a46c51a0f752d691a71744c2111b690ed1e258f6d423f7ae
4
- data.tar.gz: 60fa539ff944e1a86fd266bd917ac2cc9b10eff212afbff887669237f8e8edea
3
+ metadata.gz: c02cc1dfd3a75ea464e31502ad5efc3785087bb11d6ab06fd470b2eaf4c641cb
4
+ data.tar.gz: 2dd8d13c7988d2c7286155b016d268ecbcad4a5c4b83e44ea5dd756565ec9b41
5
5
  SHA512:
6
- metadata.gz: 88c7cff5b02baaaa2eea69d3834bb924998d20d82a1264670aadfc24b2392f608a94653403029d746d43a89cbb9d5f6ca764af96778761681d09919c04d48ae4
7
- data.tar.gz: ae2da726f27c3cf3f1226de6879290da09b6d04415f390d7289a9d1f73f6dbccf4f0ea6dc1dc685067c4c6190b2345cbb1a0e30a409acf9b43d24c0b2eeca323
6
+ metadata.gz: b10dcd0eabf38a4da70f34ef60ec70b39189af7b538b7217a3d3de5990ae3a2d154c08961c256e654733dde4d1e7b0bb7029434273ff7dd9d6a46dfbea019166
7
+ data.tar.gz: d250db6ab45922cf4679194b2c044d5fecd54b62af607134605d1a6cbba588c9782a0360b858a29c7fcf75962aab36aba952584d3f7b7b1a45d7805979f3f578
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ![Falcon](logo.svg)
2
2
 
3
- Falcon is a multi-process, multi-fiber Rack HTTP server built on top of [async], [async-io] and [async-http]. Each request is run within a light weight fiber and can block on up-stream requests without stalling the entire server process. Supports HTTP/1 and HTTP/2 natively.
3
+ Falcon is a multi-process, multi-fiber Rack HTTP server built on top of [async], [async-io], [async-container] and [async-http]. Each request is run within a light weight fiber and can block on up-stream requests without stalling the entire server process. Supports HTTP/1 and HTTP/2 natively. [Paid business support](#Business-Support) is available.
4
4
 
5
5
  [![Build Status](https://secure.travis-ci.org/socketry/falcon.svg)](http://travis-ci.org/socketry/falcon)
6
6
  [![Code Climate](https://codeclimate.com/github/socketry/falcon.svg)](https://codeclimate.com/github/socketry/falcon)
@@ -8,6 +8,7 @@ Falcon is a multi-process, multi-fiber Rack HTTP server built on top of [async],
8
8
 
9
9
  [async]: https://github.com/socketry/async
10
10
  [async-io]: https://github.com/socketry/async-io
11
+ [async-container]: https://github.com/socketry/async-container
11
12
  [async-http]: https://github.com/socketry/async-http
12
13
 
13
14
  ## Installation
@@ -28,7 +29,15 @@ Or install it yourself as:
28
29
 
29
30
  ## Usage
30
31
 
31
- You can run `falcon serve` directly, and it will load the `config.ru` and start serving on port 9292.
32
+ You can run `falcon serve` directly, and it will load the `config.ru` and start serving on https://localhost:9292.
33
+
34
+ ### Integration with Rails
35
+
36
+ Falcon works perfectly with `rails` apps.
37
+
38
+ Add `gem 'falcon'` to your `Gemfile` and perhaps remove `gem 'puma'` once you are satisified with the change.
39
+
40
+ Run `RACK_HANDLER=falcon rails server` to start the server (at least, until [rack#181](https://github.com/rack/rack/pull/1181) is merged). Alternatively, if you want to use `HTTP/2`, run `falcon serve` directly.
32
41
 
33
42
  ### WebSockets
34
43
 
@@ -48,7 +57,7 @@ Falcon can restart very quickly and is ideal for use with guard. See [guard-falc
48
57
 
49
58
  ### Integration with Capybara
50
59
 
51
- It is a very fast and light-weight implementation for Capybara:
60
+ It's quick start up time is great for use with Capybara. See [falcon-capybara] for more details.
52
61
 
53
62
  [falcon-capybara]: https://github.com/socketry/falcon-capybara
54
63
 
@@ -66,11 +75,24 @@ Falcon is uses an asynchronous event-driven reactor to provide non-blocking IO.
66
75
 
67
76
  It uses one Fiber per request, which yields in the presence of blocking IO.
68
77
 
78
+ - [Improving Ruby Concurrency](https://www.codeotaku.com/journal/2018-06/improving-ruby-concurrency/index#performance) – Comparison of Falcon and Puma.
79
+
69
80
  ### Memory Usage
70
81
 
71
- Falcon uses a pre-fork model which loads the entire rack application before forking. This reduces per-process memory usage.
82
+ Falcon uses a pre-fork model which loads the entire rack application before forking. This reduces per-process memory usage.
83
+
84
+ [async-http] has been designed carefully to minimize IO related garbage. This avoids large per-request memory allocations or disk usage, provided that you use streaming IO.
85
+
86
+ ## Business Support
87
+
88
+ If you use this software for business purposes, please consider purchasing Business Support. The agreement will give you:
89
+
90
+ - Better software through funded development and testing.
91
+ - Advance notification of bugs and security issues.
92
+ - Priority consideration of feature requests and bug reports.
93
+ - Private support and assistance via direct email.
72
94
 
73
- ### Throughput
95
+ The price for business support is $60.00 USD / instance / year, invoiced on a yearly basis. Please [contact us](mailto:context@oriontransfer.co.nz?subject=Falcon%20Business%20Support) for more details.
74
96
 
75
97
  ## Contributing
76
98
 
@@ -84,7 +106,7 @@ Falcon uses a pre-fork model which loads the entire rack application before fork
84
106
 
85
107
  Released under the MIT license.
86
108
 
87
- Copyright, 2017, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
109
+ Copyright, 2018, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
88
110
 
89
111
  Permission is hereby granted, free of charge, to any person obtaining a copy
90
112
  of this software and associated documentation files (the "Software"), to deal
@@ -19,6 +19,7 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  require_relative 'output'
22
+ require 'time'
22
23
 
23
24
  module Falcon
24
25
  module Adapters
@@ -27,6 +28,9 @@ module Falcon
27
28
  # We normalize headers to be lower case:
28
29
  headers = headers.map{|key, value| [key.downcase, value]}.to_h
29
30
 
31
+ headers['server'] ||= "falcon/#{Falcon::VERSION}"
32
+ headers['date'] ||= Time.now.httpdate
33
+
30
34
  super(nil, status, nil, headers, Output.wrap(status, headers, body))
31
35
  end
32
36
  end
@@ -40,12 +40,8 @@ module Falcon
40
40
  end
41
41
 
42
42
  nested '<command>',
43
- 'serve' => Serve
44
- # 'get' => Get
45
- # 'post' => Post
46
- # 'head' => Head,
47
- # 'put' => Put,
48
- # 'delete' => Delete
43
+ 'serve' => Serve,
44
+ default: 'serve'
49
45
 
50
46
  def verbose?
51
47
  @options[:logging] == :verbose
@@ -26,10 +26,6 @@ module Falcon
26
26
  @options[:ssl_context] || build_ssl_context
27
27
  end
28
28
 
29
- def build_endpoint(endpoint = nil)
30
- super(@options.fetch(:bind, endpoint))
31
- end
32
-
33
29
  def build_ssl_context(hostname = self.hostname)
34
30
  authority = Localhost::Authority.fetch(hostname)
35
31
 
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Falcon
22
- VERSION = "0.18.1"
22
+ VERSION = "0.18.2"
23
23
  end
data/logo.svg CHANGED
@@ -1,8 +1,8 @@
1
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
2
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
3
  <svg width="100%" height="100%" viewBox="0 0 600 220" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;">
4
- <g id="Name" transform="matrix(1,0,-0.176327,1,245.058,11.0473)">
5
- <g transform="matrix(12.4689,0,0,1,2662.53,0)">
4
+ <g id="Name" transform="matrix(1,0,-0.176327,1,237.874,11.0473)">
5
+ <g transform="matrix(12.3597,0,0,0.991236,2645.68,0.928996)">
6
6
  <g opacity="0.5">
7
7
  <g id="a2YeZXbxK" transform="matrix(-1.71632,0,0,0.386532,-68.0238,97.1636)">
8
8
  <path d="M73.939,38.385L94.531,27.962L73.939,22.859L73.939,38.385Z" style="fill:rgb(86,86,86);fill-rule:nonzero;"/>
@@ -33,7 +33,27 @@
33
33
  </g>
34
34
  </g>
35
35
  </g>
36
- <g transform="matrix(1,0,0,1,-404.578,86.5424)">
36
+ <g transform="matrix(0.882487,0,0,0.533211,-371.748,95.1582)">
37
+ <g transform="matrix(1.13316,0,0,1.87543,-27.5826,-16.1583)">
38
+ <path d="M211.688,18.458L262.778,18.458L262.778,41.208L239.378,41.208L239.378,50.828L262.388,50.828L262.388,72.408L239.378,72.408L239.378,105.168L211.688,105.168L211.688,18.458Z" style="fill:white;fill-rule:nonzero;"/>
39
+ </g>
40
+ <g transform="matrix(1.13316,0,0,1.87543,-27.5826,-16.1583)">
41
+ <path d="M288.518,18.458L309.318,18.458L342.208,105.168L314.908,105.168L312.048,97.368L285.788,97.368L282.928,105.168L255.628,105.168L288.518,18.458Z" style="fill:white;fill-rule:nonzero;"/>
42
+ </g>
43
+ <g transform="matrix(1.13316,0,0,1.87543,-27.5826,-16.1583)">
44
+ <path d="M344.158,18.458L373.018,18.458L373.018,82.418L396.938,82.418L396.938,105.168L344.158,105.168L344.158,18.458Z" style="fill:white;fill-rule:nonzero;"/>
45
+ </g>
46
+ <g transform="matrix(1.13316,0,0,1.87543,-27.5826,-16.1583)">
47
+ <path d="M395.638,61.878C395.638,54.944 396.851,48.683 399.278,43.093C401.705,37.503 404.998,32.714 409.158,28.728C413.318,24.741 418.171,21.686 423.718,19.563C429.265,17.439 435.158,16.378 441.398,16.378C446.338,16.378 450.736,16.854 454.593,17.808C458.45,18.761 461.765,19.844 464.538,21.058C467.745,22.444 470.518,23.961 472.858,25.608L459.208,49.658C457.821,48.618 456.305,47.621 454.658,46.668C453.185,45.974 451.43,45.303 449.393,44.653C447.356,44.003 445.038,43.678 442.438,43.678C439.751,43.678 437.281,44.154 435.028,45.108C432.775,46.061 430.803,47.361 429.113,49.008C427.423,50.654 426.101,52.583 425.148,54.793C424.195,57.003 423.718,59.364 423.718,61.878C423.718,64.391 424.216,66.753 425.213,68.963C426.21,71.173 427.575,73.101 429.308,74.748C431.041,76.394 433.078,77.694 435.418,78.648C437.758,79.601 440.315,80.078 443.088,80.078C445.861,80.078 448.331,79.731 450.498,79.038C452.665,78.344 454.485,77.564 455.958,76.698C457.691,75.744 459.208,74.618 460.508,73.318L474.158,97.368C471.818,99.274 469.045,100.964 465.838,102.438C463.065,103.651 459.728,104.778 455.828,105.818C451.928,106.858 447.465,107.378 442.438,107.378C435.678,107.378 429.438,106.273 423.718,104.063C417.998,101.853 413.058,98.754 408.898,94.768C404.738,90.781 401.488,85.993 399.148,80.403C396.808,74.813 395.638,68.638 395.638,61.878Z" style="fill:white;fill-rule:nonzero;"/>
48
+ </g>
49
+ <g transform="matrix(1.13316,0,0,1.87543,-27.5826,-16.1583)">
50
+ <path d="M467.658,61.878C467.658,55.638 468.85,49.744 471.233,44.198C473.616,38.651 476.866,33.819 480.983,29.703C485.1,25.586 489.931,22.336 495.478,19.953C501.025,17.569 506.918,16.378 513.158,16.378C519.398,16.378 525.291,17.569 530.838,19.953C536.385,22.336 541.216,25.586 545.333,29.703C549.45,33.819 552.7,38.651 555.083,44.198C557.466,49.744 558.658,55.638 558.658,61.878C558.658,68.118 557.466,74.011 555.083,79.558C552.7,85.104 549.45,89.936 545.333,94.053C541.216,98.169 536.385,101.419 530.838,103.803C525.291,106.186 519.398,107.378 513.158,107.378C506.918,107.378 501.025,106.186 495.478,103.803C489.931,101.419 485.1,98.169 480.983,94.053C476.866,89.936 473.616,85.104 471.233,79.558C468.85,74.011 467.658,68.118 467.658,61.878ZM494.958,61.878C494.958,64.391 495.435,66.753 496.388,68.963C497.341,71.173 498.641,73.101 500.288,74.748C501.935,76.394 503.863,77.694 506.073,78.648C508.283,79.601 510.645,80.078 513.158,80.078C515.671,80.078 518.033,79.601 520.243,78.648C522.453,77.694 524.381,76.394 526.028,74.748C527.675,73.101 528.975,71.173 529.928,68.963C530.881,66.753 531.358,64.391 531.358,61.878C531.358,59.364 530.881,57.003 529.928,54.793C528.975,52.583 527.675,50.654 526.028,49.008C524.381,47.361 522.453,46.061 520.243,45.108C518.033,44.154 515.671,43.678 513.158,43.678C510.645,43.678 508.283,44.154 506.073,45.108C503.863,46.061 501.935,47.361 500.288,49.008C498.641,50.654 497.341,52.583 496.388,54.793C495.435,57.003 494.958,59.364 494.958,61.878Z" style="fill:white;fill-rule:nonzero;"/>
51
+ </g>
52
+ <g transform="matrix(1.13316,0,0,1.87543,-27.5826,-16.1583)">
53
+ <path d="M565.808,18.458L588.558,18.458L612.478,51.868L612.478,18.458L639.648,18.458L639.648,105.168L616.768,105.168L592.978,71.888L592.978,105.168L565.808,105.168L565.808,18.458Z" style="fill:white;fill-rule:nonzero;"/>
54
+ </g>
55
+ </g>
56
+ <g transform="matrix(1,0,0,1,-396.089,86.5424)">
37
57
  <text x="207.138px" y="105.168px" style="font-family:'Phosphate-Inline', 'Phosphate';font-size:130px;">F<tspan x="258.228px 339.608px 393.038px 465.058px 561.258px " y="105.168px 105.168px 105.168px 105.168px 105.168px ">ALCON</tspan></text>
38
58
  </g>
39
59
  </g>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-07 00:00:00.000000000 Z
11
+ date: 2018-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-io