falcon 0.47.7 → 0.47.9

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: 73fd9cdd0487e158c35151aae57790af29fc451f32b89c0e3409ff9cba3f38c0
4
- data.tar.gz: 603c9ce305ffbda9868d4484102fbbc26476390784284b80314a07b298644cc6
3
+ metadata.gz: 62d903fdc0bb50c3d76ee6091a0b142f18e112f93faf5de63f3f5879e4a19187
4
+ data.tar.gz: 95f81fd5c9dd1525b0d87fdb18d63d46dcfd230fdbc4f2e2aa8ae4cdce298753
5
5
  SHA512:
6
- metadata.gz: 8386c8cf98fb7f77dedf328efcb596134a6cabb51e28db0b11e162b81281ff58c2a62e26a2beeca29fdd35f833042df5289e946da23c942a352d81bcd29d2381
7
- data.tar.gz: bc828474bc5049ecdb557d670af7d1165bc9c2a9d5eb5ca14c05de603050df43bdae3538afa188a674808eccdf527013306d193e20a66e5ea879688d687e8385
6
+ metadata.gz: a94919d62d6a84416b52d7678bba3bd68e795377e07149b5f2a612cbd1afae98e1e4cfe1a8ad8fb786204d51518042ebb6c58e3130a5df524275bc95da90d9fe
7
+ data.tar.gz: 45d482bb25b531d9869d8641c36974943747c56c885d115a73234dcbccbd23ce1b42c62a35ecb648d7a6f325b69ebc9cb723d38c0053a6395de087e38d4e4fc3
checksums.yaml.gz.sig CHANGED
Binary file
data/bin/falcon CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
data/bin/falcon-host CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2020-2023, by Samuel Williams.
4
+ # Copyright, 2020-2024, by Samuel Williams.
5
5
 
6
6
  require_relative '../configuration'
7
7
 
@@ -6,6 +6,8 @@
6
6
  require_relative '../service/supervisor'
7
7
  require_relative '../environment'
8
8
 
9
+ require 'io/endpoint/unix_endpoint'
10
+
9
11
  module Falcon
10
12
  module Environment
11
13
  # Provides an environment for hosting a supervisor which can monitor multiple applications.
@@ -1,12 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2018-2023, by Samuel Williams.
4
+ # Copyright, 2018-2024, by Samuel Williams.
5
5
 
6
6
  require 'async/http/client'
7
7
  require 'protocol/http/headers'
8
8
  require 'protocol/http/middleware'
9
9
 
10
+ require 'console/event/failure'
11
+
10
12
  module Falcon
11
13
  module Middleware
12
14
  # A static middleware which always returns a 400 bad request response.
@@ -95,7 +97,7 @@ module Falcon
95
97
  def prepare_request(request, host)
96
98
  forwarded = []
97
99
 
98
- Console.logger.debug(self) do |buffer|
100
+ Console.debug(self) do |buffer|
99
101
  buffer.puts "Request authority: #{request.authority}"
100
102
  buffer.puts "Host authority: #{host.authority}"
101
103
  buffer.puts "Request: #{request.method} #{request.path} #{request.version}"
@@ -136,12 +138,13 @@ module Falcon
136
138
 
137
139
  client = connect(host.endpoint)
138
140
 
141
+ Console.debug(self, "Sending request...", host: host, request: request, count: @count)
139
142
  client.call(request)
140
143
  else
141
144
  super
142
145
  end
143
146
  rescue => error
144
- Console.error(self, error)
147
+ Console::Event::Failure.for(error).emit(self)
145
148
  return Protocol::HTTP::Response[502, {'content-type' => 'text/plain'}, [error.class.name]]
146
149
  end
147
150
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
6
  require 'io/endpoint/unix_endpoint'
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2023, by Samuel Williams.
4
+ # Copyright, 2024, by Samuel Williams.
5
5
 
6
6
  require 'rackup/handler'
7
7
 
@@ -8,6 +8,9 @@ require 'json'
8
8
 
9
9
  require 'async/service/generic'
10
10
 
11
+ require 'io/endpoint/bound_endpoint'
12
+ require 'io/stream'
13
+
11
14
  module Falcon
12
15
  module Service
13
16
  # Implements a host supervisor which can restart the host services and provide various metrics about the running processes.
@@ -69,7 +72,7 @@ module Falcon
69
72
  container.run(name: self.name, restart: true, count: 1) do |instance|
70
73
  Async do
71
74
  @bound_endpoint.accept do |peer|
72
- stream = ::IO::Stream.new(peer)
75
+ stream = ::IO::Stream(peer)
73
76
 
74
77
  while message = stream.gets("\0")
75
78
  response = handle(JSON.parse(message, symbolize_names: true))
