dm-devise 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc
CHANGED
@@ -20,8 +20,8 @@ earlier versions, but it's not been tested (if you try, please let Jared Morgan
|
|
20
20
|
This README only covers dm-devise specifics. Make sure to read the devise
|
21
21
|
README http://github.com/plataformatec/devise/blob/master/README.rdoc
|
22
22
|
|
23
|
-
Last tested against devise master: 2011-04-
|
24
|
-
Last tested against devise release 1.3.
|
23
|
+
Last tested against devise master: 2011-04-21, commit 64cf8a45347137053b6c91bf85a3542c26e94771
|
24
|
+
Last tested against devise release 1.3.3
|
25
25
|
|
26
26
|
== Installation
|
27
27
|
|
@@ -33,7 +33,7 @@ Add dm-devise and dm gems to your Gemfile. The following gems are required:
|
|
33
33
|
gem 'dm-timestamps', '~> 1.1.0'
|
34
34
|
gem 'dm-rails', '~> 1.1.0'
|
35
35
|
gem 'dm-validations', '~> 1.1.0' # Do not include if using data_mapper_active_model
|
36
|
-
gem 'dm-devise', '~> 1.3.
|
36
|
+
gem 'dm-devise', '~> 1.3.1'
|
37
37
|
|
38
38
|
If you're using data_mapper_active_model do not include dm-validations in your
|
39
39
|
Gemfile.
|
@@ -51,7 +51,8 @@ DataMapper::Validate::ValidationErrors.default_error_messages = {
|
|
51
51
|
:primitive => '%s must be of type %s',
|
52
52
|
:not_found => '%s not found',
|
53
53
|
:already_confirmed => '%s was already confirmed, please try signing in',
|
54
|
-
:not_locked => '%s was not locked'
|
54
|
+
:not_locked => '%s was not locked',
|
55
|
+
:expired => '%s has expired, please request a new one'
|
55
56
|
}
|
56
57
|
|
57
58
|
module DataMapper
|
data/lib/dm-devise/version.rb
CHANGED
@@ -26,20 +26,4 @@ if DEVISE_ORM == :data_mapper
|
|
26
26
|
end
|
27
27
|
|
28
28
|
end
|
29
|
-
|
30
|
-
class AuthenticationOthersTest < ActionController::IntegrationTest
|
31
|
-
|
32
|
-
undef test_registration_in_xml_format_works_when_recognizing_path
|
33
|
-
|
34
|
-
# DM's validates_confirmation_of requires the confirmation field to be present,
|
35
|
-
# while ActiveModel by default skips the confirmation test if the confirmation
|
36
|
-
# value is nil. This test takes advantage of AM's behavior, so just add the
|
37
|
-
# :password_confirmation value.
|
38
|
-
test 'registration in xml format works when recognizing path' do
|
39
|
-
assert_nothing_raised do
|
40
|
-
# post user_registration_path(:format => 'xml', :user => {:email => "test@example.com", :password => "invalid"} )
|
41
|
-
post user_registration_path(:format => 'xml', :user => {:email => "test@example.com", :password => "invalid", :password_confirmation => "invalid"} )
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
29
|
end
|
@@ -20,6 +20,10 @@ module Shim
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def to_xml(*args)
|
23
|
-
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + super
|
23
|
+
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + super + "\n"
|
24
|
+
end
|
25
|
+
|
26
|
+
def to_json(*args)
|
27
|
+
{self.model.name.downcase => JSON.parse(super)}.to_json
|
24
28
|
end
|
25
29
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 1
|
10
|
+
version: 1.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jared Morgan
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-21 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|