megam_api 1.7.2 → 1.7.4

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: 723afebf8521f22ead52d8e91456b2b8c8bc3b1b
4
- data.tar.gz: 45b26bb7dc87b714ed9e98dc4efaab0fd3b8a908
3
+ metadata.gz: 6ca04e35aee41237797e50ded7540b870ac340d5
4
+ data.tar.gz: f2791db58398aeb8cc68340653c144790c7fa640
5
5
  SHA512:
6
- metadata.gz: 89b6863ed11d55f9ea9554888d65e5c18a973e0542bd57eb3472e0aa9e9aedccf5dd1dcfe170db7ceb4b956a23fb1785a2d774ba3b7e83f13701775910367224
7
- data.tar.gz: 0322314b01efd9c534eb4ee08a3513b2182507045a59afb587cf059cd230ccef157c125d926a49dae555fecb79e71a876fe878bc3ebfc1732cf285aa015e9089
6
+ metadata.gz: 62239bbc32d36861adaecda0913829e97039a6957d0ec07ce3e27aa571f6fa5f76631bedebcd0b3145886e7fa937fbd0d0b6317dcb5a10d22fefb51902833f9d
7
+ data.tar.gz: c84a1534f10a94828cbe6644d0473ba9e34a58ac9c2484c1fc4721559081de4b52a4b4a1aafd4307b29080157b04e756a372d291ade2505260c20583a2e403f7
data/lib/megam/api.rb CHANGED
@@ -125,9 +125,7 @@ module Megam
125
125
  assign_credentials
126
126
 
127
127
  ensure_host_is_flattened
128
-
129
- ensure_authkeys unless is_passthru?
130
-
128
+
131
129
  turn_off_ssl_verify
132
130
  end
133
131
 
@@ -141,6 +139,8 @@ module Megam
141
139
  start = Time.now
142
140
  Megam::Log.debug('START')
143
141
 
142
+ ensure_authkeys unless is_passthru?
143
+
144
144
  begin
145
145
  response = connection.request(params, &block)
146
146
  rescue Excon::Errors::HTTPStatusError => error
@@ -266,7 +266,7 @@ module Megam
266
266
 
267
267
  digest = OpenSSL::Digest.new('sha256')
268
268
 
269
- if pw_combo_missing?
269
+ if pw_combo_missing? && !is_passthru?
270
270
  hash = OpenSSL::HMAC.hexdigest(digest, Base64.strict_decode64(@password_hash), movingFactor)
271
271
  elsif api_combo_missing?
272
272
  hash = OpenSSL::HMAC.hexdigest(digest, @api_key, movingFactor)
@@ -278,10 +278,10 @@ module Megam
278
278
  end
279
279
 
280
280
  def build_header_puttusavi
281
- if pw_combo_missing?
281
+ if pw_combo_missing? && !is_passthru?
282
282
  @options[:headers] = @options[:headers].merge(X_Megam_PUTTUSAVI => "true")
283
283
  end
284
284
  end
285
285
 
286
286
  end
287
- end
287
+ end
@@ -27,8 +27,8 @@ module Megam
27
27
 
28
28
  # The body content needs to be a json.
29
29
  def post_accounts(new_account)
30
- @options = {:path => '/accounts/content',
31
- :body => Megam::JSONCompat.to_json(new_account)}.merge(@options)
30
+ @options = {path: '/accounts/content',
31
+ body: Megam::JSONCompat.to_json(new_account)}.merge(@options)
32
32
 
33
33
  request(
34
34
  :expects => 201,
@@ -38,8 +38,8 @@ module Megam
38
38
  end
39
39
 
40
40
  def update_accounts(update_account)
41
- @options = {:path => '/accounts/update',
42
- :body => Megam::JSONCompat.to_json(update_account)}.merge(@options)
41
+ @options = {path: '/accounts/update', passthru: true,
42
+ body: Megam::JSONCompat.to_json(update_account)}.merge(@options)
43
43
 
44
44
  request(
45
45
  :expects => 201,
@@ -49,8 +49,8 @@ module Megam
49
49
  end
50
50
 
51
51
  def forgot(account)
52
- @options = {:path => "/accounts/forgot/#{account["email"]}",
53
- :body => ''}.merge(@options)
52
+ @options = { path: "/accounts/forgot/#{account["email"]}", passthru: true,
53
+ body: ''}.merge(@options)
54
54
 
55
55
  request(
56
56
  :expects => 201,
@@ -60,8 +60,8 @@ module Megam
60
60
  end
61
61
 
62
62
  def password_reset(account)
63
- @options = {:path => "/accounts/password_reset",
64
- :body => Megam::JSONCompat.to_json(account)}.merge(@options)
63
+ @options = {:path => "/accounts/password_reset", passthru: true,
64
+ body: Megam::JSONCompat.to_json(account)}.merge(@options)
65
65
 
66
66
  request(
67
67
  :expects => 201,
@@ -71,4 +71,4 @@ module Megam
71
71
  end
72
72
 
73
73
  end
74
- end
74
+ end
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "1.7.2"
3
+ VERSION = "1.7.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: megam_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajthilak, Kishorekumar Neelamegam, Ranjitha R, Vinodhini V, Rathish VBR, Rajesh
@@ -271,4 +271,30 @@ rubygems_version: 2.5.1
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: Ruby Client for the Megam Vertice
274
- test_files: []
274
+ test_files:
275
+ - test/mixins/test_assemblies.rb
276
+ - test/mixins/test_assembly.rb
277
+ - test/mixins/test_component.rb
278
+ - test/test_accounts.rb
279
+ - test/test_addons.rb
280
+ - test/test_assemblies.rb
281
+ - test/test_assembly.rb
282
+ - test/test_balances.rb
283
+ - test/test_billedhistories.rb
284
+ - test/test_billingtranscations.rb
285
+ - test/test_components.rb
286
+ - test/test_disks.rb
287
+ - test/test_domains.rb
288
+ - test/test_eventsbilling.rb
289
+ - test/test_eventscontainer.rb
290
+ - test/test_eventsstorage.rb
291
+ - test/test_eventsvm.rb
292
+ - test/test_helper.rb
293
+ - test/test_marketplaces.rb
294
+ - test/test_organizations.rb
295
+ - test/test_promos.rb
296
+ - test/test_requests.rb
297
+ - test/test_sensors.rb
298
+ - test/test_snapshots.rb
299
+ - test/test_sshkeys.rb
300
+ - test/test_subscriptions.rb