ruby_aem 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/conf/spec.yaml +12 -0
- data/lib/ruby_aem.rb +21 -14
- data/lib/ruby_aem/resources/aem.rb +7 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db17bd379da3f56cab010d2bd3616f83d3919154
|
4
|
+
data.tar.gz: e704e3e0f154f4b05b3dc4c7925b85568f223c8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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.
|
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-
|
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.
|
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.
|
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.
|
138
|
+
rubygems_version: 2.6.14
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: AEM API Ruby client
|