formtastic-bootstrap 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64b433e690559fd1f31b9ca9eb8d9ff10a1d5818
4
- data.tar.gz: b1d6b9565b53ac962973ddff1de78ace485db272
3
+ metadata.gz: 9a4c8ccd643acebbf6e74e39dd50f116ec11aecf
4
+ data.tar.gz: ffdc3de2dcf7c48ffa0254f054331e873c96562c
5
5
  SHA512:
6
- metadata.gz: bf8be1a24e398d57860c8929a483d9c9da7770aacb46a704645a54e8f08a7fffd43d6b10d19f8b6610d8a75d1194eed6b0b4465764dfef43ff0c11d924f64148
7
- data.tar.gz: 4dbdce5ad3cafad6d69d9dadcd0ac37bda0861cea640df4ea1e876d7c91019de2dc936e5c32a15dbbabb7f1a9302382bb0a270c6327543abc08811a08b80a9bc
6
+ metadata.gz: 1263c8854ccb91e32f3f561d901f28382f52f4cf539e862cb051b3b329470d202951cb64a1b4102a432628cd8d0ad548fee93d5bca151aac9431ef99452e6eb4
7
+ data.tar.gz: 6a3d94a0a0afd6c74f8c259e78c736da4c4ccecf691333e47e5501fdac374107b71883c57d8e03637013aa8eea579e6e05b436f34867a98b3029088199b8ccaf
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.1.0
@@ -1,19 +1,20 @@
1
1
  require "formtastic"
2
2
  require "formtastic-bootstrap/engine" if defined?(::Rails) # For tests
3
3
  require "formtastic-bootstrap/helpers"
4
+ require "formtastic-bootstrap/inputs"
5
+ require "formtastic-bootstrap/actions"
4
6
  require "formtastic-bootstrap/form_builder"
5
7
  require "action_view/helpers/text_field_date_helper"
6
8
 
7
9
  module FormtasticBootstrap
8
-
9
10
  extend ActiveSupport::Autoload
10
11
 
11
12
  # autoload :FormBuilder
12
13
  # autoload :Helpers
13
14
  # autoload :HtmlAttributes
14
15
  # autoload :I18n
15
- autoload :Inputs, "formtastic-bootstrap/inputs"
16
- autoload :Actions, "formtastic-bootstrap/actions"
16
+ # autoload :Inputs, "formtastic-bootstrap/inputs"
17
+ # autoload :Actions, "formtastic-bootstrap/actions"
17
18
  # autoload :LocalizedString
18
19
  # autoload :Localizer
19
20
  # autoload :Util
@@ -7,6 +7,13 @@ module FormtasticBootstrap
7
7
  configure :default_inline_hint_class, 'help-inline'
8
8
  configure :default_block_hint_class, 'help-block'
9
9
 
10
+ self.input_namespaces = [::Object, ::FormtasticBootstrap::Inputs, ::Formtastic::Inputs]
11
+ self.action_namespaces = [::Object, ::FormtasticBootstrap::Actions, ::Formtastic::Actions]
12
+
13
+ # TODO: remove both class finders after formtastic 4 (where it will be default)
14
+ self.input_class_finder = ::Formtastic::InputClassFinder
15
+ self.action_class_finder = ::Formtastic::ActionClassFinder
16
+
10
17
  def self.default_error_class
11
18
  # self.default_inline_error_class
12
19
  raise
@@ -29,12 +36,9 @@ module FormtasticBootstrap
29
36
  raise
30
37
  end
31
38
 
32
- include FormtasticBootstrap::Helpers::InputHelper # Revisit
33
39
  include FormtasticBootstrap::Helpers::InputsHelper
34
40
  include FormtasticBootstrap::Helpers::ErrorsHelper
35
- include FormtasticBootstrap::Helpers::ActionHelper
36
41
  include FormtasticBootstrap::Helpers::ActionsHelper
37
- # include Formtastic::Helpers::ErrorsHelper
38
42
 
