cafmal 0.23.0 → 0.24.0

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: 2d6712ce334fc95292bc85613b620f54a5ae86a2
4
- data.tar.gz: 696029cbc24ad382f20074fb4ff8b68a70c7f5d4
3
+ metadata.gz: b3cd71fdce05fdc565e0d0492e03ee852d5d2acf
4
+ data.tar.gz: 252c075420d09aa7a87ff27f0d44accd55483c87
5
5
  SHA512:
6
- metadata.gz: 0bcbe576328a29f763cd5adaf681e9145e7161848566d83ee577a09203f9d58b924d8d5f81e48ca27f2bf4a4abaeda4f4a954ece956c9d410a18ada34180b96e
7
- data.tar.gz: 02e7fcad6e7c1e140716e0d383cc48106f51a9225a0b62fd10ef245a11d39b95e15a3db9d2684ec05fb7a4e5a2eea5d2e5325040d171e00c74307d1f646a252d
6
+ metadata.gz: 3fed0dc271d2b44e5a47f7a6f8e35e58d41d2db5ecca7ae8d1b5a62cc81ccf363ecf31321e92f97094ef968dbfa85c689d36525675927a41bc4f941460daff72
7
+ data.tar.gz: db0aa9e725d24936c66540c2ca4787b609546a87453edba4c60fe6972ed6cfe6fe52bfe94e674597d1af5dd7c343a7f08c2751754a17fdf2985c33a3d70b17fa
data/lib/cafmal/auth.rb CHANGED
@@ -77,9 +77,9 @@ module Cafmal
77
77
  end
78
78
 
79
79
  # refresh token
80
- def refresh
81
- headers = {"Content-Type" => "application/json", "Authorization" => "Bearer #{@token}"}
82
- credentials = {token: @token}.to_json
80
+ def refresh(token)
81
+ headers = {"Content-Type" => "application/json", "Authorization" => "Bearer #{token}"}
82
+ credentials = {token: token}.to_json
83
83
  refresh_request = Cafmal::Request::Post.new(@cafmal_api_url + '/user_token_refresh', credentials, headers)
84
84
  if refresh_request.code < 300
85
85
  @token = JSON.parse(refresh_request.response.body)['jwt']
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Cafmal
4
- VERSION = "0.23.0"
4
+ VERSION = "0.24.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafmal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nils Bartels
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-06 00:00:00.000000000 Z
11
+ date: 2016-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler