exvo_auth 0.16.4 → 0.16.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e754347d0b073427eb5fb87c24e29737385b9f69
4
- data.tar.gz: cb7d2d9e463830e5a987bcfe26b3993b5260546f
3
+ metadata.gz: 5aa4c9580044bd46a3b1ecc1f679f41d227c359f
4
+ data.tar.gz: e38f50ba072497d774c2c58a9b9ffbc187e5147d
5
5
  SHA512:
6
- metadata.gz: 87b3b27ebe336e27a9d9b7c6a2466a685ebb1743b78fdb2407bc3671ae5360ce0b7ba441996857bef46ba6352ff61d99d3adb7b8c9aa7531c662511083b45cab
7
- data.tar.gz: e4fae07b824b09f1913653f514bbc79e972afaa4479013360ae1cf7e71a5cc1c5099c30aa5f593ec5e9c3265268cba8d51d65d3fd41dd9f13ea4c7d2ea4b412e
6
+ metadata.gz: a5df3d67af7db159610f8640080c5993e5522fbbf93715d1fece91498d873abd5f0025dc5763d37545d86a84b20702134e1d1ab13b2804fdcec8e91579abbd28
7
+ data.tar.gz: cc9ca91bcd25ab840084129272701fddf39f017fc796714f8c98cdaf7d5992472d956608abb246a629cdef1af64fd4861b49252100cbcb4a8c95c82757274dea
@@ -20,9 +20,10 @@ Gem::Specification.new do |gem|
20
20
  gem.add_dependency "httparty"
21
21
  gem.add_dependency "activemodel", "~> 3.0"
22
22
  gem.add_dependency "activesupport", "~> 3.0"
23
- gem.add_dependency "exvo_helpers", "~> 0.5"
23
+ gem.add_dependency "exvo_helpers", "~> 0.6"
24
+ gem.add_dependency "rack"
24
25
 
25
- gem.add_development_dependency "mocha"
26
+ gem.add_development_dependency "mocha", "~> 0.14"
26
27
  gem.add_development_dependency "test-unit"
27
28
  gem.add_development_dependency "rake"
28
29
  gem.add_development_dependency "guard"
@@ -2,6 +2,7 @@ require 'multi_json'
2
2
  require 'httparty'
3
3
  require 'uri'
4
4
  require 'base64'
5
+ require 'rack'
5
6
  require 'exvo_helpers'
6
7
 
7
8
  module ExvoAuth
@@ -140,6 +140,6 @@ module ExvoAuth::Controllers::Base
140
140
  end
141
141
 
142
142
  def store_request!
143
- session[:user_return_to] = request.path if request.get?
143
+ session[:user_return_to] = request.original_fullpath if request.get?
144
144
  end
145
145
  end
@@ -1,3 +1,3 @@
1
1
  module ExvoAuth
2
- VERSION = "0.16.4"
2
+ VERSION = "0.16.5"
3
3
  end
@@ -5,5 +5,5 @@ SimpleCov.start
5
5
 
6
6
  require 'rubygems'
7
7
  require 'test/unit'
8
- require 'mocha'
8
+ require 'mocha/setup'
9
9
  require 'exvo_auth'
@@ -39,4 +39,28 @@ class TestExvoAuth < Test::Unit::TestCase
39
39
  c = ExvoAuth::Autonomous::Consumer.new(:app_id => "baz")
40
40
  assert_true c.send(:basement).included_modules.include?(HTTParty)
41
41
  end
42
+
43
+ test "storing full request with query params in the session" do
44
+ class Controller
45
+ include ExvoAuth::Controllers::Base
46
+ end
47
+
48
+ c = Controller.new
49
+ c.expects(:unobtrusively_authenticate_user!)
50
+ c.expects(:signed_in?).returns(false)
51
+
52
+ original_fullpath = '/inbox?query=yes'
53
+ request = stub(:original_fullpath => original_fullpath, :get? => true)
54
+ c.stubs(:request).returns(request)
55
+
56
+ session = {}
57
+ c.stubs(:session => session)
58
+
59
+ c.stubs(:params => {})
60
+ c.expects(:redirect_to).with(c.sign_in_path)
61
+
62
+ c.authenticate_user!
63
+
64
+ assert_equal original_fullpath, session[:user_return_to]
65
+ end
42
66
  end
@@ -5,7 +5,7 @@ class TestIntegration < Test::Unit::TestCase
5
5
  Exvo::Helpers.auth_host = "auth.exvo.co"
6
6
  Exvo::Helpers.auth_client_id = "foo"
7
7
  Exvo::Helpers.auth_client_secret = "bar"
8
- Exvo::Helpers.auth_require_ssl = true
8
+ Exvo::Helpers.env = "staging"
9
9
  end
10
10
 
11
11
  test "integration with auth.exvo.co" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exvo_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.4
4
+ version: 0.16.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacek Becela
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-12 00:00:00.000000000 Z
12
+ date: 2013-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -59,28 +59,42 @@ dependencies:
59
59
  requirements:
60
60
  - - ~>
61
61
  - !ruby/object:Gem::Version
62
- version: '0.5'
62
+ version: '0.6'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: '0.5'
69
+ version: '0.6'
70
70
  - !ruby/object:Gem::Dependency
71
- name: mocha
71
+ name: rack
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - '>='
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
- type: :development
77
+ type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - '>='
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: mocha
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ version: '0.14'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ~>
96
+ - !ruby/object:Gem::Version
97
+ version: '0.14'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: test-unit
86
100
  requirement: !ruby/object:Gem::Requirement
@@ -243,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
257
  version: '0'
244
258
  requirements: []
245
259
  rubyforge_project:
246
- rubygems_version: 2.0.3
260
+ rubygems_version: 2.1.5
247
261
  signing_key:
248
262
  specification_version: 4
249
263
  summary: User and App authentication for Exvo