rackula 1.4.0 → 1.4.1

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: 2701b7bad49c8ae0fa8cdfea3aecc269476470f4540fe556dae76207954fae62
4
- data.tar.gz: e86b948cb85d787463a6632df3f17c15ee24d09e8e26001d02de5709ba4b5281
3
+ metadata.gz: ccc36740b9e7e49a82036a7b3b15ec0eb8a1c856602f24131546e8dadbb18226
4
+ data.tar.gz: 12765e13ba4e2812a6b43cc8d6ed7493100c640302fd6197541c4f91f9e0c8a9
5
5
  SHA512:
6
- metadata.gz: 9eedee0d79b1bbbcf7705605ece547edc4735abb43a59adca73749a37c7221caafee3ace1b858306b324ff7b5d43f2ca3f510555f6d87516fce99c3e69557149
7
- data.tar.gz: e0b5b8b07c0a75247f14777c15df7bc936e1849e2c55d62ade62d112f099416c70072805719f385c3050769aa3b3f78a1eccb11e19e464577005e5db585c9bfa
6
+ metadata.gz: 2f4dc00059ef1933403658f8d2a66a63c0a732e1319ebad770f0b8ac87daff83bb2580e301ab52da15f0ace54f0e252a4175e3af2276d5a5e8cad4035117cc3b
7
+ data.tar.gz: df6f4a56a88d5ec8a0c88d6bb24a0eafdf68409122f85bb6eff073f46b4140fa27ab522ff84d2cda51d694a05ac626948a3cca2648ab9ad9e81e2c503970e4c5
checksums.yaml.gz.sig CHANGED
Binary file
@@ -63,7 +63,7 @@ module Rackula
63
63
  config_path = root + @options[:config]
64
64
 
65
65
  container.run do |instance|
66
- Async do
66
+ Sync do
67
67
  rack_app, _ = Rack::Builder.parse_file(config_path.to_s)
68
68
  app = ::Falcon::Server.middleware(rack_app, verbose: @options[:verbose])
69
69
  server = ::Falcon::Server.new(app, endpoint)
@@ -79,8 +79,12 @@ module Rackula
79
79
  return container
80
80
  end
81
81
 
82
- def run(address, root)
83
- endpoint = Async::HTTP::Endpoint.parse("http://localhost", port: address.ip_port, reuse_port: true)
82
+ def run(bound_endpoint, root)
83
+ # We need to determine the actual port we are bound to:
84
+ local_addresses = bound_endpoint.sockets.map(&:local_address)
85
+ address = local_addresses.first
86
+
87
+ endpoint = Async::HTTP::Endpoint.parse("http://localhost", bound_endpoint)
84
88
 
85
89
  Console.logger.info(self) {"Setting up container to serve site on port #{address.ip_port}..."}
86
90
  container = serve(endpoint, root)
@@ -96,10 +100,13 @@ module Rackula
96
100
 
97
101
  endpoint = ::IO::Endpoint.tcp("localhost", 0, reuse_port: true)
98
102
 
99
- # We bind to a socket to generate a temporary port:
100
- socket = Sync{endpoint.bind.first}
101
-
102
- run(socket.local_address, Pathname.new(parent.root))
103
+ begin
104
+ bound_endpoint = endpoint.bound
105
+
106
+ run(bound_endpoint, Pathname.new(parent.root))
107
+ ensure
108
+ bound_endpoint&.close
109
+ end
103
110
  end
104
111
  end
105
112
  end
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2017-2024, by Samuel Williams.
5
5
 
6
6
  module Rackula
7
- VERSION = "1.4.0"
7
+ VERSION = "1.4.1"
8
8
  end
data/readme.md CHANGED
@@ -8,7 +8,7 @@ Rackula will immortalize your rackup web app by generating a static copy. It can
8
8
 
9
9
  Please see the [project documentation](https://socketry.github.io/rackula/) for more details.
10
10
 
11
- - [Getting Started](https://socketry.github.io/rackula/guides/getting-started/index) - This guide will show you how to use the `rakula` gem to create a simple static website.
11
+ - [Getting Started](https://socketry.github.io/rackula/guides/getting-started/index) - This guide will show you how to use the `rackula` gem to create a simple static website.
12
12
 
13
13
  ## Contributing
14
14
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rackula
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -39,7 +39,7 @@ cert_chain:
39
39
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
40
40
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
41
41
  -----END CERTIFICATE-----
42
- date: 2024-04-24 00:00:00.000000000 Z
42
+ date: 2024-08-02 00:00:00.000000000 Z
43
43
  dependencies:
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: falcon
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.5.3
121
+ rubygems_version: 3.5.11
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Generate a static site from any rackup compatible application.
metadata.gz.sig CHANGED
Binary file