ruby_aem 1.4.1 → 1.4.2

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
  SHA1:
3
- metadata.gz: 50f980c9fe9b3d931d8e8a75ed021fdb5cdcab50
4
- data.tar.gz: 3acd91dfbeae100286df90bd1529b3c081f2446b
3
+ metadata.gz: db17bd379da3f56cab010d2bd3616f83d3919154
4
+ data.tar.gz: e704e3e0f154f4b05b3dc4c7925b85568f223c8f
5
5
  SHA512:
6
- metadata.gz: 8ae0fc6cc72e93f3d667308ab062e5cc1f66ba5e1887f198a2cbf2644792e7f3141b07046f991f19d2c44a2233cd7291aa8bf32b074583cd1fb38c88c55f9fc1
7
- data.tar.gz: 9c8927c9ae5b41514ea1d4e666769fd2f0f2e7aa5063e4aa023d1399aab3feda1e2cbd91661a3db63ab4feaa3d02fe1f71c99a0cd295c18ebf690bfb02cb48a4
6
+ metadata.gz: 4a21e7768885f40c4560919b2e902cce0a01f290297833d391c54f57e34c17b9a8410add7f1f0dcfff8168b187bdfff43b809d85bf97dca6e801144ef9613121
7
+ data.tar.gz: 33614eb491d78330eb0173d295f4a02d060031c2e6d7fd41e8beeef99991716f61437b2c70af522b8b69297612b121b39cf6ff606418396e81c41eadfcda8bc7
data/conf/spec.yaml CHANGED
@@ -40,6 +40,18 @@ aem:
40
40
  200:
41
41
  handler: simple
42
42
  message: 'Install status retrieved successfully'
43
+ get_crxde_status:
44
+ api: crx
45
+ operation: getCrxdeStatus
46
+ params:
47
+ required:
48
+ responses:
49
+ 200:
50
+ handler: simple_true
51
+ message: 'CRXDE is enabled'
52
+ 404:
53
+ handler: simple_false
54
+ message: 'CRXDE is disabled'
43
55
  bundle:
44
56
  responses:
45
57
  404:
data/lib/ruby_aem.rb CHANGED
@@ -44,27 +44,18 @@ module RubyAem
44
44
  # - debug: if true, then additional debug messages will be included, default: false
45
45
  # @return new RubyAem::Aem instance
46
46
  def initialize(conf = {})
47
- conf[:username] ||= 'admin'
48
- conf[:password] ||= 'admin'
49
- conf[:protocol] ||= 'http'
50
- conf[:host] ||= 'localhost'
51
- conf[:port] ||= 4502
52
- conf[:timeout] ||= 300
53
- conf[:debug] ||= false
54
-
55
- # handle custom configuration value being passed as a String
56
- # e.g. when the values are passed via environment variables
57
- conf[:port] = conf[:port].to_i
58
- conf[:timeout] = conf[:timeout].to_i
59
- conf[:debug] = conf[:debug] == 'true' if conf[:debug].is_a? String
47
+ sanitise_conf(conf)
60
48
 
61
49
  SwaggerAemClient.configure { |swagger_conf|
62
50
  [
63
- swagger_conf.host = "#{conf[:protocol]}://#{conf[:host]}:#{conf[:port]}",
51
+ swagger_conf.scheme = conf[:protocol],
52
+ swagger_conf.host = "#{conf[:host]}:#{conf[:port]}",
64
53
  swagger_conf.username = conf[:username],
65
54
  swagger_conf.password = conf[:password],
66
55
  swagger_conf.timeout = conf[:timeout],
67
56
  swagger_conf.debugging = conf[:debug],
57
+ swagger_conf.verify_ssl = conf[:verify_ssl],
58
+ swagger_conf.verify_ssl_host = conf[:verify_ssl],
68
59
  swagger_conf.params_encoding = :multi
69
60
  ]
70
61
  }
@@ -82,6 +73,22 @@ module RubyAem
82
73
  @client = RubyAem::Client.new(apis, spec)
83
74
  end
84
75
 
76
+ # Set default configuration values and handle numeric/boolean String values
77
+ def sanitise_conf(conf)
78
+ conf[:username] ||= 'admin'
79
+ conf[:password] ||= 'admin'
80
+ conf[:protocol] ||= 'http'
81
+ conf[:host] ||= 'localhost'
82
+ conf[:port] ||= 4502
83
+ conf[:timeout] ||= 300
84
+ # handle custom configuration value being passed as a String
85
+ # e.g. when the values are passed via environment variables
86
+ conf[:port] = conf[:port].to_i
87
+ conf[:timeout] = conf[:timeout].to_i
88
+ conf[:verify_ssl] = conf[:verify_ssl] == 'true' if conf[:verify_ssl].is_a? String
89
+ conf[:debug] = conf[:debug] == 'true' if conf[:debug].is_a? String
90
+ end
91
+
85
92
  # Create an AEM instance.
86
93
  #
87
94
  # @return new RubyAem::Resources::Aem instance
@@ -36,6 +36,13 @@ module RubyAem
36
36
  @client.call(self.class, __callee__.to_s, @call_params)
37
37
  end
38
38
 
39
+ # Retrieve AEM CRXDE Status
40
+ #
41
+ # @return RubyAem::Result
42
+ def get_crxde_status
43
+ @client.call(self.class, __callee__.to_s, @call_params)
44
+ end
45
+
39
46
  # Retrieve AEM Health Check.
40
47
  # This is a custom API and requires
41
48
  # https://github.com/shinesolutions/aem-healthcheck
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.4.1
4
+ version: 1.4.2
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: 2018-01-22 00:00:00.000000000 Z
12
+ date: 2018-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 1.2.0
48
+ version: 1.2.1
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 1.2.0
55
+ version: 1.2.1
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.4.8
138
+ rubygems_version: 2.6.14
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: AEM API Ruby client