File tree 13 files changed +40
-113
lines changed
test/falcon/.configuration
13 files changed +40
-113
lines changed Original file line number Diff line number Diff line change 4
4
# Released under the MIT License.
5
5
# Copyright, 2019-2025, by Samuel Williams.
6
6
7
- load :rack , :self_signed_tls , :supervisor
7
+ require "falcon/environment/rack"
8
+ require "falcon/environment/self_signed_tls"
9
+ require "falcon/environment/supervisor"
8
10
9
- rack "beer.localhost" , :self_signed_tls
11
+ service "beer.localhost" do
12
+ include Falcon ::Environment ::Rack
13
+ include Falcon ::Environment ::SelfSignedTLS
14
+ end
10
15
11
- supervisor
16
+ service "supervisor" do
17
+ include Falcon ::Environment ::Supervisor
18
+ end
Original file line number Diff line number Diff line change 4
4
# Released under the MIT License.
5
5
# Copyright, 2019-2025, by Samuel Williams.
6
6
7
- load :rack , :self_signed_tls , :supervisor
7
+ require "falcon/environment/rack"
8
+ require "falcon/environment/self_signed_tls"
9
+ require "falcon/environment/supervisor"
8
10
9
- rack "benchmark.local" , :self_signed_tls
11
+ service "benchmark.localhost" do
12
+ include Falcon ::Environment ::Rack
13
+ include Falcon ::Environment ::SelfSignedTLS
14
+ end
15
+
16
+ service "supervisor" do
17
+ include Falcon ::Environment ::Supervisor
18
+ end
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ Here is a basic example which hosts a rack application using :
22
22
# !/usr/bin/env falcon-host
23
23
# frozen_string_literal: true
24
24
25
- load :rack , :supervisor
25
+ require " falcon/environment/rack"
26
+ require " falcon/environment/lets_encrypt_tls"
27
+ require " falcon/environment/supervisor"
26
28
27
29
hostname = File .basename(__dir__ )
28
30
service hostname do
@@ -48,7 +50,8 @@ The environment configuration is defined in the `Falcon::Environment` module. Th
48
50
# !/usr/bin/env falcon-host
49
51
# frozen_string_literal: true
50
52
51
- load :rack , :supervisor
53
+ require " falcon/environment/rack"
54
+ require " falcon/environment/supervisor"
52
55
53
56
hostname = File .basename(__dir__ )
54
57
service hostname do
@@ -82,7 +85,7 @@ web: bundle exec falcon host
82
85
83
86
# !/usr/bin/env -S falcon host
84
87
85
- load : rack
88
+ require " falcon/environment/ rack"
86
89
87
90
hostname = File .basename(__dir__ )
88
91
port = ENV [" PORT" ] || 3000
Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ The `falcon serve` command is only intended to be used for local development. Fo
27
27
# !/usr/bin/env -S falcon host
28
28
# frozen_string_literal: true
29
29
30
- load : rack
30
+ require " falcon/environment/ rack"
31
31
32
32
hostname = File .basename(__dir__ )
33
33
port = ENV [" PORT" ] || 3000
34
34
35
- rack hostname do
36
- append preload " preload.rb "
37
- endpoint Async ::HTTP ::Endpoint .parse(" http://0.0.0.0:#{ port } " )
35
+ service hostname do
36
+ include Falcon :: Environment :: Rack
37
+ endpoint Async ::HTTP ::Endpoint .parse(" http://0.0.0.0:#{ port } " )
38
38
end
39
39
```
40
40
Original file line number Diff line number Diff line change 9
9
module Falcon
10
10
# Manages environments which describes how to host a specific application.
11
11
#
12
- # Environments are key-value maps with lazy value resolution. An environment can inherit from a parent environment, which can provide defaults
13
- #
14
- # A typical configuration file might look something like:
15
- #
16
- # ~~~ ruby
17
- # #!/usr/bin/env falcon-host
18
- # # frozen_string_literal: true
19
- #
20
- # load :rack, :self_signed_tls, :supervisor
21
- #
22
- # supervisor
23
- #
24
- # rack 'hello.localhost', :self_signed_tls do
25
- # end
26
- # ~~~
12
+ # Environments are key-value maps with lazy value resolution. An environment can inherit from a parent environment, which can provide defaults or shared configuration.
27
13
#
28
14
class Configuration < ::Async ::Service ::Configuration
29
15
# Load the specified configuration file. See {Loader#load_file} for more details.
Original file line number Diff line number Diff line change 3
3
# Released under the MIT License.
4
4
# Copyright, 2019-2023, by Samuel Williams.
5
5
6
- load : proxy
6
+ require "falcon/environment/ proxy"
7
7
8
- proxy 'localhost' do
9
- url 'https://www.google.com'
8
+ service "localhost" do
9
+ include Falcon ::Environment ::Proxy
10
+ url "https://www.google.com"
10
11
end
Original file line number Diff line number Diff line change 4
4
# Copyright, 2020, by Daniel Evans.
5
5
# Copyright, 2023, by Samuel Williams.
6
6
7
- load : rack
7
+ require "falcon/environment/ rack"
8
8
9
- rack 'localhost' do
10
- count 3
9
+ service "localhost" do
10
+ include Falcon ::Environment ::Rack
11
+ count 3
11
12
end
You can’t perform that action at this time.
0 commit comments