padrino-fields 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/.document +5 -0
  2. data/Gemfile +40 -0
  3. data/Gemfile.lock +133 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.markdown +189 -0
  6. data/Rakefile +53 -0
  7. data/VERSION +1 -0
  8. data/lib/padrino-fields.rb +30 -0
  9. data/lib/padrino-fields/form_builder.rb +183 -0
  10. data/lib/padrino-fields/form_helpers.rb +63 -0
  11. data/lib/padrino-fields/orms/datamapper.rb +54 -0
  12. data/lib/padrino-fields/settings.rb +18 -0
  13. data/load_paths.rb +12 -0
  14. data/padrino-fields.gemspec +141 -0
  15. data/test/.DS_Store +0 -0
  16. data/test/fixtures/datamapper/app.rb +48 -0
  17. data/test/fixtures/datamapper/views/capture_concat.erb +14 -0
  18. data/test/fixtures/datamapper/views/capture_concat.haml +12 -0
  19. data/test/fixtures/datamapper/views/content_for.erb +11 -0
  20. data/test/fixtures/datamapper/views/content_for.haml +9 -0
  21. data/test/fixtures/datamapper/views/content_tag.erb +11 -0
  22. data/test/fixtures/datamapper/views/content_tag.haml +9 -0
  23. data/test/fixtures/datamapper/views/fields_for.erb +20 -0
  24. data/test/fixtures/datamapper/views/fields_for.haml +15 -0
  25. data/test/fixtures/datamapper/views/form_for.erb +56 -0
  26. data/test/fixtures/datamapper/views/form_for.haml +47 -0
  27. data/test/fixtures/datamapper/views/form_tag.erb +56 -0
  28. data/test/fixtures/datamapper/views/form_tag.haml +45 -0
  29. data/test/fixtures/datamapper/views/link_to.erb +5 -0
  30. data/test/fixtures/datamapper/views/link_to.haml +4 -0
  31. data/test/fixtures/datamapper/views/mail_to.erb +3 -0
  32. data/test/fixtures/datamapper/views/mail_to.haml +3 -0
  33. data/test/fixtures/datamapper/views/meta_tag.erb +3 -0
  34. data/test/fixtures/datamapper/views/meta_tag.haml +3 -0
  35. data/test/helper.rb +128 -0
  36. data/test/test_datamapper.rb +109 -0
  37. data/test/test_form_builder.rb +193 -0
  38. data/test/test_form_helpers.rb +59 -0
  39. data/test/test_settings.rb +51 -0
  40. metadata +288 -0
