speedo-formstrap 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +13 -0
  4. data/Gemfile.lock +117 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.md +192 -0
  7. data/Rakefile +49 -0
  8. data/VERSION +1 -0
  9. data/formtastic-bootstrap.gemspec +56 -0
  10. data/lib/action_view/helpers/text_field_date_helper.rb +166 -0
  11. data/lib/formtastic-bootstrap.rb +7 -0
  12. data/lib/formtastic-bootstrap/actions.rb +4 -0
  13. data/lib/formtastic-bootstrap/actions/base.rb +18 -0
  14. data/lib/formtastic-bootstrap/actions/button_action.rb +7 -0
  15. data/lib/formtastic-bootstrap/actions/input_action.rb +7 -0
  16. data/lib/formtastic-bootstrap/actions/link_action.rb +7 -0
  17. data/lib/formtastic-bootstrap/engine.rb +4 -0
  18. data/lib/formtastic-bootstrap/form_builder.rb +40 -0
  19. data/lib/formtastic-bootstrap/helpers.rb +21 -0
  20. data/lib/formtastic-bootstrap/helpers/action_helper.rb +12 -0
  21. data/lib/formtastic-bootstrap/helpers/actions_helper.rb +23 -0
  22. data/lib/formtastic-bootstrap/helpers/buttons_helper.rb +56 -0
  23. data/lib/formtastic-bootstrap/helpers/fieldset_wrapper.rb +42 -0
  24. data/lib/formtastic-bootstrap/helpers/input_helper.rb +12 -0
  25. data/lib/formtastic-bootstrap/helpers/inputs_helper.rb +36 -0
  26. data/lib/formtastic-bootstrap/inputs.rb +29 -0
  27. data/lib/formtastic-bootstrap/inputs/base.rb +23 -0
  28. data/lib/formtastic-bootstrap/inputs/base/choices.rb +38 -0
  29. data/lib/formtastic-bootstrap/inputs/base/errors.rb +48 -0
  30. data/lib/formtastic-bootstrap/inputs/base/hints.rb +27 -0
  31. data/lib/formtastic-bootstrap/inputs/base/html.rb +21 -0
  32. data/lib/formtastic-bootstrap/inputs/base/labelling.rb +28 -0
  33. data/lib/formtastic-bootstrap/inputs/base/numeric.rb +18 -0
  34. data/lib/formtastic-bootstrap/inputs/base/stringish.rb +18 -0
  35. data/lib/formtastic-bootstrap/inputs/base/timeish.rb +28 -0
  36. data/lib/formtastic-bootstrap/inputs/base/wrapping.rb +74 -0
  37. data/lib/formtastic-bootstrap/inputs/boolean_input.rb +29 -0
  38. data/lib/formtastic-bootstrap/inputs/check_boxes_input.rb +36 -0
  39. data/lib/formtastic-bootstrap/inputs/date_input.rb +16 -0
  40. data/lib/formtastic-bootstrap/inputs/datetime_input.rb +19 -0
  41. data/lib/formtastic-bootstrap/inputs/email_input.rb +15 -0
  42. data/lib/formtastic-bootstrap/inputs/file_input.rb +14 -0
  43. data/lib/formtastic-bootstrap/inputs/hidden_input.rb +14 -0
  44. data/lib/formtastic-bootstrap/inputs/number_input.rb +15 -0
  45. data/lib/formtastic-bootstrap/inputs/password_input.rb +15 -0
  46. data/lib/formtastic-bootstrap/inputs/phone_input.rb +15 -0
  47. data/lib/formtastic-bootstrap/inputs/radio_input.rb +33 -0
  48. data/lib/formtastic-bootstrap/inputs/range_input.rb +15 -0
  49. data/lib/formtastic-bootstrap/inputs/search_input.rb +15 -0
  50. data/lib/formtastic-bootstrap/inputs/select_input.rb +14 -0
  51. data/lib/formtastic-bootstrap/inputs/string_input.rb +15 -0
  52. data/lib/formtastic-bootstrap/inputs/text_input.rb +14 -0
  53. data/lib/formtastic-bootstrap/inputs/time_input.rb +16 -0
  54. data/lib/formtastic-bootstrap/inputs/time_zone_input.rb +14 -0
  55. data/lib/formtastic-bootstrap/inputs/url_input.rb +14 -0
  56. data/spec/actions/button_action_spec.rb +68 -0
  57. data/spec/actions/generic_action_spec.rb +486 -0
  58. data/spec/actions/input_action_spec.rb +64 -0
  59. data/spec/actions/link_action_spec.rb +93 -0
  60. data/spec/builder/semantic_fields_for_spec.rb +130 -0
  61. data/spec/helpers/action_helper_spec.rb +365 -0
  62. data/spec/helpers/actions_helper_spec.rb +143 -0
  63. data/spec/helpers/buttons_helper_spec.rb +159 -0
  64. data/spec/helpers/input_helper_spec.rb +956 -0
  65. data/spec/helpers/inputs_helper_spec.rb +591 -0
  66. data/spec/inputs/boolean_input_spec.rb +221 -0
  67. data/spec/inputs/check_boxes_input_spec.rb +467 -0
  68. data/spec/inputs/date_input_spec.rb +213 -0
  69. data/spec/inputs/datetime_input_spec.rb +101 -0
  70. data/spec/inputs/email_input_spec.rb +87 -0
  71. data/spec/inputs/file_input_spec.rb +91 -0
  72. data/spec/inputs/hidden_input_spec.rb +150 -0
  73. data/spec/inputs/number_input_spec.rb +817 -0
  74. data/spec/inputs/password_input_spec.rb +101 -0
  75. data/spec/inputs/phone_input_spec.rb +87 -0
  76. data/spec/inputs/radio_input_spec.rb +268 -0
  77. data/spec/inputs/range_input_spec.rb +507 -0
  78. data/spec/inputs/search_input_spec.rb +86 -0
  79. data/spec/inputs/select_input_spec.rb +613 -0
  80. data/spec/inputs/string_input_spec.rb +227 -0
  81. data/spec/inputs/text_input_spec.rb +190 -0
  82. data/spec/inputs/time_input_spec.rb +206 -0
  83. data/spec/inputs/time_zone_input_spec.rb +120 -0
  84. data/spec/inputs/url_input_spec.rb +87 -0
  85. data/spec/spec_helper.rb +24 -0
  86. data/spec/support/custom_macros.rb +575 -0
  87. data/spec/support/depracation.rb +6 -0
  88. data/spec/support/formtastic_spec_helper.rb +398 -0
  89. metadata +216 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'formtastic', '~> 2.1.0.beta1'
