falcon 0.22.1 → 0.22.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: 66edcdaf881f348568922e6637c9986fe2fcc4344dca0ecb27a3f0d8afe67fbf
4
- data.tar.gz: 0614a43d42110816ef9207671f7b4c1afa5ae4d8a160a2ef599fabbd7ae6ed6b
3
+ metadata.gz: 8ad8912f89a8a19ccbe962c4c381ca16eb6d840336df23d0c4a5891ada31ca7f
4
+ data.tar.gz: 75891fe68eb4027572a7e3f34d14881dbc3d74dab98bbd013eb066080d412bbf
5
5
  SHA512:
6
- metadata.gz: 577b0db37623e01616143cb1b4fea321471c5d6fef01b50aca28a2b9b6384bde668b213e3a70fdcae3be6ef74577d6479153edb089728064f876befae44e3461
7
- data.tar.gz: 71b8dfa0a026dc3b62a2e3ab2ae376d8b53fef841b4e9dbdef98e92ce6a8b40467c7ee17a8590100f4d309e7b921775cf56df6e930b6b450df22cd5a75117961
6
+ metadata.gz: 0fe2de11207ab1887eeb78252abe448c3fbfc01abc4d3dc9bf777f004bba65ea2ae35bad8b7ac5485799ae473598e4e824ff4095800afb9fb5402908f0c87360
7
+ data.tar.gz: dbee0d708311e799dbc2f2e7a184fe10ae6d98380e11a9b54499e52df1e938bf2452a372021227279b8b0b2e17daaa5c561d2327b8a825b346f5a4728f86c73c
@@ -33,6 +33,7 @@ module Falcon
33
33
  PATH_INFO = 'PATH_INFO'.freeze
34
34
  REQUEST_METHOD = 'REQUEST_METHOD'.freeze
35
35
  REQUEST_PATH = 'REQUEST_PATH'.freeze
36
+ REQUEST_URI = 'REQUEST_URI'.freeze
36
37
  SCRIPT_NAME = 'SCRIPT_NAME'.freeze
37
38
  QUERY_STRING = 'QUERY_STRING'.freeze
38
39
  SERVER_PROTOCOL = 'SERVER_PROTOCOL'.freeze
@@ -136,7 +137,8 @@ module Falcon
136
137
  # The remainder of the request URL's “path”, designating the virtual “location” of the request's target within the application. This may be an empty string, if the request URL targets the application root and does not have a trailing slash. This value may be percent-encoded when originating from a URL.
137
138
  PATH_INFO => request_path,
138
139
  REQUEST_PATH => request_path,
139
-
140
+ REQUEST_URI => request.path,
141
+
140
142
  # The portion of the request URL that follows the ?, if any. May be empty, but is always required!
141
143
  QUERY_STRING => query_string || '',
142
144
 
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Falcon
22
- VERSION = "0.22.1"
22
+ VERSION = "0.22.2"
23
23
  end
@@ -9,6 +9,7 @@ module Rack
9
9
  module Handler
10
10
  module Falcon
11
11
  SCHEME = "http".freeze
12
+ NAME = :falcon
12
13
 
13
14
  def self.endpoint_for(**options)
14
15
  host = options[:Host] || 'localhost'
@@ -24,13 +25,14 @@ module Rack
24
25
  app = ::Falcon::Adapters::Rewindable.new(app)
25
26
 
26
27
  server = ::Falcon::Server.new(app, endpoint, Async::HTTP::Protocol::HTTP1, SCHEME)
27
-
28
+ yield server if block_given?
29
+
28
30
  Async::Reactor.run do
29
31
  server.run
30
32
  end
31
33
  end
32
34
  end
33
35
 
34
- register :falcon, Falcon
36
+ register Falcon::NAME, Falcon
35
37
  end
36
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.1
4
+ version: 0.22.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams