authlogic 3.1.1 → 3.1.2

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

Potentially problematic release.


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

data/Gemfile CHANGED
@@ -1,12 +1,12 @@
1
1
  source :rubygems
2
2
 
3
- gem 'activesupport', '>= 3.0.0'
4
- gem 'activerecord', '>= 3.0.0'
3
+ gem 'activesupport', '>= 3.0.7'
4
+ gem 'activerecord', '>= 3.0.7'
5
5
 
6
6
  group :test do
7
7
  gem 'bcrypt-ruby'
8
8
  gem 'jeweler'
9
9
  gem 'rake'
10
- gem 'ruby-debug19'
10
+ gem 'debugger'
11
11
  gem 'sqlite3'
12
12
  end
data/Gemfile.lock CHANGED
@@ -12,11 +12,17 @@ GEM
12
12
  activesupport (3.2.5)
13
13
  i18n (~> 0.6)
14
14
  multi_json (~> 1.0)
15
- archive-tar-minitar (0.5.2)
16
15
  arel (3.0.2)
17
16
  bcrypt-ruby (3.0.1)
18
17
  builder (3.0.0)
19
18
  columnize (0.3.6)
19
+ debugger (1.1.3)
20
+ columnize (>= 0.3.1)
21
+ debugger-linecache (~> 1.1.1)
22
+ debugger-ruby_core_source (~> 1.1.2)
23
+ debugger-linecache (1.1.1)
24
+ debugger-ruby_core_source (>= 1.1.1)
25
+ debugger-ruby_core_source (1.1.3)
20
26
  git (1.2.5)
21
27
  i18n (0.6.0)
22
28
  jeweler (1.8.3)
@@ -25,22 +31,10 @@ GEM
25
31
  rake
26
32
  rdoc
27
33
  json (1.7.3)
28
- linecache19 (0.5.12)
29
- ruby_core_source (>= 0.1.4)
30
34
  multi_json (1.3.6)
31
35
  rake (0.9.2.2)
32
36
  rdoc (3.12)
33
37
  json (~> 1.4)
34
- ruby-debug-base19 (0.11.25)
35
- columnize (>= 0.3.1)
36
- linecache19 (>= 0.5.11)
37
- ruby_core_source (>= 0.1.4)
38
- ruby-debug19 (0.11.6)
39
- columnize (>= 0.3.1)
40
- linecache19 (>= 0.5.11)
41
- ruby-debug-base19 (>= 0.11.19)
42
- ruby_core_source (0.1.5)
43
- archive-tar-minitar (>= 0.5.2)
44
38
  sqlite3 (1.3.6)
45
39
  tzinfo (0.3.33)
46
40
 
@@ -48,10 +42,10 @@ PLATFORMS
48
42
  ruby
49
43
 
50
44
  DEPENDENCIES
51
- activerecord (>= 3.0.0)
52
- activesupport (>= 3.0.0)
45
+ activerecord (>= 3.0.7)
46
+ activesupport (>= 3.0.7)
53
47
  bcrypt-ruby
48
+ debugger
54
49
  jeweler
55
50
  rake
56
- ruby-debug19
57
51
  sqlite3
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 3
3
3
  :minor: 1
4
- :patch: 1
4
+ :patch: 2
5
5
  :build:
data/authlogic.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "authlogic"
8
- s.version = "3.1.1"
8
+ s.version = "3.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ben Johnson of Binary Logic"]
@@ -154,19 +154,19 @@ Gem::Specification.new do |s|
154
154
  s.specification_version = 3
155
155
 
156
156
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
157
- s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
158
- s.add_runtime_dependency(%q<activerecord>, [">= 3.0.0"])
157
+ s.add_runtime_dependency(%q<activesupport>, [">= 3.0.7"])
158
+ s.add_runtime_dependency(%q<activerecord>, [">= 3.0.7"])
159
159
  s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
160
160
  s.add_runtime_dependency(%q<activerecord>, [">= 3.0.0"])
161
161
  else
162
- s.add_dependency(%q<activesupport>, [">= 3.0.0"])
163
- s.add_dependency(%q<activerecord>, [">= 3.0.0"])
162
+ s.add_dependency(%q<activesupport>, [">= 3.0.7"])
163
+ s.add_dependency(%q<activerecord>, [">= 3.0.7"])
164
164
  s.add_dependency(%q<activesupport>, [">= 3.0.0"])
