speedo-formstrap 1.2.6 → 1.2.7

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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speedo-formstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,18 +14,18 @@ date: 2012-07-09 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: formtastic
17
- requirement: &2168941740 !ruby/object:Gem::Requirement
17
+ requirement: &2168338040 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - ! '>='
20
+ - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: '0'
22
+ version: 2.1.0.beta1
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2168941740
25
+ version_requirements: *2168338040
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rails
28
- requirement: &2168939920 !ruby/object:Gem::Requirement
28
+ requirement: &2168336500 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 3.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2168939920
36
+ version_requirements: *2168336500
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec
39
- requirement: &2168938580 !ruby/object:Gem::Requirement
39
+ requirement: &2168334720 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2168938580
47
+ version_requirements: *2168334720
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: bundler
50
- requirement: &2168937500 !ruby/object:Gem::Requirement
50
+ requirement: &2168330020 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2168937500
58
+ version_requirements: *2168330020
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: jeweler
61
- requirement: &2168936140 !ruby/object:Gem::Requirement
61
+ requirement: &2168327940 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2168936140
69
+ version_requirements: *2168327940
70
70
  - !ruby/object:Gem::Dependency
71
- name: rcov
72
- requirement: &2168934840 !ruby/object:Gem::Requirement
71
+ name: simplecov
72
+ requirement: &2168326920 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *2168934840
80
+ version_requirements: *2168326920
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rspec_tag_matchers
83
- requirement: &2168933700 !ruby/object:Gem::Requirement
83
+ requirement: &2168326140 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,9 +88,9 @@ dependencies:
88
88
  version: '0'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *2168933700
91
+ version_requirements: *2168326140
92
92
  description: Formtastic form builder to generate Twitter Bootstrap-friendly markup.
93
- email: mjbellantoni@yahoo.com
93
+ email: stu@t.apio.ca
94
94
  executables: []
95
95
  extensions: []
96
96
  extra_rdoc_files:
@@ -143,7 +143,6 @@ files:
143
143
  - lib/formtastic-bootstrap/inputs/time_input.rb
144
144
  - lib/formtastic-bootstrap/inputs/time_zone_input.rb
145
145
  - lib/formtastic-bootstrap/inputs/url_input.rb
146
- - spec/builder/errors_spec.rb
147
146
  - spec/builder/semantic_fields_for_spec.rb
148
147
  - spec/helpers/buttons_helper_spec.rb
149
148
  - spec/helpers/input_helper_spec.rb
@@ -171,7 +170,6 @@ files:
171
170
  - spec/support/custom_macros.rb
172
171
  - spec/support/depracation.rb
173
172
  - spec/support/formtastic_spec_helper.rb
174
- - speedo-formstrap.gemspec
175
173
  - vendor/assets/stylesheets/formtastic-bootstrap.css
176
174
  homepage: http://github.com/thugsb/formtastic-bootstrap
177
175
  licenses:
@@ -188,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
186
  version: '0'
189
187
  segments:
190
188
  - 0
191
- hash: -1672270839262573393
189
+ hash: -2461484441867445917
192
190
  required_rubygems_version: !ruby/object:Gem::Requirement
193
191
  none: false
194
192
  requirements:
@@ -1,214 +0,0 @@
1
- # encoding: utf-8
2
- require 'spec_helper'
3
-
4
- describe 'Formtastic::FormBuilder#errors_on' do
5
-
6
- include FormtasticSpecHelper
7
-
8
- before(:each) do
9
- @output_buffer = ''
10
- mock_everything
11
- Formtastic::Helpers::FormHelper.builder = FormtasticBootstrap::FormBuilder
12
- @title_errors = ['must not be blank', 'must be longer than 10 characters', 'must be awesome']
13
- @errors = mock('errors')
14
- @new_post.stub!(:errors).and_return(@errors)
15
-
16
- @orig_inline_errors = FormtasticBootstrap::FormBuilder.inline_errors
17
- @orig_inline_error_class = FormtasticBootstrap::FormBuilder.default_inline_error_class
18
- @orig_error_list_class = FormtasticBootstrap::FormBuilder.default_error_list_class
19
- end
20
-
21
- after(:each) do
22
- FormtasticBootstrap::FormBuilder.inline_errors = @orig_inline_errors
23
- FormtasticBootstrap::FormBuilder.default_inline_error_class = @orig_inline_error_class
24
- FormtasticBootstrap::FormBuilder.default_error_list_class = @orig_error_list_class
25
- end
26
-
27
- describe 'when there are errors' do
28
- before do
29
- @errors.stub!(:[]).with(:title).and_return(@title_errors)
30
- end
31
-
32
- # after do
33
- # FormtasticBootstrap::FormBuilder.default_inline_error_class = 'inline-errors'
34
- # FormtasticBootstrap::FormBuilder.default_inline_error_class = 'help-inline'
35
- # FormtasticBootstrap::FormBuilder.default_error_list_class = 'errors'
36
- # end
37
-
38
- it 'should render a paragraph with the errors joined into a sentence when inline_errors config is :sentence' do
39
- FormtasticBootstrap::FormBuilder.inline_errors = :sentence
40
- concat(semantic_form_for(@new_post) do |builder|
41
- builder.input :title
42
- end)
43
- output_buffer.should have_tag('span.help-inline', @title_errors.to_sentence)
44
- end
45
-
46
- it 'should render a paragraph with a overridden default class' do
47
- FormtasticBootstrap::FormBuilder.default_inline_error_class = 'better-errors'
48
- concat(semantic_form_for(@new_post) do |builder|
49
- builder.input(:title)
50
- end)
51
- output_buffer.should have_tag('span.better-errors', @title_errors.to_sentence)
52
- end
53
-
54
- it 'should render a paragraph with the errors joined into a sentence when inline_errors config is :sentence with a customized error class' do
55
- FormtasticBootstrap::FormBuilder.inline_errors = :sentence
56
- concat(semantic_form_for(@new_post) do |builder|
57
- builder.input(:title, :error_class => 'better-errors')
58
- end)
59
- output_buffer.should have_tag('span.better-errors', @title_errors.to_sentence)
60
- end
61
-
62
- it 'should render an unordered list with the class errors when inline_errors config is :list' do
63
- FormtasticBootstrap::FormBuilder.inline_errors = :list
64
- concat(semantic_form_for(@new_post) do |builder|
65
- builder.input(:title)
66
- end)
67
- output_buffer.should have_tag('ul.errors')
68
- @title_errors.each do |error|
69
- output_buffer.should have_tag('ul.errors li', error)
70
- end
71
- end
72
-
73
- it 'should render an unordered list with the class overridden default class' do
74
- FormtasticBootstrap::FormBuilder.inline_errors = :list
75
- FormtasticBootstrap::FormBuilder.default_error_list_class = "better-errors"
76
- concat(semantic_form_for(@new_post) do |builder|
77
- builder.input :title
78
- end)
79
- output_buffer.should have_tag('ul.better-errors')
80
- @title_errors.each do |error|
81
- output_buffer.should have_tag('ul.better-errors li', error)
82
- end
83
- end
84
-
85
- it 'should render an unordered list with the class errors when inline_errors config is :list with a customized error class' do
86
- FormtasticBootstrap::FormBuilder.inline_errors = :list
87
- concat(semantic_form_for(@new_post) do |builder|
88
- builder.input :title, :error_class => "better-errors"
89
- end)
90
- output_buffer.should have_tag('ul.better-errors')
91
- @title_errors.each do |error|
92
- output_buffer.should have_tag('ul.better-errors li', error)
93
- end
94
- end
95
-
96
- it 'should render a paragraph with the first error when inline_errors config is :first' do
97
- FormtasticBootstrap::FormBuilder.inline_errors = :first
98
- concat(semantic_form_for(@new_post) do |builder|
99
- builder.input :title
100
- end)
101
- output_buffer.should have_tag('span.help-inline', @title_errors.first)
102
- end
103
-
104
- it 'should render a paragraph with the first error when inline_errors config is :first with a customized error class' do
105
- FormtasticBootstrap::FormBuilder.inline_errors = :first
106
- concat(semantic_form_for(@new_post) do |builder|
107
- builder.input :title, :error_class => "better-errors"
108
- end)
109
- output_buffer.should have_tag('span.better-errors', @title_errors.first)
110
- end
111
-
112
- it 'should return nil when inline_errors config is :none' do
113
- FormtasticBootstrap::FormBuilder.inline_errors = :none
114
- concat(semantic_form_for(@new_post) do |builder|
115
- builder.input :title
116
- end)
117
- output_buffer.should_not have_tag('span.help-inline')
118
- output_buffer.should_not have_tag('span.help-block')
119
- output_buffer.should_not have_tag('ul.errors')
120
- end
121
-
122
- it 'should allow calling deprecated errors_on and inline_errors_for helpers' do
123
- FormtasticBootstrap::FormBuilder.inline_errors = :sentence
124
- with_deprecation_silenced do
125
- concat(semantic_form_for(@new_post) do |builder|
126
- builder.errors_on :title
127
- builder.inline_errors_for :title
128
- end)
129
- end
130
- end
131
- end
132
-
133
- describe 'when there are no errors (nil)' do
134
- before do
135
- @errors.stub!(:[]).with(:title).and_return(nil)
136
- end
137
-
138
- it 'should return nil when inline_errors config is :sentence, :list or :none' do
139
- with_deprecation_silenced do
140
- [:sentence, :list, :none].each do |config|
141
- with_config :inline_errors, config do
142
- semantic_form_for(@new_post) do |builder|
143
- builder.errors_on(:title).should be_nil
144
- end
145
- end
146
- end
147
- end
148
- end
149
- end
150
-
151
- describe 'when there are no errors (empty array)' do
152
-
153
- before(:each) do
154
- @errors.stub!(:[]).with(:title).and_return([])
155
- end
156
-
157
- it 'should return nil when inline_errors config is :sentence, :list or :none' do
158
- with_deprecation_silenced do
159
- [:sentence, :list, :none].each do |config|
160
- FormtasticBootstrap::FormBuilder.inline_errors = config
161
- semantic_form_for(@new_post) do |builder|
162
- builder.errors_on(:title).should be_nil
163
- end
164
- end
165
- end
166
- end
167
- end
168
-
169
- describe 'when file type columns have errors' do
170
- it "should list errors added on metadata fields" do
171
- @errors.stub!(:[]).with(:document_file_name).and_return(['must be provided'])
172
- @errors.stub!(:[]).with(:document_file_size).and_return(['must be less than 4mb'])
173
- @errors.stub!(:[]).with(:document_content_type).and_return(['must be an image'])
174
- @errors.stub!(:[]).with(:document).and_return(nil)
175
-
176
- with_config :inline_errors, :sentence do
177
- concat(semantic_form_for(@new_post) do |builder|
178
- concat(builder.input(:document))
179
- end)
180
- end
181
- output_buffer.should have_tag("div.error")
182
- output_buffer.should have_tag('span.help-inline', (['must be an image','must be provided', 'must be less than 4mb']).to_sentence)
183
- end
184
- end
185
-
186
- describe 'when there are errors on the association and column' do
187
-
188
- it "should list all unique errors" do
189
- ::Post.stub!(:reflections).and_return({:author => mock('reflection', :options => {}, :macro => :belongs_to)})
190
-
191
- @errors.stub!(:[]).with(:author).and_return(['must not be blank'])
192
- @errors.stub!(:[]).with(:author_id).and_return(['is already taken', 'must not be blank']) # note the duplicate of association
193
-
194
- with_config :inline_errors, :list do
195
- concat(semantic_form_for(@new_post) do |builder|
196
- concat(builder.input(:author))
197
- end)
198
- end
199
- output_buffer.should have_tag("ul.errors li", /must not be blank/, :count => 1)
200
- output_buffer.should have_tag("ul.errors li", /is already taken/, :count => 1)
201
- end
202
-
203
- end
204
-
205
- describe "when there are errors on a has_many association" do
206
- it "should include the association ids error messages" do
207
- semantic_form_for(@new_post) do |builder|
208
- builder.send(:error_keys, :sub_posts, {}).should include(:sub_post_ids)
209
- end
210
- end
211
- end
212
-
213
- end
214
-
@@ -1,133 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = "speedo-formstrap"
8
- s.version = "1.2.6"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Matthew Bellantoni", "Stu Basden"]
12
- s.date = "2012-07-09"
13
- s.description = "Formtastic form builder to generate Twitter Bootstrap-friendly markup."
14
- s.email = "mjbellantoni@yahoo.com"
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".rspec",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "LICENSE.txt",
25
- "README.md",
26
- "Rakefile",
27
- "VERSION",
28
- "lib/action_view/helpers/text_field_date_helper.rb",
29
- "lib/formtastic-bootstrap.rb",
30
- "lib/formtastic-bootstrap/engine.rb",
31
- "lib/formtastic-bootstrap/form_builder.rb",
32
- "lib/formtastic-bootstrap/helpers.rb",
33
- "lib/formtastic-bootstrap/helpers/buttons_helper.rb",
34
- "lib/formtastic-bootstrap/helpers/fieldset_wrapper.rb",
35
- "lib/formtastic-bootstrap/helpers/input_helper.rb",
36
- "lib/formtastic-bootstrap/helpers/inputs_helper.rb",
37
- "lib/formtastic-bootstrap/inputs.rb",
38
- "lib/formtastic-bootstrap/inputs/base.rb",
39
- "lib/formtastic-bootstrap/inputs/base/choices.rb",
40
- "lib/formtastic-bootstrap/inputs/base/errors.rb",
41
- "lib/formtastic-bootstrap/inputs/base/hints.rb",
42
- "lib/formtastic-bootstrap/inputs/base/html.rb",
43
- "lib/formtastic-bootstrap/inputs/base/labelling.rb",
44
- "lib/formtastic-bootstrap/inputs/base/stringish.rb",
45
- "lib/formtastic-bootstrap/inputs/base/timeish.rb",
46
- "lib/formtastic-bootstrap/inputs/base/wrapping.rb",
47
- "lib/formtastic-bootstrap/inputs/boolean_input.rb",
48
- "lib/formtastic-bootstrap/inputs/check_boxes_input.rb",
49
- "lib/formtastic-bootstrap/inputs/date_input.rb",
50
- "lib/formtastic-bootstrap/inputs/datetime_input.rb",
51
- "lib/formtastic-bootstrap/inputs/email_input.rb",
52
- "lib/formtastic-bootstrap/inputs/file_input.rb",
53
- "lib/formtastic-bootstrap/inputs/hidden_input.rb",
54
- "lib/formtastic-bootstrap/inputs/number_input.rb",
55
- "lib/formtastic-bootstrap/inputs/password_input.rb",
56
- "lib/formtastic-bootstrap/inputs/phone_input.rb",
57
- "lib/formtastic-bootstrap/inputs/radio_input.rb",
58
- "lib/formtastic-bootstrap/inputs/range_input.rb",
59
- "lib/formtastic-bootstrap/inputs/search_input.rb",
60
- "lib/formtastic-bootstrap/inputs/select_input.rb",
61
- "lib/formtastic-bootstrap/inputs/string_input.rb",
62
- "lib/formtastic-bootstrap/inputs/text_input.rb",
63
- "lib/formtastic-bootstrap/inputs/time_input.rb",
64
- "lib/formtastic-bootstrap/inputs/time_zone_input.rb",
65
- "lib/formtastic-bootstrap/inputs/url_input.rb",
66
- "spec/builder/errors_spec.rb",
67
- "spec/builder/semantic_fields_for_spec.rb",
68
- "spec/helpers/buttons_helper_spec.rb",
69
- "spec/helpers/input_helper_spec.rb",
70
- "spec/helpers/inputs_helper_spec.rb",
71
- "spec/inputs/boolean_input_spec.rb",
72
- "spec/inputs/check_boxes_input_spec.rb",
73
- "spec/inputs/date_input_spec.rb",
74
- "spec/inputs/datetime_input_spec.rb",
75
- "spec/inputs/email_input_spec.rb",
76
- "spec/inputs/file_input_spec.rb",
77
- "spec/inputs/hidden_input_spec.rb",
78
- "spec/inputs/number_input_spec.rb",
79
- "spec/inputs/password_input_spec.rb",
80
- "spec/inputs/phone_input_spec.rb",
81
- "spec/inputs/radio_input_spec.rb",
82
- "spec/inputs/range_input_spec.rb",
83
- "spec/inputs/search_input_spec.rb",
84
- "spec/inputs/select_input_spec.rb",
85
- "spec/inputs/string_input_spec.rb",
86
- "spec/inputs/text_input_spec.rb",
87
- "spec/inputs/time_input_spec.rb",
88
- "spec/inputs/time_zone_input_spec.rb",
89
- "spec/inputs/url_input_spec.rb",
90
- "spec/spec_helper.rb",
91
- "spec/support/custom_macros.rb",
92
- "spec/support/depracation.rb",
93
- "spec/support/formtastic_spec_helper.rb",
94
- "speedo-formstrap.gemspec",
95
- "vendor/assets/stylesheets/formtastic-bootstrap.css"
96
- ]
97
- s.homepage = "http://github.com/thugsb/formtastic-bootstrap"
98
- s.licenses = ["MIT"]
99
- s.require_paths = ["lib"]
100
- s.rubygems_version = "1.8.10"
101
- s.summary = "Formtastic form builder to generate Twitter Bootstrap-friendly markup."
102
-
103
- if s.respond_to? :specification_version then
104
- s.specification_version = 3
105
-
106
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
107
- s.add_runtime_dependency(%q<formtastic>, [">= 0"])
108
- s.add_runtime_dependency(%q<rails>, [">= 3.1.0"])
109
- s.add_development_dependency(%q<rspec>, [">= 0"])
110
- s.add_development_dependency(%q<bundler>, [">= 0"])
111
- s.add_development_dependency(%q<jeweler>, [">= 0"])
112
- s.add_development_dependency(%q<rcov>, [">= 0"])
113
- s.add_development_dependency(%q<rspec_tag_matchers>, [">= 0"])
114
- else
115
- s.add_dependency(%q<formtastic>, [">= 0"])
116
- s.add_dependency(%q<rails>, [">= 3.1.0"])
117
- s.add_dependency(%q<rspec>, [">= 0"])
118
- s.add_dependency(%q<bundler>, [">= 0"])
119
- s.add_dependency(%q<jeweler>, [">= 0"])
120
- s.add_dependency(%q<rcov>, [">= 0"])
121
- s.add_dependency(%q<rspec_tag_matchers>, [">= 0"])
122
- end
123
- else
124
- s.add_dependency(%q<formtastic>, [">= 0"])
125
- s.add_dependency(%q<rails>, [">= 3.1.0"])
126
- s.add_dependency(%q<rspec>, [">= 0"])
127
- s.add_dependency(%q<bundler>, [">= 0"])
128
- s.add_dependency(%q<jeweler>, [">= 0"])
129
- s.add_dependency(%q<rcov>, [">= 0"])
130
- s.add_dependency(%q<rspec_tag_matchers>, [">= 0"])
131
- end
132
- end
133
-