oauth-multipart 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module OauthMultipart
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
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-09 00:00:00 +08:00
18
+ date: 2012-06-10 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency