falcon 0.55.4 → 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: 518acbb2388840608c7abc42e802372d5b8cf547d0928a0164afc5bdd3aa7590
4
- data.tar.gz: 9d37e38f1c95e19fa11a34c7ccebab765820401a48bea7e97b6a9ecf7e0c36d5
3
+ metadata.gz: 9efae16cb2a08be54e0b1099559fdb943d7ef5a85d709b57f4caa2590d08ff8f
4
+ data.tar.gz: 4f03dd493732da1714b55ec9af8df3d1ec7e20ce0bd51e9ef48f5cee1e8141ed
5
5
  SHA512:
6
- metadata.gz: 05ae47c057c66f6a89e84d2f46a2a4db66109716a1035af63bfd0e2db4272d51a1e6702bf7f915a32b1f9479c991ca7de622d7ed96ac1ddfa7c6e234a866299b
7
- data.tar.gz: 4ceeb8958477cff0ffc308ea911e7844bebb6343cf464a20e35e749098a104cf2f807f92d56fb891eeb4f2135cbec638b1518b7b7362ee926658250f19d09898
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
@@ -2,13 +2,13 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2018-2026, by Samuel Williams.
5
+ # Copyright, 2026, by Fletcher Dares.
5
6
 
6
7
  require "async/http/client"
7
8
  require "protocol/http/headers"
8
9
  require "protocol/http/middleware"
9
10
 
10
11
  require "console/event/failure"
11
- require "traces/provider"
12
12
 
13
13
  module Falcon
14
14
  # @namespace
@@ -43,6 +43,7 @@ module Falcon
43
43
  "keep-alive",
44
44
  "public",
45
45
  "proxy-authenticate",
46
+ "proxy-authorization",
46
47
  "transfer-encoding",
47
48
  "upgrade",
48
49
  ]
@@ -153,20 +154,6 @@ module Falcon
153
154
  return Protocol::HTTP::Response[502, {"content-type" => "text/plain"}, [error.class.name]]
154
155
  end
155
156
 
156
- Traces::Provider(self) do
157
- def call(request)
158
- attributes = {
159
- "authority" => request.authority,
160
- "method" => request.method,
161
- "path" => request.path,
162
- "version" => request.version,
163
- }
164
-
165
- Traces.trace("falcon.middleware.proxy.call", attributes: attributes) do
166
- super
167
- end
168
- end
169
- end
170
157
  end
171
158
  end
172
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.4"
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/license.md CHANGED
@@ -29,6 +29,7 @@ Copyright, 2025, by Pierre Montelle.
29
29
  Copyright, 2025, by Jared Smith.
30
30
  Copyright, 2025, by Yoji Shidara.
31
31
  Copyright, 2026, by Ayush Newatia.
32
+ Copyright, 2026, by Fletcher Dares.
32
33
 
33
34
  Permission is hereby granted, free of charge, to any person obtaining a copy
34
35
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -47,6 +47,15 @@ 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
+
55
+ ### v0.55.5
56
+
57
+ - Strip `proxy-authorization` header in `Falcon::Middleware::Proxy`.
58
+
50
59
  ### v0.55.4
51
60
 
52
61
  - Ensure `requests_active` is decremented if closing the response body raises.
@@ -82,19 +91,6 @@ Please see the [project releases](https://socketry.github.io/falcon/releases/ind
82
91
 
83
92
  - Relax dependency on `async-container-supervisor` to allow `~> 0.6`.
84
93
 
85
- ### v0.52.0
86
-
87
- - Modernized codebase and dropped support for Ruby v3.1.
88
- - Improved Rails integration documentation.
89
- - Added extra logging of `RUBY_DESCRIPTION`.
90
- - Minor documentation improvements.
91
- - Agent context is now available, via the [`agent-context` gem](https://github.com/ioquatix/agent-context).
92
-
93
- ### v0.51.0
94
-
95
- - Introduce <code class="language-ruby">Falcon::Environment::Server\#make\_server</code> which gives you full control over the server creation process.
96
- - [Introduce `Async::Container::Supervisor`.](https://socketry.github.io/falcon/releases/index#introduce-async::container::supervisor.)
97
-
98
94
  ## Contributing
99
95
 
100
96
  We welcome contributions to this project.
@@ -105,6 +101,22 @@ We welcome contributions to this project.
105
101
  4. Push to the branch (`git push origin my-new-feature`).
106
102
  5. Create new Pull Request.
107
103
 
104
+ ### Running Tests
105
+
106
+ To run the test suite:
107
+
108
+ ``` shell
109
+ bundle exec sus
110
+ ```
111
+
112
+ ### Making Releases
113
+
114
+ To make a new release:
115
+
116
+ ``` shell
117
+ bundle exec bake gem:release:patch # or minor or major
118
+ ```
119
+
108
120
  ### Developer Certificate of Origin
109
121
 
110
122
  In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
data/releases.md CHANGED
@@ -1,5 +1,14 @@
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
+
8
+ ## v0.55.5
9
+
10
+ - Strip `proxy-authorization` header in `Falcon::Middleware::Proxy`.
11
+
3
12
  ## v0.55.4
4
13
 
5
14
  - Ensure `requests_active` is decremented if closing the response body raises.
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.4
4
+ version: 0.55.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -18,6 +18,7 @@ authors:
18
18
  - Ayush Newatia
19
19
  - Colby Swandale
20
20
  - Daniel Evans
21
+ - Fletcher Dares
21
22
  - Ismael Celis
22
23
  - Jared Smith
23
24
  - Kent Gruber
@@ -289,6 +290,9 @@ files:
289
290
  - lib/falcon/version.rb
290
291
  - lib/rack/handler/falcon.rb
291
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
292
296
  - license.md
293
297
  - readme.md
294
298
  - releases.md
metadata.gz.sig CHANGED
Binary file