ruby_aem 1.0.8 → 1.0.10

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: f1040bfc91374ad32876e37979e14d127f15863e
4
- data.tar.gz: f2bdb8461462ac3cba13faba6be57d76e8b347bd
3
+ metadata.gz: f58955b686a05c89c384331c00ee3fb3a2a9bc33
4
+ data.tar.gz: 555987037f0139f86f89350f8b2bf4ba203ab189
5
5
  SHA512:
6
- metadata.gz: a34f54ded219719ab4b1d4def2d1e46d6a7b3b7b558411175b43084cd6e698015d71ca10bac899e001efcd6941327ba3690e29ed715a5c0a5b95c826c2492ef1
7
- data.tar.gz: b401b22dd6476051f1053b690c1d5e85f4e3d5e82bab9ffcc183a2fb0ee99dd77531a77f4aa01ac23664b8b5d5e9dc07e72b94d009db2ed6525394a0eafc5354
6
+ metadata.gz: c32a53282340f2897d6ff14d6e8889a83e2b0a82dd771e25dc5d4cd36d8d0a598a326e2047ebab55eda9b4498ce9995e51855d9a0656644b1d32839962837c85
7
+ data.tar.gz: 9208c2885463eebc1b906b3024e726763189f7a615f6cf845ad6a6858575369601f8fd8c46478dba5daf314db0be989cd54b03ff757c362f7fd2c2385df0bfca
data/conf/spec.yaml CHANGED
@@ -367,13 +367,12 @@ path:
367
367
  message: 'Path %{name} activated'
368
368
  configproperty:
369
369
  actions:
370
- create:
370
+ createapachefelixjettybasedhttpservice:
371
371
  api: sling
372
- operation: postConfig
372
+ operation: postConfigApacheFelixJettyBasedHttpService
373
373
  params:
374
374
  required:
375
375
  runmode: '%{run_mode}'
376
- name: '%{node_name}'
377
376
  optional:
378
377
  - org_apache_felix_https_nio
379
378
  - org_apache_felix_https_nio_type_hint
@@ -395,13 +394,75 @@ configproperty:
395
394
  - org_apache_felix_https_enable_type_hint
396
395
  - org_osgi_service_http_port_secure
397
396
  - org_osgi_service_http_port_secure_type_hint
397
+ - json_maximumresults
398
+ - json_maximumresults_type_hint
399
+ responses:
400
+ 200:
401
+ handler: simple
402
+ message: 'Set %{run_mode} %{config_node_name} config %{type} property %{name}=%{value}'
403
+ 201:
404
+ handler: simple
405
+ message: 'Set %{run_mode} %{config_node_name} config %{type} property %{name}=%{value}'
406
+ createapacheslinggetservlet:
407
+ api: sling
408
+ operation: postConfigApacheSlingGetServlet
409
+ params:
410
+ required:
411
+ runmode: '%{run_mode}'
412
+ optional:
413
+ - json_maximumresults
414
+ - json_maximumresults_type_hint
415
+ - enable_html
416
+ - enable_html_type_hint
417
+ - enable_txt
418
+ - enable_txt_type_hint
419
+ - enable_xml
420
+ - enable_xml_type_hint
421
+ responses:
422
+ 200:
423
+ handler: simple
424
+ message: 'Set %{run_mode} %{config_node_name} config %{type} property %{name}=%{value}'
425
+ 201:
426
+ handler: simple
427
+ message: 'Set %{run_mode} %{config_node_name} config %{type} property %{name}=%{value}'
428
+ createapacheslingreferrerfilter:
429
+ api: sling
430
+ operation: postConfigApacheSlingReferrerFilter
431
+ params:
432
+ required:
433
+ runmode: '%{run_mode}'
434
+ optional:
435
+ - allow_empty
436
+ - allow_empty_type_hint
437
+ - allow_hosts
438
+ - allow_hosts_type_hint
439
+ - allow_hosts_regexp
440
+ - allow_hosts_regexp_type_hint
441
+ responses:
442
+ 200:
443
+ handler: simple
444
+ message: 'Set %{run_mode} %{config_node_name} config %{type} property %{name}=%{value}'
445
+ 201:
446
+ handler: simple
447
+ message: 'Set %{run_mode} %{config_node_name} config %{type} property %{name}=%{value}'
448
+ createapacheslingdavexservlet:
449
+ api: sling
450
+ operation: postConfigApacheSlingDavExServlet
451
+ params:
452
+ required:
453
+ runmode: '%{run_mode}'
454
+ optional:
455
+ - alias
456
+ - alias_type_hint
457
+ - dav_create_absolute_uri
458
+ - dav_create_absolute_uri_type_hint
398
459
  responses:
