oauth 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of oauth might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29fe1f105a51dedb366646ca34148b6273a47d38
4
- data.tar.gz: 11aba170f8b29621abcf596661917cf6aaaf29cf
3
+ metadata.gz: 5bc9d7d87cd97024d39e6cd354fd2dc1ae44f4d1
4
+ data.tar.gz: d3992c9bb4d3142d2a7d4e70f76836fbe1b94b56
5
5
  SHA512:
6
- metadata.gz: 9e0803a6c13174958a094cc048338575507a33d0b8f3556789ae315213790acb1628725a6c0104e05283d1903f712f2b25b5dd7978538cbbcf3c8c7b089ec727
7
- data.tar.gz: 27745d6f08bb244209a706ee5c5d8180f3fc8f45f2608c74696c851bf2fb98b5e46f5c916e5b5b3b9d02ca1c5163e819784509d38be2ce24e420a865815e4455
6
+ metadata.gz: 2e5602e42f41ed1312cddd17ce4ef9473fcac93152e64c16e6e30c151171e15702394e74534657e2b67b6b51f20767b698e877a707a144cf5d904445074e8ce9
7
+ data.tar.gz: fc164eae28c093eb3e777e469d70bf2527cd058c6772b304866fbdd7df686048307e65ad4c9c786db75035153e34b21755af7a1eecc094227c40f2dee388d0d2
@@ -51,6 +51,7 @@ When user returns create an access_token
51
51
 
52
52
  Now that you have an access token, you can use Typhoeus to interact with the OAuth provider if you choose.
53
53
 
54
+ require 'typhoeus'
54
55
  require 'oauth/request_proxy/typhoeus_request'
55
56
  oauth_params = {:consumer => oauth_consumer, :token => access_token}
56
57
  hydra = Typhoeus::Hydra.new
@@ -4,7 +4,6 @@ $LOAD_PATH << root unless $LOAD_PATH.include?(root)
4
4
  require 'oauth/version'
5
5
 
6
6
  require 'oauth/oauth'
7
- require 'oauth/core_ext'
8
7
 
9
8
  require 'oauth/client/helper'
10
9
  require 'oauth/signature/hmac/sha1'
@@ -131,7 +131,7 @@ class OAuth::CLI
131
131
  options[:method] = v
132
132
  end
133
133
 
134
- opts.on("--nonce NONCE", "Specifies the none to use.") do |v|
134
+ opts.on("--nonce NONCE", "Specifies the nonce to use.") do |v|
135
135
  options[:oauth_nonce] = v
136
136
  end
137
137
 
@@ -1,5 +1,6 @@
1
1
  if defined? ActionDispatch
2
2
  require 'oauth/request_proxy/rack_request'
3
+ require 'oauth/request_proxy/action_dispatch_request'
3
4
  require 'action_dispatch/testing/test_process'
4
5
  else
5
6
  require 'oauth/request_proxy/action_controller_request'
@@ -15,11 +15,11 @@ module OAuth
15
15
  end
16
16
 
17
17
  def _escape(string)
18
- URI.escape(string, OAuth::RESERVED_CHARACTERS)
18
+ URI::DEFAULT_PARSER.escape(string, OAuth::RESERVED_CHARACTERS)
19
19
  end
20
20
 
21
21
  def unescape(value)
22
- URI.unescape(value.gsub('+', '%2B'))
22
+ URI::DEFAULT_PARSER.unescape(value.gsub('+', '%2B'))
23
23
  end
24
24
 
25
25
  # Generate a random key of up to +size+ bytes. The value returned is Base64 encoded with non-word
@@ -23,7 +23,7 @@ then # rails 3.x
23
23
  ActionDispatch::Request::HTTP_METHOD_LOOKUP["patch"] = :patch
24
24
  end
25
25
 
26
- else # rails 4.x - already has patch
26
+ else # rails 4.x and later - already has patch
27
27
  require 'action_dispatch/http/request'
