merb-auth-core 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/merb-auth-core.rb +1 -1
- data/lib/merb-auth-core/authenticated_helper.rb +12 -12
- data/lib/merb-auth-core/authentication.rb +35 -35
- data/lib/merb-auth-core/bootloader.rb +2 -2
- data/lib/merb-auth-core/callbacks.rb +6 -6
- data/lib/merb-auth-core/customizations.rb +5 -5
- data/lib/merb-auth-core/errors.rb +1 -1
- data/lib/merb-auth-core/responses.rb +8 -8
- data/lib/merb-auth-core/router_helper.rb +6 -6
- data/lib/merb-auth-core/session_mixin.rb +10 -10
- data/lib/merb-auth-core/strategy.rb +37 -37
- data/lib/merb-auth-core/version.rb +1 -1
- data/spec/helpers/authentication_helper_spec.rb +22 -22
- data/spec/merb-auth-core/authentication_spec.rb +66 -66
- data/spec/merb-auth-core/callbacks_spec.rb +16 -16
- data/spec/merb-auth-core/customizations_spec.rb +5 -5
- data/spec/merb-auth-core/errors_spec.rb +9 -9
- data/spec/merb-auth-core/failed_login_spec.rb +16 -16
- data/spec/merb-auth-core/merb-auth-core_spec.rb +1 -1
- data/spec/merb-auth-core/router_helper_spec.rb +23 -23
- data/spec/merb-auth-core/strategy_spec.rb +54 -54
- data/spec/spec_helper.rb +7 -7
- metadata +14 -6
data/spec/spec_helper.rb
CHANGED
@@ -14,9 +14,9 @@ require "merb-auth-core"
|
|
14
14
|
require 'spec'
|
15
15
|
|
16
16
|
|
17
|
-
Merb.start :environment => "test",
|
18
|
-
:adapter => "runner",
|
19
|
-
:session_store => "cookie",
|
17
|
+
Merb.start :environment => "test",
|
18
|
+
:adapter => "runner",
|
19
|
+
:session_store => "cookie",
|
20
20
|
:session_secret_key => "d3a6e6f99a25004da82b71af8b9ed0ab71d3ea21"
|
21
21
|
|
22
22
|
module StrategyHelper
|
@@ -48,7 +48,7 @@ end
|
|
48
48
|
|
49
49
|
class User
|
50
50
|
attr_accessor :name, :age, :id
|
51
|
-
|
51
|
+
|
52
52
|
def initialize(opts = {})
|
53
53
|
@name = opts.fetch(:name, "NAME")
|
54
54
|
@age = opts.fetch(:age, 42)
|
@@ -58,7 +58,7 @@ end
|
|
58
58
|
|
59
59
|
class Users < Application
|
60
60
|
before :ensure_authenticated
|
61
|
-
|
61
|
+
|
62
62
|
def index
|
63
63
|
"You Made It!"
|
64
64
|
end
|
@@ -79,7 +79,7 @@ class Merb::Authentication
|
|
79
79
|
u = User.new(:id => id)
|
80
80
|
end
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
def store_user(user)
|
84
84
|
user.nil? ? nil : 24
|
85
85
|
end
|
@@ -91,7 +91,7 @@ class Viking
|
|
91
91
|
def self.captures
|
92
92
|
@captures ||= []
|
93
93
|
end
|
94
|
-
|
94
|
+
|
95
95
|
def self.capture(klass)
|
96
96
|
@captures ||= []
|
97
97
|
case klass
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-auth-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 1
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Adam French
|
@@ -15,30 +16,33 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-
|
19
|
+
date: 2010-06-15 00:00:00 +01:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
22
23
|
name: merb-core
|
23
24
|
prerelease: false
|
24
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
25
27
|
requirements:
|
26
28
|
- - ~>
|
27
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 13
|
28
31
|
segments:
|
29
32
|
- 1
|
30
33
|
- 1
|
31
|
-
|
32
|
-
version: 1.1.0
|
34
|
+
version: "1.1"
|
33
35
|
type: :runtime
|
34
36
|
version_requirements: *id001
|
35
37
|
- !ruby/object:Gem::Dependency
|
36
38
|
name: rspec
|
37
39
|
prerelease: false
|
38
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
39
42
|
requirements:
|
40
43
|
- - ">="
|
41
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 13
|
42
46
|
segments:
|
43
47
|
- 1
|
44
48
|
- 2
|
@@ -96,23 +100,27 @@ rdoc_options:
|
|
96
100
|
require_paths:
|
97
101
|
- lib
|
98
102
|
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
none: false
|
99
104
|
requirements:
|
100
105
|
- - ">="
|
101
106
|
- !ruby/object:Gem::Version
|
107
|
+
hash: 3
|
102
108
|
segments:
|
103
109
|
- 0
|
104
110
|
version: "0"
|
105
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
106
113
|
requirements:
|
107
114
|
- - ">="
|
108
115
|
- !ruby/object:Gem::Version
|
116
|
+
hash: 3
|
109
117
|
segments:
|
110
118
|
- 0
|
111
119
|
version: "0"
|
112
120
|
requirements: []
|
113
121
|
|
114
122
|
rubyforge_project:
|
115
|
-
rubygems_version: 1.3.
|
123
|
+
rubygems_version: 1.3.7
|
116
124
|
signing_key:
|
117
125
|
specification_version: 3
|
118
126
|
summary: Merb plugin that provides basic authentication support
|