lab-manager 1.0.2 → 1.0.3
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.
- data/lib/lab_manager/httpclient_patch.rb +28 -0
- data/lib/lab_manager/machine.rb +1 -1
- data/lib/lab_manager.rb +3 -1
- metadata +3 -2
@@ -0,0 +1,28 @@
|
|
1
|
+
#
|
2
|
+
# Monkey Patch HTTP Client
|
3
|
+
# Sets SSL verify mode to NONE so that we can connect to an SSL server
|
4
|
+
# that does not have a trusted certificate.
|
5
|
+
#
|
6
|
+
# The 1.8.7 patch adds a new constructor.
|
7
|
+
# The 1.9.3 patch intercepts the existing constructor now that the class
|
8
|
+
# name has changed.
|
9
|
+
|
10
|
+
if RUBY_VERSION == "1.8.7"
|
11
|
+
class HTTPAccess2::Client
|
12
|
+
def initialize(*args)
|
13
|
+
super(args[0], args[1])
|
14
|
+
@session_manager.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
15
|
+
#@session_manager.debug_dev = STDOUT
|
16
|
+
end
|
17
|
+
end
|
18
|
+
else # > 1.8.7
|
19
|
+
class HTTPClient
|
20
|
+
alias_method :original_initialize, :initialize
|
21
|
+
def initialize(*args)
|
22
|
+
original_initialize(args[0], args[1])
|
23
|
+
@session_manager.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
24
|
+
#@session_manager.debug_dev = STDOUT
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
data/lib/lab_manager/machine.rb
CHANGED
data/lib/lab_manager.rb
CHANGED
@@ -8,6 +8,8 @@ require 'yaml'
|
|
8
8
|
|
9
9
|
require 'lab_manager/machine'
|
10
10
|
|
11
|
+
require 'lab_manager/httpclient_patch'
|
12
|
+
|
11
13
|
#
|
12
14
|
# Lab Manager API
|
13
15
|
#
|
@@ -131,7 +133,7 @@ class LabManager
|
|
131
133
|
proxy.generate_explicit_type = false # No datatype with request
|
132
134
|
proxy.headerhandler << LabManagerHeader.new(@organization, @workspace, @username, @password)
|
133
135
|
|
134
|
-
proxy.streamhandler.client.ssl_config.verify_mode =
|
136
|
+
#proxy.streamhandler.client.ssl_config.verify_mode = false
|
135
137
|
|
136
138
|
proxy
|
137
139
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lab-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mumboe-soap4r
|
@@ -49,6 +49,7 @@ executables: []
|
|
49
49
|
extensions: []
|
50
50
|
extra_rdoc_files: []
|
51
51
|
files:
|
52
|
+
- lib/lab_manager/httpclient_patch.rb
|
52
53
|
- lib/lab_manager/machine.rb
|
53
54
|
- lib/lab_manager.rb
|
54
55
|
homepage:
|