rackula 1.3.2 → 1.4.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/rackula/command/generate.rb +15 -8
- data/lib/rackula/version.rb +1 -1
- data/readme.md +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccc36740b9e7e49a82036a7b3b15ec0eb8a1c856602f24131546e8dadbb18226
|
4
|
+
data.tar.gz: 12765e13ba4e2812a6b43cc8d6ed7493100c640302fd6197541c4f91f9e0c8a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f4dc00059ef1933403658f8d2a66a63c0a732e1319ebad770f0b8ac87daff83bb2580e301ab52da15f0ace54f0e252a4175e3af2276d5a5e8cad4035117cc3b
|
7
|
+
data.tar.gz: df6f4a56a88d5ec8a0c88d6bb24a0eafdf68409122f85bb6eff073f46b4140fa27ab522ff84d2cda51d694a05ac626948a3cca2648ab9ad9e81e2c503970e4c5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -12,7 +12,7 @@ require 'rack'
|
|
12
12
|
|
13
13
|
require 'falcon/server'
|
14
14
|
|
15
|
-
require 'io/endpoint'
|
15
|
+
require 'io/endpoint/host_endpoint'
|
16
16
|
require 'async/container'
|
17
17
|
require 'async/http'
|
18
18
|
|
@@ -63,7 +63,7 @@ module Rackula
|
|
63
63
|
config_path = root + @options[:config]
|
64
64
|
|
65
65
|
container.run do |instance|
|
66
|
-
|
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(
|
83
|
-
|
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
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
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
|
data/lib/rackula/version.rb
CHANGED
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 `
|
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
|
+
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-
|
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.
|
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
|