ruby_aem 3.2.1 → 3.3.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: bf4fa41608ff393bae26090c24cd398993c82ac2
4
- data.tar.gz: b7f3eed536af4ae8fde43eeebf15e426c6d0ec85
3
+ metadata.gz: 46d97b74d2f3cfd1c5702001a169427c5be4865a
4
+ data.tar.gz: 75ae679a7fc78f70e39bf31734575f1c05e1badd
5
5
  SHA512:
6
- metadata.gz: 61c9d87f0ef993e772eccf87707b213f446e11e8bf1256ad94654f804b947c2094d432d988834523c8b530b170191a65ac67b1bb7133525db92c52eb7b10d2b5
7
- data.tar.gz: 43c1707b025aa3b8a67404051f851777f28aa209206b1eb1f8c28aab8b7ac6d2b14251a96477bea7e0597e72f13a428303795ebc9f017d4ffea28f7909d3490e
6
+ metadata.gz: ec8453f2b50fc61619725a79ed8faddb3412181d96e248422cbb39434ed8a84b84f3f1cfaea43ffb0615509004f1ae993e982b689cc717b60339cc9380f633ea
7
+ data.tar.gz: c4abdc405b9b96cc34f99c5355f577df0d272560624854294b2ac0b2bb3e28250b9b88f72bad9a9310a77f19e4568f2b86ed36297921d875e25c09f816e125bb
@@ -1 +1 @@
1
- version: 3.2.1
1
+ version: 3.3.0
@@ -228,6 +228,17 @@ bundle:
228
228
  200:
229
229
  handler: simple
230
230
  message: 'Bundle %{name} stopped'
231
+ aemconfigmgr:
232
+ actions:
233
+ get:
234
+ api: console
235
+ operation: getConfigMgr
236
+ params:
237
+ required:
238
+ responses:
239
+ 200:
240
+ handler: simple
241
+ message: 'Configuration Manager page successfully received'
231
242
  certificate:
232
243
  actions:
233
244
  import:
@@ -1156,8 +1167,8 @@ repository:
1156
1167
  saml:
1157
1168
  actions:
1158
1169
  get:
1159
- api: console
1160
- operation: postSamlConfiguration
1170
+ api: configmgr
1171
+ operation: comAdobeGraniteAuthSamlSamlAuthenticationHandler
1161
1172
  params:
1162
1173
  optional:
1163
1174
  post: true
@@ -1166,8 +1177,8 @@ saml:
1166
1177
  handler: simple
1167
1178
  message: 'SAML Configuration found'
1168
1179
  create:
1169
- api: console
1170
- operation: postSamlConfiguration
1180
+ api: configmgr
1181
+ operation: comAdobeGraniteAuthSamlSamlAuthenticationHandler
1171
1182
  params:
1172
1183
  optional:
1173
1184
  - post
@@ -1208,8 +1219,8 @@ saml:
1208
1219
  handler: simple
1209
1220
  message: 'SAML Configuration created'
1210
1221
  delete:
1211
- api: console
1212
- operation: postSamlConfiguration
1222
+ api: configmgr
1223
+ operation: comAdobeGraniteAuthSamlSamlAuthenticationHandler
1213
1224
  params:
1214
1225
  optional:
1215
1226
  - apply
@@ -14,6 +14,7 @@
14
14
 
15
15
  require 'ruby_aem/client'
16
16
  require 'ruby_aem/resources/aem'
17
+ require 'ruby_aem/resources/aem_configmgr'
17
18
  require 'ruby_aem/resources/authorizable_keystore'
18
19
  require 'ruby_aem/resources/bundle'
19
20
  require 'ruby_aem/resources/certificate'
@@ -32,6 +33,7 @@ require 'ruby_aem/resources/repository'
32
33
  require 'ruby_aem/resources/truststore'
33
34
  require 'ruby_aem/resources/user'
34
35
  require 'swagger_aem'
36
+ require 'swagger_aem_osgi'
35
37
  require 'yaml'