39
43
  end
40
44
 
@@ -1,13 +1,11 @@
1
1
  module FormtasticBootstrap
2
2
  module Helpers
3
3
 
4
- autoload :ActionHelper, 'formtastic-bootstrap/helpers/action_helper'
5
4
  autoload :ActionsHelper, 'formtastic-bootstrap/helpers/actions_helper'
6
5
  autoload :ErrorsHelper, 'formtastic-bootstrap/helpers/errors_helper'
7
6
  autoload :FieldsetWrapper, 'formtastic-bootstrap/helpers/fieldset_wrapper'
8
7
  # autoload :FileColumnDetection, 'formtastic/helpers/file_column_detection'
9
8
  # autoload :FormHelper, 'formtastic/helpers/form_helper'
10
- autoload :InputHelper, 'formtastic-bootstrap/helpers/input_helper'
11
9
  autoload :InputsHelper, 'formtastic-bootstrap/helpers/inputs_helper'
12
10
  # autoload :LabelHelper, 'formtastic/helpers/label_helper'
13
11
  # autoload :SemanticFormHelper, 'formtastic/helpers/semantic_form_helper'
@@ -1,10 +1,12 @@
1
1
  module FormtasticBootstrap
2
2
  module Inputs
3
+ extend ActiveSupport::Autoload
3
4
 
4
5
  autoload :Base, "formtastic-bootstrap/inputs/base"
5
6
  # autoload :Basic
6
7
  autoload :BooleanInput, "formtastic-bootstrap/inputs/boolean_input"
7
8
  autoload :CheckBoxesInput, "formtastic-bootstrap/inputs/check_boxes_input"
9
+ autoload :ColorInput, "formtastic-bootstrap/inputs/color_input"
8
10
  autoload :CountryInput, "formtastic-bootstrap/inputs/country_input"
9
11
  autoload :DateInput, "formtastic-bootstrap/inputs/date_input"
10
12
  autoload :DatePickerInput, "formtastic-bootstrap/inputs/date_picker_input"
@@ -6,6 +6,7 @@ require "formtastic-bootstrap/inputs/base/labelling"
6
6
  module FormtasticBootstrap
7
7
  module Inputs
8
8
  module Base
9
+ extend ActiveSupport::Autoload
9
10
 
10
11
  autoload :DatetimePickerish, "formtastic-bootstrap/inputs/base/datetime_pickerish"
11
12
  # autoload :Associations
@@ -14,7 +15,6 @@ module FormtasticBootstrap
14
15
  # autoload :Database
15
16
  # autoload :Errors
16
17
  # autoload :Fileish
17
- autoload :GroupedCollections, "formtastic-bootstrap/inputs/base/grouped_collections"
18
18
  # autoload :Hints
19
19
  # autoload :Html
20
20
  # autoload :Labelling
@@ -16,7 +16,13 @@ module FormtasticBootstrap
16
16
 
17
17
  # def control_label_html
18
18
  def label_html
19
- render_label? ? builder.label(input_name, label_text, label_html_options) : "".html_safe
19
+ if render_label?
20
+ template.content_tag(:span, :class => 'form-label') do
21
+ builder.label(input_name, label_text, label_html_options)
22
+ end
23
+ else
24
+ "".html_safe
25
+ end
20
26
  end
21
27
 
22
28
  end
@@ -5,7 +5,7 @@ module FormtasticBootstrap
5
5
  include Base
6
6
 
7
7
  def to_html
8
- checkbox_wrapping do
8
+ bootstrap_wrapping do
9
9
  hidden_field_html <<
10
10
  "".html_safe <<
11
11
  [label_with_nested_checkbox, hint_html].join("\n").html_safe
@@ -39,4 +39,4 @@ module FormtasticBootstrap
39
39
 
40
40
  end
41
41
  end
42
- end
42
+ end
@@ -7,8 +7,7 @@ module FormtasticBootstrap
7
7
  # TODO Make sure help blocks work correctly.