165
165
  s.add_dependency(%q<activerecord>, [">= 3.0.0"])
166
166
  end
167
167
  else
168
- s.add_dependency(%q<activesupport>, [">= 3.0.0"])
169
- s.add_dependency(%q<activerecord>, [">= 3.0.0"])
168
+ s.add_dependency(%q<activesupport>, [">= 3.0.7"])
169
+ s.add_dependency(%q<activerecord>, [">= 3.0.7"])
170
170
  s.add_dependency(%q<activesupport>, [">= 3.0.0"])
171
171
  s.add_dependency(%q<activerecord>, [">= 3.0.0"])
172
172
  end
@@ -65,7 +65,7 @@ module Authlogic
65
65
  # * <tt>Default:</tt> {:with => Authlogic::Regex.email, :message => lambda {I18n.t('error_messages.email_invalid', :default => "should look like an email address.")}}
66
66
  # * <tt>Accepts:</tt> Hash of options accepted by validates_format_of
67
67
  def validates_format_of_email_field_options(value = nil)
68
- rw_config(:validates_format_of_email_field_options, value, {:with => Authlogic::Regex.email, :message => lambda {I18n.t('error_messages.email_invalid', :default => "should look like an email address.")}})
68
+ rw_config(:validates_format_of_email_field_options, value, {:with => Authlogic::Regex.email, :message => I18n.t('error_messages.email_invalid', :default => "should look like an email address.")})
69
69
  end
70
70
  alias_method :validates_format_of_email_field_options=, :validates_format_of_email_field_options
71
71
 
@@ -62,7 +62,7 @@ module Authlogic
62
62
  # * <tt>Default:</tt> {:with => Authlogic::Regex.login, :message => lambda {I18n.t('error_messages.login_invalid', :default => "should use only letters, numbers, spaces, and .-_@ please.")}}
63
63
  # * <tt>Accepts:</tt> Hash of options accepted by validates_format_of
64
64
  def validates_format_of_login_field_options(value = nil)
65
- rw_config(:validates_format_of_login_field_options, value, {:with => Authlogic::Regex.login, :message => lambda {I18n.t('error_messages.login_invalid', :default => "should use only letters, numbers, spaces, and .-_@ please.")}})
65
+ rw_config(:validates_format_of_login_field_options, value, {:with => Authlogic::Regex.login, :message => I18n.t('error_messages.login_invalid', :default => "should use only letters, numbers, spaces, and .-_@ please.")})
66
66
  end
67
67
  alias_method :validates_format_of_login_field_options=, :validates_format_of_login_field_options
68
68
 
@@ -5,101 +5,101 @@ module ActsAsAuthenticTest
5
5
  def test_login_field_config
6
6
  assert_equal :login, User.login_field
7
7
  assert_nil Employee.login_field
8
-
8
+
9
9
  User.login_field = :nope
10
10
  assert_equal :nope, User.login_field
11
11
  User.login_field :login
12
12
  assert_equal :login, User.login_field
13
13
  end
14
-
14
+
15
15
  def test_validate_login_field_config
16
16
  assert User.validate_login_field
17
17
  assert Employee.validate_login_field
18
-
18
+
19
19
  User.validate_login_field = false
20
20
  assert !User.validate_login_field
21
21
  User.validate_login_field true
22
22
  assert User.validate_login_field
23
23
  end
24
-
24
+
25
25
  def test_validates_length_of_login_field_options_config
26
26
  assert_equal({:within => 3..100}, User.validates_length_of_login_field_options)
27
27
  assert_equal({:within => 3..100}, Employee.validates_length_of_login_field_options)
28
-
28
+
29
29
  User.validates_length_of_login_field_options = {:yes => "no"}
30
30
  assert_equal({:yes => "no"}, User.validates_length_of_login_field_options)
31
31
  User.validates_length_of_login_field_options({:within => 3..100})
32
32
  assert_equal({:within => 3..100}, User.validates_length_of_login_field_options)
33
33
  end
34
-
34
+
35
35
  def test_validates_format_of_login_field_options_config
