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.
- data/MIT-LICENSE +1 -1
- data/README.textile +80 -66
- data/generators/form/form_generator.rb +37 -46
- data/generators/formtastic/formtastic_generator.rb +10 -8
- data/lib/formtastic.rb +318 -227
- data/lib/formtastic/i18n.rb +8 -6
- data/lib/formtastic/layout_helper.rb +6 -4
- data/lib/formtastic/railtie.rb +3 -1
- data/lib/formtastic/util.rb +2 -0
- data/lib/generators/formtastic/form/form_generator.rb +5 -7
- data/lib/generators/formtastic/install/install_generator.rb +2 -9
- data/lib/generators/templates/_form.html.erb +5 -0
- data/lib/generators/templates/_form.html.haml +4 -0
- data/{generators/formtastic → lib/generators}/templates/formtastic.css +25 -11
- data/{generators/formtastic → lib/generators}/templates/formtastic.rb +19 -2
- data/{generators/formtastic → lib/generators}/templates/formtastic_changes.css +0 -0
- metadata +58 -98
- data/Rakefile +0 -127
- data/generators/form/templates/view__form.html.erb +0 -5
- data/generators/form/templates/view__form.html.haml +0 -4
- data/generators/formtastic_stylesheets/formtastic_stylesheets_generator.rb +0 -16
- data/init.rb +0 -5
- data/rails/init.rb +0 -2
- data/spec/buttons_spec.rb +0 -166
- data/spec/commit_button_spec.rb +0 -401
- data/spec/custom_builder_spec.rb +0 -98
- data/spec/defaults_spec.rb +0 -20
- data/spec/error_proc_spec.rb +0 -27
- data/spec/errors_spec.rb +0 -105
- data/spec/form_helper_spec.rb +0 -142
- data/spec/helpers/layout_helper_spec.rb +0 -21
- data/spec/i18n_spec.rb +0 -152
- data/spec/include_blank_spec.rb +0 -74
- data/spec/input_spec.rb +0 -786
- data/spec/inputs/boolean_input_spec.rb +0 -104
- data/spec/inputs/check_boxes_input_spec.rb +0 -426
- data/spec/inputs/country_input_spec.rb +0 -118
- data/spec/inputs/date_input_spec.rb +0 -168
- data/spec/inputs/datetime_input_spec.rb +0 -310
- data/spec/inputs/file_input_spec.rb +0 -34
- data/spec/inputs/hidden_input_spec.rb +0 -78
- data/spec/inputs/numeric_input_spec.rb +0 -44
- data/spec/inputs/password_input_spec.rb +0 -46
- data/spec/inputs/radio_input_spec.rb +0 -243
- data/spec/inputs/select_input_spec.rb +0 -546
- data/spec/inputs/string_input_spec.rb +0 -64
- data/spec/inputs/text_input_spec.rb +0 -34
- data/spec/inputs/time_input_spec.rb +0 -206
- data/spec/inputs/time_zone_input_spec.rb +0 -110
- data/spec/inputs_spec.rb +0 -476
- data/spec/label_spec.rb +0 -89
- data/spec/semantic_errors_spec.rb +0 -98
- data/spec/semantic_fields_for_spec.rb +0 -45
- data/spec/spec.opts +0 -2
- data/spec/spec_helper.rb +0 -289
- data/spec/support/custom_macros.rb +0 -494
- data/spec/support/output_buffer.rb +0 -4
- data/spec/support/test_environment.rb +0 -45
@@ -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
|