@@ -0,0 +1,109 @@
1
+ require 'helper'
2
+
3
+ class TestDataMapper < Test::Unit::TestCase
4
+
5
+ include PadrinoFields
6
+ include PadrinoFields::DataMapperWrapper
7
+
8
+ context "for #form_attribute_is_required? method" do
9
+
10
+ should "return true if attribute is required" do
11
+ assert Person.form_attribute_is_required?(:name)
12
+ end
13
+ should "return false if attribute is not required" do
14
+ assert_equal false, Person.form_attribute_is_required?(:string)
15
+ end
16
+
17
+ end
18
+
19
+ context "for #form_has_required_attributes? method" do
20
+
21
+ should "return true if any attributes are required" do
22
+ assert Person.form_has_required_attributes?
23
+ end
24
+ should "return false if no attributes are required" do
25
+ assert_equal false, Nobody.form_has_required_attributes?
26
+ end
27
+
28
+ end
29
+
30
+ context "for #form_reflection_validators method" do
31
+
32
+ should "return validations for an associated model" do
33
+ expected = [
34
+ DataMapper::Validations::NumericalityValidator,
35
+ DataMapper::Validations::LengthValidator,
36
+ DataMapper::Validations::PrimitiveTypeValidator,
37
+ DataMapper::Validations::NumericalityValidator
38
+ ]
39
+ assert_equal expected, Person.form_reflection_validators(:nobodies).map(&:class)
40
+ end
41
+
42
+ end
43
+
44
+ context "for #form_attribute_validators method" do
45
+
46
+ should "return validations for a model" do
47
+ expected = [
48
+ DataMapper::Validations::NumericalityValidator,
49
+ DataMapper::Validations::LengthValidator,
50
+ DataMapper::Validations::PrimitiveTypeValidator,
51
+ DataMapper::Validations::LengthValidator,
52
+ DataMapper::Validations::PrimitiveTypeValidator,
53
+ DataMapper::Validations::NumericalityValidator,
54
+ DataMapper::Validations::PrimitiveTypeValidator,
55
+ DataMapper::Validations::NumericalityValidator,
56
+ DataMapper::Validations::NumericalityValidator,
57
+ DataMapper::Validations::LengthValidator,
58
+ DataMapper::Validations::PrimitiveTypeValidator,
59
+ DataMapper::Validations::PrimitiveTypeValidator,
60
+ DataMapper::Validations::PrimitiveTypeValidator,
61
+ DataMapper::Validations::LengthValidator,
62
+ DataMapper::Validations::PrimitiveTypeValidator,
63
+ DataMapper::Validations::LengthValidator,
64
+ DataMapper::Validations::PrimitiveTypeValidator,
65
+ DataMapper::Validations::LengthValidator,
66
+ DataMapper::Validations::PrimitiveTypeValidator,
67
+ DataMapper::Validations::LengthValidator,
68
+ DataMapper::Validations::PrimitiveTypeValidator,
69
+ DataMapper::Validations::LengthValidator,
70
+ DataMapper::Validations::PrimitiveTypeValidator,
71
+ DataMapper::Validations::LengthValidator,
72
+ DataMapper::Validations::PrimitiveTypeValidator,
73
+ DataMapper::Validations::PresenceValidator
74
+ ]
75
+ assert_equal expected, Person.form_attribute_validators.map(&:class)
76
+ end
77
+
78
+ end
79
+
80
+ context 'for #form_column_type_for method' do
81
+
82
+ should "return :string for String columns" do
83
+ assert_equal :string, Person.form_column_type_for(:name)
84
+ end
85
+ should "return :text for Text columns" do
86
+ assert_equal :text, Person.form_column_type_for(:text)
87
+ end
88
+ should "return :number for Decimal columns" do
89
+ assert_equal :number, Person.form_column_type_for(:decimal)
90
+ end
91
+ should "return :number for Float columns" do
92
+ assert_equal :number, Person.form_column_type_for(:float)
93
+ end
94
+ should "return :number for Integer columns" do
95
+ assert_equal :number, Person.form_column_type_for(:integer)
96
+ end
97
+ should "return :date for Date columns" do
98
+ assert_equal :date, Person.form_column_type_for(:date)
99
+ end
100
+ should "return :date for DateTime columns" do
101
+ assert_equal :date, Person.form_column_type_for(:datetime)
102
+ end
103
+ should "return :boolean for Boolean columns" do
104
+ assert_equal :boolean, Person.form_column_type_for(:boolean)
105
+ end
106
+
107
+ end
108
+
109
+ end
@@ -0,0 +1,193 @@
1
+ require "helper"
2
+
3
+ class TestFormBuilder < Test::Unit::TestCase
4
+
5
+ def setup
6
+ @invalid_person = mock_model(Person, :name => nil)
7
+ @invalid_person.stubs(:errors => {:name => "must be present"})
8
+ @person = mock_model(Person, :name => "Joe")
9
+ @person_none = mock_model(Person)
10
+ end
11
+
12
+ context "#input" do
13
+
14
+ should "wrap field elements in a <p> tag by default" do
15
+ actual = field.input(:string)
16
+ assert_has_tag("p", :class => "string") { actual }
17
+ end
18
+
19
+ should "mark container and labels as required" do
20
+ actual = field.input(:name)
21
+ assert_has_tag("p", :class => "string required") { actual }
22
+ end
23
+
24
+ should "display error messages" do
25
+ actual = field(@invalid_person).input(:name)
26
+ assert_has_tag("span", :class=>"error", content:"must be present") { actual }
27
+ end
28
+
29
+ should "display a hint" do
30
+ actual = field.input(:name, :hint => "person's full name")
31
+ assert_has_tag("span", :class=>"hint", content:"person's full name") { actual }
32
+ end
33
+
34
+ should "customize input's html" do
35
+ actual = field.input(:name, :input_html => {:class => 'nice', :size => 8})
36
+ assert_has_tag("input", :class=>"nice", :size => '8') { actual }
37
+ end
38
+
39
+ should "return boolean field" do
40
+ actual = field.input(:name, :as => :boolean)
41
+ assert_has_tag("input", type:"checkbox") { actual }
42
+ assert_has_tag("label", content:"Name") { actual }
43
+ end
44
+
45
+ should "disable the input" do
46
+ actual = field.input(:name, :disabled => :true)
47
+ assert_has_tag("input", disabled:"disabled") { actual }
48
+ end
49
+
50
+ should "show custom label text" do
51
+ actual = field.input(:string, :caption => "Cool!")
52
+ assert_has_tag("label", content:"Cool!") { actual }
53
+ end
54
+
55
+ should "show no label text" do
56
+ actual = field.input(:string, :caption => false)
57
+ assert_has_tag("label", content:nil) { actual }
58
+ end
59
+
60
+ %w(email search tel url).each do |type|
61
+ instance_eval <<-EOF
62
+ should "return #{type} field for #{type} attribute" do
63
+ actual = field.input(:#{type})
64
+ assert_has_tag("input", type:"#{type}") { actual }
65
+ end
66
+ EOF
67
+ end
68
+
69
+ should "return tel field for phone attribute" do
70
+ actual = field.input(:phone)
71
+ assert_has_tag("input", type:"tel") { actual }
72
+ end
73
+
74
+ should "return url field for website attribute" do
75
+ actual = field.input(:website)
76
+ assert_has_tag("input", type:"url") { actual }
77
+ end
78
+
79
+
80
+ should "return default input matching the attribute's column type" do
81
+ text = field.input(:text)
82
+ assert_has_tag("textarea", id:"person_text", name:"person[text]", :class => "text") { text }
83
+ string = field.input(:string)
84
+ assert_has_tag("input[type=text]", id:"person_string", name:"person[string]", :class => "string") { string }
85
+ date = field.input(:date)
86
+ assert_has_tag("input", type:'date', id:"person_date", name:"person[date]", :class => "date") { date }
87
+ boolean = field.input(:boolean)
88
+ assert_has_tag("input", type:"checkbox", id:"person_boolean", name:"person[boolean]", :class => "boolean") { boolean }
89
+ end
90
+
91
+ should "return a specified input type" do
92
+ actual = field.input(:name)
93
+ assert_has_tag("input", type:"text", id:"person_name", name:"person[name]") { actual }
94
+ end
95
+
96
+ should "return a select field with options" do
97
+ actual = field.input(:name, :options => ["Ann",["Bob",2]])
98
+ assert_has_tag("select", id:"person_name", name:"person[name]") { actual }
99
+ assert_has_tag("option", value:"Ann", content:"Ann") { actual }
100
+ assert_has_tag("option", value:"2", content:"Bob") { actual }
101
+ end
102
+
103
+ should "return a select field with grouped options" do
104
+ opts = {
105
+ "Friends" => ["Yoda",["Obiwan",2]],
106
+ "Enemies" => ["Palpatine",['Darth Vader',3]]
107
+ }
108
+ actual = field.input( :name, :grouped_options => opts )
109
+ assert_has_tag("select", name:"person[name]") { actual }
110
+ assert_has_tag("optgroup", label:"Friends") { actual }
111
+ assert_has_tag("option", value:"Yoda", content:"Yoda") { actual }
112
+ assert_has_tag("option", value:"2", content:"Obiwan") { actual }
113
+ assert_has_tag("optgroup", label:"Enemies") { actual }
114
+ assert_has_tag("option", value:"Palpatine", content:"Palpatine") { actual }
115
+ assert_has_tag("option", value:"3", content:"Darth Vader") { actual }
116
+ end
117
+
118
+ should "return a collection of checkboxes" do
119
+ actual = field.input(:string, :options => ["Ann","Bob"], :as => :checks)
120
+ assert_has_tag("label", :class => "checks", :for => "person_string_ann", content:"Ann") { actual }
121
+ assert_has_tag("input", type:"checkbox", value:"Ann", id:"person_string_ann", name:"person[string][]") { actual }
122
+ assert_has_tag("label", :class => "checks", :for => "person_string_bob", content:"Bob") { actual }
123
+ assert_has_tag("input", type:"checkbox", value:"Bob", id:"person_string_bob", name:"person[string][]") { actual }
124
+ assert_has_tag("input", type:"hidden", name:"person[string][]", value:"0") { actual }
125
+ end
126
+
127
+ should "return a collection of checkboxes using a multi-dimensional array" do
128
+ actual = field.input(:string, :options => [["Ann",1],["Bob",2]], :as => :checks)
129
+ assert_has_tag("label", :class => "checks", :for => "person_string_ann", content:"Ann") { actual }
130
+ assert_has_tag("input", type:"checkbox", value:"1", id:"person_string_ann", name:"person[string][]") { actual }
131
+ assert_has_tag("input", type:"hidden", name:"person[string][]", value:"0") { actual }
132
+ assert_has_tag("label", :class => "checks", :for => "person_string_bob", content:"Bob") { actual }
133
+ assert_has_tag("input", type:"checkbox", value:"2", id:"person_string_bob", name:"person[string][]") { actual }
134
+ assert_has_tag("input", type:"hidden", name:"person[string][]", value:"0") { actual }
135
+ end
136
+
137
+ should "return a collection of radio buttons" do
138
+ actual = field.input(:string, :options => ["Ann","Bob"], :as => :radios)
139
+ assert_has_tag("label", :class => "radios", :for => "person_string_ann", content:"Ann") { actual }
140
+ assert_has_tag("input", type:"radio", id:"person_string_ann", name:"person[string]", value:"Ann") { actual }
141
+ assert_has_tag("label", :class => "radios", :for => "person_string_bob", content:"Bob") { actual }
142
+ assert_has_tag("input", type:"radio", id:"person_string_bob", name:"person[string]", value:"Bob") { actual }
143
+ end
144
+
145
+ should "return a collection of radio buttons using a multi-dimensional array" do
146
+ actual = field.input(:string, :options => [["Ann",1],["Bob",2]], :as => :radios)
147
+ assert_has_tag("label", :class => "radios", :for => "person_string_ann", content:"Ann") { actual }
148
+ assert_has_tag("input", type:"radio", id:"person_string_ann", name:"person[string]", value:"1") { actual }
149
+ assert_has_tag("label", :class => "radios", :for => "person_string_bob", content:"Bob") { actual }
150
+ assert_has_tag("input", type:"radio", id:"person_string_bob", name:"person[string]", value:"2") { actual }
151
+ end
152
+
153
+ should "add a css class marking a required input" do
154
+ actual = field.input(:name)
155
+ assert_has_tag("input", :class => "string required") { actual }
156
+ end
157
+
158
+ should "render a file field" do
159
+ actual = field.input(:string, :as => :file)
160
+ assert_has_tag("input", :type => "file") { actual }
161
+ end
162
+ end
163
+
164
+ context "#setup_label" do
165
+
166
+ should "display default field marker for a required label" do
167
+ actual = field.setup_label(:name, "string")
168
+ expected = "<label class=\"string required\" for=\"person_name\"><abbr>*</abbr>Name</label>"
169
+ assert_equal expected, actual
170
+ end
171
+
172
+ should "not display field marker for an optional field" do
173
+ actual = field.setup_label(:string, 'string')
174
+ expected = "<label class=\"string\" for=\"person_string\">String</label>"
175
+ assert_equal expected, actual
176
+ end
177
+
178
+ end
179
+
180
+ context "#hint" do
181
+ should "display text in a hint span" do
182
+ actual = field.hint('Here is a hint')
183
+ assert_has_tag("span", :class => "hint", content:"Here is a hint") { actual }
184
+ end
185
+ end
186
+
187
+ context '#domize' do
188
+ should "convert text to a dom-friendly string" do
189
+ assert_equal "cool", field.domize('C!@#$o%^&*o(_)l+{[<>]},./\|')
190
+ end
191
+ end
192
+
193
+ end
@@ -0,0 +1,59 @@
1
+ require "helper"
2
+
3
+ class TestFormHelper < Test::Unit::TestCase
4
+
5
+ %w(date email number search tel url).each do |type|
6
+ class_eval <<-EOF
7
+ context 'for ##{type}_field_tag method' do
8
+ should "return a #{type} field" do
9
+ actual = #{type}_field_tag('#{type}')
10
+ assert_has_tag('input', type:'#{type}', name:'#{type}') { actual }
11
+ end
12
+ end
13
+ EOF
14
+ end
15
+
16
+ context '#select_tag' do
17
+
18
+ setup do
19
+ @hash_options = {
20
+ "Friends" => ["Yoda",["Obiwan",2]],
21
+ "Enemies" => ["Palpatine",['Darth Vader',3]]
22
+ }
23
+ @array_options = [
24
+ ["Friends",["Yoda",["Obiwan",2]]],
25
+ ["Enemies", ["Palpatine",['Darth Vader',3]]]
26
+ ]
27
+ end
28
+
29
+ should "return a select tag with grouped options for an nested array" do
30
+ actual = select_tag( 'name', :grouped_options => @array_options )
31
+ assert_has_tag("select", name:"name") { actual }
32
+ assert_has_tag("optgroup", label:"Friends") { actual }
33
+ assert_has_tag("option", value:"Yoda", content:"Yoda") { actual }
34
+ assert_has_tag("option", value:"2", content:"Obiwan") { actual }
35
+ assert_has_tag("optgroup", label:"Enemies") { actual }
36
+ assert_has_tag("option", value:"Palpatine", content:"Palpatine") { actual }
37
+ assert_has_tag("option", value:"3", content:"Darth Vader") { actual }
38
+ end
39
+
40
+ should "return a select tag with grouped options for a hash" do
41
+
42
+ actual = select_tag( 'name', :grouped_options => @hash_options )
43
+ assert_has_tag("select", name:"name") { actual }
44
+ assert_has_tag("optgroup", label:"Friends") { actual }
45
+ assert_has_tag("option", value:"Yoda", content:"Yoda") { actual }
46
+ assert_has_tag("option", value:"2", content:"Obiwan") { actual }
47
+ assert_has_tag("optgroup", label:"Enemies") { actual }
48
+ assert_has_tag("option", value:"Palpatine", content:"Palpatine") { actual }
49
+ assert_has_tag("option", value:"3", content:"Darth Vader") { actual }
50
+ end
51
+
52
+ should "return a select tag with blank option for grouped_options" do
53
+ actual = select_tag( 'name', :grouped_options => @hash_options, :include_blank => 'Choose' )
54
+ assert_has_tag("option", value:"", content:"Choose") { actual }
55
+ end
56
+
57
+ end
58
+
59
+ end
@@ -0,0 +1,51 @@
1
+ require "helper"
2
+
3
+ class TestPadrinoFieldsSettings < ActiveSupport::TestCase
4
+
5
+ should "make setup block yield self" do
6
+ PadrinoFields::Settings.configure do |config|
7
+ assert_equal PadrinoFields::Settings, config
8
+ end
9
+ end
10
+
11
+ context "for #container setting" do
12
+ should "wrap field in a custom container" do
13
+ PadrinoFields::Settings.container = :div
14
+ actual = field.input(:name)
15
+ assert_has_tag("div") { actual }
16
+ end
17
+ end
18
+
19
+ context "for #label_required_marker setting" do
20
+ should "display custom label marker for a required field" do
21
+ PadrinoFields::Settings.label_required_marker = "*"
22
+ actual = field.setup_label(:name, 'string')
23
+ assert_has_tag("label", :content => "*Name") { actual }
24
+ end
25
+ end
26
+
27
+ context "for #label_required_marker_position setting" do
28
+ should "prepend label marker to a required field" do
29
+ PadrinoFields::Settings.label_required_marker_position = :prepend
30
+ actual = field.setup_label(:name, 'string')
31
+ assert_has_tag("label", :content => "*Name") { actual }
32
+ end
33
+ should "append label marker to a required field" do
34
+ PadrinoFields::Settings.label_required_marker_position = :append
35
+ actual = field.setup_label(:name, 'string')
36
+ assert_has_tag("label", :content => "Name*") { actual }
37
+ end
38
+ end
39
+
40
+ %w(date email number search tel url).each do |type|
41
+ class_eval <<-EOF
42
+ context 'for ##{type}_field method' do
43
+ should "return a #{type} field" do
44
+ actual = field.#{type}_field('#{type}')
45
+ assert_has_tag('input', type:'#{type}') { actual }
46
+ end
47
+ end
48
+ EOF
49
+ end
50
+
51
+ end
metadata ADDED
@@ -0,0 +1,288 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: padrino-fields
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.3
5
+ platform: ruby
6
+ authors:
7
+ - Steven Garcia
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2011-03-17 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: padrino
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: padrino-core
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: padrino-helpers
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: rcov
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: "0"
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: jeweler
57
+ type: :development
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: "0"
64
+ version:
65
+ - !ruby/object:Gem::Dependency
66
+ name: rake
67
+ type: :development
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 0.8.7
74
+ version:
75
+ - !ruby/object:Gem::Dependency
76
+ name: mocha
77
+ type: :development
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 0.9.8
84
+ version:
85
+ - !ruby/object:Gem::Dependency
86
+ name: rack-test
87
+ type: :development
88
+ version_requirement:
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: 0.5.0
94
+ version:
95
+ - !ruby/object:Gem::Dependency
96
+ name: fakeweb
97
+ type: :development
98
+ version_requirement:
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 1.2.8
104
+ version:
105
+ - !ruby/object:Gem::Dependency
106
+ name: webrat
107
+ type: :development
108
+ version_requirement:
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: 0.5.1
114
+ version:
115
+ - !ruby/object:Gem::Dependency
116
+ name: haml
117
+ type: :development
118
+ version_requirement:
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 2.2.22
124
+ version:
125
+ - !ruby/object:Gem::Dependency
126
+ name: phocus
127
+ type: :development
128
+ version_requirement:
129
+ version_requirements: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: "0"
134
+ version:
135
+ - !ruby/object:Gem::Dependency
136
+ name: shoulda
137
+ type: :development
138
+ version_requirement:
139
+ version_requirements: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: 2.10.3
144
+ version:
145
+ - !ruby/object:Gem::Dependency
146
+ name: uuid
147
+ type: :development
148
+ version_requirement:
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: 2.3.1
154
+ version:
155
+ - !ruby/object:Gem::Dependency
156
+ name: bcrypt-ruby
157
+ type: :development
158
+ version_requirement:
159
+ version_requirements: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: "0"
164
+ version:
165
+ - !ruby/object:Gem::Dependency
166
+ name: ruby-prof
167
+ type: :development
168
+ version_requirement:
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: 0.9.1
174
+ version:
175
+ - !ruby/object:Gem::Dependency
176
+ name: system_timer
177
+ type: :development
178
+ version_requirement:
179
+ version_requirements: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: "1.0"
184
+ version:
185
+ - !ruby/object:Gem::Dependency
186
+ name: memcached
187
+ type: :development
188
+ version_requirement:
189
+ version_requirements: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: 0.20.1
194
+ version:
195
+ - !ruby/object:Gem::Dependency
196
+ name: dalli
197
+ type: :development
198
+ version_requirement:
199
+ version_requirements: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: 1.0.2
204
+ version:
205
+ description: Smart fields for your forms, similar to Formtastic or SimpleForm
206
+ email: stevendgarcia@gmail.com
207
+ executables: []
208
+
209
+ extensions: []
210
+
211
+ extra_rdoc_files:
212
+ - LICENSE.txt
213
+ - README.markdown
214
+ files:
215
+ - .document
216
+ - Gemfile
217
+ - Gemfile.lock
218
+ - LICENSE.txt
219
+ - README.markdown
220
+ - Rakefile
221
+ - VERSION
222
+ - lib/padrino-fields.rb
223
+ - lib/padrino-fields/form_builder.rb
224
+ - lib/padrino-fields/form_helpers.rb
225
+ - lib/padrino-fields/orms/datamapper.rb
226
+ - lib/padrino-fields/settings.rb
227
+ - load_paths.rb
228
+ - padrino-fields.gemspec
229
+ - test/.DS_Store
230
+ - test/fixtures/datamapper/app.rb
231
+ - test/fixtures/datamapper/views/capture_concat.erb
232
+ - test/fixtures/datamapper/views/capture_concat.haml
233
+ - test/fixtures/datamapper/views/content_for.erb
234
+ - test/fixtures/datamapper/views/content_for.haml
235
+ - test/fixtures/datamapper/views/content_tag.erb
236
+ - test/fixtures/datamapper/views/content_tag.haml
237
+ - test/fixtures/datamapper/views/fields_for.erb
238
+ - test/fixtures/datamapper/views/fields_for.haml
239
+ - test/fixtures/datamapper/views/form_for.erb
240
+ - test/fixtures/datamapper/views/form_for.haml
241
+ - test/fixtures/datamapper/views/form_tag.erb
242
+ - test/fixtures/datamapper/views/form_tag.haml
243
+ - test/fixtures/datamapper/views/link_to.erb
244
+ - test/fixtures/datamapper/views/link_to.haml
245
+ - test/fixtures/datamapper/views/mail_to.erb
246
+ - test/fixtures/datamapper/views/mail_to.haml
247
+ - test/fixtures/datamapper/views/meta_tag.erb
248
+ - test/fixtures/datamapper/views/meta_tag.haml
249
+ - test/helper.rb
250
+ - test/test_datamapper.rb
251
+ - test/test_form_builder.rb
252
+ - test/test_form_helpers.rb
253
+ - test/test_settings.rb
254
+ has_rdoc: true
255
+ homepage: http://github.com/activestylus/padrino-fields
256
+ licenses:
257
+ - MIT
258
+ post_install_message:
259
+ rdoc_options: []
260
+
261
+ require_paths:
262
+ - lib
263
+ required_ruby_version: !ruby/object:Gem::Requirement
264
+ requirements:
265
+ - - ">="
266
+ - !ruby/object:Gem::Version
267
+ version: "0"
268
+ version:
269
+ required_rubygems_version: !ruby/object:Gem::Requirement
270
+ requirements:
271
+ - - ">="
272
+ - !ruby/object:Gem::Version
273
+ version: "0"
274
+ version:
275
+ requirements: []
276
+
277
+ rubyforge_project:
278
+ rubygems_version: 1.3.5
279
+ signing_key:
280
+ specification_version: 3
281
+ summary: Advanced form helpers for Padrino framework
282
+ test_files:
283
+ - test/fixtures/datamapper/app.rb
284
+ - test/helper.rb
285
+ - test/test_datamapper.rb
286
+ - test/test_form_builder.rb
287
+ - test/test_form_helpers.rb
288
+ - test/test_settings.rb