aem-deploy 0.1.18 → 0.1.19
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 +4 -4
- data/lib/aem/deploy/session.rb +8 -4
- data/lib/aem/deploy/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4411d8d5f786d38c8052a16c4eef6d7b348c4b9
|
4
|
+
data.tar.gz: 1bd38cb2ea45e9cb19ded52e41486e159033fbee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ece9913bbe379bd26564fe7d8483695df4a908304085c02f909a23d297f5a82e9f303e228c440e6d2eb5df2f7369df6d970036ee1fdd9bd5c0a020072820b6df
|
7
|
+
data.tar.gz: 39efeda7430f55c58e1d2dd452b4390016777ec85cbaa1bb0c47402d79015eca42c711864694088693ea836f604107a81d5b2a3f4c16f638f4d5e84cafb32af0
|
data/lib/aem/deploy/session.rb
CHANGED
@@ -6,7 +6,7 @@ require 'json'
|
|
6
6
|
module Aem::Deploy
|
7
7
|
|
8
8
|
class Session
|
9
|
-
attr_reader :host, :user, :pass, :retry, :upload_path
|
9
|
+
attr_reader :host, :user, :pass, :retry, :upload_path, :protocol
|
10
10
|
|
11
11
|
# Initialize the object
|
12
12
|
# @param [Hash] including :host, :user and :pass REQUIRED, optional :retry [Integer] which will retry failures x times.
|
@@ -17,6 +17,10 @@ module Aem::Deploy
|
|
17
17
|
@user = params.fetch(:user)
|
18
18
|
@pass = CGI.escape(params.fetch(:pass))
|
19
19
|
@retry = params.fetch(:retry).to_i unless params[:retry].nil?
|
20
|
+
@protocol = params.fetch(:protocol)
|
21
|
+
if @protocol.nil?
|
22
|
+
@protocol = 'http'
|
23
|
+
end
|
20
24
|
else
|
21
25
|
raise 'Hostname, User and Password are required'
|
22
26
|
end
|
@@ -36,7 +40,7 @@ module Aem::Deploy
|
|
36
40
|
# @return [Hash] installation message from crx.
|
37
41
|
# @raise [Error] if server returns anything but success.
|
38
42
|
def upload_package(package_path)
|
39
|
-
upload = RestClient::Request.execute(method: :post, url: "
|
43
|
+
upload = RestClient::Request.execute(method: :post, url: "#{@protocol}://#{@user}:#{@pass}@#{@host}/crx/packmgr/service/.json", payload: {cmd: 'upload', package: File.new(package_path, 'rb'), force: true} )
|
40
44
|
parse_response(upload)
|
41
45
|
@upload_path = URI.encode(JSON.parse(upload)["path"])
|
42
46
|
rescue => error
|
@@ -55,7 +59,7 @@ module Aem::Deploy
|
|
55
59
|
if options[:path]
|
56
60
|
@upload_path = options[:path]
|
57
61
|
end
|
58
|
-
install = RestClient::Request.execute(method: :post, url: "
|
62
|
+
install = RestClient::Request.execute(method: :post, url: "#{@protocol}://#{@user}:#{@pass}@#{@host}/crx/packmgr/service/.json#{@upload_path}", payload: {cmd: 'install'} )
|
59
63
|
parse_response(install)
|
60
64
|
rescue => error
|
61
65
|
{error: error.to_s}.to_json
|
@@ -70,7 +74,7 @@ module Aem::Deploy
|
|
70
74
|
# @raise [Error] if server returns anything but success.
|
71
75
|
def recompile_jsps
|
72
76
|
begin
|
73
|
-
RestClient.post "
|
77
|
+
RestClient.post "#{@protocol}://#{@user}:#{@pass}@#{@host}/system/console/slingjsp", :cmd => 'recompile', :timeout => 120
|
74
78
|
rescue => error
|
75
79
|
return {msg: 'JSPs recompiled'}.to_json
|
76
80
|
rescue => error
|
data/lib/aem/deploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aem-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitch Eaton
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -79,8 +79,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.5.1
|
82
|
+
rubygems_version: 2.4.5.1
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: A gem to wrap deployments to Adobe Experience Manager
|
86
86
|
test_files: []
|
87
|
+
has_rdoc:
|