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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 115dac06d080c93def98277b1b04e446db7cd66ee17b0cf40b2fba938232d9b7
4
- data.tar.gz: d774f8b6bb8cc99af3efaa00848fadd9ea9614d42448aa84cba992fae2941fb6
3
+ metadata.gz: b3d126738e9200783bf929ef8f8e6dd406a9aec36e6e2cfab24e4791a7807e79
4
+ data.tar.gz: 89d4ba2e18df6deb075c0c6648f8eb08b6daae092b6d9809a4a34ecab0b1f7a4
5
5
  SHA512:
6
- metadata.gz: ce6bb72b308c1ca1087096de06de131e98b95c31ea0129f9890ee5687715262b3e60ce41cd5151f92ad32ebf48f1043b6156bd16da5e8156dbcccaa80ab52b5c
7
- data.tar.gz: 65d76565e6fa300c866f7de531d6017af79cccb1c81210128fa7f0bbc6b79724ffbcf4f2dd100b76484fa7cbf05196e891ff3bdb5b6908efc1bc9e9ba81ad79d
6
+ metadata.gz: 6817464fa2b8b43627c511c5b81182d2da6ded01e0ec0a207dc0f4008b7e677d914a3a7e0b7c10cf29d4dd93114d160f07f38e8fdc50109bd31d3b0c251f874a
7
+ data.tar.gz: d197fc06dd5b544b44ef575c73140e364ebbe1a50852df103f8e828c220bc2beb6bc97233dee0ab5d7a2c619700d1003ef919f6b6c022a514bb5aae7b3fd7e60
data/README.md CHANGED
@@ -314,6 +314,3 @@ Aws.config.update(
314
314
  )
315
315
  )
316
316
  ```
317
-
318
- TODO
319
- - Get CI running
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 = 'ApartmentAcmeClien'
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')
@@ -6,6 +6,7 @@ module ApartmentAcmeClient
6
6
  module AcmeClient
7
7
  class RealClient
8
8
  attr_reader :csr_private_key
9
+
9
10
  def initialize(acme_client_private_key:, csr_private_key:)
10
11
  @client = Acme::Client.new(
11
12
  private_key: acme_client_private_key,
@@ -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
- object = s3.bucket(ApartmentAcmeClient.aws_bucket).object(filename)
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
- # Note: The `region` doesn't matter, because Route53 is global.
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
@@ -1,3 +1,3 @@
1
1
  module ApartmentAcmeClient
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  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.6
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: 2020-01-25 00:00:00.000000000 Z
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: '6'
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: '6'
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
- rubyforge_project:
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)