apartment_acme_client 0.0.6 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 115dac06d080c93def98277b1b04e446db7cd66ee17b0cf40b2fba938232d9b7
4
- data.tar.gz: d774f8b6bb8cc99af3efaa00848fadd9ea9614d42448aa84cba992fae2941fb6
3
+ metadata.gz: 6a9ae10328746012f23122c13526bf4b1a08949180b7edadd45029e2d5e023a2
4
+ data.tar.gz: 557fce773ce08bd1989c39618b0299b36fda23d0fdd0d0689d6ece91b698e4e3
5
5
  SHA512:
6
- metadata.gz: ce6bb72b308c1ca1087096de06de131e98b95c31ea0129f9890ee5687715262b3e60ce41cd5151f92ad32ebf48f1043b6156bd16da5e8156dbcccaa80ab52b5c
7
- data.tar.gz: 65d76565e6fa300c866f7de531d6017af79cccb1c81210128fa7f0bbc6b79724ffbcf4f2dd100b76484fa7cbf05196e891ff3bdb5b6908efc1bc9e9ba81ad79d
6
+ metadata.gz: 53a383b635df97292b1e406ca5a5e4f3d62abba51525b2554163c9e265e655ad6d52379af24264442dda9809b56f6840910f66629d4582711c60f88ace89b105
7
+ data.tar.gz: 037a289dab65609bbd1ccf2207f41fadfb66a567f6b81324efaa5967eead50dd7dc6b2f80b711f51d2f1ae7387d1b2e04016eed3de34d432cbd71ad61a467c67
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.8'
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.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Dunlop
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-25 00:00:00.000000000 Z
11
+ date: 2022-10-28 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: '8'
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: '8'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: acme-client
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -76,16 +76,16 @@ dependencies:
76
76
  name: bundler
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: '1.15'
81
+ version: 2.1.4
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '1.15'
88
+ version: 2.1.4
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: pry
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -104,16 +104,16 @@ dependencies:
104
104
  name: rake
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - "~>"
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '10.0'
109
+ version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - "~>"
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '10.0'
116
+ version: '0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: rspec
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -216,7 +216,7 @@ homepage: https://github.com/rdunlop/apartment_acme_client
216
216
  licenses:
217
217
  - MIT
218
218
  metadata: {}
219
- post_install_message:
219
+ post_install_message:
220
220
  rdoc_options: []
221
221
  require_paths:
222
222
  - lib
@@ -231,9 +231,8 @@ 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
236
- signing_key:
234
+ rubygems_version: 3.1.6
235
+ signing_key:
237
236
  specification_version: 4
238
237
  summary: Let's Encrypt interface for Multi-tenancy applications (like Apartment)
239
238
  test_files: []