falcon 0.55.5 → 0.55.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd76881d4e2bd3d7d00d9ec50dbb09f912df3846c2f5e35efec1b3cfb34cc936
4
- data.tar.gz: 025f81b91d16d7f9e71797fd7d59b64f321c1026b350be23797f1019b8d78680
3
+ metadata.gz: 9efae16cb2a08be54e0b1099559fdb943d7ef5a85d709b57f4caa2590d08ff8f
4
+ data.tar.gz: 4f03dd493732da1714b55ec9af8df3d1ec7e20ce0bd51e9ef48f5cee1e8141ed
5
5
  SHA512:
6
- metadata.gz: 3dd4e37cf24b306e1aa71519612552de2bd0e6eae12b408b33227ea59dec06fc49a52c5094330d7bf632dfe8284a125a50765189b9cd8f92225a909f16ef7c6d
7
- data.tar.gz: e6c129ee4d46bfb68a0584fbd48a4f0fe41497bc102200a845c1476a77ab7abfe011f2f5b8e37ff7f1de8e33dd38b08db7191442b55e0a490ebaffa64bb738ea
6
+ metadata.gz: c0301ea50dea981115c09258abe18b55e8327bfcf2a74d018a4b1b7a55c1567521f8afb38b16b52a4559dc181df922af0408901bd7b79c6ac61a6cbc16b6c8b7
7
+ data.tar.gz: 5270c593232e8d23d4157faa6b85176b5c95d220c4c0360871cb11e8990d04d1c2f508ef1681b1ff1e7c87fc408f5a68783d4fcf094812317ec8f241627d5a32
checksums.yaml.gz.sig CHANGED
Binary file
data/bin/falcon CHANGED
@@ -23,11 +23,4 @@
23
23
 
24
24
  require_relative "../lib/falcon/command"
25
25
 
26
- begin
27
- Falcon::Command.call
28
- rescue Interrupt
29
- # Ignore.
30
- rescue => error
31
- Console.error(Falcon::Command, error)
32
- exit! 1
33
- end
26
+ Falcon::Command.call
data/bin/falcon-host CHANGED
@@ -23,7 +23,4 @@
23
23
 
24
24
  require_relative "../lib/falcon/command/host"
25
25
 
26
- begin
27
- Falcon::Command::Host.call
28
- rescue Interrupt
29
- end
26
+ Falcon::Command::Host.call
@@ -8,6 +8,7 @@ require_relative "../version"
8
8
 
9
9
  require "samovar"
10
10
  require "async/service/controller"
11
+ require "console"
11
12
 
12
13
  module Falcon
13
14
  module Command
@@ -17,6 +18,17 @@ module Falcon
17
18
  class Host < Samovar::Command
18
19
  self.description = "Host the specified applications."
19
20
 
21
+ # The main entry point for the `falcon-host` executable.
22
+ # @parameter arguments [Array(String)] The command line arguments.
23
+ def self.call(...)
24
+ super
25
+ rescue Interrupt
26
+ # Ignore.
27
+ rescue => error
28
+ Console.error(self, error)
29
+ exit! 1
30
+ end
31
+
20
32
  # One or more paths to the configuration files.
21
33
  # @name paths
22
34
  # @attribute [Array(String)]
@@ -7,6 +7,7 @@
7
7
  require_relative "../server"
8
8
  require_relative "../endpoint"
9
9
  require_relative "../service/server"
10
+ require_relative "../environment/server"
10
11
  require_relative "../environment/rackup"
11
12
 
12
13
  require "async/service/configuration"
@@ -6,6 +6,8 @@
6
6
 
7
7
  require_relative "command/top"
8
8
 
9
+ require "console"
10
+
9
11
  module Falcon
10
12
  # @namespace
11
13
  module Command
@@ -13,6 +15,11 @@ module Falcon
13
15
  # @parameter arguments [Array(String)] The command line arguments.
14
16
  def self.call(*arguments)
15
17
  Top.call(*arguments)
18
+ rescue Interrupt
19
+ # Ignore.
20
+ rescue => error
21
+ Console.error(self, error)
22
+ exit! 1
16
23
  end
17
24
  end
18
25
  end
@@ -9,7 +9,6 @@ require "protocol/http/headers"
9
9
  require "protocol/http/middleware"
10
10
 
11
11
  require "console/event/failure"
12
- require "traces/provider"
13
12
 
14
13
  module Falcon
15
14
  # @namespace
@@ -155,20 +154,6 @@ module Falcon
155
154
  return Protocol::HTTP::Response[502, {"content-type" => "text/plain"}, [error.class.name]]
156
155
  end
157
156
 
