booter 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +13 -0
- data/README.md +10 -14
- data/app/form_builders/bootstrap_form_builder.rb +4 -5
- data/booter.gemspec +2 -2
- data/config/locales/booter.en.yml +6 -0
- data/lib/booter/version.rb +1 -1
- metadata +11 -8
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,27 +1,23 @@
|
|
1
1
|
# Booter
|
2
2
|
|
3
|
-
|
3
|
+
One more twitter bootstrap wrapper for Rails.
|
4
4
|
|
5
|
-
##
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add `gem "booter"` to your Gemfile and fire `bundle install`.
|
6
8
|
|
7
|
-
|
9
|
+
Include <tt>bootstrap.css</tt> to your <tt>application.css</tt> and optionally
|
10
|
+
<tt>bootstrap.js</tt> to <tt>application.js</tt>.
|
8
11
|
|
9
|
-
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
Use <tt>nice_form_for</tt> helper method to draw nice bootstrap forms:
|
10
15
|
|
11
16
|
``` haml
|
12
17
|
= nice_form_for @user do
|
18
|
+
= f.errors_for
|
13
19
|
= f.email_field :email
|
14
20
|
= f.password_field :password
|
15
21
|
= f.check_box :remember_me
|
16
22
|
= f.submit "Sign in"
|
17
23
|
```
|
18
|
-
|
19
|
-
## Changelog
|
20
|
-
|
21
|
-
### Booter 0.2.3 (March 19, 2012)
|
22
|
-
|
23
|
-
* Add select field support
|
24
|
-
|
25
|
-
### Booter 0.2.2 (March 18, 2012)
|
26
|
-
|
27
|
-
* First public release
|
@@ -6,9 +6,9 @@ class BootstrapFormBuilder < ActionView::Helpers::FormBuilder
|
|
6
6
|
|
7
7
|
messages = @object.errors.full_messages.map { |msg| content_tag(:li, msg) }.join
|
8
8
|
sentence = I18n.t(
|
9
|
-
"errors.
|
9
|
+
"errors.template.header",
|
10
10
|
:count => @object.errors.count,
|
11
|
-
:
|
11
|
+
:model => @object.class.model_name.human
|
12
12
|
)
|
13
13
|
|
14
14
|
html = <<-HTML
|
@@ -27,9 +27,9 @@ class BootstrapFormBuilder < ActionView::Helpers::FormBuilder
|
|
27
27
|
name = args.first
|
28
28
|
wrapper name, options do
|
29
29
|
if method_name == 'text_area'
|
30
|
-
super(name, rows: 7)
|
30
|
+
super(name, rows: 7, class: 'input-xxlarge')
|
31
31
|
else
|
32
|
-
super(name)
|
32
|
+
super(name, class: 'input-xxlarge')
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
@@ -55,7 +55,6 @@ class BootstrapFormBuilder < ActionView::Helpers::FormBuilder
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
private
|
59
58
|
def wrapper(name, options = {}, &block)
|
60
59
|
content_tag :div, class: ['control-group', ('error' if @object.errors[name].present?)] do
|
61
60
|
safe_join [
|
data/booter.gemspec
CHANGED
@@ -5,8 +5,8 @@ Gem::Specification.new do |gem|
|
|
5
5
|
gem.authors = ["Alexey Vakhov"]
|
6
6
|
gem.email = ["vakhov@gmail.com"]
|
7
7
|
gem.description = %q{Twitter bootstrap for Rails}
|
8
|
-
gem.summary = %q{Twitter bootstrap framework wrapper}
|
9
|
-
gem.homepage = ""
|
8
|
+
gem.summary = %q{Twitter bootstrap framework wrapper for Ruby on Rails with nice form rendering helper.}
|
9
|
+
gem.homepage = "https://github.com/boshie/booter"
|
10
10
|
|
11
11
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
12
|
gem.files = `git ls-files`.split("\n")
|
data/lib/booter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: booter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &77315400 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *77315400
|
25
25
|
description: Twitter bootstrap for Rails
|
26
26
|
email:
|
27
27
|
- vakhov@gmail.com
|
@@ -30,6 +30,7 @@ extensions: []
|
|
30
30
|
extra_rdoc_files: []
|
31
31
|
files:
|
32
32
|
- .gitignore
|
33
|
+
- CHANGELOG.md
|
33
34
|
- Gemfile
|
34
35
|
- LICENSE
|
35
36
|
- README.md
|
@@ -42,10 +43,11 @@ files:
|
|
42
43
|
- app/form_builders/bootstrap_form_builder.rb
|
43
44
|
- app/helpers/booter_helper.rb
|
44
45
|
- booter.gemspec
|
46
|
+
- config/locales/booter.en.yml
|
45
47
|
- lib/booter.rb
|
46
48
|
- lib/booter/engine.rb
|
47
49
|
- lib/booter/version.rb
|
48
|
-
homepage:
|
50
|
+
homepage: https://github.com/boshie/booter
|
49
51
|
licenses: []
|
50
52
|
post_install_message:
|
51
53
|
rdoc_options: []
|
@@ -59,7 +61,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
61
|
version: '0'
|
60
62
|
segments:
|
61
63
|
- 0
|
62
|
-
hash:
|
64
|
+
hash: -884449395
|
63
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
66
|
none: false
|
65
67
|
requirements:
|
@@ -68,11 +70,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
70
|
version: '0'
|
69
71
|
segments:
|
70
72
|
- 0
|
71
|
-
hash:
|
73
|
+
hash: -884449395
|
72
74
|
requirements: []
|
73
75
|
rubyforge_project:
|
74
76
|
rubygems_version: 1.8.17
|
75
77
|
signing_key:
|
76
78
|
specification_version: 3
|
77
|
-
summary: Twitter bootstrap framework wrapper
|
79
|
+
summary: Twitter bootstrap framework wrapper for Ruby on Rails with nice form rendering
|
80
|
+
helper.
|
78
81
|
test_files: []
|