ocp 0.0.13 → 0.0.14

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/client/OcpClient.rb +9 -18
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 679afe750764e72c5c0cba230544d5179a55384d
4
- data.tar.gz: b81d289e56bbe79997b2101adabffe25527a2b01
3
+ metadata.gz: 001da620f5d23077105f3e76137004436939c221
4
+ data.tar.gz: dec33cc652e3f44d4a93619751e50fc0d2696ca0
5
5
  SHA512:
6
- metadata.gz: c68ff98f74e0f038848f30b5436e4ae97ee209b8bba9e7fcd58bb9dd6d30e64fc826ac705ec8a6ee212522f14afce0157cc1d0d11751c0b12cfc01df2de5d494
7
- data.tar.gz: 4f46da65d1e35c7902cd6e0684aef85e1f6af71948c742344e80cb0bd5e1a1ce1a6526c38bd6ab6ea1b5e9b8287a364dae64373241b283a5c1c781c32656045c
6
+ metadata.gz: 347c5491525a5f7498e6eb2670a8fe5f27b8652cf81802a5222d598af7cb3db9ee2753237d59957badcb1a190f41934c857f82f5599f8e7f2cb47a8f1617ca1b
7
+ data.tar.gz: bad8c5375e8fa09681901831c93d761365ae16292b87fd9e2d06573cd9992276cad3076526702d56c08100da914b7e8737922bc84dacb78c323a10e01d806607
@@ -81,26 +81,22 @@ class OcpClient
81
81
  private
82
82
 
83
83
  def call(location, body, method)
84
-
85
- if @debug
86
- puts "Method - #{method}"
87
- unless body.nil?
88
- puts "Body - #{JSON.pretty_generate(body)}"
89
- end
90
- end
91
-
92
84
  if !@clientcert.nil? and !@clientkey.nil?
93
85
  return callbycert(location, body, method)
94
86
  else
95
87
  return callbytoken(location, body, method)
96
88
  end
97
-
98
89
  end
99
90
 
100
91
  def callbytoken(location, body=nil, method)
101
92
 
102
93
  if @debug
103
94
  puts "Client Token - #{@token}"
95
+ puts "URL - #{@url}#{location}"
96
+ puts "Method - #{method}"
97
+ unless body.nil?
98
+ puts "Body - #{JSON.pretty_generate(body)}"
99
+ end
104
100
  end
105
101
 
106
102
  response = nil
@@ -127,9 +123,9 @@ class OcpClient
127
123
  end
128
124
  rescue => exception
129
125
  if @debug and !exception.nil?
130
- puts "Exception: " << exception.response.to_s
126
+ puts "Exception: " << exception
131
127
  end
132
- @response = exception.response
128
+ @response = exception
133
129
  end
134
130
 
135
131
  @response = response
@@ -180,17 +176,12 @@ class OcpClient
180
176
  ).execute
181
177
  end
182
178
  rescue => exception
183
- puts "----- EXCEPTION #{exception}----"
184
179
  if @debug and !exception.nil?
185
- puts "Exception: " << exception.response.to_s
180
+ puts "Exception: " << exception
186
181
  end
187
- @response = exception.response
182
+ @response = exception
188
183
  end
189
184
 
190
-
191
-
192
- puts "----- GOT HERE ----"
193
-
194
185
  @response = response
195
186
 
196
187
  if !response.nil? and @pretty
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Evensen