smart_field_constraints 0.0.2 → 0.1.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.
- data/{CHANGELOG → CHANGELOG.rdoc} +8 -10
- data/{README → README.rdoc} +10 -10
- data/Rakefile +44 -36
- data/lib/smart_field_constraints/extensions/form_helper.rb +42 -43
- data/lib/smart_field_constraints/extensions/validations.rb +60 -62
- data/test/app_root/config/environment.rb +1 -2
- data/test/{unit → helpers}/form_helper_test.rb +9 -13
- data/test/unit/validations_test.rb +1 -1
- metadata +24 -24
@@ -1,23 +1,21 @@
|
|
1
|
-
|
1
|
+
== master
|
2
2
|
|
3
|
-
|
3
|
+
== 0.1.0 / 2008-12-14
|
4
4
|
|
5
|
-
* Remove
|
5
|
+
* Remove the PluginAWeek namespace
|
6
|
+
* Update tests to use ActionView::TestCase
|
6
7
|
|
7
|
-
|
8
|
+
== 0.0.2 / 2008-06-22
|
8
9
|
|
10
|
+
* Remove log files from gems
|
11
|
+
* Don't check length validation constraints if models were loaded prior to the plugin being loaded [grosser]
|
9
12
|
* Refactor FormHelper extension to allow for others to easily extend the plugin for things like textarea lengths [grosser]
|
10
|
-
|
11
13
|
* Add support for tracking validates_size_of validations
|
12
14
|
|
13
|
-
|
15
|
+
== 0.0.1 / 2008-05-05
|
14
16
|
|
15
17
|
* Initial public release
|
16
|
-
|
17
18
|
* Add documentation
|
18
|
-
|
19
19
|
* Remove maxlength attribute for textare tags since it's not valid html
|
20
|
-
|
21
20
|
* Don't set the size based on the smart maxlength
|
22
|
-
|
23
21
|
* Don't expect columns to exist for every attribute
|
data/{README → README.rdoc}
RENAMED
@@ -5,21 +5,21 @@ fields based on column constraints and validations.
|
|
5
5
|
|
6
6
|
== Resources
|
7
7
|
|
8
|
-
Wiki
|
9
|
-
|
10
|
-
* http://wiki.pluginaweek.org/Smart_field_constraints
|
11
|
-
|
12
8
|
API
|
13
9
|
|
14
10
|
* http://api.pluginaweek.org/smart_field_constraints
|
15
11
|
|
12
|
+
Bugs
|
13
|
+
|
14
|
+
* http://pluginaweek.lighthouseapp.com/projects/13287-smart_field_constraints
|
15
|
+
|
16
16
|
Development
|
17
17
|
|
18
|
-
* http://
|
18
|
+
* http://github.com/pluginaweek/smart_field_constraints
|
19
19
|
|
20
20
|
Source
|
21
21
|
|
22
|
-
*
|
22
|
+
* git://github.com/pluginaweek/smart_field_constraints.git
|
23
23
|
|
24
24
|
== Description
|
25
25
|
|
@@ -28,9 +28,9 @@ and improving the user experience. Normally, adding the +maxlength+ configuratio
|
|
28
28
|
option for input fields is not DRY and duplicates data already available in the
|
29
29
|
model or database. This plugin helps make this automatic.
|
30
30
|
|
31
|
-
+
|
31
|
+
+smart_field_constraints+ looks in two places for determining the maxlength value
|
32
32
|
for an input field:
|
33
|
-
* Model validates_length_of validations
|
33
|
+
* Model validates_length_of/validates_size_of validations
|
34
34
|
* Database column definitions (limits specifically)
|
35
35
|
|
36
36
|
Model validations will always take preference over database column definitions.
|
@@ -59,7 +59,7 @@ HTML:
|
|
59
59
|
Since the +maxlength+ attribute is not W3C-compliant for textareas, it is not
|
60
60
|
included in the types of fields that will be automatically assigned length
|
61
61
|
constraints. However, you can easily add this yourself by extending the plugin
|
62
|
-
|
62
|
+
yourself.
|
63
63
|
|
64
64
|
== Caveats
|
65
65
|
|
@@ -81,7 +81,7 @@ config/environment.rb:
|
|
81
81
|
== Testing
|
82
82
|
|
83
83
|
Before you can run any tests, the following gem must be installed:
|
84
|
-
* plugin_test_helper[http://
|
84
|
+
* plugin_test_helper[http://github.com/pluginaweek/plugin_test_helper]
|
85
85
|
|
86
86
|
To run against a specific version of Rails:
|
87
87
|
|
data/Rakefile
CHANGED
@@ -3,46 +3,54 @@ require 'rake/rdoctask'
|
|
3
3
|
require 'rake/gempackagetask'
|
4
4
|
require 'rake/contrib/sshpublisher'
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
spec = Gem::Specification.new do |s|
|
7
|
+
s.name = 'smart_field_constraints'
|
8
|
+
s.version = '0.1.0'
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.summary = 'Intelligently applies a maxlength attribute for text fields based on column constraints and validations'
|
11
|
+
|
12
|
+
s.files = FileList['{lib,test}/**/*'] + %w(CHANGELOG.rdoc init.rb LICENSE Rakefile README.rdoc) - FileList['test/app_root/{log,log/*,script,script/*}']
|
13
|
+
s.require_path = 'lib'
|
14
|
+
s.has_rdoc = true
|
15
|
+
s.test_files = Dir['test/**/*_test.rb']
|
16
|
+
|
17
|
+
s.author = 'Aaron Pfeifer'
|
18
|
+
s.email = 'aaron@pluginaweek.org'
|
19
|
+
s.homepage = 'http://www.pluginaweek.org'
|
20
|
+
s.rubyforge_project = 'pluginaweek'
|
21
|
+
end
|
22
|
+
|
23
|
+
desc 'Default: run all tests.'
|
12
24
|
task :default => :test
|
13
25
|
|
14
|
-
desc
|
26
|
+
desc "Test the #{spec.name} plugin."
|
15
27
|
Rake::TestTask.new(:test) do |t|
|
16
28
|
t.libs << 'lib'
|
17
|
-
t.
|
29
|
+
t.test_files = spec.test_files
|
18
30
|
t.verbose = true
|
19
31
|
end
|
20
32
|
|
21
|
-
|
33
|
+
begin
|
34
|
+
require 'rcov/rcovtask'
|
35
|
+
namespace :test do
|
36
|
+
desc "Test the #{spec.name} plugin with Rcov."
|
37
|
+
Rcov::RcovTask.new(:rcov) do |t|
|
38
|
+
t.libs << 'lib'
|
39
|
+
t.test_files = spec.test_files
|
40
|
+
t.rcov_opts << '--exclude="^(?!lib/)"'
|
41
|
+
t.verbose = true
|
42
|
+
end
|
43
|
+
end
|
44
|
+
rescue LoadError
|
45
|
+
end
|
46
|
+
|
47
|
+
desc "Generate documentation for the #{spec.name} plugin."
|
22
48
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
23
49
|
rdoc.rdoc_dir = 'rdoc'
|
24
|
-
rdoc.title =
|
50
|
+
rdoc.title = spec.name
|
25
51
|
rdoc.template = '../rdoc_template.rb'
|
26
52
|
rdoc.options << '--line-numbers' << '--inline-source'
|
27
|
-
rdoc.rdoc_files.include('README')
|
28
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
29
|
-
end
|
30
|
-
|
31
|
-
spec = Gem::Specification.new do |s|
|
32
|
-
s.name = PKG_NAME
|
33
|
-
s.version = PKG_VERSION
|
34
|
-
s.platform = Gem::Platform::RUBY
|
35
|
-
s.summary = 'Intelligently applies a maxlength attribute for text fields based on column constraints and validations'
|
36
|
-
|
37
|
-
s.files = FileList['{lib,test}/**/*'].to_a - FileList['test/app_root/log/*'].to_a + %w(CHANGELOG init.rb LICENSE Rakefile README)
|
38
|
-
s.require_path = 'lib'
|
39
|
-
s.autorequire = 'smart_field_constraints'
|
40
|
-
s.has_rdoc = true
|
41
|
-
s.test_files = Dir['test/**/*_test.rb']
|
42
|
-
|
43
|
-
s.author = 'Aaron Pfeifer'
|
44
|
-
s.email = 'aaron@pluginaweek.org'
|
45
|
-
s.homepage = 'http://www.pluginaweek.org'
|
53
|
+
rdoc.rdoc_files.include('README.rdoc', 'CHANGELOG.rdoc', 'LICENSE', 'lib/**/*.rb')
|
46
54
|
end
|
47
55
|
|
48
56
|
Rake::GemPackageTask.new(spec) do |p|
|
@@ -51,14 +59,14 @@ Rake::GemPackageTask.new(spec) do |p|
|
|
51
59
|
p.need_zip = true
|
52
60
|
end
|
53
61
|
|
54
|
-
desc 'Publish the beta gem'
|
62
|
+
desc 'Publish the beta gem.'
|
55
63
|
task :pgem => [:package] do
|
56
|
-
Rake::SshFilePublisher.new('aaron@pluginaweek.org', '/home/aaron/gems.pluginaweek.org/public/gems', 'pkg', "#{
|
64
|
+
Rake::SshFilePublisher.new('aaron@pluginaweek.org', '/home/aaron/gems.pluginaweek.org/public/gems', 'pkg', "#{spec.name}-#{spec.version}.gem").upload
|
57
65
|
end
|
58
66
|
|
59
|
-
desc 'Publish the API documentation'
|
67
|
+
desc 'Publish the API documentation.'
|
60
68
|
task :pdoc => [:rdoc] do
|
61
|
-
Rake::SshDirPublisher.new('aaron@pluginaweek.org', "/home/aaron/api.pluginaweek.org/public/#{
|
69
|
+
Rake::SshDirPublisher.new('aaron@pluginaweek.org', "/home/aaron/api.pluginaweek.org/public/#{spec.name}", 'rdoc').upload
|
62
70
|
end
|
63
71
|
|
64
72
|
desc 'Publish the API docs and gem'
|
@@ -71,10 +79,10 @@ task :release => [:gem, :package] do
|
|
71
79
|
ruby_forge = RubyForge.new.configure
|
72
80
|
ruby_forge.login
|
73
81
|
|
74
|
-
%w(
|
75
|
-
file = "pkg/#{
|
82
|
+
%w(gem tgz zip).each do |ext|
|
83
|
+
file = "pkg/#{spec.name}-#{spec.version}.#{ext}"
|
76
84
|
puts "Releasing #{File.basename(file)}..."
|
77
85
|
|
78
|
-
ruby_forge.add_release(
|
86
|
+
ruby_forge.add_release(spec.rubyforge_project, spec.name, spec.version, file)
|
79
87
|
end
|
80
88
|
end
|
@@ -1,56 +1,55 @@
|
|
1
|
-
module
|
2
|
-
module
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
1
|
+
module SmartFieldConstraints
|
2
|
+
module Extensions #:nodoc:
|
3
|
+
# Automatically applies the maximum length for an input field if it can be
|
4
|
+
# determined
|
5
|
+
module InstanceTag
|
6
|
+
def self.included(base) #:nodoc:
|
7
|
+
base.class_eval do
|
8
|
+
alias_method_chain :to_input_field_tag, :smart_constraints
|
10
9
|
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# Apply constraints for the given field
|
13
|
+
def to_input_field_tag_with_smart_constraints(field_type, options = {})
|
14
|
+
# Only check password and text fields
|
15
|
+
add_max_length_constraints(options) if %w(password text).include?(field_type)
|
11
16
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
17
|
+
to_input_field_tag_without_smart_constraints(field_type, options)
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
def add_max_length_constraints(options)
|
22
|
+
options.stringify_keys!
|
23
|
+
return if options['maxlength'] || !object
|
16
24
|
|
17
|
-
|
25
|
+
# Look for the attribute's maximum length from tracked validations or
|
26
|
+
# the column's definition
|
27
|
+
if max_length = validation_length || column_limit
|
28
|
+
# If the size isn't specified, use the caller's maxlength of the default value.
|
29
|
+
# This must be done here, otherwise it'll use the maxlength value that
|
30
|
+
# we apply here
|
31
|
+
options['size'] ||= options['maxlength'] || ActionView::Helpers::InstanceTag::DEFAULT_FIELD_OPTIONS['size']
|
32
|
+
options['maxlength'] = max_length
|
33
|
+
end
|
18
34
|
end
|
19
35
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
# Look for the attribute's maximum length from tracked validations or
|
26
|
-
# the column's definition
|
27
|
-
if max_length = validation_length || column_limit
|
28
|
-
# If the size isn't specified, use the caller's maxlength of the default value.
|
29
|
-
# This must be done here, otherwise it'll use the maxlength value that
|
30
|
-
# we apply here
|
31
|
-
options['size'] ||= options['maxlength'] || ActionView::Helpers::InstanceTag::DEFAULT_FIELD_OPTIONS['size']
|
32
|
-
options['maxlength'] = max_length
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
# Finds the maximum length according to validations
|
37
|
-
def validation_length
|
38
|
-
if constraints = object.class.smart_length_constraints
|
39
|
-
constraints[method_name]
|
40
|
-
end
|
36
|
+
# Finds the maximum length according to validations
|
37
|
+
def validation_length
|
38
|
+
if constraints = object.class.smart_length_constraints
|
39
|
+
constraints[method_name]
|
41
40
|
end
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
41
|
+
end
|
42
|
+
|
43
|
+
# Finds the maximum length according to column limits
|
44
|
+
def column_limit
|
45
|
+
if column = object.class.columns_hash[method_name]
|
46
|
+
column.limit
|
48
47
|
end
|
49
|
-
|
48
|
+
end
|
50
49
|
end
|
51
50
|
end
|
52
51
|
end
|
53
52
|
|
54
53
|
ActionView::Helpers::InstanceTag.class_eval do
|
55
|
-
include
|
54
|
+
include SmartFieldConstraints::Extensions::InstanceTag
|
56
55
|
end
|
@@ -1,76 +1,74 @@
|
|
1
|
-
module
|
2
|
-
module
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
extend PluginAWeek::SmartFieldConstraints::Extensions::Validations::ClassMethods
|
10
|
-
end
|
1
|
+
module SmartFieldConstraints
|
2
|
+
module Extensions #:nodoc:
|
3
|
+
# Tracks validations on the length of fields so that they can be used when
|
4
|
+
# generating form tags for those fields
|
5
|
+
module Validations
|
6
|
+
def self.included(base) #:nodoc:
|
7
|
+
base.class_eval do
|
8
|
+
extend SmartFieldConstraints::Extensions::Validations::ClassMethods
|
11
9
|
end
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
class << base
|
21
|
-
alias_method_chain :validates_length_of, :smart_constraints
|
22
|
-
alias_method_chain :validates_size_of, :smart_constraints
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
# Tracks what the maximum value that's allowed for all of the attributes
|
27
|
-
# being validated
|
28
|
-
def validates_length_of_with_smart_constraints(*attrs)
|
29
|
-
track_length_constraints(attrs)
|
30
|
-
validates_length_of_without_smart_constraints(*attrs)
|
10
|
+
end
|
11
|
+
|
12
|
+
module ClassMethods
|
13
|
+
def self.extended(base) #:nodoc:
|
14
|
+
base.class_eval do
|
15
|
+
class_inheritable_hash :smart_length_constraints
|
16
|
+
self.smart_length_constraints = {}
|
31
17
|
end
|
32
18
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
track_length_constraints(attrs)
|
37
|
-
validates_size_of_without_smart_constraints(*attrs)
|
19
|
+
class << base
|
20
|
+
alias_method_chain :validates_length_of, :smart_constraints
|
21
|
+
alias_method_chain :validates_size_of, :smart_constraints
|
38
22
|
end
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
23
|
+
end
|
24
|
+
|
25
|
+
# Tracks what the maximum value is that's allowed for all of the
|
26
|
+
# attributes being validated
|
27
|
+
def validates_length_of_with_smart_constraints(*attrs)
|
28
|
+
track_length_constraints(attrs)
|
29
|
+
validates_length_of_without_smart_constraints(*attrs)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Tracks what the maximum value is that's allowed for all of the
|
33
|
+
# attributes being validated
|
34
|
+
def validates_size_of_with_smart_constraints(*attrs)
|
35
|
+
track_length_constraints(attrs)
|
36
|
+
validates_size_of_without_smart_constraints(*attrs)
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
def track_length_constraints(attrs)
|
41
|
+
options = attrs.last
|
42
|
+
if options.is_a?(Hash)
|
43
|
+
# Extract the option restricting the length
|
44
|
+
options = options.symbolize_keys
|
45
|
+
range_options = ActiveRecord::Validations::ClassMethods::ALL_RANGE_OPTIONS & options.keys
|
46
|
+
option = range_options.first
|
47
|
+
option_value = options[range_options.first]
|
48
|
+
|
49
|
+
# Find the max value from ranges or specific maximums
|
50
|
+
max_length = nil
|
51
|
+
case option
|
52
|
+
when :within, :in
|
53
|
+
max_length = option_value.end
|
54
|
+
when :maximum, :is
|
55
|
+
max_length = option_value
|
56
|
+
end
|
57
|
+
|
58
|
+
if max_length
|
59
|
+
# Store the maximum value for each attribute so that it can be referenced later
|
60
|
+
attrs.each do |attr|
|
61
|
+
self.smart_length_constraints ||= {}
|
62
|
+
self.smart_length_constraints[attr.to_s] = max_length
|
65
63
|
end
|
66
64
|
end
|
67
65
|
end
|
68
|
-
|
66
|
+
end
|
69
67
|
end
|
70
68
|
end
|
71
69
|
end
|
72
70
|
end
|
73
71
|
|
74
72
|
ActiveRecord::Base.class_eval do
|
75
|
-
include
|
73
|
+
include SmartFieldConstraints::Extensions::Validations
|
76
74
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
require 'config/boot'
|
2
2
|
|
3
3
|
Rails::Initializer.run do |config|
|
4
|
-
config.
|
5
|
-
config.plugins = %w(plugins_plus tags smart_field_constraints)
|
4
|
+
config.plugins = %w(tags smart_field_constraints)
|
6
5
|
config.cache_classes = false
|
7
6
|
config.whiny_nils = true
|
8
7
|
end
|
@@ -1,8 +1,7 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../test_helper'
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
2
2
|
|
3
|
-
class FormHelperWithoutConstraintsTest <
|
4
|
-
|
5
|
-
include ActionView::Helpers::FormHelper
|
3
|
+
class FormHelperWithoutConstraintsTest < ActionView::TestCase
|
4
|
+
tests ActionView::Helpers::FormHelper
|
6
5
|
|
7
6
|
def setup
|
8
7
|
@user = User.new
|
@@ -17,9 +16,8 @@ class FormHelperWithoutConstraintsTest < Test::Unit::TestCase
|
|
17
16
|
end
|
18
17
|
end
|
19
18
|
|
20
|
-
class FormHelperWithValidationConstraintsTest <
|
21
|
-
|
22
|
-
include ActionView::Helpers::FormHelper
|
19
|
+
class FormHelperWithValidationConstraintsTest < ActionView::TestCase
|
20
|
+
tests ActionView::Helpers::FormHelper
|
23
21
|
|
24
22
|
def setup
|
25
23
|
User.validates_length_of :biography, :maximum => 120
|
@@ -59,9 +57,8 @@ class FormHelperWithValidationConstraintsTest < Test::Unit::TestCase
|
|
59
57
|
end
|
60
58
|
end
|
61
59
|
|
62
|
-
class FormHelperWithColumnConstraintsTest <
|
63
|
-
|
64
|
-
include ActionView::Helpers::FormHelper
|
60
|
+
class FormHelperWithColumnConstraintsTest < ActionView::TestCase
|
61
|
+
tests ActionView::Helpers::FormHelper
|
65
62
|
|
66
63
|
def setup
|
67
64
|
@user = User.new
|
@@ -88,9 +85,8 @@ class FormHelperWithColumnConstraintsTest < Test::Unit::TestCase
|
|
88
85
|
end
|
89
86
|
end
|
90
87
|
|
91
|
-
class FormHelperForModelNotTrackedTest <
|
92
|
-
|
93
|
-
include ActionView::Helpers::FormHelper
|
88
|
+
class FormHelperForModelNotTrackedTest < ActionView::TestCase
|
89
|
+
tests ActionView::Helpers::FormHelper
|
94
90
|
|
95
91
|
def setup
|
96
92
|
@tag = Tag.new
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_field_constraints
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Pfeifer
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-12-14 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -24,35 +24,35 @@ extra_rdoc_files: []
|
|
24
24
|
files:
|
25
25
|
- lib/smart_field_constraints
|
26
26
|
- lib/smart_field_constraints/extensions
|
27
|
-
- lib/smart_field_constraints/extensions/validations.rb
|
28
27
|
- lib/smart_field_constraints/extensions/form_helper.rb
|
28
|
+
- lib/smart_field_constraints/extensions/validations.rb
|
29
29
|
- lib/smart_field_constraints.rb
|
30
|
+
- test/test_helper.rb
|
31
|
+
- test/unit
|
32
|
+
- test/unit/validations_test.rb
|
33
|
+
- test/helpers
|
34
|
+
- test/helpers/form_helper_test.rb
|
30
35
|
- test/app_root
|
31
|
-
- test/app_root/
|
32
|
-
- test/app_root/
|
33
|
-
- test/app_root/
|
36
|
+
- test/app_root/db
|
37
|
+
- test/app_root/db/migrate
|
38
|
+
- test/app_root/db/migrate/001_create_users.rb
|
39
|
+
- test/app_root/db/migrate/002_create_tags.rb
|
40
|
+
- test/app_root/config
|
41
|
+
- test/app_root/config/environment.rb
|
34
42
|
- test/app_root/vendor
|
35
43
|
- test/app_root/vendor/plugins
|
36
44
|
- test/app_root/vendor/plugins/tags
|
37
|
-
- test/app_root/vendor/plugins/tags/init.rb
|
38
45
|
- test/app_root/vendor/plugins/tags/lib
|
39
46
|
- test/app_root/vendor/plugins/tags/lib/tag.rb
|
40
|
-
- test/app_root/
|
41
|
-
- test/app_root/
|
42
|
-
- test/app_root/
|
43
|
-
- test/app_root/
|
44
|
-
-
|
45
|
-
- test/app_root/db/migrate/002_create_tags.rb
|
46
|
-
- test/app_root/log
|
47
|
-
- test/test_helper.rb
|
48
|
-
- test/unit
|
49
|
-
- test/unit/validations_test.rb
|
50
|
-
- test/unit/form_helper_test.rb
|
51
|
-
- CHANGELOG
|
47
|
+
- test/app_root/vendor/plugins/tags/init.rb
|
48
|
+
- test/app_root/app
|
49
|
+
- test/app_root/app/models
|
50
|
+
- test/app_root/app/models/user.rb
|
51
|
+
- CHANGELOG.rdoc
|
52
52
|
- init.rb
|
53
53
|
- LICENSE
|
54
54
|
- Rakefile
|
55
|
-
- README
|
55
|
+
- README.rdoc
|
56
56
|
has_rdoc: true
|
57
57
|
homepage: http://www.pluginaweek.org
|
58
58
|
post_install_message:
|
@@ -74,11 +74,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version:
|
75
75
|
requirements: []
|
76
76
|
|
77
|
-
rubyforge_project:
|
78
|
-
rubygems_version: 1.
|
77
|
+
rubyforge_project: pluginaweek
|
78
|
+
rubygems_version: 1.2.0
|
79
79
|
signing_key:
|
80
80
|
specification_version: 2
|
81
81
|
summary: Intelligently applies a maxlength attribute for text fields based on column constraints and validations
|
82
82
|
test_files:
|
83
83
|
- test/unit/validations_test.rb
|
84
|
-
- test/
|
84
|
+
- test/helpers/form_helper_test.rb
|