ruby_aem 3.12.0 → 3.13.0

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
  SHA1:
3
- metadata.gz: 77cd630887d7b0e7cba6d66048d3311cc1fe7fcb
4
- data.tar.gz: 9e6563f890d65b4b3d513e91eb5a9e69f596d822
3
+ metadata.gz: 3a154746a1ed43ed3249c2f62899c9c276fda456
4
+ data.tar.gz: 9206f74538f50c740ab41f166ba368e79044f024
5
5
  SHA512:
6
- metadata.gz: 2846bdc56ea4d2decde0242a05359c5deb577ca57a5c95b1cec454fb7825d9c5c475a865c5898e86b5b3cd404a82e79bd7a880fd6026ec9702273eb5c939d091
7
- data.tar.gz: 3b9f8ed3040c878c0497c8c0699efc56c7eba0c3f139369075061d5932342799331c0f781164165cde2d31c6c6b3a6033cc5fa0a9fbd603d6b8c4c9337d07641
6
+ metadata.gz: 94d718969b924a1a49fef1108c56e7d6ee1fd77dc2b204eeeca4ff7c35a8bcea892457f9431cfc1c52495a523fadea10b01a1b74c23cd463f60d8497894ec615
7
+ data.tar.gz: f9d5d3fe3a3810c9bb30b4cd3cfbf789df860d0c8e7c069604a5783eba6bffb364afbc4c7779d7a879876de79947154f921646714e79841839ea73869e5c483b
data/conf/gem.yaml CHANGED
@@ -1 +1 @@
1
- version: 3.12.0
1
+ version: 3.13.0
@@ -15,6 +15,7 @@
15
15
  require 'retries'
16
16
  require 'ruby_aem/error'
17
17
  require 'rexml/document'
18
+ require 'ruby_aem/resources/bundle'
18
19
 
19
20
  module RubyAem
20
21
  # AEM resources
@@ -282,6 +283,35 @@ module RubyAem
282
283
  def get_product_info
283
284
  @client.call(self.class, __callee__.to_s, @call_params)
284
285
  end
286
+
287
+ # Check whether development bundles are active as per AEM Security Checklist
288
+ # https://experienceleague.adobe.com/docs/experience-manager-65/administering/security/security-checklist.html
289
+ # The checklist documentation also includes 'com.adobe.granite.crxde-support',
290
+ # however this bundle does not exist on AEM 6.5 so it has been excluded from this implementation.
291
+ # True result data indicates that the development bundles are active, false otherwise.
292
+ #
293
+ # @return RubyAem::Result
294
+ def get_development_bundles_status
295
+ crx_explorer_bundle = RubyAem::Resources::Bundle.new(@client, 'com.adobe.granite.crx-explorer')
296
+ crxde_lite_bundle = RubyAem::Resources::Bundle.new(@client, 'com.adobe.granite.crxde-lite')
297
+
298
+ result = RubyAem::Result.new(nil, nil)
299
+
300
+ crx_explorer_bundle_is_active = crx_explorer_bundle.is_active.data
301
+ crxde_lite_bundle_is_active = crxde_lite_bundle.is_active.data
302
+ if crx_explorer_bundle_is_active && crxde_lite_bundle_is_active
303
+ result.message = 'Development bundles are all active'
304
+ result.data = true
305
+ elsif !crx_explorer_bundle_is_active && !crxde_lite_bundle_is_active
306
+ result.message = 'Development bundles are all inactive'
307
+ result.data = false
308
+ else
309
+ result.message = "Development bundles are partially active. crx_explorer_bundle is active: #{crx_explorer_bundle_is_active}, crxde_lite_bundle is active: #{crxde_lite_bundle_is_active}"
310
+ result.data = false
311
+ end
312
+
313
+ result
314
+ end
285
315
  end
286
316
  end
287
317
  end
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: 3.12.0
4
+ version: 3.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shine Solutions