puma-acme 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +7 -3
- data/lib/puma/acme/middleware.rb +15 -6
- data/lib/puma/acme/version.rb +1 -1
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b4d5b3068b477bc92cdf7fe1c7f4a6c3c8639790195551f4164e3fc227234d8
|
4
|
+
data.tar.gz: 6720366b5a14eebcb08906a849488c42a6c8f28b0a0e9073abba1d81f6576657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5364f21424a664662d05d70c74435d66eceb0d0823b36601c88409fc513ff1767254ee3739d0d72fb4740bcc91af6b303912ffa27e43f0bb5d2e6c16732fe489
|
7
|
+
data.tar.gz: c9ef04b5033eeaa7200b9350960b269cb92c9ce1f87202b5e6ed3c1afe2986b8b521368fc01e9e53f79cc180c5f7520cd23bcfc93d71e46308d03181c7e19ff9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## 0.1.8 - 07/29/24
|
4
|
+
|
5
|
+
- remove sinatra to simplify and fix some unintended parsing bugs
|
6
|
+
- drop jruby from CI matrix
|
7
|
+
- add base64 dependency for future compatibility
|
8
|
+
|
3
9
|
## 0.1.7 - 07/17/24
|
4
10
|
|
5
11
|
- fix #closed? on nil error when shutting down puma
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
puma-acme (0.1.
|
4
|
+
puma-acme (0.1.8)
|
5
5
|
acme-client (~> 2.0.13)
|
6
|
+
base64 (~> 0.2)
|
6
7
|
pstore (~> 0.1)
|
7
8
|
puma (~> 6.0)
|
8
9
|
sinatra (>= 3.2)
|
@@ -40,12 +41,14 @@ GEM
|
|
40
41
|
puma (6.4.2)
|
41
42
|
nio4r (~> 2.0)
|
42
43
|
r509 (1.0.1)
|
43
|
-
rack (3.
|
44
|
+
rack (3.1.7)
|
44
45
|
rack-protection (4.0.0)
|
45
46
|
base64 (>= 0.1.0)
|
46
47
|
rack (>= 3.0.0, < 4)
|
47
48
|
rack-session (2.0.0)
|
48
49
|
rack (>= 3.0.0)
|
50
|
+
rack-test (2.1.0)
|
51
|
+
rack (>= 1.3)
|
49
52
|
rake (13.2.0)
|
50
53
|
rexml (3.2.6)
|
51
54
|
ruby2_keywords (0.0.5)
|
@@ -55,7 +58,7 @@ GEM
|
|
55
58
|
rack-protection (= 4.0.0)
|
56
59
|
rack-session (>= 2.0.0, < 3)
|
57
60
|
tilt (~> 2.0)
|
58
|
-
tilt (2.
|
61
|
+
tilt (2.4.0)
|
59
62
|
uri (0.13.0)
|
60
63
|
vcr (6.2.0)
|
61
64
|
webmock (3.23.0)
|
@@ -72,6 +75,7 @@ DEPENDENCIES
|
|
72
75
|
minitest-mock_expectations (~> 1.2)
|
73
76
|
puma-acme!
|
74
77
|
r509 (~> 1.0)
|
78
|
+
rack-test
|
75
79
|
rake (~> 13.0)
|
76
80
|
vcr (~> 6.1)
|
77
81
|
webmock (~> 3.19)
|
data/lib/puma/acme/middleware.rb
CHANGED
@@ -3,16 +3,18 @@
|
|
3
3
|
module Puma
|
4
4
|
module Acme
|
5
5
|
# ACME challenge response handler for HTTP-01 challenges.
|
6
|
-
class Middleware
|
6
|
+
class Middleware
|
7
7
|
def initialize(app, manager:)
|
8
8
|
@app = app
|
9
9
|
@manager = manager
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
+
def call(env)
|
13
|
+
dup._call(env)
|
12
14
|
end
|
13
15
|
|
14
|
-
|
15
|
-
if (token =
|
16
|
+
def _call(env)
|
17
|
+
if (token = token(env)).nil?
|
16
18
|
return @app.call(env)
|
17
19
|
end
|
18
20
|
|
@@ -20,8 +22,15 @@ module Puma
|
|
20
22
|
return @app.call(env)
|
21
23
|
end
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
+
[200, {'content-type' => 'text/plain;charset=utf-8'}, [answer.value]]
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def token(env)
|
31
|
+
path = ::Rack::Request.new(env).path_info
|
32
|
+
prefix = '/.well-known/acme-challenge/'
|
33
|
+
path[prefix.size..-1] if path.start_with?(prefix)
|
25
34
|
end
|
26
35
|
end
|
27
36
|
end
|
data/lib/puma/acme/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puma-acme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anchor Security, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acme-client
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.0.13
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: base64
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.2'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.2'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: pstore
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +136,20 @@ dependencies:
|
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '1.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rack-test
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
125
153
|
- !ruby/object:Gem::Dependency
|
126
154
|
name: rake
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|