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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cd805b5dd7ccb163ca33b41505e9a5d7ba19294
4
- data.tar.gz: 3601de46a1c75265965fe0b9658f26b915747b2f
3
+ metadata.gz: f4411d8d5f786d38c8052a16c4eef6d7b348c4b9
4
+ data.tar.gz: 1bd38cb2ea45e9cb19ded52e41486e159033fbee
5
5
  SHA512:
6
- metadata.gz: 532ecd64b0866fc22c6c65d6a5664dbb9d6237ed690fbdddc6ea2347a70cfd2c0de57f2ed75147311fddf6b5ddb32f78ee64ee66b9ddd3a98cfc2ab2aab01933
7
- data.tar.gz: ecf3275a2c72e8a7cd651fa92553f83318b775214b11db8ac7207bbccd3628c2d8101f412c9231859348a22d98761787067b625ca5f013559610679c46770e19
6
+ metadata.gz: ece9913bbe379bd26564fe7d8483695df4a908304085c02f909a23d297f5a82e9f303e228c440e6d2eb5df2f7369df6d970036ee1fdd9bd5c0a020072820b6df
7
+ data.tar.gz: 39efeda7430f55c58e1d2dd452b4390016777ec85cbaa1bb0c47402d79015eca42c711864694088693ea836f604107a81d5b2a3f4c16f638f4d5e84cafb32af0
@@ -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: "http://#{@user}:#{@pass}@#{@host}/crx/packmgr/service/.json", payload: {cmd: 'upload', package: File.new(package_path, 'rb'), force: true} )
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: "http://#{@user}:#{@pass}@#{@host}/crx/packmgr/service/.json#{@upload_path}", payload: {cmd: 'install'} )
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 "http://#{@user}:#{@pass}@#{@host}/system/console/slingjsp", :cmd => 'recompile', :timeout => 120
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
@@ -1,5 +1,5 @@
1
1
  module Aem
2
2
  module Deploy
3
- VERSION = "0.1.18"
3
+ VERSION = "0.1.19"
4
4
  end
5
5
  end
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.18
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-04-25 00:00:00.000000000 Z
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: