ruby_aem 4.2.0 → 4.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecce097e3cae4a4d5077d30e7f92596bf253e82dfa423b13dd2c6894cdf757ab
4
- data.tar.gz: 5b7694a28a97e0e1cb233ae8f57c81be72c32fe4a3651d1ead294c8f2d9a2e7c
3
+ metadata.gz: ce24785eb3ebcc84dbbf3a819e122c80d3433191658187a43218fc523bc90693
4
+ data.tar.gz: 37f2cfc03c49956b34e4ab3840636c5ce9b8de3d1599bffc31da3cd16110b008
5
5
  SHA512:
6
- metadata.gz: 7c33633aa9abcbefe8787fa14350c365895556fa8875f5c3465da2d19a800171a22fbe017b04a467da5339742d52ce958ef03c39c878b5eaaa39bc78b19e4d15
7
- data.tar.gz: d01309ca35d02122fb0f88aca354cd3acbb5cce233f896f6cbf9c89853e1c913c07aff075f5426ff5e93620a2d08a795736fa6f7dd70c61b57d735e680e74944
6
+ metadata.gz: d0f88ce0eb78cee32e952bad276ad6dcd4ca842313e0de6cbf9a515e6b58239b39789c972d83030aeab455c46770703f4f70f94e46b9150752e1140b0eb60416
7
+ data.tar.gz: 1b7f8153ab9e59375fbac259a9829adb48fb659f78e6ba66d037ac2acf860bd87d4094eef9172f9cce30186175219ce4313e199f9353c5f0458f3e3509dfc6c2
data/conf/gem.yaml CHANGED
@@ -1,2 +1,2 @@
1
1
  ---
2
- version: 4.2.0
2
+ version: 4.2.1
@@ -131,7 +131,15 @@ module RubyAem
131
131
  begin
132
132
  result = enable(**opts)
133
133
  rescue RubyAem::Error => e
134
- raise StandardError.new(result) unless e.result.response.status_code.zero?
134
+ response = e.result.response
135
+ status_code = response.status_code
136
+ # AEM's sslSetup checks the new HTTPS connector only 250ms after configuring it, and responds with
137
+ # 500 "Connection refused" when the connector is still starting, although SSL has been configured.
138
+ # The connector starts slower since AEM 6.5 SP26, so treat it like response code 0 and verify below.
139
+ connector_starting = status_code == 500 && response.body.to_s.include?('Connection refused')
140
+ # Re-raise the original error, which carries AEM's status code, headers and body.
141
+ # result is still nil here, so wrapping it lost the details and raised a bare StandardError.
142
+ raise e unless status_code.zero? || connector_starting
135
143
 
136
144
  with_retries(max_tries: opts[:_retries][:max_tries], base_sleep_seconds: opts[:_retries][:base_sleep_seconds], max_sleep_seconds: opts[:_retries][:max_sleep_seconds]) { |retries_count|
137
145
  result = is_enabled
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_aem
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shine Solutions