399
460
  200:
400
461
  handler: simple
401
- message: 'Set %{run_mode} %{node_name} config %{type} property %{name}=%{value}'
462
+ message: 'Set %{run_mode} %{config_node_name} config %{type} property %{name}=%{value}'
402
463
  201:
403
464
  handler: simple
404
- message: 'Set %{run_mode} %{node_name} config %{type} property %{name}=%{value}'
465
+ message: 'Set %{run_mode} %{config_node_name} config %{type} property %{name}=%{value}'
405
466
  replicationagent:
406
467
  responses:
407
468
  404:
@@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  =end
16
+ require 'ruby_aem/swagger'
16
17
 
17
18
  module RubyAem
18
19
  module Resources
@@ -38,18 +39,19 @@ module RubyAem
38
39
  # Create a new config property.
39
40
  #
40
41
  # @param run_mode AEM run mode: author or publish
41
- # @param node_name the node name under /apps/system/config.{run_mode}/ where the property will be part of
42
+ # @param @param config_node_name the node name of a given OSGI config
42
43
  # @return RubyAem::Result
43
- def create(run_mode, node_name)
44
+ def create(run_mode, config_node_name)
44
45
 
45
46
  name = RubyAem::Swagger.property_to_parameter(@call_params[:name])
46
47
 
47
- @call_params[:node_name] = node_name
48
48
  @call_params[:run_mode] = run_mode
49
+ @call_params[:config_node_name] = config_node_name
49
50
  @call_params["#{name}".to_sym] = @call_params[:value]
50
51
  @call_params["#{name}_type_hint".to_sym] = @call_params[:type]
51
52
 
52
- @client.call(self.class, __callee__.to_s, @call_params)
53
+ config_name = Swagger.config_node_name_to_config_name(config_node_name)
54
+ @client.call(self.class, __callee__.to_s.concat(config_name.downcase.gsub(/\s+/, '')), @call_params)
53
55
  end
54
56
 
55
57
  end
@@ -89,6 +89,8 @@ module RubyAem
89
89
  end
90
90
 
91
91
  # Change the user's password.
92
+ # This only works if the user whose password is to be changed, is also the
93
+ # same user that authenticates to AEM via SwaggerAemClient.
92
94
  #
93
95
  # @param old_password the user's old password to be changed from
94
96
  # @param new_password the user's new password to be changed to
@@ -47,5 +47,25 @@ module RubyAem
47
47
  path.gsub(/^\//, '').gsub(/\/$/, '')
48
48
  end
49
49
 
50
+ # Given a config node name, return the corresponding OSGI config name.
51
+ # OSGI config name are available from AEM Web Console's Config Manager page.
52
+ #
53
+ # @param config_node_name the name of the node for a given config
54
+ # @return config name
55
+ def Swagger.config_node_name_to_config_name(config_node_name)
56
+ case config_node_name
57
+ when 'org.apache.felix.http'
58
+ 'Apache Felix Jetty Based HTTP Service'
59
+ when 'org.apache.sling.servlets.get.DefaultGetServlet'
60
+ 'Apache Sling GET Servlet'
61
+ when 'org.apache.sling.security.impl.ReferrerFilter'
62
+ 'Apache Sling Referrer Filter'
63
+ when 'org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet'
64
+ 'Apache Sling DavEx Servlet'
65
+ else
66
+ nil
67
+ end
68
+ end
69
+
50
70
  end
51
71
  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: 1.0.8
4
+ version: 1.0.10
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: 2017-02-19 00:00:00.000000000 Z
12
+ date: 2017-03-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -51,14 +51,14 @@ dependencies:
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.9.4
54
+ version: 0.9.6
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 0.9.4
61
+ version: 0.9.6
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rspec
64
64
  requirement: !ruby/object:Gem::Requirement