@@ -91,6 +94,18 @@ module Falcon
91
94
 
92
95
  super
93
96
  end
97
+
98
+ def invoke(command)
99
+ @bound_endpoint.local_address_endpoint.connect do |peer|
100
+ stream = ::IO::Stream(peer)
101
+
102
+ stream.puts(command.to_json, separator: "\0")
103
+
104
+ response = JSON.parse(stream.gets("\0"), symbolize_names: true)
105
+
106
+ return response
107
+ end
108
+ end
94
109
  end
95
110
  end
96
111
  end
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2017-2024, by Samuel Williams.
5
5
 
6
6
  module Falcon
7
- VERSION = "0.47.7"
7
+ VERSION = "0.47.9"
8
8
  end
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2023, by Samuel Williams.
4
+ # Copyright, 2017-2024, by Samuel Williams.
5
+ # Copyright, 2019, by Bryan Powell.
5
6
 
6
7
  require 'rack/handler'
7
8
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2023, by Samuel Williams.
4
+ # Copyright, 2023-2024, by Samuel Williams.
5
5
 
6
6
  require 'rackup/handler'
7
7
 
data/license.md CHANGED
@@ -21,6 +21,8 @@ Copyright, 2024, by Peter Schrammel.
21
21
  Copyright, 2024, by Santiago Bartesaghi.
22
22
  Copyright, 2024, by Trevor Turk.
23
23
  Copyright, 2024, by dependabot[bot].
24
+ Copyright, 2024, by Adam Daniels.
25
+ Copyright, 2024, by Stefan Buhrmester.
24
26
 
25
27
  Permission is hereby granted, free of charge, to any person obtaining a copy
26
28
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- # ![Falcon](logo.svg)
1
+ # ![Falcon](assets/logo.webp)
2
2
 
3
3
  Falcon is a multi-process, multi-fiber rack-compatible HTTP server built on top of [async](https://github.com/socketry/async), [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.
4
4
 
@@ -41,6 +41,14 @@ Please see the [project documentation](https://socketry.github.io/falcon/) for m
41
41
 
42
42
  - [How It Works](https://socketry.github.io/falcon/guides/how-it-works/index) - This guide gives an overview of how Falcon handles an incoming web request.
43
43
 
44
+ ## Releases
45
+
46
+ Please see the [project releases](https://socketry.github.io/falcon/releases/index) for all releases.
47
+
48
+ ### v0.47.8
49
+
50
+ - Fix Falcon Supervisor implementation: due to invalid code, it was unable to start.
51
+
44
52
  ## Contributing
45
53
 
46
54
  We welcome contributions to this project.
@@ -53,8 +61,8 @@ We welcome contributions to this project.
53
61
 
54
62
  ### Developer Certificate of Origin
55
63
 
56
- This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
64
+ 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.
57
65
 
58
- ### Contributor Covenant
66
+ ### Community Guidelines
59
67
 
60
- This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
68
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
data/releases.md ADDED
@@ -0,0 +1,5 @@
1
+ # Releases
2
+
3
+ ## v0.47.8
4
+
5
+ - Fix Falcon Supervisor implementation: due to invalid code, it was unable to start.
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.47.7
4
+ version: 0.47.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -11,7 +11,9 @@ authors:
11
11
  - Claudiu Garba
12
12
  - Kyle Tam
13
13
  - Mitsutaka Mimura
14
+ - Peter Schrammel
14
15
  - Sho Ito
16
+ - Adam Daniels
15
17
  - Colby Swandale
16
18
  - Daniel Evans
17
19
  - Kent Gruber
@@ -19,9 +21,9 @@ authors:
19
21
  - Mikel Kew
20
22
  - Nick Janetakis
21
23
  - Olle Jonsson
22
- - Peter Schrammel
23
24
  - Santiago Bartesaghi
24
25
  - Sh Lin
26
+ - Stefan Buhrmester
25
27
  - Tad Thorley
26
28
  - Tasos Latsas
27
29
  - dependabot[bot]
@@ -57,7 +59,7 @@ cert_chain:
57
59
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
58
60
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
59
61
  -----END CERTIFICATE-----
60
- date: 2024-06-20 00:00:00.000000000 Z
62
+ date: 2024-08-26 00:00:00.000000000 Z
61
63
  dependencies:
62
64
  - !ruby/object:Gem::Dependency
63
65
  name: async
@@ -272,6 +274,7 @@ files:
272
274
  - lib/rackup/handler/falcon.rb
273
275
  - license.md
274
276
  - readme.md
277
+ - releases.md
275
278
  homepage: https://github.com/socketry/falcon
276
279
  licenses:
277
280
  - MIT
metadata.gz.sig CHANGED
Binary file