html5_validators 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +31 -8
- data/README.rdoc +2 -2
- data/gemfiles/Gemfile.rails-3.0 +4 -0
- data/gemfiles/Gemfile.rails-3.1 +7 -0
- data/gemfiles/Gemfile.rails-3.2 +7 -0
- data/gemfiles/Gemfile.rails-4.1 +6 -0
- data/gemfiles/Gemfile.rails-4.2 +6 -0
- data/gemfiles/Gemfile.rails-edge +1 -0
- data/html5_validators.gemspec +0 -1
- data/lib/html5_validators/active_record/base.rb +15 -9
- data/lib/html5_validators/version.rb +1 -1
- data/spec/models/active_record/inherited_spec.rb +8 -0
- metadata +20 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce3e90d93c4855d7bc7680fe214fd9d4715df134
|
|
4
|
+
data.tar.gz: b9c00e66bf79c7f2f1ba6cc7485dc499abfa0866
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0897fd574293e79806322a314675fd41b5802709326ab508a19f276b70d11a57d2a4f1411a4f1711034c2fd44e9f287a4ca4de687256da97f9eedc354ae3ebd9
|
|
7
|
+
data.tar.gz: 819f6a2ab4e1ee7deb2741ef2f92ed5d1f3b433bebca0b863575286deda4de6d479330c018b582d71f2e03573228cf08eb2ee31bddc350ef62b34deee00290a2
|
data/.travis.yml
CHANGED
|
@@ -1,28 +1,51 @@
|
|
|
1
1
|
language: ruby
|
|
2
|
+
|
|
2
3
|
rvm:
|
|
3
4
|
- 1.8.7
|
|
4
5
|
- 1.9.3
|
|
5
6
|
- 2.0.0
|
|
7
|
+
- 2.1
|
|
8
|
+
- 2.2.1
|
|
6
9
|
- ruby-head
|
|
10
|
+
|
|
7
11
|
gemfile:
|
|
8
12
|
- gemfiles/Gemfile.rails-3.0
|
|
9
13
|
- gemfiles/Gemfile.rails-3.1
|
|
10
14
|
- gemfiles/Gemfile.rails-3.2
|
|
11
15
|
- gemfiles/Gemfile.rails-4.0
|
|
16
|
+
- gemfiles/Gemfile.rails-4.1
|
|
17
|
+
- gemfiles/Gemfile.rails-4.2
|
|
12
18
|
- gemfiles/Gemfile.rails-edge
|
|
19
|
+
|
|
20
|
+
sudo: false
|
|
21
|
+
|
|
13
22
|
matrix:
|
|
14
23
|
exclude:
|
|
15
|
-
- rvm: 2.0.0
|
|
16
|
-
gemfile: gemfiles/Gemfile-rails.3.0
|
|
17
|
-
- rvm: 2.0.0
|
|
18
|
-
gemfile: gemfiles/Gemfile-rails.3.1
|
|
19
|
-
- rvm: ruby-head
|
|
20
|
-
gemfile: gemfiles/Gemfile-rails.3.0
|
|
21
|
-
- rvm: ruby-head
|
|
22
|
-
gemfile: gemfiles/Gemfile-rails.3.1
|
|
23
24
|
- rvm: 1.8.7
|
|
24
25
|
gemfile: gemfiles/Gemfile.rails-4.0
|
|
25
26
|
- rvm: 1.8.7
|
|
27
|
+
gemfile: gemfiles/Gemfile.rails-4.1
|
|
28
|
+
- rvm: 1.8.7
|
|
29
|
+
gemfile: gemfiles/Gemfile.rails-4.2
|
|
30
|
+
- rvm: 1.8.7
|
|
31
|
+
gemfile: gemfiles/Gemfile.rails-edge
|
|
32
|
+
- rvm: 1.9.3
|
|
26
33
|
gemfile: gemfiles/Gemfile.rails-edge
|
|
34
|
+
- rvm: 2.0.0
|
|
35
|
+
gemfile: gemfiles/Gemfile.rails-edge
|
|
36
|
+
- rvm: 2.1
|
|
37
|
+
gemfile: gemfiles/Gemfile.rails-edge
|
|
38
|
+
- rvm: 2.2.1
|
|
39
|
+
gemfile: gemfiles/Gemfile.rails-3.0
|
|
40
|
+
- rvm: 2.2.1
|
|
41
|
+
gemfile: gemfiles/Gemfile.rails-3.1
|
|
42
|
+
- rvm: 2.2.1
|
|
43
|
+
gemfile: gemfiles/Gemfile.rails-3.2
|
|
44
|
+
- rvm: ruby-head
|
|
45
|
+
gemfile: gemfiles/Gemfile.rails-3.0
|
|
46
|
+
- rvm: ruby-head
|
|
47
|
+
gemfile: gemfiles/Gemfile.rails-3.1
|
|
48
|
+
- rvm: ruby-head
|
|
49
|
+
gemfile: gemfiles/Gemfile.rails-3.2
|
|
27
50
|
allow_failures:
|
|
28
51
|
- rvm: ruby-head
|
data/README.rdoc
CHANGED
|
@@ -118,9 +118,9 @@ Write `auto_html5_validation = false` in ActiveModelish class
|
|
|
118
118
|
|
|
119
119
|
== Supported versions
|
|
120
120
|
|
|
121
|
-
* Ruby 1.8.7, 1.9.2, 1.9.3, 2.0, 2.1 (trunk)
|
|
121
|
+
* Ruby 1.8.7, 1.9.2, 1.9.3, 2.0, 2.1, 2.2, 2.3 (trunk)
|
|
122
122
|
|
|
123
|
-
* Rails 3.0.x, 3.1.x, 3.2.x, 4.0.x, 4.1 (edge)
|
|
123
|
+
* Rails 3.0.x, 3.1.x, 3.2.x, 4.0.x, 4.1, 4.2, 5.0 (edge)
|
|
124
124
|
|
|
125
125
|
* HTML5 compatible browsers
|
|
126
126
|
|
data/gemfiles/Gemfile.rails-3.0
CHANGED
|
@@ -3,6 +3,10 @@ source 'https://rubygems.org'
|
|
|
3
3
|
gem 'railties', '~> 3.0.0'
|
|
4
4
|
gem 'activerecord', '~> 3.0.0'
|
|
5
5
|
gem 'nokogiri', '~> 1.5.0'
|
|
6
|
+
gem 'rspec-rails', '~> 2.14.1'
|
|
6
7
|
gem 'capybara', '~> 2.0.0'
|
|
8
|
+
# stick to versions that work under Ruby 1.8 for now
|
|
9
|
+
gem 'mime-types', '< 2'
|
|
10
|
+
gem 'rubyzip', '< 1'
|
|
7
11
|
|
|
8
12
|
gemspec :path => '..'
|
data/gemfiles/Gemfile.rails-3.1
CHANGED
|
@@ -2,7 +2,14 @@ source 'https://rubygems.org'
|
|
|
2
2
|
|
|
3
3
|
gem 'railties', '~> 3.1.0'
|
|
4
4
|
gem 'activerecord', '~> 3.1.0'
|
|
5
|
+
if RUBY_VERSION <= '1.8.7'
|
|
6
|
+
gem 'i18n', '~> 0.6.11'
|
|
7
|
+
end
|
|
5
8
|
gem 'nokogiri', '~> 1.5.0'
|
|
9
|
+
gem 'rspec-rails', '~> 2.14.1'
|
|
6
10
|
gem 'capybara', '~> 2.0.0'
|
|
11
|
+
# stick to versions that work under Ruby 1.8 for now
|
|
12
|
+
gem 'mime-types', '< 2'
|
|
13
|
+
gem 'rubyzip', '< 1'
|
|
7
14
|
|
|
8
15
|
gemspec :path => '..'
|
data/gemfiles/Gemfile.rails-3.2
CHANGED
|
@@ -2,7 +2,14 @@ source 'https://rubygems.org'
|
|
|
2
2
|
|
|
3
3
|
gem 'railties', '~> 3.2.0'
|
|
4
4
|
gem 'activerecord', '~> 3.2.0'
|
|
5
|
+
if RUBY_VERSION <= '1.8.7'
|
|
6
|
+
gem 'i18n', '~> 0.6.11'
|
|
7
|
+
end
|
|
5
8
|
gem 'nokogiri', '~> 1.5.0'
|
|
9
|
+
gem 'rspec-rails', '~> 2.14.1'
|
|
6
10
|
gem 'capybara', '~> 2.0.0'
|
|
11
|
+
# stick to versions that work under Ruby 1.8 for now
|
|
12
|
+
gem 'mime-types', '< 2'
|
|
13
|
+
gem 'rubyzip', '< 1'
|
|
7
14
|
|
|
8
15
|
gemspec :path => '..'
|
data/gemfiles/Gemfile.rails-edge
CHANGED
data/html5_validators.gemspec
CHANGED
|
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
|
|
|
18
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
20
20
|
s.require_paths = ['lib']
|
|
21
|
-
s.add_development_dependency 'activerecord'
|
|
22
21
|
s.add_development_dependency 'rspec-rails'
|
|
23
22
|
s.add_development_dependency 'capybara', '>= 2'
|
|
24
23
|
s.add_development_dependency 'sqlite3'
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
module
|
|
2
|
-
|
|
1
|
+
module Html5Validators
|
|
2
|
+
module ActiveRecordExtension
|
|
3
|
+
extend ActiveSupport::Concern
|
|
4
|
+
|
|
3
5
|
# Future subclasses will pick up the model extension
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
module ClassMethods
|
|
7
|
+
|
|
8
|
+
def inherited(kls)
|
|
9
|
+
super
|
|
7
10
|
kls.class_eval do
|
|
8
11
|
cattr_accessor :auto_html5_validation, :instance_accessor => false, :instance_reader => false, :instance_writer => false
|
|
9
12
|
end if kls.superclass == ActiveRecord::Base
|
|
10
13
|
end
|
|
11
|
-
alias_method_chain :inherited, :html5_validation
|
|
12
14
|
end
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
included do
|
|
17
|
+
# Existing subclasses pick up the model extension as well
|
|
18
|
+
self.descendants.each do |kls|
|
|
19
|
+
cattr_accessor :auto_html5_validation, :instance_accessor => false, :instance_reader => false, :instance_writer => false if kls.superclass == ActiveRecord::Base
|
|
20
|
+
end
|
|
17
21
|
end
|
|
18
22
|
end
|
|
19
23
|
end
|
|
24
|
+
|
|
25
|
+
ActiveRecord::Base.send(:include, Html5Validators::ActiveRecordExtension)
|
metadata
CHANGED
|
@@ -1,83 +1,69 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html5_validators
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Akira Matsuda
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: activerecord
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - '>='
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - '>='
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
27
13
|
- !ruby/object:Gem::Dependency
|
|
28
14
|
name: rspec-rails
|
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
|
30
16
|
requirements:
|
|
31
|
-
- -
|
|
17
|
+
- - ">="
|
|
32
18
|
- !ruby/object:Gem::Version
|
|
33
19
|
version: '0'
|
|
34
20
|
type: :development
|
|
35
21
|
prerelease: false
|
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
23
|
requirements:
|
|
38
|
-
- -
|
|
24
|
+
- - ">="
|
|
39
25
|
- !ruby/object:Gem::Version
|
|
40
26
|
version: '0'
|
|
41
27
|
- !ruby/object:Gem::Dependency
|
|
42
28
|
name: capybara
|
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
|
44
30
|
requirements:
|
|
45
|
-
- -
|
|
31
|
+
- - ">="
|
|
46
32
|
- !ruby/object:Gem::Version
|
|
47
33
|
version: '2'
|
|
48
34
|
type: :development
|
|
49
35
|
prerelease: false
|
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
37
|
requirements:
|
|
52
|
-
- -
|
|
38
|
+
- - ">="
|
|
53
39
|
- !ruby/object:Gem::Version
|
|
54
40
|
version: '2'
|
|
55
41
|
- !ruby/object:Gem::Dependency
|
|
56
42
|
name: sqlite3
|
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
|
58
44
|
requirements:
|
|
59
|
-
- -
|
|
45
|
+
- - ">="
|
|
60
46
|
- !ruby/object:Gem::Version
|
|
61
47
|
version: '0'
|
|
62
48
|
type: :development
|
|
63
49
|
prerelease: false
|
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
51
|
requirements:
|
|
66
|
-
- -
|
|
52
|
+
- - ">="
|
|
67
53
|
- !ruby/object:Gem::Version
|
|
68
54
|
version: '0'
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
56
|
name: rake
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
|
72
58
|
requirements:
|
|
73
|
-
- -
|
|
59
|
+
- - ">="
|
|
74
60
|
- !ruby/object:Gem::Version
|
|
75
61
|
version: '0'
|
|
76
62
|
type: :development
|
|
77
63
|
prerelease: false
|
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
65
|
requirements:
|
|
80
|
-
- -
|
|
66
|
+
- - ">="
|
|
81
67
|
- !ruby/object:Gem::Version
|
|
82
68
|
version: '0'
|
|
83
69
|
description: A gem/plugin for Rails 3+ that enables client-side validation using ActiveModel
|
|
@@ -88,9 +74,9 @@ executables: []
|
|
|
88
74
|
extensions: []
|
|
89
75
|
extra_rdoc_files: []
|
|
90
76
|
files:
|
|
91
|
-
- .gitignore
|
|
92
|
-
- .rspec
|
|
93
|
-
- .travis.yml
|
|
77
|
+
- ".gitignore"
|
|
78
|
+
- ".rspec"
|
|
79
|
+
- ".travis.yml"
|
|
94
80
|
- Gemfile
|
|
95
81
|
- MIT-LICENSE
|
|
96
82
|
- README.rdoc
|
|
@@ -99,6 +85,8 @@ files:
|
|
|
99
85
|
- gemfiles/Gemfile.rails-3.1
|
|
100
86
|
- gemfiles/Gemfile.rails-3.2
|
|
101
87
|
- gemfiles/Gemfile.rails-4.0
|
|
88
|
+
- gemfiles/Gemfile.rails-4.1
|
|
89
|
+
- gemfiles/Gemfile.rails-4.2
|
|
102
90
|
- gemfiles/Gemfile.rails-edge
|
|
103
91
|
- html5_validators.gemspec
|
|
104
92
|
- lib/html5_validators.rb
|
|
@@ -110,6 +98,7 @@ files:
|
|
|
110
98
|
- lib/html5_validators/version.rb
|
|
111
99
|
- spec/fake_app.rb
|
|
112
100
|
- spec/features/validation_spec.rb
|
|
101
|
+
- spec/models/active_record/inherited_spec.rb
|
|
113
102
|
- spec/spec_helper.rb
|
|
114
103
|
homepage: https://github.com/amatsuda/html5_validators
|
|
115
104
|
licenses: []
|
|
@@ -120,21 +109,22 @@ require_paths:
|
|
|
120
109
|
- lib
|
|
121
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
111
|
requirements:
|
|
123
|
-
- -
|
|
112
|
+
- - ">="
|
|
124
113
|
- !ruby/object:Gem::Version
|
|
125
114
|
version: '0'
|
|
126
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
116
|
requirements:
|
|
128
|
-
- -
|
|
117
|
+
- - ">="
|
|
129
118
|
- !ruby/object:Gem::Version
|
|
130
119
|
version: '0'
|
|
131
120
|
requirements: []
|
|
132
121
|
rubyforge_project: html5_validators
|
|
133
|
-
rubygems_version: 2.
|
|
122
|
+
rubygems_version: 2.4.5
|
|
134
123
|
signing_key:
|
|
135
124
|
specification_version: 4
|
|
136
125
|
summary: Automatic client side validation using HTML5 Form Validation
|
|
137
126
|
test_files:
|
|
138
127
|
- spec/fake_app.rb
|
|
139
128
|
- spec/features/validation_spec.rb
|
|
129
|
+
- spec/models/active_record/inherited_spec.rb
|
|
140
130
|
- spec/spec_helper.rb
|