zammad_api 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zammad_api/client.rb +1 -0
- data/lib/zammad_api/transport.rb +2 -0
- data/lib/zammad_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f1066dec474bcc211a86ca8979f74f02eef179f
|
4
|
+
data.tar.gz: 42a205c2f54d155d09094921803bdca1a86d0757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 292b8cd24f2551c6b3e455e6f29e3089218630cb40f34ac28cd0c3affc8891a5d68735a10198ebf7254981a4c859a7e761e79ffd9868ef06d02a3bb14c3b97fc
|
7
|
+
data.tar.gz: 697698a15ea1c857934b8b04b283e7bef83196c0c556d7b93514a7ad0574a41726f38b654cd0630526503166f1e017bc91008e0cf4e6b75d6f9a636a4daf8438
|
data/lib/zammad_api/client.rb
CHANGED
@@ -33,6 +33,7 @@ module ZammadAPI
|
|
33
33
|
|
34
34
|
# check for token auth
|
35
35
|
return if @config[:http_token] && !@config[:http_token].empty?
|
36
|
+
return if @config[:oauth2_token] && !@config[:oauth2_token].empty?
|
36
37
|
|
37
38
|
if !@config[:user] || @config[:user].empty?
|
38
39
|
raise 'missing user in config'
|
data/lib/zammad_api/transport.rb
CHANGED
@@ -17,6 +17,8 @@ module ZammadAPI
|
|
17
17
|
@conn.headers[:user_agent] = 'Zammad API Ruby'
|
18
18
|
if config[:http_token] && !config[:http_token].empty?
|
19
19
|
@conn.token_auth(config[:http_token])
|
20
|
+
elsif config[:oauth2_token] && !config[:oauth2_token].empty?
|
21
|
+
@conn.authorization :Bearer, config[:oauth2_token]
|
20
22
|
else
|
21
23
|
@conn.basic_auth(config[:user], config[:password])
|
22
24
|
end
|
data/lib/zammad_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zammad_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Edenhofer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -106,7 +106,7 @@ files:
|
|
106
106
|
- lib/zammad_api/resources/user.rb
|
107
107
|
- lib/zammad_api/transport.rb
|
108
108
|
- lib/zammad_api/version.rb
|
109
|
-
homepage: https://github.com/zammad/
|
109
|
+
homepage: https://github.com/zammad/zammad-api-client-ruby
|
110
110
|
licenses: []
|
111
111
|
metadata: {}
|
112
112
|
post_install_message:
|