28
28
  end
29
29
 
@@ -0,0 +1,7 @@
1
+ require 'oauth/request_proxy/rack_request'
2
+
3
+ module OAuth::RequestProxy
4
+ class ActionDispatchRequest < OAuth::RequestProxy::RackRequest
5
+ proxies ActionDispatch::Request
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module OAuth
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pelle Braendgaard
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2017-05-24 00:00:00.000000000 Z
18
+ date: 2017-12-08 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rake
@@ -63,16 +63,16 @@ dependencies:
63
63
  name: actionpack
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '4.0'
68
+ version: '5.0'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '4.0'
75
+ version: '5.0'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: iconv
78
78
  requirement: !ruby/object:Gem::Requirement
@@ -93,14 +93,14 @@ dependencies:
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.0'
96
+ version: '2.0'
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '1.0'
103
+ version: '2.0'
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: rack-test
106
106
  requirement: !ruby/object:Gem::Requirement
@@ -255,7 +255,6 @@ files:
255
255
  - lib/oauth/client/helper.rb
256
256
  - lib/oauth/client/net_http.rb
257
257
  - lib/oauth/consumer.rb
258
- - lib/oauth/core_ext.rb
259
258
  - lib/oauth/errors.rb
260
259
  - lib/oauth/errors/error.rb
261
260
  - lib/oauth/errors/problem.rb
@@ -265,6 +264,7 @@ files:
265
264
  - lib/oauth/oauth_test_helper.rb
266
265
  - lib/oauth/request_proxy.rb
267
266
  - lib/oauth/request_proxy/action_controller_request.rb
267
+ - lib/oauth/request_proxy/action_dispatch_request.rb
268
268
  - lib/oauth/request_proxy/base.rb
269
269
  - lib/oauth/request_proxy/curb_request.rb
270
270
  - lib/oauth/request_proxy/em_http_request.rb
@@ -307,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
307
  version: '0'
308
308
  requirements: []
309
309
  rubyforge_project:
310
- rubygems_version: 2.6.11
310
+ rubygems_version: 2.2.2
311
311
  signing_key:
312
312
  specification_version: 4
313
313
  summary: OAuth Core Ruby implementation
@@ -1,53 +0,0 @@
1
- # these are to backport methods from 1.8.7/1.9.1 to 1.8.6
2
-
3
- class Object
4
-
5
- unless method_defined?(:tap)
6
- def tap
7
- yield self
8
- self
9
- end
10
- end
11
-
12
- end
13
-
14
- class String
15
-
16
- unless method_defined?(:bytesize)
17
- def bytesize
18
- self.size
19
- end
20
- end
21
-
22
- unless method_defined?(:bytes)
23
- def bytes
24
- require 'enumerator'
25
- Enumerable::Enumerator.new(self, :each_byte)
26
- end
27
- end
28
-
29
- end
30
-
31
- # TODO: Work around URI.escape obsolete method
32
- #
33
- # 21/May/2016 - We are silencing a warning introduced in 2009
34
- # https://github.com/ruby/ruby/commit/238b979f1789f95262a267d8df6239806f2859cc
35
- #
36
- # The only clear alternative to this problem is to invoke CGI.escape instead
37
- # but that one does not take a secondary argument so we can pass OAuth::RESERVED_CHARACTERS
38
- # As of today, ignoring this secondary argument would introduce 44 errors on our tests
39
- # 181 runs, 511 assertions, 44 failures, 0 errors, 0 skips
40
- #
41
- # If you have a proper way to work around this so we don't need to override ruby core code
42
- # Please send us a Pull Request
43
- module URI
44
- module Escape
45
- def escape(*arg)
46
- DEFAULT_PARSER.escape(*arg)
47
- end
48
-
49
- def unescape(*arg)
50
- DEFAULT_PARSER.unescape(*arg)
51
- end
52
- end
53
- end