4
+ gem 'rails', '>= 3.1.0'
5
+
6
+
7
+ group :development, :test do
8
+ gem "rspec"
9
+ gem "bundler"
10
+ gem "jeweler"
11
+ gem "rcov", ">= 0"
12
+ gem "rspec_tag_matchers"
13
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,117 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (3.2.1)
5
+ actionpack (= 3.2.1)
6
+ mail (~> 2.4.0)
7
+ actionpack (3.2.1)
8
+ activemodel (= 3.2.1)
9
+ activesupport (= 3.2.1)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ journey (~> 1.0.1)
13
+ rack (~> 1.4.0)
14
+ rack-cache (~> 1.1)
15
+ rack-test (~> 0.6.1)
16
+ sprockets (~> 2.1.2)
17
+ activemodel (3.2.1)
18
+ activesupport (= 3.2.1)
19
+ builder (~> 3.0.0)
20
+ activerecord (3.2.1)
21
+ activemodel (= 3.2.1)
22
+ activesupport (= 3.2.1)
23
+ arel (~> 3.0.0)
24
+ tzinfo (~> 0.3.29)
25
+ activeresource (3.2.1)
26
+ activemodel (= 3.2.1)
27
+ activesupport (= 3.2.1)
28
+ activesupport (3.2.1)
29
+ i18n (~> 0.6)
30
+ multi_json (~> 1.0)
31
+ arel (3.0.0)
32
+ builder (3.0.0)
33
+ diff-lcs (1.1.3)
34
+ erubis (2.7.0)
35
+ formtastic (2.1.0.beta1)
36
+ actionpack (~> 3.0)
37
+ git (1.2.5)
38
+ hike (1.2.1)
39
+ i18n (0.6.0)
40
+ jeweler (1.6.4)
41
+ bundler (~> 1.0)
42
+ git (>= 1.2.5)
43
+ rake
44
+ journey (1.0.1)
45
+ json (1.6.5)
46
+ mail (2.4.1)
47
+ i18n (>= 0.4.0)
48
+ mime-types (~> 1.16)
49
+ treetop (~> 1.4.8)
50
+ mime-types (1.17.2)
51
+ multi_json (1.0.4)
52
+ nokogiri (1.5.0)
53
+ polyglot (0.3.3)
54
+ rack (1.4.1)
55
+ rack-cache (1.1)
56
+ rack (>= 0.4)
57
+ rack-ssl (1.3.2)
58
+ rack
59
+ rack-test (0.6.1)
60
+ rack (>= 1.0)
61
+ rails (3.2.1)
62
+ actionmailer (= 3.2.1)
63
+ actionpack (= 3.2.1)
64
+ activerecord (= 3.2.1)
65
+ activeresource (= 3.2.1)
66
+ activesupport (= 3.2.1)
67
+ bundler (~> 1.0)
68
+ railties (= 3.2.1)
69
+ railties (3.2.1)
70
+ actionpack (= 3.2.1)
71
+ activesupport (= 3.2.1)
72
+ rack-ssl (~> 1.3.2)
73
+ rake (>= 0.8.7)
74
+ rdoc (~> 3.4)
75
+ thor (~> 0.14.6)
76
+ rake (0.9.2.2)
77
+ rcov (0.9.11)
78
+ rdoc (3.12)
79
+ json (~> 1.4)
80
+ rspec (2.7.0)
81
+ rspec-core (~> 2.7.0)
82
+ rspec-expectations (~> 2.7.0)
83
+ rspec-mocks (~> 2.7.0)
84
+ rspec-core (2.7.1)
85
+ rspec-expectations (2.7.0)
86
+ diff-lcs (~> 1.1.2)
87
+ rspec-mocks (2.7.0)
88
+ rspec-rails (2.7.0)
89
+ actionpack (~> 3.0)
90
+ activesupport (~> 3.0)
91
+ railties (~> 3.0)
92
+ rspec (~> 2.7.0)
93
+ rspec_tag_matchers (1.0.0)
94
+ nokogiri (>= 1.4.0)
95
+ rspec-rails (>= 1.2.6)
96
+ sprockets (2.1.2)
97
+ hike (~> 1.2)
98
+ rack (~> 1.0)
99
+ tilt (~> 1.1, != 1.3.0)
100
+ thor (0.14.6)
101
+ tilt (1.3.3)
102
+ treetop (1.4.10)
103
+ polyglot
104
+ polyglot (>= 0.3.1)
105
+ tzinfo (0.3.31)
106
+
107
+ PLATFORMS
108
+ ruby
109
+
110
+ DEPENDENCIES
111
+ bundler
112
+ formtastic (~> 2.1.0.beta1)
113
+ jeweler
114
+ rails (>= 3.1.0)
115
+ rcov
116
+ rspec
117
+ rspec_tag_matchers
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Matthew Bellantoni
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,192 @@
1
+ # Formtastic Bootstrap
2
+
3
+ A [Formtastic](https://github.com/justinfrench/formtastic) form builder that creates markup suitable for the [Twitter Bootstrap](http://twitter.github.com/bootstrap/) framework. In theory, it should just work. Two great tastes in one!
4
+
5
+ You can follow [FormBoot on twitter](http://twitter.com/FormBoot) for update announcements and other relevant info.
6
+
7
+ ## Getting Started
8
+
9
+ ### Dependencies
10
+
11
+ Sppedo Formstrap (forked from Formtastic Bootstrap) has only been tested with Ruby 1.9.2, Rails 3.2, Formtastic 2.1 and Twitter Bootstrap 2.0.4.
12
+
13
+ #### Installation
14
+
15
+ Install the gem with
16
+
17
+ gem install speedo-formstrap
18
+
19
+ Or add it to your Gemfile:
20
+
21
+ gem 'speedo-formstrap'
22
+
23
+ And install it with <tt>bundle install</tt>.
24
+
25
+ #### Configuration
26
+
27
+ Add the following line to your Formtastic initialization file:
28
+
29
+ # config/initializers/formtastic.rb
30
+ Formtastic::Helpers::FormHelper.builder = FormtasticBootstrap::FormBuilder
31
+
32
+ Make sure the CSS `.hidden {display:none;}` is in your project.
33
+
34
+ Make sure you've already downloaded and installed Formtastic!
35
+
36
+
37
+ ## Formtastic vs. Formtastic Bootstrap
38
+
39
+
40
+ ### Overview
41
+
42
+ In general, Formtastic creates very verbose HTML whereas Bootstrap expects simpler HTML. Every attempt has been
43
+ made to generate the HTML expected by Bootstrap while still generating the rich HTML provided by Formtastic. Here's a pretty typical (simplified) example of what Formtastic generates and what Formtastic Bootstrap generates.
44
+
45
+ #### ERB
46
+
47
+ <%= semantic_form_for @post do |f| %>
48
+ <%= f.semantic_errors %>
49
+ <%= f.inputs do %>
50
+ <%= f.input :title, :hint => "This is the title!" %>
51
+ <% end %>
52
+ <%= f.buttons do %>
53
+ <%= f.commit_button %>
54
+ <% end %>
55
+ <% end %>
56
+
57
+ #### Formtastic
58
+
59
+ <form accept-charset="UTF-8" action="/posts" class="formtastic post" id="new_post" method="post">
60
+ <fieldset class="inputs">
61
+ <ol>
62
+ <li class="string input optional stringish" id="post_title_input">
63
+ <label class=" label" for="post_title">Title</label>
64
+ <input id="post_title" maxlength="255" name="post[title]" type="text" value="" />
65
+ <p class="inline-hints">This is the title!</p>
66
+ </li>
67
+ </ol>
68
+ </fieldset>
69
+ <fieldset class="buttons">
70
+ <ol>
71
+ <li class="commit button">
72
+ <input class="create" name="commit" type="submit" value="Create Post" />
73
+ </li>
74
+ </ol>
75
+ </fieldset>
76
+ </form>
77
+
78
+ #### Speedo's Formstrap
79
+
80
+ <form accept-charset="UTF-8" action="/posts" class="formtastic post" id="new_post" method="post">
81
+ <fieldset class="inputs">
82
+ <div class="string clearfix optional stringish" id="post_title_input">
83
+ <label class="" for="post_title">Title</label>
84
+ <div class="input">
85
+ <input id="post_title" maxlength="255" name="post[title]" type="text" value="" />
86
+ <span class="help-inline">This is the title!</span>
87
+ </div>
88
+ </div>
89
+ </fieldset>
90
+ <div class="actions">
91
+ <input class="btn create commit" name="commit" type="submit" value="Create Post" />
92
+ </div>
93
+ </form>
94
+
95
+ ### Major Difference in Behavior
96
+
97
+ * Formtastic Bootstrap omits the <tt>label</tt> class on label tags since Twitter Bootstrap uses this tag in another context (and it makes bad things happen.)
98
+ * Formtastic Bootstrap puts the <tt>input</tt> label in a different place because it makes Bootstrap behave correctly.
99
+ * Formtastic Bootstrap renders <tt>:date</tt>, <tt>:datetime</tt> and <tt>:time</tt> as text fields since this is how Twitter Bootstrap presents these data types (Formtastic renders them as dropdowns.) Some Rails magic may have been lost here. Additionally:
100
+ * <tt>:date</tt> et al are tagged with the <tt>stringish</tt> class.
101
+ * Hidden fields are not generated.
102
+ * Fieldsets are simply nested.
103
+ * <tt>f.buttons :name</tt> is not supported. This generates a <tt>fieldset</tt> and <tt>legend</tt> tag which will cause the wrong thing to happen in Bootstrap.
104
+
105
+ Bootstrap is somewhat incomplete, and in a few cases an inference needed to be drawn to determine a course of action. If you disagree with any of these choices, feel free to let me know.
106
+
107
+ The gem also provides some "shim" CSS where Bootstrap is missing styles provided Formtastic.
108
+
109
+ ### Other
110
+
111
+ A lot of the code (especially the test suite) was copied over from Formtastic and then beaten into submission. I'm sure you'll find some ugliness in there. In general, I mimicked the Formtastic code structure as much as possible.
112
+
113
+ In particular:
114
+
115
+ * Bootstrap doesn't say anything about nested <tt>formfields</tt>.
116
+ * Bootstrap doesn't explicitly lay out a <tt>:boolean</tt> control.
117
+ * Bootstrap doesn't explicitly say everything that needs to be said about <tt>:datetime</tt>, <tt>:date</tt>, and <tt>:time</tt>.
118
+ * I've inferred what <tt>:datetime</tt> should do since there's not example of a single <tt>:datetime</tt>.
119
+ * In some places the markup is tortuous (e.g. <tt>:boolean</tt>.) Hopefully as Bootstrap evolves these can get simplified!
120
+ * Bootstrap uses different HTML classes for sentence-based inline/block error messages.
121
+
122
+ ### What's Missing
123
+
124
+ Contributions are welcome!
125
+
126
+ * Formtastic's <tt>:country</tt> has not yet been implemented.
127
+ * Twitter Bootstrap's Date Range, Prepend Checkbox and Appended Checkbox controls have not yet been implemented.
128
+
129
+ ## Usage
130
+
131
+ #### Prepended Text
132
+ To create a Prepended Text field, use the ```:prepend``` option. This works on any text field input type, like ```:url```, ```:search```, and of course ```:string```
133
+
134
+ <%= semantic_form_for @user do |f| %>
135
+ <%= f.inputs do %>
136
+ <%= f.input :handle, :prepend => '@' %>
137
+ <% end %>
138
+ <% end %>
139
+
140
+ ## Contributing
141
+
142
+ ### Contributors
143
+
144
+ A big thank you [to all contributors](https://github.com/mjbellantoni/formtastic-bootstrap/contributors)!
145
+
146
+ ### Submitting Issues
147
+
148
+ If you're filing a bug, thank you! Secondly, in the report please include:
149
+
150
+ * The version of Formtastic you're using.
151
+ * The version of Twitter Bootstrap you're using.
152
+ * The code for your form.
153
+ * Anything else you think will help!
154
+
155
+ ### Source Contributions
156
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
157
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
158
+ * Fork the project
159
+ * Start a feature/bugfix branch
160
+ * Commit and push until you are happy with your contribution
161
+ * Make sure to add tests for it and to run the test suite. **If you don't have tests, I won't accept the pull.** If you need help with this, please ask.
162
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
163
+
164
+
165
+ ### To Do
166
+
167
+ * Field Types
168
+ * Basic Formtastic
169
+ * :country
170
+ * :time_zone
171
+ * Fancy Bootstrap Fields
172
+ * Date Range
173
+ * Prepend Checkbox
174
+ * Appended Checkbox
175
+ * :datetime, :date, :time
176
+ * As rich functionally as their Rails counterparts.
177
+ * Extract into a standalone gem.
178
+ * Disabled inputs
179
+ * Tests
180
+ * Refactor
181
+ * More -- See if I'm making sure the Bootstrap classes are present.
182
+ * Documentation
183
+ * Refactor :boolean to use common "choices" code (if possible.) (Not sure it is.)
184
+ * Boostrap
185
+ * Ask why they use 'inline-inputs' class instead of a fieldset tag.
186
+ * Why 'help-inline' and 'help-block' when they could have done p.help and span.help?
187
+
188
+
189
+ ## Copyright
190
+
191
+ Copyright (c) 2011 Matthew Bellantoni. See LICENSE.txt for further details.
192
+
data/Rakefile ADDED
@@ -0,0 +1,49 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "speedo-formstrap"
18
+ gem.homepage = "http://github.com/thugsb/formtastic-bootstrap"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Formtastic form builder to generate Twitter Bootstrap-friendly markup.}
21
+ gem.description = gem.summary
22
+ gem.email = "mjbellantoni@yahoo.com"
23
+ gem.authors = ["Matthew Bellantoni", "Stu Basden"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rspec/core'
29
+ require 'rspec/core/rake_task'
30
+ RSpec::Core::RakeTask.new(:spec) do |spec|
31
+ spec.pattern = FileList['spec/**/*_spec.rb']
32
+ end
33
+
34
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
35
+ spec.pattern = 'spec/**/*_spec.rb'
36
+ spec.rcov = true
37
+ end
38
+
39
+ task :default => :spec
40
+
41
+ require 'rake/rdoctask'
42
+ Rake::RDocTask.new do |rdoc|
43
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
+
45
+ rdoc.rdoc_dir = 'rdoc'
46
+ rdoc.title = "speedo-formstrap #{version}"
47
+ rdoc.rdoc_files.include('README*')
48
+ rdoc.rdoc_files.include('lib/**/*.rb')
49
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.2.0
@@ -0,0 +1,56 @@
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.0"
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 = "2011-12-21"
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 = `git ls-files`.split("\n")
20
+ s.homepage = "http://github.com/thugsb/formtastic-bootstrap"
21
+ s.licenses = ["MIT"]
22
+ s.require_paths = ["lib"]
23
+ s.rubygems_version = "1.8.10"
24
+ s.summary = "Formtastic form builder to generate Twitter Bootstrap-friendly markup."
25
+
26
+ if s.respond_to? :specification_version then
27
+ s.specification_version = 3
28
+
29
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
30
+ s.add_runtime_dependency(%q<formtastic>, [">= 0"])
31
+ s.add_runtime_dependency(%q<rails>, [">= 3.1.0"])
32
+ s.add_development_dependency(%q<rspec>, [">= 0"])
33
+ s.add_development_dependency(%q<bundler>, [">= 0"])
34
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
35
+ s.add_development_dependency(%q<rcov>, [">= 0"])
36
+ s.add_development_dependency(%q<rspec_tag_matchers>, [">= 0"])
37
+ else
38
+ s.add_dependency(%q<formtastic>, [">= 0"])
39
+ s.add_dependency(%q<rails>, [">= 3.1.0"])
40
+ s.add_dependency(%q<rspec>, [">= 0"])
41
+ s.add_dependency(%q<bundler>, [">= 0"])
42
+ s.add_dependency(%q<jeweler>, [">= 0"])
43
+ s.add_dependency(%q<rcov>, [">= 0"])
44
+ s.add_dependency(%q<rspec_tag_matchers>, [">= 0"])
45
+ end
46
+ else
47
+ s.add_dependency(%q<formtastic>, [">= 0"])
48
+ s.add_dependency(%q<rails>, [">= 3.1.0"])
49
+ s.add_dependency(%q<rspec>, [">= 0"])
50
+ s.add_dependency(%q<bundler>, [">= 0"])
51
+ s.add_dependency(%q<jeweler>, [">= 0"])
52
+ s.add_dependency(%q<rcov>, [">= 0"])
53
+ s.add_dependency(%q<rspec_tag_matchers>, [">= 0"])
54
+ end
55
+ end
56
+