8
8
 
9
9
  def to_html
10
- form_group_wrapping do
11
- label_html <<
10
+ bootstrap_wrapping do
12
11
  hidden_field_for_all << # Might need to remove this guy.
13
12
  collection.map { |choice|
14
13
  choice_html(choice)
@@ -0,0 +1,8 @@
1
+ module FormtasticBootstrap
2
+ module Inputs
3
+ class ColorInput < Formtastic::Inputs::ColorInput
4
+ include Base
5
+ include Base::Stringish
6
+ end
7
+ end
8
+ end
@@ -7,8 +7,7 @@ module FormtasticBootstrap
7
7
  # TODO Make sure help blocks work correctly.
8
8
 
9
9
  def to_html
10
- form_group_wrapping do
11
- label_html <<
10
+ bootstrap_wrapping do
12
11
  collection.map { |choice|
13
12
  choice_html(choice)
14
13
  }.join("\n").html_safe
@@ -1,9 +1,9 @@
1
1
  module FormtasticBootstrap
2
2
  module Inputs
3
3
  class SelectInput < Formtastic::Inputs::SelectInput
4
+
4
5
  include Base
5
6
  include Base::Collections
6
- include Base::GroupedCollections
7
7
 
8
8
  def select_html
9
9
  builder.select(input_name, collection, input_options, form_control_input_html_options)
@@ -1,3 +1,3 @@
1
1
  module FormtasticBootstrap
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formtastic-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Bellantoni
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-24 00:00:00.000000000 Z
12
+ date: 2015-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: formtastic
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '>='
19
19
  - !ruby/object:Gem::Version
20
- version: '2.2'
20
+ version: '3.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '>='
26
26
  - !ruby/object:Gem::Version
27
- version: '2.2'
27
+ version: '3.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -81,62 +81,76 @@ dependencies:
81
81
  - - <
82
82
  - !ruby/object:Gem::Version
83
83
  version: 1.6.0
84
+ - !ruby/object:Gem::Dependency
85
+ name: rspec
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ version: '2.14'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ~>
96
+ - !ruby/object:Gem::Version
97
+ version: '2.14'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: rspec-rails
86
100
  requirement: !ruby/object:Gem::Requirement
87
101
  requirements:
88
- - - '>='
102
+ - - ~>
89
103
  - !ruby/object:Gem::Version
90
- version: '0'
104
+ version: '2.14'
91
105
  type: :development
92
106
  prerelease: false
93
107
  version_requirements: !ruby/object:Gem::Requirement
94
108
  requirements:
95
- - - '>='
109
+ - - ~>
96
110
  - !ruby/object:Gem::Version
97
- version: '0'
111
+ version: '2.14'
98
112
  - !ruby/object:Gem::Dependency
99
113
  name: rspec_tag_matchers
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
- - - '>='
116
+ - - ~>
103
117
  - !ruby/object:Gem::Version
104
- version: 1.0.0
118
+ version: '1.0'
105
119
  type: :development
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
108
122
  requirements:
109
- - - '>='
123
+ - - ~>
110
124
  - !ruby/object:Gem::Version
111
- version: 1.0.0
125
+ version: '1.0'
112
126
  - !ruby/object:Gem::Dependency
113
127
  name: ammeter
114
128
  requirement: !ruby/object:Gem::Requirement
115
129
  requirements:
116
130
  - - ~>
117
131
  - !ruby/object:Gem::Version
118
- version: 0.2.5
132
+ version: '0.2'
119
133
  type: :development
120
134
  prerelease: false
121
135
  version_requirements: !ruby/object:Gem::Requirement
122
136
  requirements:
123
137
  - - ~>
124
138
  - !ruby/object:Gem::Version
125
- version: 0.2.5
139
+ version: '0.2'
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: actionpack
128
142
  requirement: !ruby/object:Gem::Requirement
129
143
  requirements:
130
- - - '>='
144
+ - - ~>
131
145
  - !ruby/object:Gem::Version
132
- version: '0'
146
+ version: '3.2'
133
147
  type: :development
134
148
  prerelease: false
135
149
  version_requirements: !ruby/object:Gem::Requirement
136
150
  requirements:
137
- - - '>='
151
+ - - ~>
138
152
  - !ruby/object:Gem::Version
139
- version: '0'
153
+ version: '3.2'
140
154
  description: Formtastic form builder to generate Twitter Bootstrap-friendly markup.
141
155
  email:
142
156
  - mjbellantoni@yahoo.com
@@ -159,18 +173,15 @@ files:
159
173
  - lib/formtastic-bootstrap/actions.rb
160
174
  - lib/formtastic-bootstrap/engine.rb
161
175
  - lib/formtastic-bootstrap/form_builder.rb
162
- - lib/formtastic-bootstrap/helpers/action_helper.rb
163
176
  - lib/formtastic-bootstrap/helpers/actions_helper.rb
164
177
  - lib/formtastic-bootstrap/helpers/errors_helper.rb
165
178
  - lib/formtastic-bootstrap/helpers/fieldset_wrapper.rb
166
- - lib/formtastic-bootstrap/helpers/input_helper.rb
167
179
  - lib/formtastic-bootstrap/helpers/inputs_helper.rb
168
180
  - lib/formtastic-bootstrap/helpers.rb
169
181
  - lib/formtastic-bootstrap/inputs/base/choices.rb
170
182
  - lib/formtastic-bootstrap/inputs/base/collections.rb
171
183
  - lib/formtastic-bootstrap/inputs/base/datetime_pickerish.rb
172
184
  - lib/formtastic-bootstrap/inputs/base/errors.rb
173
- - lib/formtastic-bootstrap/inputs/base/grouped_collections.rb
174
185
  - lib/formtastic-bootstrap/inputs/base/hints.rb
175
186
  - lib/formtastic-bootstrap/inputs/base/html.rb
176
187
  - lib/formtastic-bootstrap/inputs/base/labelling.rb
@@ -182,6 +193,7 @@ files:
182
193
  - lib/formtastic-bootstrap/inputs/base.rb
183
194
  - lib/formtastic-bootstrap/inputs/boolean_input.rb
184
195
  - lib/formtastic-bootstrap/inputs/check_boxes_input.rb
196
+ - lib/formtastic-bootstrap/inputs/color_input.rb
185
197
  - lib/formtastic-bootstrap/inputs/country_input.rb
186
198
  - lib/formtastic-bootstrap/inputs/date_input.rb
187
199
  - lib/formtastic-bootstrap/inputs/date_picker_input.rb
@@ -229,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
241
  version: '0'
230
242
  requirements: []
231
243
  rubyforge_project:
232
- rubygems_version: 2.0.3
244
+ rubygems_version: 2.0.14
233
245
  signing_key:
234
246
  specification_version: 4
235
247
  summary: Formtastic form builder to generate Twitter Bootstrap-friendly markup.
@@ -1,12 +0,0 @@
1
- module FormtasticBootstrap
2
- module Helpers
3
- module ActionHelper
4
-
5
- # :as => :button # => FormtasticBootstrap::Actions::ButtonAction
6
- def standard_action_class_name(as)
7
- "FormtasticBootstrap::Actions::#{as.to_s.camelize}Action"
8
- end
9
-
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- module FormtasticBootstrap
2
- module Helpers
3
- module InputHelper
4
- include Formtastic::Helpers::InputHelper
5
-
6
- def standard_input_class_name(as)
7
- "FormtasticBootstrap::Inputs::#{as.to_s.camelize}Input"
8
- end
9
-
10
- end
11
- end
12
- end
@@ -1,9 +0,0 @@
1
- module FormtasticBootstrap
2
- module Inputs
3
- module Base
4
- module GroupedCollections
5
- include Formtastic::Inputs::Base::GroupedCollections
6
- end
7
- end
8
- end
9
- end