patchboard 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/patchboard/action.rb +13 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bde78db8d9ac849efda5d8bb08b5f23b00c408ab
|
4
|
+
data.tar.gz: 34192a8c8f5aa26a0935f2f0c67969811425cd62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c43fd51294b574449ea515458564bf6043308ec1423186732ba2e7a5eb90568f5a2cc5a8a0d1d87cc8b4dc8e7c1ec7a74716e87b7250122f022dc65e07161d41
|
7
|
+
data.tar.gz: 87b7c6f25b74a8e788af1b3d2001dccb3c1c69ada108ac30dcf63d9a523af1d35f4b4171f838d69e34f8de33a2e27b004d13017d5e22e5372a14f999da3c40cd
|
data/lib/patchboard/action.rb
CHANGED
@@ -59,13 +59,24 @@ class Patchboard
|
|
59
59
|
:url => url, :method => @method, :headers => headers
|
60
60
|
}
|
61
61
|
|
62
|
+
input_options = self.process_args(args)
|
63
|
+
|
62
64
|
if @auth_schemes && context.respond_to?(:authorizer)
|
63
|
-
|
65
|
+
# Ugly hack to maintain backwards compatibility with existing
|
66
|
+
# implementations of context.authorizer
|
67
|
+
scheme, credential = begin
|
68
|
+
context.authorizer(
|
69
|
+
:schemes => @auth_schemes,
|
70
|
+
:resource => resource, :action => @name,
|
71
|
+
:request => input_options
|
72
|
+
)
|
73
|
+
rescue ArgumentError
|
74
|
+
context.authorizer(@auth_schemes, resource, @name)
|
75
|
+
end
|
64
76
|
|
65
77
|
headers["Authorization"] = "#{scheme} #{credential}"
|
66
78
|
end
|
67
79
|
|
68
|
-
input_options = self.process_args(args)
|
69
80
|
if input_options[:body]
|
70
81
|
options[:body] = input_options[:body]
|
71
82
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patchboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew King
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|