bootstrap_helper 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1,2 @@
1
+ * 2.1.0 add will_paginate & simple_form template initializer for bootstrap
2
+ * 2.0.0.3 fix notice_mesage
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
14
  gem.name = "bootstrap_helper"
15
15
  gem.require_paths = ["lib"]
16
- gem.version = "2.1.0"
16
+ gem.version = "2.1.1"
17
17
 
18
18
  gem.add_dependency "railties", "~> 3.0"
19
19
  gem.add_dependency "thor", "~> 0.14"
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  # Use this setup block to configure all options available in SimpleForm.
3
2
  SimpleForm.setup do |config|
4
3
  # Wrappers are used by the form builder to generate a
@@ -42,41 +41,44 @@ SimpleForm.setup do |config|
42
41
 
43
42
  ## Inputs
44
43
  b.use :label_input
45
- b.use :hint, :tag => :span, :class => :hint
46
- b.use :error, :tag => :span, :class => :error
44
+ b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
45
+ b.use :error, :wrap_with => { :tag => :span, :class => :error }
47
46
  end
48
47
 
49
48
  config.wrappers :bootstrap, :tag => 'div', :class => 'control-group', :error_class => 'error' do |b|
49
+ b.use :html5
50
50
  b.use :placeholder
51
- b.use :label, :class => 'control-label'
52
- b.use :tag => 'div', :class => 'controls' do |ba|
51
+ b.use :label
52
+ b.wrapper :tag => 'div', :class => 'controls' do |ba|
53
53
  ba.use :input
54
- ba.use :error, :tag => 'span', :class => 'help-inline'
55
- ba.use :hint, :tag => 'p', :class => 'help-block'
54
+ ba.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
55
+ ba.use :hint, :wrap_with => { :tag => 'p', :class => 'help-block' }
56
56
  end
57
57
  end
58
58
 
59
59
  config.wrappers :prepend, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
60
+ b.use :html5
60
61
  b.use :placeholder
61
- b.use :label, :class => 'control-label'
62
- b.use :hint, :tag => 'span', :class => 'help-block'
63
- b.use :tag => 'div', :class => 'controls' do |input|
64
- input.use :tag => 'div', :class => 'input-prepend' do |prepend|
62
+ b.use :label
63
+ b.wrapper :tag => 'div', :class => 'controls' do |input|
64
+ input.wrapper :tag => 'div', :class => 'input-prepend' do |prepend|
65
65
  prepend.use :input
66
66
  end
67
- input.use :error, :tag => 'span', :class => 'help-inline'
67
+ input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' }
68
+ input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
68
69
  end
69
70
  end
70
71
 
71
72
  config.wrappers :append, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
73
+ b.use :html5
72
74
  b.use :placeholder
73
- b.use :label, :class => 'control-label'
74
- b.use :hint, :tag => 'span', :class => 'help-block'
75
- b.use :tag => 'div', :class => 'controls' do |input|
76
- input.use :tag => 'div', :class => 'input-append' do |append|
75
+ b.use :label
76
+ b.wrapper :tag => 'div', :class => 'controls' do |input|
77
+ input.wrapper :tag => 'div', :class => 'input-append' do |append|
77
78
  append.use :input
78
79
  end
79
- input.use :error, :tag => 'span', :class => 'help-inline'
80
+ input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' }
81
+ input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
80
82
  end
81
83
  end
82
84
 
@@ -95,14 +97,16 @@ SimpleForm.setup do |config|
95
97
  # Default class for buttons
96
98
  config.button_class = 'btn'
97
99
 
98
- # Method used to tidy up errors.
100
+ # Method used to tidy up errors. Specify any Rails Array method.
101
+ # :first lists the first message for each field.
102
+ # Use :to_sentence to list all errors for each field.
99
103
  # config.error_method = :first
100
104
 
101
105
  # Default tag used for error notification helper.
102
- # config.error_notification_tag = :p
106
+ config.error_notification_tag = :div
103
107
 
104
108
  # CSS class to add for error notification helper.
105
- # config.error_notification_class = :error_notification
109
+ config.error_notification_class = 'alert alert-error'
106
110
 
107
111
  # ID to add for error notification helper.
108
112
  # config.error_notification_id = nil
@@ -131,11 +135,14 @@ SimpleForm.setup do |config|
131
135
  # config.label_text = lambda { |label, required| "#{required} #{label}" }
132
136
 
133
137
  # You can define the class to use on all labels. Default is nil.
134
- # config.label_class = nil
138
+ config.label_class = 'control-label'
135
139
 
136
140
  # You can define the class to use on all forms. Default is simple_form.
137
141
  # config.form_class = :simple_form
138
142
 
143
+ # You can define which elements should obtain additional classes
144
+ # config.generate_additional_classes_for = [:wrapper, :label, :input]
145
+
139
146
  # Whether attributes are required by default (or not). Default is true.
140
147
  # config.required_by_default = true
141
148
 
@@ -166,6 +173,6 @@ SimpleForm.setup do |config|
166
173
  # Automatically discover new inputs in Rails' autoload path.
167
174
  # config.inputs_discovery = true
168
175
 
169
- # Cache simple form inputs discovery
176
+ # Cache SimpleForm inputs discovery
170
177
  # config.cache_discovery = !Rails.env.development?
171
178
  end
@@ -1,5 +1,5 @@
1
1
  module BootstrapHelper
2
2
  module Rails
3
- VERSION = "1.4.2"
3
+ VERSION = "2.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,90 +1,121 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_helper
3
- version: !ruby/object:Gem::Version
4
- version: 2.1.0
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 2
7
+ - 1
8
+ - 1
9
+ version: 2.1.1
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - xdite
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2012-07-04 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2012-10-10 00:00:00 +08:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: railties
16
- requirement: &70291938989700 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
25
+ requirements:
19
26
  - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '3.0'
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 3
30
+ - 0
31
+ version: "3.0"
22
32
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70291938989700
25
- - !ruby/object:Gem::Dependency
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
26
35
  name: thor
27
- requirement: &70291938989220 !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
28
38
  none: false
29
- requirements:
39
+ requirements:
30
40
  - - ~>
31
- - !ruby/object:Gem::Version
32
- version: '0.14'
41
+ - !ruby/object:Gem::Version
42
+ segments:
43
+ - 0
44
+ - 14
45
+ version: "0.14"
33
46
  type: :runtime
34
- prerelease: false
35
- version_requirements: *70291938989220
36
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
37
49
  name: simple_form
38
- requirement: &70291938988760 !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
39
52
  none: false
40
- requirements:
53
+ requirements:
41
54
  - - ~>
42
- - !ruby/object:Gem::Version
55
+ - !ruby/object:Gem::Version
56
+ segments:
57
+ - 2
58
+ - 0
59
+ - 2
43
60
  version: 2.0.2
44
61
  type: :runtime
45
- prerelease: false
46
- version_requirements: *70291938988760
47
- - !ruby/object:Gem::Dependency
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
48
64
  name: will_paginate
49
- requirement: &70291938988300 !ruby/object:Gem::Requirement
65
+ prerelease: false
66
+ requirement: &id004 !ruby/object:Gem::Requirement
50
67
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ segments:
72
+ - 3
73
+ - 0
74
+ - 3
54
75
  version: 3.0.3
55
76
  type: :runtime
56
- prerelease: false
57
- version_requirements: *70291938988300
58
- - !ruby/object:Gem::Dependency
77
+ version_requirements: *id004
78
+ - !ruby/object:Gem::Dependency
59
79
  name: bundler
60
- requirement: &70291938987840 !ruby/object:Gem::Requirement
80
+ prerelease: false
81
+ requirement: &id005 !ruby/object:Gem::Requirement
61
82
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ segments:
87
+ - 1
88
+ - 0
89
+ - 0
65
90
  version: 1.0.0
66
91
  type: :development
67
- prerelease: false
68
- version_requirements: *70291938987840
69
- - !ruby/object:Gem::Dependency
92
+ version_requirements: *id005
93
+ - !ruby/object:Gem::Dependency
70
94
  name: rails
71
- requirement: &70291938987380 !ruby/object:Gem::Requirement
95
+ prerelease: false
96
+ requirement: &id006 !ruby/object:Gem::Requirement
72
97
  none: false
73
- requirements:
98
+ requirements:
74
99
  - - ~>
75
- - !ruby/object:Gem::Version
76
- version: '3.0'
100
+ - !ruby/object:Gem::Version
101
+ segments:
102
+ - 3
103
+ - 0
104
+ version: "3.0"
77
105
  type: :development
78
- prerelease: false
79
- version_requirements: *70291938987380
106
+ version_requirements: *id006
80
107
  description: Twitter Bootstrap HTML Helper
81
- email:
108
+ email:
82
109
  - xuite.joke@gmail.com
83
110
  executables: []
111
+
84
112
  extensions: []
113
+
85
114
  extra_rdoc_files: []
86
- files:
115
+
116
+ files:
87
117
  - .gitignore
118
+ - CHANGELOG
88
119
  - Gemfile
89
120
  - README.md
90
121
  - Rakefile
@@ -98,28 +129,37 @@ files:
98
129
  - lib/bootstrap_helper/helper.rb
99
130
  - lib/bootstrap_helper/railtie.rb
100
131
  - lib/bootstrap_helper/version.rb
132
+ has_rdoc: true
101
133
  homepage: https://github.com/xdite/bootstrap-helper
102
134
  licenses: []
135
+
103
136
  post_install_message:
104
137
  rdoc_options: []
105
- require_paths:
138
+
139
+ require_paths:
106
140
  - lib
107
- required_ruby_version: !ruby/object:Gem::Requirement
141
+ required_ruby_version: !ruby/object:Gem::Requirement
108
142
  none: false
109
- requirements:
110
- - - ! '>='
111
- - !ruby/object:Gem::Version
112
- version: '0'
113
- required_rubygems_version: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ segments:
147
+ - 0
148
+ version: "0"
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
150
  none: false
115
- requirements:
116
- - - ! '>='
117
- - !ruby/object:Gem::Version
118
- version: '0'
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ segments:
155
+ - 0
156
+ version: "0"
119
157
  requirements: []
158
+
120
159
  rubyforge_project:
121
- rubygems_version: 1.8.15
160
+ rubygems_version: 1.3.7.1
122
161
  signing_key:
123
162
  specification_version: 3
124
163
  summary: Twitter Bootstrap HTML Helper
125
164
  test_files: []
165
+