bootstrap_validator_rails 0.6.0 → 0.7.0
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/README.md +165 -0
- data/Rakefile +8 -16
- data/lib/bootstrap_validator_rails.rb +3 -5
- data/lib/bootstrap_validator_rails/helper.rb +7 -0
- data/lib/bootstrap_validator_rails/validators/format_validator.rb +1 -1
- data/lib/bootstrap_validator_rails/validators/length_validator.rb +1 -1
- data/lib/bootstrap_validator_rails/validators/numericality_validator.rb +3 -3
- data/lib/bootstrap_validator_rails/validators/presence_validator.rb +1 -1
- data/lib/bootstrap_validator_rails/validators/validator.rb +1 -1
- data/lib/bootstrap_validator_rails/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +1273 -0
- metadata +3 -10
- data/test/bootstrap_validator_rails_test.rb +0 -14
- data/test/dummy/app/models/post.rb +0 -6
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20140723124112_create_posts.rb +0 -9
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bootstrap_validator_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- huynhquancam
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-07-
|
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bootstrap_form
|
|
@@ -75,6 +75,7 @@ extensions: []
|
|
|
75
75
|
extra_rdoc_files: []
|
|
76
76
|
files:
|
|
77
77
|
- MIT-LICENSE
|
|
78
|
+
- README.md
|
|
78
79
|
- Rakefile
|
|
79
80
|
- app/assets/javascripts/bootstrapValidatorRails.js
|
|
80
81
|
- lib/bootstrap_validator_rails.rb
|
|
@@ -92,14 +93,12 @@ files:
|
|
|
92
93
|
- lib/bootstrap_validator_rails/validators/validator.rb
|
|
93
94
|
- lib/bootstrap_validator_rails/version.rb
|
|
94
95
|
- lib/tasks/bootstrap_validator_rails_tasks.rake
|
|
95
|
-
- test/bootstrap_validator_rails_test.rb
|
|
96
96
|
- test/dummy/README.rdoc
|
|
97
97
|
- test/dummy/Rakefile
|
|
98
98
|
- test/dummy/app/assets/javascripts/application.js
|
|
99
99
|
- test/dummy/app/assets/stylesheets/application.css
|
|
100
100
|
- test/dummy/app/controllers/application_controller.rb
|
|
101
101
|
- test/dummy/app/helpers/application_helper.rb
|
|
102
|
-
- test/dummy/app/models/post.rb
|
|
103
102
|
- test/dummy/app/views/layouts/application.html.erb
|
|
104
103
|
- test/dummy/bin/bundle
|
|
105
104
|
- test/dummy/bin/rails
|
|
@@ -123,8 +122,6 @@ files:
|
|
|
123
122
|
- test/dummy/config/locales/en.yml
|
|
124
123
|
- test/dummy/config/routes.rb
|
|
125
124
|
- test/dummy/config/secrets.yml
|
|
126
|
-
- test/dummy/db/development.sqlite3
|
|
127
|
-
- test/dummy/db/migrate/20140723124112_create_posts.rb
|
|
128
125
|
- test/dummy/db/schema.rb
|
|
129
126
|
- test/dummy/db/test.sqlite3
|
|
130
127
|
- test/dummy/log/ENV=test.log
|
|
@@ -171,12 +168,10 @@ signing_key:
|
|
|
171
168
|
specification_version: 4
|
|
172
169
|
summary: BootstrapValidator for Rails
|
|
173
170
|
test_files:
|
|
174
|
-
- test/bootstrap_validator_rails_test.rb
|
|
175
171
|
- test/dummy/app/assets/javascripts/application.js
|
|
176
172
|
- test/dummy/app/assets/stylesheets/application.css
|
|
177
173
|
- test/dummy/app/controllers/application_controller.rb
|
|
178
174
|
- test/dummy/app/helpers/application_helper.rb
|
|
179
|
-
- test/dummy/app/models/post.rb
|
|
180
175
|
- test/dummy/app/views/layouts/application.html.erb
|
|
181
176
|
- test/dummy/bin/bundle
|
|
182
177
|
- test/dummy/bin/rails
|
|
@@ -200,8 +195,6 @@ test_files:
|
|
|
200
195
|
- test/dummy/config/routes.rb
|
|
201
196
|
- test/dummy/config/secrets.yml
|
|
202
197
|
- test/dummy/config.ru
|
|
203
|
-
- test/dummy/db/development.sqlite3
|
|
204
|
-
- test/dummy/db/migrate/20140723124112_create_posts.rb
|
|
205
198
|
- test/dummy/db/schema.rb
|
|
206
199
|
- test/dummy/db/test.sqlite3
|
|
207
200
|
- test/dummy/log/development.log
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
require 'test_helper'
|
|
2
|
-
|
|
3
|
-
class BootstrapValidatorRailsTest < ActionView::TestCase
|
|
4
|
-
def setup
|
|
5
|
-
@post = Post.new(title: 'An awesome title')
|
|
6
|
-
@form = view.bootstrap_validation_form_for(@post, url: '#') do |f|
|
|
7
|
-
f.check_box :accepted
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
test 'test will be included later' do
|
|
12
|
-
p @form
|
|
13
|
-
end
|
|
14
|
-
end
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
class Post < ActiveRecord::Base
|
|
2
|
-
validates :title, presence: true, length: {within: 20..50}, numericality: {greater_than_or_equal_to: 20, odd: true}
|
|
3
|
-
validates :title, format: { with: /\A[a-zA-Z]+\z/, message: "only allows letters" }
|
|
4
|
-
validates :intro, presence: true, if: :published?
|
|
5
|
-
validates :accepted, acceptance: true
|
|
6
|
-
end
|
|
Binary file
|