36
38
 
37
39
  module RubyAem
@@ -65,8 +67,23 @@ module RubyAem
65
67
  ]
66
68
  }
67
69
 
70
+ SwaggerAemOsgiClient.configure { |swagger_conf|
71
+ [
72
+ swagger_conf.scheme = conf[:protocol],
73
+ swagger_conf.host = "#{conf[:host]}:#{conf[:port]}",
74
+ swagger_conf.username = conf[:username],
75
+ swagger_conf.password = conf[:password],
76
+ swagger_conf.timeout = conf[:timeout],
77
+ swagger_conf.debugging = conf[:debug],
78
+ swagger_conf.verify_ssl = conf[:verify_ssl],
79
+ swagger_conf.verify_ssl_host = conf[:verify_ssl],
80
+ swagger_conf.params_encoding = :multi
81
+ ]
82
+ }
83
+
68
84
  apis = {
69
85
  console: SwaggerAemClient::ConsoleApi.new,
86
+ configmgr: SwaggerAemOsgiClient::ConfigmgrApi.new,
70
87
  custom: SwaggerAemClient::CustomApi.new,
71
88
  cq: SwaggerAemClient::CqApi.new,
72
89
  crx: SwaggerAemClient::CrxApi.new,
@@ -101,6 +118,13 @@ module RubyAem
101
118
  RubyAem::Resources::Aem.new(@client)
102
119
  end
103
120
 
121
+ # Create an AEM ConfigMgr instance.
122
+ #
123
+ # @return new RubyAem::Resources::Aem instance
124
+ def aem_configmgr
125
+ RubyAem::Resources::AemConfigMgr.new(@client)
126
+ end
127
+
104
128
  # Create a bundle instance.
105
129
  #
106
130
  # @param name the bundle's name, e.g. com.adobe.cq.social.cq-social-forum
@@ -75,6 +75,8 @@ module RubyAem
75
75
  response = RubyAem::Response.new(status_code, data, headers)
76
76
  rescue SwaggerAemClient::ApiError => e
77
77
  response = RubyAem::Response.new(e.code, e.response_body, e.response_headers)
78
+ rescue SwaggerAemOsgiClient::ApiError => e
79
+ response = RubyAem::Response.new(e.code, e.response_body, e.response_headers)
78
80
  end
79
81
  handle(response, responses_spec, call_params)
80
82
  end
@@ -0,0 +1,42 @@
1
+ # Copyright 2016-2019 Shine Solutions
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'typhoeus'
16
+ require 'yaml'
17
+
18
+ module RubyAem
19
+ # AEM resources
20
+ module Resources
21
+ # AEM class contains API calls related to managing the AEM instance itself.
22
+ class AemConfigMgr
23
+ # Initialise an AEM instance.
24
+ #
25
+ # @param client RubyAem::Client
26
+ # @return new RubyAem::Resources::Aem instance
27
+ def initialize(client)
28
+ @client = client
29
+ @call_params = {
30
+ }
31
+ end
32
+
33
+ # Connect to AEM /system/console/configMgr to collect
34
+ # all configuration nodes
35
+ #
36
+ # @return RubyAem::Result
37
+ def get
38
+ @client.call(self.class, __callee__.to_s, @call_params)
39
+ end
40
+ end
41
+ end
42
+ 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.2.1
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shine Solutions
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-06-05 00:00:00.000000000 Z
12
+ date: 2019-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: retries
@@ -87,6 +87,7 @@ files:
87
87
  - lib/ruby_aem/handlers/simple.rb
88
88
  - lib/ruby_aem/handlers/xml.rb
89
89
  - lib/ruby_aem/resources/aem.rb
90
+ - lib/ruby_aem/resources/aem_configmgr.rb
90
91
  - lib/ruby_aem/resources/authorizable_keystore.rb
91
92
  - lib/ruby_aem/resources/bundle.rb
92
93
  - lib/ruby_aem/resources/certificate.rb