oauth-multipart 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/oauth-multipart.rb +12 -0
- data/lib/oauth-multipart/version.rb +1 -1
- metadata +4 -4
data/lib/oauth-multipart.rb
CHANGED
@@ -65,6 +65,18 @@ OAuth::Consumer.class_eval do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
OAuth::AccessToken.class_eval do
|
68
|
+
|
69
|
+
def post_with_multipart(*args)
|
70
|
+
uri,headers,options = args
|
71
|
+
if headers && headers.find{|key,value| value.is_a?(UploadIO) }
|
72
|
+
multipart_post *args
|
73
|
+
else
|
74
|
+
post_without_multipart(*args)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
alias_method_chain :post,:multipart
|
79
|
+
|
68
80
|
def multipart_post(*args)
|
69
81
|
request(:multipart_post,*args)
|
70
82
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth-multipart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- aotianlong
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-06-
|
18
|
+
date: 2012-06-10 00:00:00 +08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|