oauth-active-resource 0.4.2 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  coverage
4
4
  rdoc
5
5
  pkg
6
+ *.gem
data/Rakefile CHANGED
@@ -5,11 +5,11 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "oauth-active-resource"
8
- gem.summary = %Q{TODO}
8
+ gem.summary = "An OAuth enabled ActiveResource wrapper"
9
9
  gem.email = "johannes@wagener.cc"
10
10
  gem.homepage = "http://github.com/jwagener/oauth-active-resource"
11
11
  gem.authors = ["Johannes Wagener"]
12
- gem.add_dependency "pelle-oauth"
12
+ gem.add_dependency "oauth", ">= 0.3.6"
13
13
  gem.add_dependency "activeresource"
14
14
  gem.add_dependency "multipart"
15
15
  end
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 4
4
- :patch: 1
4
+ :patch: 4
@@ -97,12 +97,27 @@ module OAuthActiveResource
97
97
  end
98
98
  end
99
99
 
100
+
101
+ # ignore is added because the multipart gem is adding an extra new line
102
+ # to the last parameter which will break parsing of track[sharing]
103
+ def self.multipart_bug_fix(params)
104
+ ordered_params = ActiveSupport::OrderedHash.new
105
+ params.each do |k,v|
106
+ ordered_params[k] = v
107
+ end
108
+ ordered_params[:ignore] = 'multipart bug'
109
+ ordered_params
110
+ end
111
+
100
112
  # allows you to POST/PUT an oauth authenticated multipart request
101
- def self.send_multipart_request(method,path,files,params={})
113
+ def self.send_multipart_request(method, path, files, params={})
102
114
  req = Net::HTTP::Post.new(path)
103
115
  if method == :put
104
116
  params[:_method] = "PUT"
105
117
  end
118
+
119
+ params = multipart_bug_fix(params)
120
+
106
121
  file_hash = {}
107
122
  files.each do |k,v|
108
123
  file_hash[k] = Net::HTTP::FileForPost.new(v)
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{oauth-active-resource}
5
- s.version = "0.4.2"
5
+ s.version = "0.4.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Johannes Wagener"]
9
- s.date = %q{2009-09-03}
9
+ s.date = %q{2009-11-19}
10
10
  s.email = %q{johannes@wagener.cc}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
@@ -58,7 +58,7 @@ Gem::Specification.new do |s|
58
58
  s.homepage = %q{http://github.com/jwagener/oauth-active-resource}
59
59
  s.rdoc_options = ["--charset=UTF-8"]
60
60
  s.require_paths = ["lib"]
61
- s.rubygems_version = %q{1.3.4}
61
+ s.rubygems_version = %q{1.3.5}
62
62
  s.summary = %q{An OAuth enabled ActiveResource wrapper}
63
63
  s.test_files = [
64
64
  "spec/oauth_active_resource_spec.rb",
@@ -70,16 +70,16 @@ Gem::Specification.new do |s|
70
70
  s.specification_version = 3
71
71
 
72
72
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
73
- s.add_runtime_dependency(%q<pelle-oauth>, [">= 0"])
73
+ s.add_runtime_dependency(%q<oauth>, [">= 0.3.6"])
74
74
  s.add_runtime_dependency(%q<activeresource>, [">= 0"])
75
75
  s.add_runtime_dependency(%q<multipart>, [">= 0"])
76
76
  else
77
- s.add_dependency(%q<pelle-oauth>, [">= 0"])
77
+ s.add_dependency(%q<oauth>, [">= 0.3.6"])
78
78
  s.add_dependency(%q<activeresource>, [">= 0"])
79
79
  s.add_dependency(%q<multipart>, [">= 0"])
80
80
  end
81
81
  else
82
- s.add_dependency(%q<pelle-oauth>, [">= 0"])
82
+ s.add_dependency(%q<oauth>, [">= 0.3.6"])
83
83
  s.add_dependency(%q<activeresource>, [">= 0"])
84
84
  s.add_dependency(%q<multipart>, [">= 0"])
85
85
  end
@@ -1,6 +1,6 @@
1
1
  require 'rubygems'
2
2
 
3
- gem 'pelle-oauth', '0.3.6'
3
+ gem 'oauth', '>= 0.3.6'
4
4
  require 'oauth'
5
5
 
6
6
  require 'spec_helper'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth-active-resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johannes Wagener
@@ -9,18 +9,18 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-03 00:00:00 +02:00
12
+ date: 2009-11-19 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: pelle-oauth
16
+ name: oauth
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: "0"
23
+ version: 0.3.6
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activeresource