pager_duty-connection 1.2.0 → 1.3.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
  SHA256:
3
- metadata.gz: 8bb93bb921c417024ae1b67084af9b46f665e665777189c9586833ce4b89eb14
4
- data.tar.gz: a1c13738d4bbdbed0d1694fe0eebe690a567e8cfc7b2161b1cd702521ce70beb
3
+ metadata.gz: b5ed2448d451ac75d9a5e2978c4bf1699c44226f0ea898e933dd183b46a280a5
4
+ data.tar.gz: 154c884d8a19d6970522150dede47047af93e4c0e2d5039985ceb123b96dfda4
5
5
  SHA512:
6
- metadata.gz: a86b4f5c25b3af8ac053f3938418eb30dffd2722ee5c33942d52eb1f2316a89455733d42c3514125405b9ce89c56dc840bcca2093996455aadbea37000037633
7
- data.tar.gz: 37850cf9bb30d87833859298029b41777bc35c728ffbe89ee4be71a19e8445bf241e25c152d86a410af89c1bbb09bb5cfd2babf76ccec10cfd94635a2f8b523f
6
+ metadata.gz: '08226d6faaf08512d6e268912e4ee57d47e0bcd3fddd2d3e56d8c67203f974409de137f206578c886028e027535e333edf8763cb190d3c6fc90607dec4605823'
7
+ data.tar.gz: a586dee66779efb0e89cdc8c7c720eeb0cc16b89f4af681cf8ad3a4735a270be9f9856bd40f81c346fef320def10822427ea2d26745e14df9d417929f24a058e
data/README.md CHANGED
@@ -51,7 +51,7 @@ Working code is worth a thousand words. The basics:
51
51
  pagerduty = PagerDuty::Connection.new(token)
52
52
 
53
53
  # setup the connection with OAuth2 token
54
- pagerduty = PagerDuty::Connection.new(token, :Bearer)
54
+ pagerduty = PagerDuty::Connection.new(token, token_type: :Bearer)
55
55
 
56
56
  # 4 main methods: `get`, `post`, `put`, and `delete`:
57
57
 
@@ -1,5 +1,5 @@
1
1
  module PagerDuty
2
2
  class Connection
3
- VERSION = "1.2.0"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
@@ -150,7 +150,13 @@ module PagerDuty
150
150
  @connection = Faraday.new do |conn|
151
151
  conn.url_prefix = "https://api.pagerduty.com/"
152
152
 
153
- conn.authorization(token_type, token)
153
+ token_arg =
154
+ case token_type
155
+ when :Token then { token: token }
156
+ when :Bearer then token
157
+ else raise ArgumentError, "invalid token_type: #{token_type.inspect}"
158
+ end
159
+ conn.authorization(token_type, token_arg)
154
160
 
155
161
  conn.use RaiseApiErrorOnNon200
156
162
  conn.use RaiseFileNotFoundOn404
@@ -19,6 +19,6 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_dependency "faraday", "~> 0.8", "< 1.0"
21
21
  gem.add_dependency "faraday_middleware", "~> 0.8", "< 1.0"
22
- gem.add_dependency "activesupport", ">= 3.2", "< 6.0"
22
+ gem.add_dependency "activesupport", ">= 3.2", "< 7.0"
23
23
  gem.add_dependency "hashie", ">= 1.2"
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pager_duty-connection
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Nichols
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-01 00:00:00.000000000 Z
11
+ date: 2020-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: '3.2'
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '6.0'
62
+ version: '7.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: '3.2'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '6.0'
72
+ version: '7.0'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: hashie
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.0.6
124
+ rubygems_version: 3.0.3
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Written with the power of faraday, pager_duty-connection tries to be a simple