36
- default = {:with => /\A\w[\w\.+\-_@ ]+$/, :message => I18n.t('error_messages.login_invalid', :default => "should use only letters, numbers, spaces, and .-_@ please.")}
36
+ default = {:with => /\A\w[\w\.+\-_@ ]+\z/, :message => I18n.t('error_messages.login_invalid', :default => "should use only letters, numbers, spaces, and .-_@ please.")}
37
37
  assert_equal default, User.validates_format_of_login_field_options
38
38
  assert_equal default, Employee.validates_format_of_login_field_options
39
-
39
+
40
40
  User.validates_format_of_login_field_options = {:yes => "no"}
41
41
  assert_equal({:yes => "no"}, User.validates_format_of_login_field_options)
42
42
  User.validates_format_of_login_field_options default
43
43
  assert_equal default, User.validates_format_of_login_field_options
44
44
  end
45
-
45
+
46
46
  def test_validates_uniqueness_of_login_field_options_config
47
47
  default = {:case_sensitive => false, :scope => User.validations_scope, :if => "#{User.login_field}_changed?".to_sym}
48
48
  assert_equal default, User.validates_uniqueness_of_login_field_options
49
-
49
+
50
50
  User.validates_uniqueness_of_login_field_options = {:yes => "no"}
51
51
  assert_equal({:yes => "no"}, User.validates_uniqueness_of_login_field_options)
52
52
  User.validates_uniqueness_of_login_field_options default
53
53
  assert_equal default, User.validates_uniqueness_of_login_field_options
54
54
  end
55
-
55
+
56
56
  def test_validates_length_of_login_field
57
57
  u = User.new
58
58
  u.login = "a"
59
59
  assert !u.valid?
60
60
  assert u.errors[:login].size > 0
61
-
61
+
62
62
  u.login = "aaaaaaaaaa"
63
63
  assert !u.valid?
64
64
  assert u.errors[:login].size == 0
65
65
  end
66
-
66
+
67
67
  def test_validates_format_of_login_field
68
68
  u = User.new
69
69
  u.login = "fdsf@^&*"
70
70
  assert !u.valid?
71
71
  assert u.errors[:login].size > 0
72
-
72
+
73
73
  u.login = "fdsfdsfdsfdsfs"
74
74
  assert !u.valid?
75
75
  assert u.errors[:login].size == 0
76
-
76
+
77
77
  u.login = "dakota.dux+1@gmail.com"
78
78
  assert !u.valid?
79
79
  assert u.errors[:login].size == 0
80
80
  end
81
-
81
+
82
82
  def test_validates_uniqueness_of_login_field
83
83
  u = User.new
84
84
  u.login = "bjohnson"
85
85
  assert !u.valid?
86
86
  assert u.errors[:login].size > 0
87
-
87
+
88
88
  u.login = "BJOHNSON"
89
89
  assert !u.valid?
90
90
  assert u.errors[:login].size > 0
91
-
91
+
92
92
  u.login = "fdsfdsf"
93
93
  assert !u.valid?
94
94
  assert u.errors[:login].size == 0
95
95
  end
96
-
96
+
97
97
  def test_find_by_smart_case_login_field
98
98
  ben = users(:ben)
99
99
  assert_equal ben, User.find_by_smart_case_login_field("bjohnson")
100
100
  assert_equal ben, User.find_by_smart_case_login_field("BJOHNSON")
101
101
  assert_equal ben, User.find_by_smart_case_login_field("Bjohnson")
102
-
102
+
103
103
  drew = employees(:drew)
104
104
  assert_equal drew, Employee.find_by_smart_case_login_field("dgainor@binarylogic.com")
105
105
  assert_equal drew, Employee.find_by_smart_case_login_field("Dgainor@binarylogic.com")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 3.0.0
21
+ version: 3.0.7
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 3.0.0
29
+ version: 3.0.7
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: activerecord
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
- version: 3.0.0
37
+ version: 3.0.7
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: 3.0.0
45
+ version: 3.0.7
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: activesupport
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -225,7 +225,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  segments:
227
227
  - 0
228
- hash: 1092096732576566616
228
+ hash: -4100786672371014491
229
229
  required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  none: false
231
231
  requirements: