ruby_aem 3.10.0 → 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/conf/gem.yaml +1 -1
- data/conf/spec.yaml +67 -57
- data/lib/ruby_aem/client.rb +1 -1
- data/lib/ruby_aem/error.rb +1 -1
- data/lib/ruby_aem/handlers/file.rb +1 -1
- data/lib/ruby_aem/handlers/html.rb +1 -1
- data/lib/ruby_aem/handlers/json.rb +1 -1
- data/lib/ruby_aem/handlers/simple.rb +1 -1
- data/lib/ruby_aem/handlers/xml.rb +1 -1
- data/lib/ruby_aem/resources/aem.rb +31 -1
- data/lib/ruby_aem/resources/aem_configmgr.rb +1 -1
- data/lib/ruby_aem/resources/authorizable_keystore.rb +1 -1
- data/lib/ruby_aem/resources/bundle.rb +27 -1
- data/lib/ruby_aem/resources/certificate.rb +1 -1
- data/lib/ruby_aem/resources/certificate_chain.rb +1 -1
- data/lib/ruby_aem/resources/config_property.rb +1 -1
- data/lib/ruby_aem/resources/flush_agent.rb +1 -1
- data/lib/ruby_aem/resources/group.rb +1 -1
- data/lib/ruby_aem/resources/node.rb +1 -1
- data/lib/ruby_aem/resources/outbox_replication_agent.rb +1 -1
- data/lib/ruby_aem/resources/package.rb +1 -1
- data/lib/ruby_aem/resources/path.rb +1 -1
- data/lib/ruby_aem/resources/replication_agent.rb +1 -1
- data/lib/ruby_aem/resources/repository.rb +1 -1
- data/lib/ruby_aem/resources/reverse_replication_agent.rb +1 -1
- data/lib/ruby_aem/resources/saml.rb +1 -1
- data/lib/ruby_aem/resources/ssl.rb +1 -1
- data/lib/ruby_aem/resources/truststore.rb +1 -1
- data/lib/ruby_aem/resources/user.rb +1 -1
- data/lib/ruby_aem/response.rb +1 -1
- data/lib/ruby_aem/result.rb +1 -1
- data/lib/ruby_aem/swagger.rb +1 -1
- data/lib/ruby_aem.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a154746a1ed43ed3249c2f62899c9c276fda456
|
4
|
+
data.tar.gz: 9206f74538f50c740ab41f166ba368e79044f024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94d718969b924a1a49fef1108c56e7d6ee1fd77dc2b204eeeca4ff7c35a8bcea892457f9431cfc1c52495a523fadea10b01a1b74c23cd463f60d8497894ec615
|
7
|
+
data.tar.gz: f9d5d3fe3a3810c9bb30b4cd3cfbf789df860d0c8e7c069604a5783eba6bffb364afbc4c7779d7a879876de79947154f921646714e79841839ea73869e5c483b
|
data/conf/gem.yaml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version: 3.
|
1
|
+
version: 3.13.0
|
data/conf/spec.yaml
CHANGED
@@ -228,6 +228,16 @@ bundle:
|
|
228
228
|
200:
|
229
229
|
handler: simple
|
230
230
|
message: 'Bundle %{name} stopped'
|
231
|
+
info:
|
232
|
+
api: console
|
233
|
+
operation: getBundleInfo
|
234
|
+
params:
|
235
|
+
required:
|
236
|
+
name: '%{name}'
|
237
|
+
responses:
|
238
|
+
200:
|
239
|
+
handler: simple_body
|
240
|
+
message: 'Retrieved bundle %{name} info'
|
231
241
|
aemconfigmgr:
|
232
242
|
actions:
|
233
243
|
get:
|
@@ -339,27 +349,27 @@ flushagent:
|
|
339
349
|
name: '%{name}'
|
340
350
|
optional:
|
341
351
|
jcrprimary_type: cq:Page
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
352
|
+
jcrcontent_cqname: '%{name}'
|
353
|
+
jcrcontent_jcrtitle: '%{title}'
|
354
|
+
jcrcontent_jcrdescription: '%{description}'
|
355
|
+
jcrcontent_slingresource_type: cq/replication/components/agent
|
356
|
+
jcrcontent_transport_uri: '%{dest_base_url}/dispatcher/invalidate.cache'
|
357
|
+
jcrcontent_log_level: '%{log_level}'
|
358
|
+
jcrcontent_no_versioning: true
|
359
|
+
jcrcontent_protocol_http_headers:
|
350
360
|
- 'CQ-Action:{action}'
|
351
361
|
- 'CQ-Handle:{path}'
|
352
362
|
- 'CQ-Path:{path}'
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
+
jcrcontent_protocol_http_headers_type_hint: String[]
|
364
|
+
jcrcontent_protocol_http_method: GET
|
365
|
+
jcrcontent_retry_delay: '%{retry_delay}'
|
366
|
+
jcrcontent_serialization_type: flush
|
367
|
+
jcrcontent_jcrmixin_types: cq:ReplicationStatus
|
368
|
+
jcrcontent_trigger_receive: true
|
369
|
+
jcrcontent_trigger_specific: true
|
370
|
+
jcrcontent_cqtemplate: /libs/cq/replication/templates/agent
|
371
|
+
jcrcontent_enabled: true
|
372
|
+
jcrcontent_ssl: '%{ssl}'
|
363
373
|
responses:
|
364
374
|
200:
|
365
375
|
handler: simple
|
@@ -418,7 +428,7 @@ group:
|
|
418
428
|
intermediate_path: '%{path}'
|
419
429
|
optional:
|
420
430
|
create_group: 'true'
|
421
|
-
|
431
|
+
profile_given_name: '%{name}'
|
422
432
|
responses:
|
423
433
|
201:
|
424
434
|
handler: html_authorizable_id
|
@@ -960,18 +970,18 @@ replicationagent:
|
|
960
970
|
name: '%{name}'
|
961
971
|
optional:
|
962
972
|
jcrprimary_type: cq:Page
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
973
|
+
jcrcontent_cqname: '%{name}'
|
974
|
+
jcrcontent_jcrtitle: '%{title}'
|
975
|
+
jcrcontent_jcrdescription: '%{description}'
|
976
|
+
jcrcontent_slingresource_type: cq/replication/components/agent
|
977
|
+
jcrcontent_serialization_type: durbo
|
978
|
+
jcrcontent_transport_uri: '%{dest_base_url}/bin/receive?sling:authRequestLogin=1'
|
979
|
+
jcrcontent_transport_user: '%{transport_user}'
|
980
|
+
jcrcontent_transport_password: '%{transport_password}'
|
981
|
+
jcrcontent_log_level: '%{log_level}'
|
982
|
+
jcrcontent_retry_delay: '%{retry_delay}'
|
983
|
+
jcrcontent_cqtemplate: /libs/cq/replication/templates/agent
|
984
|
+
jcrcontent_enabled: true
|
975
985
|
responses:
|
976
986
|
200:
|
977
987
|
handler: simple
|
@@ -1030,19 +1040,19 @@ outboxreplicationagent:
|
|
1030
1040
|
name: '%{name}'
|
1031
1041
|
optional:
|
1032
1042
|
jcrprimary_type: cq:Page
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1043
|
+
jcrcontent_cqname: '%{name}'
|
1044
|
+
jcrcontent_jcrtitle: '%{title}'
|
1045
|
+
jcrcontent_jcrdescription: '%{description}'
|
1046
|
+
jcrcontent_slingresource_type: cq/replication/components/agent
|
1047
|
+
jcrcontent_transport_uri: repo://var/replication/outbox
|
1048
|
+
jcrcontent_no_versioning: true
|
1049
|
+
jcrcontent_log_level: '%{log_level}'
|
1050
|
+
jcrcontent_cqtemplate: /libs/cq/replication/templates/agent
|
1051
|
+
jcrcontent_enabled: true
|
1052
|
+
jcrcontent_trigger_distribute: true
|
1053
|
+
jcrcontent_trigger_modified: false
|
1054
|
+
jcrcontent_trigger_specific: true
|
1055
|
+
jcrcontent_user_id: '%{user_id}'
|
1046
1056
|
responses:
|
1047
1057
|
200:
|
1048
1058
|
handler: simple
|
@@ -1101,19 +1111,19 @@ reversereplicationagent:
|
|
1101
1111
|
name: '%{name}'
|
1102
1112
|
optional:
|
1103
1113
|
jcrprimary_type: cq:Page
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1114
|
+
jcrcontent_cqname: '%{name}'
|
1115
|
+
jcrcontent_jcrtitle: '%{title}'
|
1116
|
+
jcrcontent_jcrdescription: '%{description}'
|
1117
|
+
jcrcontent_slingresource_type: cq/replication/components/agent
|
1118
|
+
jcrcontent_serialization_type: durbo
|
1119
|
+
jcrcontent_transport_uri: '%{dest_base_url}/bin/receive?sling:authRequestLogin=1'
|
1120
|
+
jcrcontent_transport_user: '%{transport_user}'
|
1121
|
+
jcrcontent_transport_password: '%{transport_password}'
|
1122
|
+
jcrcontent_log_level: '%{log_level}'
|
1123
|
+
jcrcontent_retry_delay: '%{retry_delay}'
|
1124
|
+
jcrcontent_cqtemplate: /libs/cq/replication/templates/agent
|
1125
|
+
jcrcontent_enabled: true
|
1126
|
+
jcrcontent_reverse_replication: true
|
1117
1127
|
responses:
|
1118
1128
|
200:
|
1119
1129
|
handler: simple
|
data/lib/ruby_aem/client.rb
CHANGED
data/lib/ruby_aem/error.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2016-
|
1
|
+
# Copyright 2016-2021 Shine Solutions Group
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -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
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2016-
|
1
|
+
# Copyright 2016-2021 Shine Solutions Group
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -41,6 +41,32 @@ module RubyAem
|
|
41
41
|
def stop
|
42
42
|
@client.call(self.class, __callee__.to_s, @call_params)
|
43
43
|
end
|
44
|
+
|
45
|
+
# Retrieve bundle info.
|
46
|
+
#
|
47
|
+
# @return RubyAem::Result
|
48
|
+
def info
|
49
|
+
@client.call(self.class, __callee__.to_s, @call_params)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Check if this bundle state is active.
|
53
|
+
# True result data indicates that the bundle is active, false otherwise.
|
54
|
+
#
|
55
|
+
# @return RubyAem::Result
|
56
|
+
def is_active
|
57
|
+
result = info
|
58
|
+
|
59
|
+
state = result.data.data[0].state
|
60
|
+
if state == 'Active'
|
61
|
+
result.message = "Bundle #{@call_params[:name]} is active"
|
62
|
+
result.data = true
|
63
|
+
else
|
64
|
+
result.message = "Bundle #{@call_params[:name]} is not active. Bundle state is #{state}"
|
65
|
+
result.data = false
|
66
|
+
end
|
67
|
+
|
68
|
+
result
|
69
|
+
end
|
44
70
|
end
|
45
71
|
end
|
46
72
|
end
|
data/lib/ruby_aem/response.rb
CHANGED
data/lib/ruby_aem/result.rb
CHANGED
data/lib/ruby_aem/swagger.rb
CHANGED
data/lib/ruby_aem.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_aem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shine Solutions
|
8
8
|
- Cliffano Subagio
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: retries
|
@@ -127,7 +127,7 @@ homepage: https://github.com/shinesolutions/ruby_aem
|
|
127
127
|
licenses:
|
128
128
|
- Apache-2.0
|
129
129
|
metadata: {}
|
130
|
-
post_install_message:
|
130
|
+
post_install_message:
|
131
131
|
rdoc_options: []
|
132
132
|
require_paths:
|
133
133
|
- lib
|
@@ -142,9 +142,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
rubyforge_project:
|
145
|
+
rubyforge_project:
|
146
146
|
rubygems_version: 2.6.14.4
|
147
|
-
signing_key:
|
147
|
+
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: AEM API Ruby client
|
150
150
|
test_files: []
|