formtastic 1.1.0 → 1.2.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/MIT-LICENSE +1 -1
  2. data/README.textile +80 -66
  3. data/generators/form/form_generator.rb +37 -46
  4. data/generators/formtastic/formtastic_generator.rb +10 -8
  5. data/lib/formtastic.rb +318 -227
  6. data/lib/formtastic/i18n.rb +8 -6
  7. data/lib/formtastic/layout_helper.rb +6 -4
  8. data/lib/formtastic/railtie.rb +3 -1
  9. data/lib/formtastic/util.rb +2 -0
  10. data/lib/generators/formtastic/form/form_generator.rb +5 -7
  11. data/lib/generators/formtastic/install/install_generator.rb +2 -9
  12. data/lib/generators/templates/_form.html.erb +5 -0
  13. data/lib/generators/templates/_form.html.haml +4 -0
  14. data/{generators/formtastic → lib/generators}/templates/formtastic.css +25 -11
  15. data/{generators/formtastic → lib/generators}/templates/formtastic.rb +19 -2
  16. data/{generators/formtastic → lib/generators}/templates/formtastic_changes.css +0 -0
  17. metadata +58 -98
  18. data/Rakefile +0 -127
  19. data/generators/form/templates/view__form.html.erb +0 -5
  20. data/generators/form/templates/view__form.html.haml +0 -4
  21. data/generators/formtastic_stylesheets/formtastic_stylesheets_generator.rb +0 -16
  22. data/init.rb +0 -5
  23. data/rails/init.rb +0 -2
  24. data/spec/buttons_spec.rb +0 -166
  25. data/spec/commit_button_spec.rb +0 -401
  26. data/spec/custom_builder_spec.rb +0 -98
  27. data/spec/defaults_spec.rb +0 -20
  28. data/spec/error_proc_spec.rb +0 -27
  29. data/spec/errors_spec.rb +0 -105
  30. data/spec/form_helper_spec.rb +0 -142
  31. data/spec/helpers/layout_helper_spec.rb +0 -21
  32. data/spec/i18n_spec.rb +0 -152
  33. data/spec/include_blank_spec.rb +0 -74
  34. data/spec/input_spec.rb +0 -786
  35. data/spec/inputs/boolean_input_spec.rb +0 -104
  36. data/spec/inputs/check_boxes_input_spec.rb +0 -426
  37. data/spec/inputs/country_input_spec.rb +0 -118
  38. data/spec/inputs/date_input_spec.rb +0 -168
  39. data/spec/inputs/datetime_input_spec.rb +0 -310
  40. data/spec/inputs/file_input_spec.rb +0 -34
  41. data/spec/inputs/hidden_input_spec.rb +0 -78
  42. data/spec/inputs/numeric_input_spec.rb +0 -44
  43. data/spec/inputs/password_input_spec.rb +0 -46
  44. data/spec/inputs/radio_input_spec.rb +0 -243
  45. data/spec/inputs/select_input_spec.rb +0 -546
  46. data/spec/inputs/string_input_spec.rb +0 -64
  47. data/spec/inputs/text_input_spec.rb +0 -34
  48. data/spec/inputs/time_input_spec.rb +0 -206
  49. data/spec/inputs/time_zone_input_spec.rb +0 -110
  50. data/spec/inputs_spec.rb +0 -476
  51. data/spec/label_spec.rb +0 -89
  52. data/spec/semantic_errors_spec.rb +0 -98
  53. data/spec/semantic_fields_for_spec.rb +0 -45
  54. data/spec/spec.opts +0 -2
  55. data/spec/spec_helper.rb +0 -289
  56. data/spec/support/custom_macros.rb +0 -494
  57. data/spec/support/output_buffer.rb +0 -4
  58. data/spec/support/test_environment.rb +0 -45
@@ -1,4 +0,0 @@
1
- module ActionView
2
- class OutputBuffer < Formtastic::Util.rails_safe_buffer_class
3
- end
4
- end
@@ -1,45 +0,0 @@
1
- if Formtastic::Util.rails3?
2
- gem 'rspec', '~> 2.0.0.beta19'
3
- gem 'rspec-rails', '~> 2.0.0.beta19'
4
- gem 'rspec_tag_matchers'
5
- gem 'i18n', '>= 0.4.0'
6
-
7
- require "rubygems"
8
- require "action_controller/railtie"
9
- require "active_resource/railtie"
10
- require 'active_model'
11
- require 'rspec/core'
12
- require 'rspec/rails'
13
- require 'rspec_tag_matchers'
14
-
15
- # Create a simple rails application for use in testing the viewhelper
16
- module FormtasticTest
17
- class Application < Rails::Application
18
- # Configure the default encoding used in templates for Ruby 1.9.
19
- config.encoding = "utf-8"
20
- config.active_support.deprecation = :stderr
21
- end
22
- end
23
- FormtasticTest::Application.initialize!
24
-
25
- # Configure RSpec 2.0
26
- RSpec.configure do |config|
27
- config.include RspecTagMatchers
28
- config.include CustomMacros
29
- config.mock_with :rspec
30
- end
31
-
32
- else
33
- gem 'rspec', '>= 1.2.6'
34
- gem 'rspec-rails', '>= 1.2.6'
35
- gem 'rspec_tag_matchers'
36
- gem 'hpricot', '>= 0.6.1'
37
- gem 'i18n', '< 0.4.0'
38
-
39
- require 'rspec_tag_matchers'
40
-
41
- Spec::Runner.configure do |config|
42
- config.include(RspecTagMatchers)
43
- config.include(CustomMacros)
44
- end
45
- end