validates_url_format_of 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,7 +32,7 @@ class ValidatesUrlFormatOfTest < MiniTest::Unit::TestCase
32
32
  ].each do |url|
33
33
  @model.homepage = url
34
34
  @model.save
35
- assert !@model.errors.on(:homepage), "#{url.inspect} should have been accepted"
35
+ assert @model.errors[:homepage].empty?, "#{url.inspect} should have been accepted"
36
36
  end
37
37
  end
38
38
 
@@ -54,7 +54,7 @@ class ValidatesUrlFormatOfTest < MiniTest::Unit::TestCase
54
54
  ].each do |url|
55
55
  @model.homepage = url
56
56
  @model.save
57
- assert @model.errors.on(:homepage), "#{url.inspect} should have been rejected"
57
+ assert @model.errors[:homepage], "#{url.inspect} should have been rejected"
58
58
  end
59
59
  end
60
60
 
@@ -62,14 +62,14 @@ class ValidatesUrlFormatOfTest < MiniTest::Unit::TestCase
62
62
  @model.homepage = 'x'
63
63
  @model.my_UrL_hooray = 'x'
64
64
  @model.save
65
- assert_equal ValidatesUrlFormatOf::DEFAULT_MESSAGE, @model.errors.on(:homepage)
66
- assert_equal ValidatesUrlFormatOf::DEFAULT_MESSAGE_URL, @model.errors.on(:my_UrL_hooray)
65
+ assert_equal ValidatesUrlFormatOf::DEFAULT_MESSAGE, @model.errors[:homepage].first
66
+ assert_equal ValidatesUrlFormatOf::DEFAULT_MESSAGE_URL, @model.errors[:my_UrL_hooray].first
67
67
  end
68
68
 
69
69
  def test_can_override_defaults
70
70
  @model.custom_url = 'x'
71
71
  @model.save
72
- assert_equal 'custom message', @model.errors.on(:custom_url)
72
+ assert_equal 'custom message', @model.errors[:custom_url].first
73
73
  end
74
74
 
75
75
  end
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  Gem::Specification.new do |gem|
4
- gem.add_dependency 'activerecord', '~> 2.3.4'
4
+ gem.add_dependency 'activerecord', '~> 3.0.10'
5
5
  gem.add_development_dependency 'minitest', '~> 2.5'
6
6
  gem.add_development_dependency 'rake', '~> 0.9'
7
7
  gem.add_development_dependency 'rdiscount', '~> 1.6'
@@ -17,5 +17,5 @@ Gem::Specification.new do |gem|
17
17
  gem.required_rubygems_version = Gem::Requirement.new('>= 1.3.6')
18
18
  gem.summary = %q{ActiveRecord URL Validation}
19
19
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
- gem.version = '0.1.3'
20
+ gem.version = '0.2.0'
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_url_format_of
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -16,18 +16,18 @@ date: 2011-08-27 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord
19
- requirement: &70206836681580 !ruby/object:Gem::Requirement
19
+ requirement: &70219050840640 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ~>
23
23
  - !ruby/object:Gem::Version
24
- version: 2.3.4
24
+ version: 3.0.10
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *70206836681580
27
+ version_requirements: *70219050840640
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: minitest
30
- requirement: &70206836680760 !ruby/object:Gem::Requirement
30
+ requirement: &70219050839460 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ~>
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: '2.5'
36
36
  type: :development
37
37
  prerelease: false
38
- version_requirements: *70206836680760
38
+ version_requirements: *70219050839460
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: rake
41
- requirement: &70206836679720 !ruby/object:Gem::Requirement
41
+ requirement: &70219050838240 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ~>
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: '0.9'
47
47
  type: :development
48
48
  prerelease: false
49
- version_requirements: *70206836679720
49
+ version_requirements: *70219050838240
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: rdiscount
52
- requirement: &70206836675100 !ruby/object:Gem::Requirement
52
+ requirement: &70219050837700 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ~>
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: '1.6'
58
58
  type: :development
59
59
  prerelease: false
60
- version_requirements: *70206836675100
60
+ version_requirements: *70219050837700
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: sqlite3
63
- requirement: &70206836674480 !ruby/object:Gem::Requirement
63
+ requirement: &70219050837080 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ~>
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: '1.3'
69
69
  type: :development
70
70
  prerelease: false
71
- version_requirements: *70206836674480
71
+ version_requirements: *70219050837080
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: yard
74
- requirement: &70206836673880 !ruby/object:Gem::Requirement
74
+ requirement: &70219050836020 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ~>
@@ -79,7 +79,7 @@ dependencies:
79
79
  version: '0.7'
80
80
  type: :development
81
81
  prerelease: false
82
- version_requirements: *70206836673880
82
+ version_requirements: *70219050836020
83
83
  description: Rails plugin that provides a validates_url_format_of method to ActiveRecord
84
84
  models. URLs are validated by regexp.
85
85
  email: conickal@gmail.com