apartment_acme_client 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -3
- data/Rakefile +1 -1
- data/lib/apartment_acme_client/acme_client/real_client.rb +1 -0
- data/lib/apartment_acme_client/certificate_storage/s3.rb +1 -2
- data/lib/apartment_acme_client/dns_api/route53.rb +2 -3
- data/lib/apartment_acme_client/encryption.rb +3 -3
- data/lib/apartment_acme_client/version.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3d126738e9200783bf929ef8f8e6dd406a9aec36e6e2cfab24e4791a7807e79
|
4
|
+
data.tar.gz: 89d4ba2e18df6deb075c0c6648f8eb08b6daae092b6d9809a4a34ecab0b1f7a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6817464fa2b8b43627c511c5b81182d2da6ded01e0ec0a207dc0f4008b7e677d914a3a7e0b7c10cf29d4dd93114d160f07f38e8fdc50109bd31d3b0c251f874a
|
7
|
+
data.tar.gz: d197fc06dd5b544b44ef575c73140e364ebbe1a50852df103f8e828c220bc2beb6bc97233dee0ab5d7a2c619700d1003ef919f6b6c022a514bb5aae7b3fd7e60
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ require 'rdoc/task'
|
|
8
8
|
|
9
9
|
RDoc::Task.new(:rdoc) do |rdoc|
|
10
10
|
rdoc.rdoc_dir = 'rdoc'
|
11
|
-
rdoc.title = '
|
11
|
+
rdoc.title = 'ApartmentAcmeClient'
|
12
12
|
rdoc.options << '--line-numbers'
|
13
13
|
rdoc.rdoc_files.include('README.md')
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
@@ -81,8 +81,7 @@ module ApartmentAcmeClient
|
|
81
81
|
|
82
82
|
def s3_file(filename)
|
83
83
|
s3 = Aws::S3::Resource.new(region: ApartmentAcmeClient.aws_region)
|
84
|
-
|
85
|
-
object
|
84
|
+
s3.bucket(ApartmentAcmeClient.aws_bucket).object(filename)
|
86
85
|
end
|
87
86
|
end
|
88
87
|
end
|
@@ -26,8 +26,7 @@ module ApartmentAcmeClient
|
|
26
26
|
@values = values
|
27
27
|
end
|
28
28
|
|
29
|
-
# NOTE:
|
30
|
-
# if you get error like:
|
29
|
+
# NOTE: If you get error like:
|
31
30
|
#
|
32
31
|
# "Invalid Resource Record: FATAL problem:
|
33
32
|
# InvalidCharacterString
|
@@ -71,7 +70,7 @@ module ApartmentAcmeClient
|
|
71
70
|
end
|
72
71
|
|
73
72
|
def route53
|
74
|
-
#
|
73
|
+
# NOTE: The `region` doesn't matter, because Route53 is global.
|
75
74
|
@route53 ||= Aws::Route53::Client.new(region: 'us-east-1')
|
76
75
|
end
|
77
76
|
|
@@ -48,7 +48,7 @@ module ApartmentAcmeClient
|
|
48
48
|
# params:
|
49
49
|
# - authorizations - a list of authorizations, which may be http or dns based (ignore the non-wildcard ones)
|
50
50
|
# - wildcard_domain - the url of the wildcard's base domain (e.g. "site.example.com")
|
51
|
-
def authorize_domains_with_dns(authorizations, wildcard_domain:) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
51
|
+
def authorize_domains_with_dns(authorizations, wildcard_domain:) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
|
52
52
|
label = nil
|
53
53
|
record_type = nil
|
54
54
|
values = []
|
@@ -111,7 +111,7 @@ module ApartmentAcmeClient
|
|
111
111
|
# returns true on success, false otherwise.
|
112
112
|
#
|
113
113
|
# from https://github.com/unixcharles/acme-client/tree/master#authorize-for-domain
|
114
|
-
def authorize_domain_with_http(domain_authorization)
|
114
|
+
def authorize_domain_with_http(domain_authorization) # rubocop:disable Metrics/MethodLength
|
115
115
|
challenge = domain_authorization.http
|
116
116
|
|
117
117
|
puts "authorizing Domain: #{domain_authorization.domain}"
|
@@ -190,7 +190,7 @@ module ApartmentAcmeClient
|
|
190
190
|
# Do the DNS (wildcard) authorizations
|
191
191
|
if authorize_domains_with_dns(order.authorizations, wildcard_domain: wildcard_domain)
|
192
192
|
client.request_certificate(common_name: common_name, names: domain_names_requested, order: order)
|
193
|
-
else
|
193
|
+
else # rubocop:disable Style/EmptyElse
|
194
194
|
# error, not authorized
|
195
195
|
nil
|
196
196
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apartment_acme_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Dunlop
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 4.1.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 4.1.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: acme-client
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -231,8 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
231
|
- !ruby/object:Gem::Version
|
232
232
|
version: '0'
|
233
233
|
requirements: []
|
234
|
-
|
235
|
-
rubygems_version: 2.7.6
|
234
|
+
rubygems_version: 3.0.3.1
|
236
235
|
signing_key:
|
237
236
|
specification_version: 4
|
238
237
|
summary: Let's Encrypt interface for Multi-tenancy applications (like Apartment)
|