158
- Traces::Provider(self) do
159
- def call(request)
160
- attributes = {
161
- "authority" => request.authority,
162
- "method" => request.method,
163
- "path" => request.path,
164
- "version" => request.version,
165
- }
166
-
167
- Traces.trace("falcon.middleware.proxy.call", attributes: attributes) do
168
- super
169
- end
170
- end
171
- end
172
157
  end
173
158
  end
174
159
  end
@@ -62,13 +62,6 @@ module Falcon
62
62
  end
63
63
  end
64
64
 
65
- Traces::Provider(self) do
66
- def call(request)
67
- Traces.trace("falcon.middleware.redirect.call", attributes: {authority: request.authority}) do
68
- super
69
- end
70
- end
71
- end
72
65
  end
73
66
  end
74
67
  end
@@ -4,6 +4,7 @@
4
4
  # Copyright, 2020-2024, by Samuel Williams.
5
5
 
6
6
  require "async/service/generic"
7
+ require "console"
7
8
 
8
9
  module Falcon
9
10
  module Service
@@ -5,5 +5,5 @@
5
5
 
6
6
  # @namespace
7
7
  module Falcon
8
- VERSION = "0.55.5"
8
+ VERSION = "0.55.6"
9
9
  end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2026, by Samuel Williams.
5
+
6
+ require_relative "../../../../falcon/middleware/proxy"
7
+
8
+ require "traces/provider"
9
+
10
+ Traces::Provider(Falcon::Middleware::Proxy) do
11
+ def call(request)
12
+ attributes = {
13
+ "authority" => request.authority,
14
+ "method" => request.method,
15
+ "path" => request.path,
16
+ "version" => request.version,
17
+ }
18
+
19
+ Traces.trace("falcon.middleware.proxy.call", attributes: attributes) do
20
+ super
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2026, by Samuel Williams.
5
+
6
+ require_relative "../../../../falcon/middleware/redirect"
7
+
8
+ require "traces/provider"
9
+
10
+ Traces::Provider(Falcon::Middleware::Redirect) do
11
+ def call(request)
12
+ Traces.trace("falcon.middleware.redirect.call", attributes: {authority: request.authority}) do
13
+ super
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2026, by Samuel Williams.
5
+
6
+ require_relative "middleware/proxy"
7
+ require_relative "middleware/redirect"
data/readme.md CHANGED
@@ -47,6 +47,11 @@ Please see the [project documentation](https://socketry.github.io/falcon/) for m
47
47
 
48
48
  Please see the [project releases](https://socketry.github.io/falcon/releases/index) for all releases.
49
49
 
50
+ ### v0.55.6
51
+
52
+ - Move Falcon middleware trace providers to `traces/provider/falcon/middleware`.
53
+ - Add `traces` to the test dependencies for Falcon middleware trace provider tests.
54
+
50
55
  ### v0.55.5
51
56
 
52
57
  - Strip `proxy-authorization` header in `Falcon::Middleware::Proxy`.
@@ -86,14 +91,6 @@ Please see the [project releases](https://socketry.github.io/falcon/releases/ind
86
91
 
87
92
  - Relax dependency on `async-container-supervisor` to allow `~> 0.6`.
88
93
 
89
- ### v0.52.0
90
-
91
- - Modernized codebase and dropped support for Ruby v3.1.
92
- - Improved Rails integration documentation.
93
- - Added extra logging of `RUBY_DESCRIPTION`.
94
- - Minor documentation improvements.
95
- - Agent context is now available, via the [`agent-context` gem](https://github.com/ioquatix/agent-context).
96
-
97
94
  ## Contributing
98
95
 
99
96
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Releases
2
2
 
3
+ ## v0.55.6
4
+
5
+ - Move Falcon middleware trace providers to `traces/provider/falcon/middleware`.
6
+ - Add `traces` to the test dependencies for Falcon middleware trace provider tests.
7
+
3
8
  ## v0.55.5
4
9
 
5
10
  - Strip `proxy-authorization` header in `Falcon::Middleware::Proxy`.
data.tar.gz.sig CHANGED
Binary file
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.55.5
4
+ version: 0.55.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -290,6 +290,9 @@ files:
290
290
  - lib/falcon/version.rb
291
291
  - lib/rack/handler/falcon.rb
292
292
  - lib/rackup/handler/falcon.rb
293
+ - lib/traces/provider/falcon/middleware.rb
294
+ - lib/traces/provider/falcon/middleware/proxy.rb
295
+ - lib/traces/provider/falcon/middleware/redirect.rb
293
296
  - license.md
294
297
  - readme.md
295
298
  - releases.md
metadata.gz.sig CHANGED
Binary file