adk2 0.0.2 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f3424b26aa32a125d4c8a5ebf87578fb21c729d
4
- data.tar.gz: 286456f416e8a6341987a82b27b00712e526ec20
3
+ metadata.gz: c27e223244b8424eccd608cf2255784b58a43bc7
4
+ data.tar.gz: 07dc4daa2a8a478b58a765f0e591c3fe94e8a258
5
5
  SHA512:
6
- metadata.gz: f63613b167fc19c9132ac66d7007cfd0d893fead07779ea774963e0fdff783a615fef3fc1e4c644bf48dc794bf0bcb38e5714393e91ed837457ca5c7a26fe97f
7
- data.tar.gz: 7e582b3199f39c85e435968552386b38aa0ccd13b5a19919bd3825dab3048ffd0043783c923961541ecfa558ebd1bc8bde8edfb16a8190060975d31f98528acf
6
+ metadata.gz: 10c851123b45fb3826254a685a3b63aecd0c9d1f856b8a99fc36ed95b9c225e762c9168c1f640e1bf4449d0baf1f6f560619f5454d3d8e8cee7ce5c74b653f1e
7
+ data.tar.gz: 907aab5bd7809f6107283cb94b7af071571366a6bbdd92c67d4ad624d014cdcea9b1a9c24d802d0ea9279dfe9debedcf0a60552a5690c0c96a023bd1d492675a
@@ -26,11 +26,12 @@ module Adk2
26
26
  end
27
27
 
28
28
  def get_api_token
29
+ return @api_token = nil if @username.nil? || @password.nil?
29
30
  response = RestClient.post(
30
31
  api_base_url + '/auth',
31
32
  {
32
33
  'email' => @username,
33
- 'password' => @username
34
+ 'password' => @password
34
35
  }.to_json
35
36
  )
36
37
 
@@ -46,7 +47,7 @@ module Adk2
46
47
  attr_reader :api_base_url, :api_token
47
48
 
48
49
  def http_get(path, params = {})
49
- Retryable.retryable(tries: 1, on: RestClient::Forbidden) do |_, exception|
50
+ Retryable.retryable(tries: 2, on: RestClient::Forbidden) do |_, exception|
50
51
  get_api_token if exception
51
52
 
52
53
  RestClient.get(
@@ -1,3 +1,3 @@
1
1
  module Adk2
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adk2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ad2games GmbH