dm-devise 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1fe8de96a22b5bc6bf782f4c6dcaf77486962a8c
4
+ data.tar.gz: 4d4f4fed04bc70ccae5f997767ba5ab665476b3b
5
+ SHA512:
6
+ metadata.gz: 108265a651a2cc04dbc491eba921a093871eda54e54cc5dc3d85ddd02de9d59167f8838870efd550fb7188ab6b7e3ff7282bc180d8171af7d70110ca1c6a99e0
7
+ data.tar.gz: 950217feb8a47302caeaf31e16679c8a5e9d7a5083265d34bd7dbe7fcf4395d526ebd8d14b7f2a1b4fd3eee58e5fd857d8829e6f9c9433764dc6a97c771c1682
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
@@ -8,8 +8,8 @@ dm-devise is intended for use with Rails >= 3.2 and devise >= 2.1.
8
8
  This README only covers dm-devise specifics. Make sure to read the devise
9
9
  README http://github.com/plataformatec/devise/blob/master/README.rdoc
10
10
 
11
- Last tested against devise master: 2013-01-11, commit 872ef2b97fdb2efc072559db56daf15943f32eec
12
- Last tested against devise release 2.2.1
11
+ Last tested against devise master: 2013-03-22, commit 72cbafa3225bab8904d62df9b1f5cbaaa0322931
12
+ Last tested against devise release 2.2.3
13
13
 
14
14
  == Installation
15
15
 
@@ -13,7 +13,7 @@ if Devise.data_mapper_validation_lib == 'dm-validations'
13
13
  # the message, including translation.
14
14
  def add(field_name, message = nil, active_record_options = {})
15
15
  if message.kind_of?(Symbol)
16
- message = self.class.default_error_message(message, field_name, active_record_options.values)
16
+ message = get_message(field_name, message, active_record_options)
17
17
  end
18
18
  original_add(field_name, message) unless errors[field_name].include?(message)
19
19
  end
@@ -23,6 +23,19 @@ if Devise.data_mapper_validation_lib == 'dm-validations'
23
23
  def to_xml(options = {})
24
24
  @errors.to_hash.to_xml(options.merge(:root => 'errors'))
25
25
  end
26
+
27
+ private
28
+
29
+ ##
30
+ # verify if a message is already define in property and use is if possible
31
+ #
32
+ def get_message(field_name, message = nil, active_record_options = {})
33
+ if resource.class.properties[:email].options[:messages]
34
+ resource.class.properties[:email].options[:messages][message]
35
+ else
36
+ self.class.default_error_message(message, field_name, active_record_options.values)
37
+ end
38
+ end
26
39
  end
27
40
  end
28
41
  end
@@ -1,5 +1,5 @@
1
1
  module DataMapper
2
2
  module Devise
3
- VERSION = '2.2.0'.freeze
3
+ VERSION = '2.2.1'.freeze
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ require "rails/test_help"
11
11
  require "orm/#{DEVISE_ORM}"
12
12
 
13
13
  I18n.load_path << "#{DEVISE_PATH}/test/support/locale/en.yml"
14
- require 'mocha'
14
+ require 'mocha/setup'
15
15
 
16
16
  require 'webrat'
17
17
  Webrat.configure do |config|
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
5
- prerelease:
4
+ version: 2.2.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jared Morgan
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-11 00:00:00.000000000 Z
11
+ date: 2013-03-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: dm-core
16
- requirement: &87065470 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -24,11 +22,17 @@ dependencies:
24
22
  version: '2.0'
25
23
  type: :runtime
26
24
  prerelease: false
27
- version_requirements: *87065470
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.0.2
30
+ - - <
31
+ - !ruby/object:Gem::Version
32
+ version: '2.0'
28
33
  - !ruby/object:Gem::Dependency
29
34
  name: dm-migrations
30
- requirement: &87064870 !ruby/object:Gem::Requirement
31
- none: false
35
+ requirement: !ruby/object:Gem::Requirement
32
36
  requirements:
33
37
  - - ! '>='
34
38
  - !ruby/object:Gem::Version
@@ -38,11 +42,17 @@ dependencies:
38
42
  version: '2.0'
39
43
  type: :runtime
40
44
  prerelease: false
41
- version_requirements: *87064870
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: 1.0.2
50
+ - - <
51
+ - !ruby/object:Gem::Version
52
+ version: '2.0'
42
53
  - !ruby/object:Gem::Dependency
43
54
  name: dm-serializer
44
- requirement: &87063760 !ruby/object:Gem::Requirement
45
- none: false
55
+ requirement: !ruby/object:Gem::Requirement
46
56
  requirements:
47
57
  - - ! '>='
48
58
  - !ruby/object:Gem::Version
@@ -52,11 +62,17 @@ dependencies:
52
62
  version: '2.0'
53
63
  type: :runtime
54
64
  prerelease: false
55
- version_requirements: *87063760
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 1.0.2
70
+ - - <
71
+ - !ruby/object:Gem::Version
72
+ version: '2.0'
56
73
  - !ruby/object:Gem::Dependency
57
74
  name: dm-timestamps
58
- requirement: &87057410 !ruby/object:Gem::Requirement
59
- none: false
75
+ requirement: !ruby/object:Gem::Requirement
60
76
  requirements:
61
77
  - - ! '>='
62
78
  - !ruby/object:Gem::Version
@@ -66,11 +82,17 @@ dependencies:
66
82
  version: '2.0'
67
83
  type: :runtime
68
84
  prerelease: false
69
- version_requirements: *87057410
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: 1.0.2
90
+ - - <
91
+ - !ruby/object:Gem::Version
92
+ version: '2.0'
70
93
  - !ruby/object:Gem::Dependency
71
94
  name: dm-rails
72
- requirement: &87056790 !ruby/object:Gem::Requirement
73
- none: false
95
+ requirement: !ruby/object:Gem::Requirement
74
96
  requirements:
75
97
  - - ! '>='
76
98
  - !ruby/object:Gem::Version
@@ -80,18 +102,28 @@ dependencies:
80
102
  version: '2.0'
81
103
  type: :runtime
82
104
  prerelease: false
83
- version_requirements: *87056790
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: 1.0.2
110
+ - - <
111
+ - !ruby/object:Gem::Version
112
+ version: '2.0'
84
113
  - !ruby/object:Gem::Dependency
85
114
  name: devise
86
- requirement: &87056340 !ruby/object:Gem::Requirement
87
- none: false
115
+ requirement: !ruby/object:Gem::Requirement
88
116
  requirements:
89
117
  - - ! '>='
90
118
  - !ruby/object:Gem::Version
91
119
  version: '1.3'
92
120
  type: :runtime
93
121
  prerelease: false
94
- version_requirements: *87056340
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '1.3'
95
127
  description: dm-devise adds DataMapper support to devise (http://github.com/plataformatec/devise)
96
128
  for authentication support for Rails
97
129
  email: jmorgan@morgancreative.net
@@ -131,27 +163,26 @@ files:
131
163
  - test/test_models.rb
132
164
  homepage: https://github.com/jm81/dm-devise
133
165
  licenses: []
166
+ metadata: {}
134
167
  post_install_message:
135
168
  rdoc_options: []
136
169
  require_paths:
137
170
  - lib
138
171
  required_ruby_version: !ruby/object:Gem::Requirement
139
- none: false
140
172
  requirements:
141
173
  - - ! '>='
142
174
  - !ruby/object:Gem::Version
143
175
  version: '0'
144
176
  required_rubygems_version: !ruby/object:Gem::Requirement
145
- none: false
146
177
  requirements:
147
178
  - - ! '>='
148
179
  - !ruby/object:Gem::Version
149
180
  version: '0'
150
181
  requirements: []
151
182
  rubyforge_project:
152
- rubygems_version: 1.8.10
183
+ rubygems_version: 2.0.0
153
184
  signing_key:
154
- specification_version: 3
185
+ specification_version: 4
155
186
  summary: DataMapper support for devise
156
187
  test_files: []
157
188
  has_rdoc: