booter 0.2.3 → 0.3.0

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.
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ ## Booter 0.3.0 (April 1, 2012)
4
+
5
+ * Use large input elementes
6
+
7
+ ## Booter 0.2.3 (March 19, 2012)
8
+
9
+ * Add select field support
10
+
11
+ ## Booter 0.2.2 (March 18, 2012)
12
+
13
+ * First public release
data/README.md CHANGED
@@ -1,27 +1,23 @@
1
1
  # Booter
2
2
 
3
- Twitter bootstrap framework for Rails.
3
+ One more twitter bootstrap wrapper for Rails.
4
4
 
5
- ## Usage
5
+ ## Installation
6
+
7
+ Add `gem "booter"` to your Gemfile and fire `bundle install`.
6
8
 
7
- Add bootstrap.css to your application.css and bootstrap.js to your application.js file.
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
- Use <tt>nice_form_for</tt> helper method to draw bootstrap forms:
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.messages.not_saved",
9
+ "errors.template.header",
10
10
  :count => @object.errors.count,
11
- :resource => @object.class.model_name.human.downcase
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 [
@@ -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")
@@ -0,0 +1,6 @@
1
+ en:
2
+ errors:
3
+ template:
4
+ header:
5
+ one: '%{model}: not saved because of %{count} error'
6
+ other: '%{model}: not saved because of %{count} errors'
@@ -1,3 +1,3 @@
1
1
  module Booter
2
- VERSION = "0.2.3"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.3
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-03-19 00:00:00.000000000 Z
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: &76893000 !ruby/object:Gem::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: *76893000
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: 976728861
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: 976728861
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: []