rango 0.0.3
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.
- data/CHANGELOG +8 -0
- data/LICENSE +20 -0
- data/README.textile +18 -0
- data/bin/rango +30 -0
- data/doc/head/Array.html +114 -0
- data/doc/head/AttributeMixin.html +613 -0
- data/doc/head/Class.html +102 -0
- data/doc/head/ColoredString.html +476 -0
- data/doc/head/Hash.html +643 -0
- data/doc/head/Kernel.html +641 -0
- data/doc/head/Object.html +140 -0
- data/doc/head/ObjectSpace.html +103 -0
- data/doc/head/Path.html +2499 -0
- data/doc/head/Range.html +109 -0
- data/doc/head/Rango.html +397 -0
- data/doc/head/Rango/ApplicationMixin.html +396 -0
- data/doc/head/Rango/Bundling.html +23 -0
- data/doc/head/Rango/Bundling/RequireStrategy.html +283 -0
- data/doc/head/Rango/Bundling/Strategy.html +703 -0
- data/doc/head/Rango/CallableStrategy.html +300 -0
- data/doc/head/Rango/Chainable.html +181 -0
- data/doc/head/Rango/Configurable.html +199 -0
- data/doc/head/Rango/Controller.html +962 -0
- data/doc/head/Rango/ControllerMixin.html +860 -0
- data/doc/head/Rango/ControllerStrategy.html +264 -0
- data/doc/head/Rango/DependencyStrategy.html +116 -0
- data/doc/head/Rango/Dispatcher.html +305 -0
- data/doc/head/Rango/Form.html +162 -0
- data/doc/head/Rango/GemDependencyStrategy.html +210 -0
- data/doc/head/Rango/Generator.html +93 -0
- data/doc/head/Rango/GenericViews.html +128 -0
- data/doc/head/Rango/GitDependencyStrategy.html +224 -0
- data/doc/head/Rango/GithubDependencyStrategy.html +118 -0
- data/doc/head/Rango/Handler.html +474 -0
- data/doc/head/Rango/Helpers.html +1271 -0
- data/doc/head/Rango/Hookable.html +202 -0
- data/doc/head/Rango/ImportMixin.html +755 -0
- data/doc/head/Rango/Logger.html +920 -0
- data/doc/head/Rango/ModelForm.html +42 -0
- data/doc/head/Rango/Project.html +516 -0
- data/doc/head/Rango/RenderMixin.html +23 -0
- data/doc/head/Rango/Request.html +1177 -0
- data/doc/head/Rango/Route.html +751 -0
- data/doc/head/Rango/Router.html +42 -0
- data/doc/head/Rango/Router/Dispatcher.html +311 -0
- data/doc/head/Rango/RouterStrategy.html +258 -0
- data/doc/head/Rango/Session.html +23 -0
- data/doc/head/Rango/Settings.html +23 -0
- data/doc/head/Rango/Settings/Erubis.html +23 -0
- data/doc/head/Rango/Settings/Framework.html +198 -0
- data/doc/head/Rango/Settings/Haml.html +23 -0
- data/doc/head/Rango/SimpleTemplate.html +187 -0
- data/doc/head/Rango/StrategyMixin.html +261 -0
- data/doc/head/Rango/Tasks.html +251 -0
- data/doc/head/Rango/Template.html +95 -0
- data/doc/head/Rango/Template/Adapter.html +90 -0
- data/doc/head/Rango/Templates.html +116 -0
- data/doc/head/Rango/Templates/Adapter.html +128 -0
- data/doc/head/Rango/Templates/Template.html +636 -0
- data/doc/head/Rango/Templates/TemplateHelpers.html +328 -0
- data/doc/head/RangoThor.html +205 -0
- data/doc/head/String.html +163 -0
- data/doc/head/TimeDSL.html +612 -0
- data/doc/head/all-methods.html +2012 -0
- data/doc/head/all-namespaces.html +114 -0
- data/doc/head/app.js +18 -0
- data/doc/head/index.html +18 -0
- data/doc/head/jquery.js +11 -0
- data/doc/head/readme.html +34 -0
- data/doc/head/style.css +68 -0
- data/doc/head/syntax_highlight.css +21 -0
- data/doc/versions/0.0.1/Rango.html +1025 -0
- data/doc/versions/0.0.1/Rango/CallableStrategy.html +166 -0
- data/doc/versions/0.0.1/Rango/ControllerStrategy.html +180 -0
- data/doc/versions/0.0.1/Rango/Route.html +340 -0
- data/doc/versions/0.0.1/Rango/Router.html +502 -0
- data/doc/versions/0.0.1/Rango/RouterStrategy.html +94 -0
- data/doc/versions/0.0.1/Rango/Template.html +28 -0
- data/doc/versions/0.0.1/Rango/Template/Adapter.html +90 -0
- data/doc/versions/0.0.1/all-methods.html +228 -0
- data/doc/versions/0.0.1/all-namespaces.html +36 -0
- data/doc/versions/0.0.1/app.js +18 -0
- data/doc/versions/0.0.1/index.html +18 -0
- data/doc/versions/0.0.1/jquery.js +11 -0
- data/doc/versions/0.0.1/readme.html +137 -0
- data/doc/versions/0.0.1/style.css +68 -0
- data/doc/versions/0.0.1/syntax_highlight.css +21 -0
- data/lib/rango.rb +25 -0
- data/lib/rango/boot.rb +54 -0
- data/lib/rango/bundling/dependency.rb +65 -0
- data/lib/rango/bundling/strategies/copy.rb +36 -0
- data/lib/rango/bundling/strategies/gem.rb +55 -0
- data/lib/rango/bundling/strategies/git.rb +71 -0
- data/lib/rango/bundling/strategies/hg.rb +9 -0
- data/lib/rango/bundling/strategy.rb +85 -0
- data/lib/rango/cli/generator.rb +15 -0
- data/lib/rango/cli/project.rb +87 -0
- data/lib/rango/cli/simple_template.rb +47 -0
- data/lib/rango/contrib/pagination.rb +15 -0
- data/lib/rango/contrib/pagination/README.textile +21 -0
- data/lib/rango/contrib/pagination/TODO +3 -0
- data/lib/rango/contrib/pagination/_pagination.html.haml +39 -0
- data/lib/rango/contrib/pagination/adapters/datamapper.rb +22 -0
- data/lib/rango/contrib/pagination/helpers.rb +12 -0
- data/lib/rango/contrib/pagination/page.rb +107 -0
- data/lib/rango/contrib/pagination/strategies.rb +49 -0
- data/lib/rango/contrib/syndication.rb +1 -0
- data/lib/rango/exceptions.rb +269 -0
- data/lib/rango/ext.rb +14 -0
- data/lib/rango/ext/attribute.rb +140 -0
- data/lib/rango/ext/class.rb +99 -0
- data/lib/rango/ext/colored_string.rb +105 -0
- data/lib/rango/ext/core_ext.rb +52 -0
- data/lib/rango/ext/hash.rb +21 -0
- data/lib/rango/ext/kernel.rb +74 -0
- data/lib/rango/ext/object_space.rb +11 -0
- data/lib/rango/ext/path.rb +222 -0
- data/lib/rango/ext/random.rb +22 -0
- data/lib/rango/ext/string.rb +16 -0
- data/lib/rango/ext/thor.rb +32 -0
- data/lib/rango/ext/time_dsl.rb +63 -0
- data/lib/rango/ext/try.rb +30 -0
- data/lib/rango/forms/form.rb +29 -0
- data/lib/rango/generic_views/static.rb +7 -0
- data/lib/rango/helpers.rb +24 -0
- data/lib/rango/helpers/README +179 -0
- data/lib/rango/helpers/assets.rb +29 -0
- data/lib/rango/helpers/general.rb +41 -0
- data/lib/rango/helpers/merb-helpers.rb +40 -0
- data/lib/rango/helpers/merb-helpers/core_ext.rb +58 -0
- data/lib/rango/helpers/merb-helpers/core_ext/numeric.rb +388 -0
- data/lib/rango/helpers/merb-helpers/date_time_formatting.rb +158 -0
- data/lib/rango/helpers/merb-helpers/date_time_helpers.rb +191 -0
- data/lib/rango/helpers/merb-helpers/form/builder.rb +447 -0
- data/lib/rango/helpers/merb-helpers/form/helpers.rb +451 -0
- data/lib/rango/helpers/merb-helpers/form_helpers.rb +19 -0
- data/lib/rango/helpers/merb-helpers/tag_helpers.rb +63 -0
- data/lib/rango/helpers/merb-helpers/text_helpers.rb +63 -0
- data/lib/rango/helpers/merb-helpers/time_dsl.rb +61 -0
- data/lib/rango/helpers/spec/core_ext_spec.rb +21 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/application.rb +4 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_check_box.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_file_field.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_hidden_field.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_option_tag.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_password_field.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_radio_button.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_radio_group.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_select.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_text_area.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/bound_text_field.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/button.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/check_box.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/custom_builder.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/delete_button.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/exceptions.rb +25 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/field_set.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/fields_for.rb +3 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/file_field.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/foo.rb +23 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/form.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/form_for.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/hacker.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/hidden_field.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/label.rb +3 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/numeric_ext.rb +3 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/option_tag.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/password_field.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/radio_button.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/radio_group.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/relative_date.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/relative_date_span.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/select.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/specs_controller.rb +11 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/submit.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/tag_helper.rb +21 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/text_area.rb +2 -0
- data/lib/rango/helpers/spec/fixture/app/controllers/text_field.rb +3 -0
- data/lib/rango/helpers/spec/fixture/app/helpers/global_helpers.rb +8 -0
- data/lib/rango/helpers/spec/fixture/app/models/fake_dm_model.rb +25 -0
- data/lib/rango/helpers/spec/fixture/app/models/first_generic_fake_model.rb +57 -0
- data/lib/rango/helpers/spec/fixture/app/models/hacker_generic_model.rb +5 -0
- data/lib/rango/helpers/spec/fixture/app/models/second_generic_fake_model.rb +18 -0
- data/lib/rango/helpers/spec/fixture/app/models/third_generic_fake_model.rb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_check_box_specs/basic.html.erb +4 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_check_box_specs/basic_unchecked.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_check_box_specs/checked.html.erb +4 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_check_box_specs/errors.html.erb +4 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_check_box_specs/label.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_check_box_specs/on_and_off.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_check_box_specs/raise_value_error.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_file_field_specs/additional_attributes.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_file_field_specs/takes_string.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_file_field_specs/with_label.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_hidden_field_specs/basic.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_hidden_field_specs/errors.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_hidden_field_specs/hidden_error.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_hidden_field_specs/label.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_option_tag_specs/grouped.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_option_tag_specs/nested.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_option_tag_specs/text_and_value.html.erb +4 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_password_field_specs/attributes.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_password_field_specs/basic.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_password_field_specs/label.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_radio_button_specs/basic.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_radio_group_specs/basic.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_radio_group_specs/hashes.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_radio_group_specs/mixed.html.erb +4 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_radio_group_specs/override_id.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_select_specs/basic.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_select_specs/blank.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_select_specs/label.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_select_specs/multiple.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_select_specs/prompt.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_select_specs/with_options.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_select_specs/with_options_with_blank.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_text_area_specs/basic.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_text_area_specs/label.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/bound_text_field_specs/basic.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/button_specs/button_with_label.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/button_specs/button_with_values.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/button_specs/disabled_button.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/basic.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/boolean.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/disabled.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/label.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/on_off_is_boolean.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/raise_unless_both_on_and_off.html.erb +2 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/raises_error_if_not_boolean.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/raises_error_if_on_off_and_boolean_false.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/simple.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/to_string.html.erb +8 -0
- data/lib/rango/helpers/spec/fixture/app/views/check_box_specs/unchecked.html.erb +2 -0
- data/lib/rango/helpers/spec/fixture/app/views/custom_builder_specs/everything.html.erb +10 -0
- data/lib/rango/helpers/spec/fixture/app/views/delete_button_specs/delete_with_explicit_url.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/delete_button_specs/delete_with_extra_params.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/delete_button_specs/delete_with_label.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/delete_button_specs/simple_delete.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/exeptions/client_error.html.erb +37 -0
- data/lib/rango/helpers/spec/fixture/app/views/exeptions/internal_server_error.html.erb +216 -0
- data/lib/rango/helpers/spec/fixture/app/views/exeptions/not_acceptable.html.erb +38 -0
- data/lib/rango/helpers/spec/fixture/app/views/exeptions/not_found.html.erb +40 -0
- data/lib/rango/helpers/spec/fixture/app/views/fields_for_specs/basic.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/fields_for_specs/midstream.html.erb +7 -0
- data/lib/rango/helpers/spec/fixture/app/views/fields_for_specs/nil.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/fieldset_specs/legend.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/file_field_specs/disabled.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/file_field_specs/makes_multipart.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/file_field_specs/with_label.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/file_field_specs/with_values.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/foo/bar.html.erb +0 -0
- data/lib/rango/helpers/spec/fixture/app/views/form_for_specs/basic.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/form_specs/create_a_form.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/form_specs/create_a_multipart_form.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/form_specs/fake_delete_if_set.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/form_specs/fake_put_if_set.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/form_specs/get_if_set.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/form_specs/post_by_default.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/form_specs/resourceful_form.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/hacker/file_field.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/hacker/hidden_field.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/hacker/option_tag.html.erb +4 -0
- data/lib/rango/helpers/spec/fixture/app/views/hacker/password_field.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/hacker/radio_button.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/hacker/radio_group.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/hacker/text_area.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/hacker/text_field.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/hidden_field_specs/basic.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/hidden_field_specs/disabled.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/hidden_field_specs/label.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/label_specs/basic.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/label_specs/basic_with_attributes.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/label_specs/basic_with_class.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/layout/application.html.erb +11 -0
- data/lib/rango/helpers/spec/fixture/app/views/numeric_ext_specs/minutes_to_hours.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/numeric_ext_specs/to_concurrency_default.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/numeric_ext_specs/two_digits.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/option_tag_specs/array.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/option_tag_specs/clean.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/option_tag_specs/collection.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/option_tag_specs/multiple_selects.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/option_tag_specs/no_extra_attributes.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/option_tag_specs/optgroups.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/option_tag_specs/selected.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/option_tag_specs/with_blank.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/option_tag_specs/with_prompt.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/password_field_specs/basic.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/password_field_specs/disabled.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_button_specs/basic.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_button_specs/checked.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_button_specs/disabled.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_button_specs/label.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_button_specs/unchecked.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_group_specs/attributes.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_group_specs/basic.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_group_specs/checked.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_group_specs/hash.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/radio_group_specs/specific_attributes.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/relative_date_span_specs/date_span_on_same_day.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/relative_date_span_specs/date_span_on_same_day_on_different_year.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/relative_date_specs/relative_date_with_year.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/relative_date_specs/relative_date_without_year.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/relative_date_specs/relative_today.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/relative_date_specs/relative_tomorrow.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/relative_date_specs/relative_yesterday.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/select_specs/basic.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/select_specs/blank.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/select_specs/multiple.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/select_specs/selected.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/submit_specs/disabled_submit.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/submit_specs/submit_with_label.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/submit_specs/submit_with_values.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/tag_helper/nested_tags.html.erb +5 -0
- data/lib/rango/helpers/spec/fixture/app/views/tag_helper/tag_with_attributes.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/tag_helper/tag_with_content.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/tag_helper/tag_with_content_in_the_block.html.erb +3 -0
- data/lib/rango/helpers/spec/fixture/app/views/text_area_specs/basic.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/text_area_specs/disabled.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/text_area_specs/label.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/text_area_specs/nil.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/text_field_specs/basic.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/text_field_specs/class.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/text_field_specs/disabled.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/text_field_specs/label.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/app/views/text_field_specs/symbolized_name.html.erb +1 -0
- data/lib/rango/helpers/spec/fixture/config/environments/development.rb +6 -0
- data/lib/rango/helpers/spec/fixture/config/environments/production.rb +5 -0
- data/lib/rango/helpers/spec/fixture/config/environments/test.rb +6 -0
- data/lib/rango/helpers/spec/fixture/config/init.rb +46 -0
- data/lib/rango/helpers/spec/fixture/config/rack.rb +11 -0
- data/lib/rango/helpers/spec/fixture/config/router.rb +38 -0
- data/lib/rango/helpers/spec/fixture/public/images/merb.jpg +0 -0
- data/lib/rango/helpers/spec/fixture/public/merb.fcgi +4 -0
- data/lib/rango/helpers/spec/fixture/public/stylesheets/master.css +119 -0
- data/lib/rango/helpers/spec/merb_helpers_config_spec.rb +84 -0
- data/lib/rango/helpers/spec/merb_helpers_date_time_spec.rb +270 -0
- data/lib/rango/helpers/spec/merb_helpers_form_spec.rb +1371 -0
- data/lib/rango/helpers/spec/merb_helpers_tag_helper_spec.rb +42 -0
- data/lib/rango/helpers/spec/merb_helpers_text_spec.rb +69 -0
- data/lib/rango/helpers/spec/numeric_extlib_spec.rb +137 -0
- data/lib/rango/helpers/spec/ordinalize_spec.rb +53 -0
- data/lib/rango/helpers/spec/spec_helper.rb +160 -0
- data/lib/rango/helpers/spec/time_dsl_spec.rb +45 -0
- data/lib/rango/helpers/syntax.rb +28 -0
- data/lib/rango/loggers/fireruby.rb +1 -0
- data/lib/rango/loggers/logger.rb +100 -0
- data/lib/rango/mixins/application.rb +25 -0
- data/lib/rango/mixins/configurable.rb +20 -0
- data/lib/rango/mixins/controller.rb +113 -0
- data/lib/rango/mixins/import.rb +89 -0
- data/lib/rango/mixins/strategy.rb +28 -0
- data/lib/rango/mvc/controller.rb +139 -0
- data/lib/rango/mvc/strategies.rb +6 -0
- data/lib/rango/orm/adapters/datamapper/fields.rb +3 -0
- data/lib/rango/orm/adapters/datamapper/setup.rb +16 -0
- data/lib/rango/orm/adapters/datamapper/support.rb +15 -0
- data/lib/rango/orm/adapters/datamapper/tasks.thor +41 -0
- data/lib/rango/orm/adapters/datamapper/types/unicode_string.rb +15 -0
- data/lib/rango/project.rb +28 -0
- data/lib/rango/rack/dispatcher.rb +61 -0
- data/lib/rango/rack/middlewares/emails.rb +7 -0
- data/lib/rango/rack/middlewares/encoding.rb +25 -0
- data/lib/rango/rack/middlewares/static.rb +49 -0
- data/lib/rango/rack/request.rb +166 -0
- data/lib/rango/rango.rb +75 -0
- data/lib/rango/router/adapters/basic.rb +21 -0
- data/lib/rango/router/adapters/rack-router.rb +18 -0
- data/lib/rango/router/dispatcher.rb +29 -0
- data/lib/rango/router/specification.txt +16 -0
- data/lib/rango/settings.rb +87 -0
- data/lib/rango/settings/erubis.rb +13 -0
- data/lib/rango/settings/framework.rb +85 -0
- data/lib/rango/settings/haml.rb +35 -0
- data/lib/rango/support/cucumber/steps/given_steps.rb +5 -0
- data/lib/rango/support/cucumber/steps/then_steps.rb +41 -0
- data/lib/rango/support/cucumber/steps/when_steps.rb +54 -0
- data/lib/rango/tasks/bundle.thor +28 -0
- data/lib/rango/tasks/stats.thor +0 -0
- data/lib/rango/templates/adapter.rb +19 -0
- data/lib/rango/templates/adapters/erb.rb +45 -0
- data/lib/rango/templates/adapters/erubis.rb +60 -0
- data/lib/rango/templates/adapters/haml.rb +17 -0
- data/lib/rango/templates/template.rb +123 -0
- data/rango.gemspec +35 -0
- data/spec/factories.rb +21 -0
- data/spec/rango/auth/core/authenticated_helper_spec.rb +0 -0
- data/spec/rango/auth/core/authentication_spec.rb +0 -0
- data/spec/rango/auth/core/callbacks_spec.rb +0 -0
- data/spec/rango/auth/core/errors_spec.rb +0 -0
- data/spec/rango/auth/core/responses_spec.rb +0 -0
- data/spec/rango/auth/core/session_mixin_spec.rb +0 -0
- data/spec/rango/auth/core/spec/helpers/authentication_helper_spec_spec.rb +0 -0
- data/spec/rango/auth/core/spec/merb-auth-core/activation_fixture_spec.rb +0 -0
- data/spec/rango/auth/core/spec/merb-auth-core/authentication_spec_spec.rb +0 -0
- data/spec/rango/auth/core/spec/merb-auth-core/callbacks_spec_spec.rb +0 -0
- data/spec/rango/auth/core/spec/merb-auth-core/customizations_spec_spec.rb +0 -0
- data/spec/rango/auth/core/spec/merb-auth-core/errors_spec_spec.rb +0 -0
- data/spec/rango/auth/core/spec/merb-auth-core/failed_login_spec_spec.rb +0 -0
- data/spec/rango/auth/core/spec/merb-auth-core/merb-auth-core_spec_spec.rb +0 -0
- data/spec/rango/auth/core/spec/merb-auth-core/router_helper_spec_spec.rb +0 -0
- data/spec/rango/auth/core/spec/merb-auth-core/strategy_spec_spec.rb +0 -0
- data/spec/rango/auth/core/spec/spec_helper_spec.rb +0 -0
- data/spec/rango/auth/core/strategy_spec.rb +0 -0
- data/spec/rango/auth/core_spec.rb +0 -0
- data/spec/rango/auth/more/mixins/redirect_back_spec.rb +0 -0
- data/spec/rango/auth/more/mixins/salted_user/ar_salted_user_spec.rb +0 -0
- data/spec/rango/auth/more/mixins/salted_user/dm_salted_user_spec.rb +0 -0
- data/spec/rango/auth/more/mixins/salted_user/relaxdb_salted_user_spec.rb +0 -0
- data/spec/rango/auth/more/mixins/salted_user/sq_salted_user_spec.rb +0 -0
- data/spec/rango/auth/more/mixins/salted_user_spec.rb +0 -0
- data/spec/rango/auth/more/spec/merb-auth-more_spec_spec.rb +0 -0
- data/spec/rango/auth/more/spec/mixins/redirect_back_spec_spec.rb +0 -0
- data/spec/rango/auth/more/spec/mixins/salted_user_spec_spec.rb +0 -0
- data/spec/rango/auth/more/spec/spec_helper_spec.rb +0 -0
- data/spec/rango/auth/more/strategies/abstract_password_spec.rb +0 -0
- data/spec/rango/auth/more/strategies/basic/basic_auth_spec.rb +0 -0
- data/spec/rango/auth/more/strategies/basic/openid_spec.rb +0 -0
- data/spec/rango/auth/more/strategies/basic/password_form_spec.rb +0 -0
- data/spec/rango/auth/more_spec.rb +0 -0
- data/spec/rango/auth/slice/exceptions_spec.rb +0 -0
- data/spec/rango/auth/slice/merb-auth-slice-password_spec.rb +0 -0
- data/spec/rango/auth/slice/sessions_spec.rb +0 -0
- data/spec/rango/auth/slice/spec_helper_spec.rb +0 -0
- data/spec/rango/auth/slice/xsessions_spec.rb +0 -0
- data/spec/rango/boot_spec.rb +19 -0
- data/spec/rango/bundling/dependency_spec.rb +0 -0
- data/spec/rango/bundling/strategies_spec.rb +0 -0
- data/spec/rango/cli/project_spec.rb +0 -0
- data/spec/rango/contrib/pagination/adapters/dm_spec.rb +0 -0
- data/spec/rango/contrib/pagination/helpers_spec.rb +0 -0
- data/spec/rango/contrib/pagination/page_spec.rb +94 -0
- data/spec/rango/contrib/pagination/strategies_spec.rb +0 -0
- data/spec/rango/contrib/pagination_spec.rb +0 -0
- data/spec/rango/contrib/syndication_spec.rb +0 -0
- data/spec/rango/exceptions_spec.rb +0 -0
- data/spec/rango/ext/attribute_spec.rb +0 -0
- data/spec/rango/ext/colored_string_spec.rb +0 -0
- data/spec/rango/ext/core_ext_spec.rb +0 -0
- data/spec/rango/ext/kernel_spec.rb +0 -0
- data/spec/rango/ext/path_spec.rb +0 -0
- data/spec/rango/ext/string_spec.rb +0 -0
- data/spec/rango/ext/thor_spec.rb +0 -0
- data/spec/rango/ext/time_dsl_spec.rb +0 -0
- data/spec/rango/ext_spec.rb +0 -0
- data/spec/rango/forms/form_spec.rb +0 -0
- data/spec/rango/generators_spec.rb +0 -0
- data/spec/rango/generic_views/static_spec.rb +0 -0
- data/spec/rango/helpers/assets_spec.rb +0 -0
- data/spec/rango/helpers/general_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/core_ext/numeric_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/core_ext_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/date_time_formatting_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/date_time_helpers_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/form/builder_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/form/helpers_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/form_helpers_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/tag_helpers_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/text_helpers_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers/time_dsl_spec.rb +0 -0
- data/spec/rango/helpers/merb-helpers_spec.rb +0 -0
- data/spec/rango/helpers/spec/core_ext_spec_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/application_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_check_box_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_file_field_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_hidden_field_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_option_tag_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_password_field_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_radio_button_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_radio_group_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_select_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_text_area_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/bound_text_field_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/button_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/check_box_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/custom_builder_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/delete_button_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/exceptions_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/field_set_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/fields_for_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/file_field_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/foo_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/form_for_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/form_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/hacker_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/hidden_field_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/label_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/numeric_ext_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/option_tag_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/password_field_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/radio_button_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/radio_group_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/relative_date_span_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/relative_date_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/select_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/specs_controller_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/submit_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/tag_helper_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/text_area_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/controllers/text_field_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/helpers/global_helpers_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/models/fake_dm_model_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/models/first_generic_fake_model_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/models/hacker_generic_model_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/models/second_generic_fake_model_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/app/models/third_generic_fake_model_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/config/environments/development_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/config/environments/production_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/config/environments/test_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/config/init_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/config/rack_spec.rb +0 -0
- data/spec/rango/helpers/spec/fixture/config/router_spec.rb +0 -0
- data/spec/rango/helpers/spec/merb_helpers_config_spec_spec.rb +0 -0
- data/spec/rango/helpers/spec/merb_helpers_date_time_spec_spec.rb +0 -0
- data/spec/rango/helpers/spec/merb_helpers_form_spec_spec.rb +0 -0
- data/spec/rango/helpers/spec/merb_helpers_tag_helper_spec_spec.rb +0 -0
- data/spec/rango/helpers/spec/merb_helpers_text_spec_spec.rb +0 -0
- data/spec/rango/helpers/spec/numeric_extlib_spec_spec.rb +0 -0
- data/spec/rango/helpers/spec/ordinalize_spec_spec.rb +0 -0
- data/spec/rango/helpers/spec/spec_helper_spec.rb +0 -0
- data/spec/rango/helpers/spec/time_dsl_spec_spec.rb +0 -0
- data/spec/rango/helpers/syntax_spec.rb +0 -0
- data/spec/rango/helpers_spec.rb +0 -0
- data/spec/rango/loggers/fireruby_spec.rb +0 -0
- data/spec/rango/loggers/logger_spec.rb +0 -0
- data/spec/rango/mixins/application_spec.rb +0 -0
- data/spec/rango/mixins/controller_spec.rb +0 -0
- data/spec/rango/mixins/import_spec.rb +0 -0
- data/spec/rango/mvc/controller_spec.rb +24 -0
- data/spec/rango/mvc/strategies_spec.rb +0 -0
- data/spec/rango/orm/adapters/dm/fields_spec.rb +0 -0
- data/spec/rango/orm/adapters/dm/setup_spec.rb +0 -0
- data/spec/rango/project_spec.rb +46 -0
- data/spec/rango/rack/dispatcher_spec.rb +0 -0
- data/spec/rango/rack/middlewares/emails_spec.rb +0 -0
- data/spec/rango/rack/middlewares/static_spec.rb +0 -0
- data/spec/rango/rack/request_spec.rb +18 -0
- data/spec/rango/rango_spec.rb +0 -0
- data/spec/rango/router/route_spec.rb +0 -0
- data/spec/rango/router/router_spec.rb +0 -0
- data/spec/rango/router/strategies_spec.rb +0 -0
- data/spec/rango/settings_spec.rb +26 -0
- data/spec/rango/spec/cucumber_spec.rb +0 -0
- data/spec/rango/spec/rspec_spec.rb +0 -0
- data/spec/rango/templates/adapter_spec.rb +0 -0
- data/spec/rango/templates/adapters/erb_spec.rb +0 -0
- data/spec/rango/templates/adapters/erubis_spec.rb +0 -0
- data/spec/rango/templates/adapters/haml_spec.rb +0 -0
- data/spec/rango/templates/template_spec.rb +0 -0
- data/spec/rango_spec.rb +37 -0
- data/spec/spec.opts +5 -0
- data/spec/spec_helper.rb +7 -0
- data/spec/stubs/flat.rb +0 -0
- data/stubs/app/content/init.rb.rbt +6 -0
- data/stubs/app/content/models.rb.rbt +9 -0
- data/stubs/app/content/views.rb.rbt +10 -0
- data/stubs/app/preprocess.rb +13 -0
- data/stubs/bigapp/content/init.rb +0 -0
- data/stubs/bigapp/content/views/application.rb +0 -0
- data/stubs/bigapp/preprocess.rb +5 -0
- data/stubs/features/content/env.rb +36 -0
- data/stubs/flat/content/flat.ru.rbt +19 -0
- data/stubs/flat/preprocess.rb +5 -0
- data/stubs/project/content/TODO +0 -0
- data/stubs/project/content/Thorfile +12 -0
- data/stubs/project/content/config.ru +34 -0
- data/stubs/project/content/init.rb +14 -0
- data/stubs/project/content/settings.rb.rbt +10 -0
- data/stubs/project/content/settings_local.rb.rbt +6 -0
- data/stubs/project/content/templates/base.html.haml.rbt +29 -0
- data/stubs/project/preprocess.rb +5 -0
- data/stubs/pupu/preprocess.rb +5 -0
- data/stubs/stub/content/metadata.yml +2 -0
- data/stubs/stub/content/postprocess.rb +7 -0
- data/stubs/stub/content/preprocess.rb +5 -0
- data/stubs/stub/preprocess.rb +5 -0
- data/support/Rango.tmbundle/Commands/Documentation for current word.tmCommand +22 -0
- data/support/Rango.tmbundle/Commands/Got to import.tmCommand +23 -0
- data/support/Rango.tmbundle/Commands/Rango console.tmCommand +22 -0
- data/support/Rango.tmbundle/Commands/Rango server.tmCommand +22 -0
- data/support/Rango.tmbundle/Commands/Read documentation.tmCommand +22 -0
- data/support/Rango.tmbundle/Snippets/Method with yardoc.tmSnippet +20 -0
- data/support/Rango.tmbundle/Snippets/Project_configure.tmSnippet +18 -0
- data/support/Rango.tmbundle/Snippets/Project_import.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Project_logger_debug.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Project_logger_error.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Project_logger_fatal.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Project_logger_inspect.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Project_logger_warn.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Rango_dependency.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Rango_import.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Rango_logger_debug.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Rango_logger_error.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Rango_logger_fatal.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Rango_logger_inspect.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/Rango_logger_warn.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/controller.tmSnippet +28 -0
- data/support/Rango.tmbundle/Snippets/doc.tmSnippet +20 -0
- data/support/Rango.tmbundle/Snippets/match.tmSnippet +16 -0
- data/support/Rango.tmbundle/Snippets/thor task.tmSnippet +19 -0
- data/support/Rango.tmbundle/info.plist +37 -0
- data/support/hooks/commit-msg +13 -0
- data/support/hooks/post-commit +4 -0
- data/support/hooks/pre-commit +4 -0
- data/support/hooks/pre-rebase +169 -0
- data/support/hooks/prepare-commit-msg +36 -0
- data/tasks/hooks.thor +26 -0
- data/tasks/package.thor +49 -0
- data/tasks/release.thor +72 -0
- data/tasks/repair.thor +75 -0
- data/tasks/spec.thor +39 -0
- data/tasks/stats.thor +66 -0
- data/tasks/yardoc.thor +16 -0
- data/templates/errors/404.html.erb +52 -0
- data/templates/errors/406.html.erb +1 -0
- data/templates/errors/500.html.erb +48 -0
- metadata +866 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# Form helpers provide a number of methods to simplify the creation of HTML forms.
|
|
4
|
+
# They can work directly with models (bound) or standalone (unbound).
|
|
5
|
+
module Rango::Helpers::Form
|
|
6
|
+
|
|
7
|
+
def _singleton_form_context
|
|
8
|
+
self._default_builder = Rango::Helpers::Form::Builder::ResourcefulFormWithErrors unless self._default_builder
|
|
9
|
+
@_singleton_form_context ||=
|
|
10
|
+
self._default_builder.new(nil, nil, self)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def form_contexts
|
|
14
|
+
@_form_contexts ||= []
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def current_form_context
|
|
18
|
+
form_contexts.last || _singleton_form_context
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def _new_form_context(name, builder)
|
|
22
|
+
if name.is_a?(String) || name.is_a?(Symbol)
|
|
23
|
+
ivar = instance_variable_get("@#{name}")
|
|
24
|
+
else
|
|
25
|
+
ivar, name = name, name.class.to_s.snake_case
|
|
26
|
+
end
|
|
27
|
+
builder ||= current_form_context.class if current_form_context
|
|
28
|
+
(builder || self._default_builder).new(ivar, name, self)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def with_form_context(name, builder)
|
|
32
|
+
form_contexts.push(_new_form_context(name, builder))
|
|
33
|
+
ret = yield
|
|
34
|
+
form_contexts.pop
|
|
35
|
+
ret
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Generates a form tag, which accepts a block that is not directly based on resource attributes
|
|
39
|
+
#
|
|
40
|
+
# ==== Parameters
|
|
41
|
+
# attrs<Hash>:: HTML attributes
|
|
42
|
+
#
|
|
43
|
+
# ==== Returns
|
|
44
|
+
# String:: HTML
|
|
45
|
+
#
|
|
46
|
+
# ==== Notes
|
|
47
|
+
# * Block helpers use the <%= =%> syntax
|
|
48
|
+
# * a multipart enctype is automatically set if the form contains a file upload field
|
|
49
|
+
#
|
|
50
|
+
# ==== Example
|
|
51
|
+
# <%= form :action => url(:controller => "foo", :action => "bar", :id => 1) do %>
|
|
52
|
+
# <%= text_field :name => "first_name", :label => "First Name" %>
|
|
53
|
+
# <%= submit "Create" %>
|
|
54
|
+
# <% end =%>
|
|
55
|
+
#
|
|
56
|
+
# Generates the HTML:
|
|
57
|
+
#
|
|
58
|
+
# <form action="/foo/bar/1" method="post">
|
|
59
|
+
# <label for="first_name">First Name</label>
|
|
60
|
+
# <input type="text" id="first_name" name="first_name" />
|
|
61
|
+
# <input type="submit" value="Create" />
|
|
62
|
+
# </form>
|
|
63
|
+
def form(*args, &block)
|
|
64
|
+
_singleton_form_context.form(*args, &block)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Generates a resource specific form tag which accepts a block, this also provides automatic resource routing.
|
|
68
|
+
#
|
|
69
|
+
# ==== Parameters
|
|
70
|
+
# name<Symbol>:: Model or Resource
|
|
71
|
+
# attrs<Hash>:: HTML attributes
|
|
72
|
+
#
|
|
73
|
+
# ==== Returns
|
|
74
|
+
# String:: HTML
|
|
75
|
+
#
|
|
76
|
+
# ==== Notes
|
|
77
|
+
# * Block helpers use the <%= =%> syntax
|
|
78
|
+
#
|
|
79
|
+
# ==== Example
|
|
80
|
+
# <%= form_for @person do %>
|
|
81
|
+
# <%= text_field :first_name, :label => "First Name" %>
|
|
82
|
+
# <%= text_field :last_name, :label => "Last Name" %>
|
|
83
|
+
# <%= submit "Create" %>
|
|
84
|
+
# <% end =%>
|
|
85
|
+
#
|
|
86
|
+
# The HTML generated for this would be:
|
|
87
|
+
#
|
|
88
|
+
# <form action="/people" method="post">
|
|
89
|
+
# <label for="person_first_name">First Name</label>
|
|
90
|
+
# <input type="text" id="person_first_name" name="person[first_name]" />
|
|
91
|
+
# <label for="person_last_name">Last Name</label>
|
|
92
|
+
# <input type="text" id="person_last_name" name="person[last_name]" />
|
|
93
|
+
# <input type="submit" value="Create" />
|
|
94
|
+
# </form>
|
|
95
|
+
def form_for(name, attrs = {}, &block)
|
|
96
|
+
with_form_context(name, attrs.delete(:builder)) do
|
|
97
|
+
current_form_context.form(attrs, &block)
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Creates a scope around a specific resource object like form_for, but doesnt create the form tags themselves.
|
|
102
|
+
# This makes fields_for suitable for specifying additional resource objects in the same form.
|
|
103
|
+
#
|
|
104
|
+
# ==== Examples
|
|
105
|
+
# <%= form_for @person do %>
|
|
106
|
+
# <%= text_field :first_name, :label => "First Name" %>
|
|
107
|
+
# <%= text_field :last_name, :label => "Last Name" %>
|
|
108
|
+
# <%= fields_for @permission do %>
|
|
109
|
+
# <%= check_box :is_admin, :label => "Administrator" %>
|
|
110
|
+
# <% end =%>
|
|
111
|
+
# <%= submit "Create" %>
|
|
112
|
+
# <% end =%>
|
|
113
|
+
def fields_for(name, attrs = {}, &block)
|
|
114
|
+
attrs ||= {}
|
|
115
|
+
with_form_context(name, attrs.delete(:builder)) do
|
|
116
|
+
capture(&block)
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Provides the ability to create quick fieldsets as blocks for your forms.
|
|
121
|
+
#
|
|
122
|
+
# ==== Parameters
|
|
123
|
+
# attrs<Hash>:: HTML attributes and options
|
|
124
|
+
#
|
|
125
|
+
# ==== Options
|
|
126
|
+
# +legend+:: Adds a legend tag within the fieldset
|
|
127
|
+
#
|
|
128
|
+
# ==== Returns
|
|
129
|
+
# String:: HTML
|
|
130
|
+
#
|
|
131
|
+
# ==== Notes
|
|
132
|
+
# Block helpers use the <%= =%> syntax
|
|
133
|
+
#
|
|
134
|
+
# ==== Example
|
|
135
|
+
# <%= fieldset :legend => "Customer Options" do %>
|
|
136
|
+
# ...your form elements
|
|
137
|
+
# <% end =%>
|
|
138
|
+
#
|
|
139
|
+
# Generates the HTML:
|
|
140
|
+
#
|
|
141
|
+
# <fieldset>
|
|
142
|
+
# <legend>Customer Options</legend>
|
|
143
|
+
# ...your form elements
|
|
144
|
+
# </fieldset>
|
|
145
|
+
def fieldset(attrs = {}, &block)
|
|
146
|
+
_singleton_form_context.fieldset(attrs, &block)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def fieldset_for(name, attrs = {}, &block)
|
|
150
|
+
with_form_context(name, attrs.delete(:builder)) do
|
|
151
|
+
current_form_context.fieldset(attrs, &block)
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Provides a generic HTML checkbox input tag.
|
|
156
|
+
# There are two ways this tag can be generated, based on the
|
|
157
|
+
# option :boolean. If not set to true, a "magic" input is generated.
|
|
158
|
+
# Otherwise, an input is created that can be easily used for passing
|
|
159
|
+
# an array of values to the application.
|
|
160
|
+
#
|
|
161
|
+
# ==== Parameters
|
|
162
|
+
# method<Symbol>:: Resource attribute
|
|
163
|
+
# attrs<Hash>:: HTML attributes and options
|
|
164
|
+
#
|
|
165
|
+
# ==== Returns
|
|
166
|
+
# String:: HTML
|
|
167
|
+
#
|
|
168
|
+
# ==== Example
|
|
169
|
+
# <%= check_box :name => "is_activated", :value => "1" %>
|
|
170
|
+
# <%= check_box :name => "choices[]", :boolean => false, :value => "dog" %>
|
|
171
|
+
# <%= check_box :name => "choices[]", :boolean => false, :value => "cat" %>
|
|
172
|
+
# <%= check_box :name => "choices[]", :boolean => false, :value => "weasle" %>
|
|
173
|
+
#
|
|
174
|
+
# Used with a model:
|
|
175
|
+
#
|
|
176
|
+
# <%= check_box :is_activated, :label => "Activated?" %>
|
|
177
|
+
def check_box; end
|
|
178
|
+
|
|
179
|
+
# Provides a HTML file input
|
|
180
|
+
#
|
|
181
|
+
# ==== Parameters
|
|
182
|
+
# name<Symbol>:: Model or Resource
|
|
183
|
+
# attrs<Hash>:: HTML attributes
|
|
184
|
+
#
|
|
185
|
+
# ==== Returns
|
|
186
|
+
# String:: HTML
|
|
187
|
+
#
|
|
188
|
+
# ==== Example
|
|
189
|
+
# <%= file_field :name => "file", :label => "File" %>
|
|
190
|
+
#
|
|
191
|
+
# Used with a model:
|
|
192
|
+
#
|
|
193
|
+
# <%= file_field :file, :label => "Choose a file" %>
|
|
194
|
+
def file_field; end
|
|
195
|
+
|
|
196
|
+
# Provides a HTML hidden input field
|
|
197
|
+
#
|
|
198
|
+
# ==== Parameters
|
|
199
|
+
# name<Symbol>:: Model or Resource
|
|
200
|
+
# attrs<Hash>:: HTML attributes
|
|
201
|
+
#
|
|
202
|
+
# ==== Returns
|
|
203
|
+
# String:: HTML
|
|
204
|
+
#
|
|
205
|
+
# ==== Example
|
|
206
|
+
# <%= hidden_field :name => "secret", :value => "some secret value" %>
|
|
207
|
+
#
|
|
208
|
+
# Used with a model:
|
|
209
|
+
#
|
|
210
|
+
# <%= hidden_field :identifier %>
|
|
211
|
+
# # => <input type="hidden" id="person_identifier" name="person[identifier]" value="#{@person.identifier}" />
|
|
212
|
+
def hidden_field; end
|
|
213
|
+
|
|
214
|
+
# Provides a generic HTML label.
|
|
215
|
+
#
|
|
216
|
+
# ==== Parameters
|
|
217
|
+
# attrs<Hash>:: HTML attributes
|
|
218
|
+
#
|
|
219
|
+
# ==== Returns
|
|
220
|
+
# String:: HTML
|
|
221
|
+
#
|
|
222
|
+
# ==== Example
|
|
223
|
+
# <%= label "Full Name", :for => "name" %>
|
|
224
|
+
# => <label for="name">Full Name</label>
|
|
225
|
+
def label(*args)
|
|
226
|
+
current_form_context.label(*args)
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Provides a HTML password input.
|
|
230
|
+
#
|
|
231
|
+
# ==== Parameters
|
|
232
|
+
# name<Symbol>:: Model or Resource
|
|
233
|
+
# attrs<Hash>:: HTML attributes
|
|
234
|
+
#
|
|
235
|
+
# ==== Returns
|
|
236
|
+
# String:: HTML
|
|
237
|
+
#
|
|
238
|
+
# ==== Example
|
|
239
|
+
# <%= password_field :name => :password, :label => "Password" %>
|
|
240
|
+
# # => <label for="password">Password</label><input type="password" id="password" name="password" />
|
|
241
|
+
#
|
|
242
|
+
# Used with a model:
|
|
243
|
+
#
|
|
244
|
+
# <%= password_field :password, :label => 'New Password' %>
|
|
245
|
+
def password_field; end
|
|
246
|
+
|
|
247
|
+
# Provides a HTML radio input tag
|
|
248
|
+
#
|
|
249
|
+
# ==== Parameters
|
|
250
|
+
# method<Symbol>:: Resource attribute
|
|
251
|
+
# attrs<Hash>:: HTML attributes and options
|
|
252
|
+
#
|
|
253
|
+
# ==== Returns
|
|
254
|
+
# String:: HTML
|
|
255
|
+
#
|
|
256
|
+
# ==== Example
|
|
257
|
+
# <%= radio_button :name => "radio_options", :value => "1", :label => "One" %>
|
|
258
|
+
# <%= radio_button :name => "radio_options", :value => "2", :label => "Two" %>
|
|
259
|
+
# <%= radio_button :name => "radio_options", :value => "3", :label => "Three", :checked => true %>
|
|
260
|
+
#
|
|
261
|
+
# Used with a model:
|
|
262
|
+
#
|
|
263
|
+
# <%= form_for @person do %>
|
|
264
|
+
# <%= radio_button :first_name %>
|
|
265
|
+
# <% end =%>
|
|
266
|
+
def radio_button; end
|
|
267
|
+
|
|
268
|
+
# Provides a radio group based on a resource attribute.
|
|
269
|
+
# This is generally used within a resource block such as +form_for+.
|
|
270
|
+
#
|
|
271
|
+
# ==== Parameters
|
|
272
|
+
# method<Symbol>:: Resource attribute
|
|
273
|
+
# arr<Array>:: Choices
|
|
274
|
+
#
|
|
275
|
+
# ==== Returns
|
|
276
|
+
# String:: HTML
|
|
277
|
+
#
|
|
278
|
+
# ==== Examples
|
|
279
|
+
# <%# the labels are the options %>
|
|
280
|
+
# <%= radio_group :my_choice, [5,6,7] %>
|
|
281
|
+
#
|
|
282
|
+
# <%# custom labels %>
|
|
283
|
+
# <%= radio_group :my_choice, [{:value => 5, :label => "five"}] %>
|
|
284
|
+
def radio_group; end
|
|
285
|
+
|
|
286
|
+
# Provides a HTML select
|
|
287
|
+
#
|
|
288
|
+
# ==== Parameters
|
|
289
|
+
# method<Symbol>:: Resource attribute
|
|
290
|
+
# attrs<Hash>:: HTML attributes and options
|
|
291
|
+
#
|
|
292
|
+
# ==== Options
|
|
293
|
+
# +prompt+:: Adds an additional option tag with the provided string with no value.
|
|
294
|
+
# +selected+:: The value of a selected object, which may be either a string or an array.
|
|
295
|
+
# +include_blank+:: Adds an additional blank option tag with no value.
|
|
296
|
+
# +collection+:: The collection for the select options
|
|
297
|
+
# +text_method+:: Method to determine text of an option (as a symbol). Ex: :text_method => :name will call .name on your record object for what text to display.
|
|
298
|
+
# +value_method+:: Method to determine value of an option (as a symbol).
|
|
299
|
+
#
|
|
300
|
+
# ==== Returns
|
|
301
|
+
# String:: HTML
|
|
302
|
+
#
|
|
303
|
+
# ==== Example
|
|
304
|
+
# <%= select :name, :collection => %w(one two three) %>
|
|
305
|
+
def select; end
|
|
306
|
+
|
|
307
|
+
# Provides a HTML textarea tag
|
|
308
|
+
#
|
|
309
|
+
# ==== Parameters
|
|
310
|
+
# contents<String>:: Contents of the text area
|
|
311
|
+
# attrs<Hash>:: HTML attributes
|
|
312
|
+
#
|
|
313
|
+
# ==== Returns
|
|
314
|
+
# String:: HTML
|
|
315
|
+
#
|
|
316
|
+
# ==== Example
|
|
317
|
+
# <%= text_area "my comments", :name => "comments" %>
|
|
318
|
+
#
|
|
319
|
+
# Used with a model:
|
|
320
|
+
#
|
|
321
|
+
# <%= text_area :comments %>
|
|
322
|
+
def text_area; end
|
|
323
|
+
|
|
324
|
+
# Provides a HTML text input tag
|
|
325
|
+
#
|
|
326
|
+
# ==== Parameters
|
|
327
|
+
# name<Symbol>:: Model or Resource
|
|
328
|
+
# attrs<Hash>:: HTML attributes
|
|
329
|
+
#
|
|
330
|
+
# ==== Returns
|
|
331
|
+
# String:: HTML
|
|
332
|
+
#
|
|
333
|
+
# ==== Example
|
|
334
|
+
# <%= text_field :name => :fav_color, :label => "Your Favorite Color" %>
|
|
335
|
+
# # => <label for="fav_color">Your Favorite Color</label><input type="text" id="fav_color" name="fav_color" />
|
|
336
|
+
#
|
|
337
|
+
# Used with a model:
|
|
338
|
+
#
|
|
339
|
+
# <%= form_for @person do %>
|
|
340
|
+
# <%= text_field :first_name, :label => "First Name" %>
|
|
341
|
+
# <% end =%>
|
|
342
|
+
def text_field; end
|
|
343
|
+
|
|
344
|
+
# @todo radio_group helper still needs to be implemented
|
|
345
|
+
%w(text_field password_field hidden_field file_field
|
|
346
|
+
text_area select check_box radio_button radio_group).each do |kind|
|
|
347
|
+
self.class_eval <<-RUBY, __FILE__, __LINE__ + 1
|
|
348
|
+
def #{kind}(*args)
|
|
349
|
+
if bound?(*args)
|
|
350
|
+
current_form_context.bound_#{kind}(*args)
|
|
351
|
+
else
|
|
352
|
+
current_form_context.unbound_#{kind}(*args)
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
RUBY
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Generates a HTML button.
|
|
359
|
+
#
|
|
360
|
+
# ==== Parameters
|
|
361
|
+
# contents<String>:: HTML contained within the button tag
|
|
362
|
+
# attrs<Hash>:: HTML attributes
|
|
363
|
+
#
|
|
364
|
+
# ==== Returns
|
|
365
|
+
# String:: HTML
|
|
366
|
+
#
|
|
367
|
+
# ==== Notes
|
|
368
|
+
# * Buttons do not always work as planned in IE
|
|
369
|
+
# http://www.peterbe.com/plog/button-tag-in-IE
|
|
370
|
+
# * Not all mobile browsers support buttons
|
|
371
|
+
# http://nickcowie.com/2007/time-to-stop-using-the-button-element/
|
|
372
|
+
#
|
|
373
|
+
# ==== Example
|
|
374
|
+
# <%= button "Initiate Launch Sequence" %>
|
|
375
|
+
def button(contents, attrs = {})
|
|
376
|
+
current_form_context.button(contents, attrs)
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
# Generates a HTML delete button.
|
|
380
|
+
#
|
|
381
|
+
# If an object is passed as first parameter, Rango will try to use the resource url for the object
|
|
382
|
+
# If the object doesn't have a resource view, pass a url
|
|
383
|
+
#
|
|
384
|
+
# ==== Parameters
|
|
385
|
+
# object_or_url<Object> or <String>:: Object to delete or URL to send the request to
|
|
386
|
+
# contents<String>:: HTML contained within the button tag
|
|
387
|
+
# attrs<Hash>:: HTML attributes
|
|
388
|
+
#
|
|
389
|
+
# ==== Returns
|
|
390
|
+
# String:: HTML
|
|
391
|
+
#
|
|
392
|
+
# ==== Example
|
|
393
|
+
# <%= delete_button @article, "Delete article now", :class => 'delete-btn' %>
|
|
394
|
+
# <%= delete_button url(:article, @article)%>
|
|
395
|
+
#
|
|
396
|
+
def delete_button(object_or_url, contents="Delete", attrs = {})
|
|
397
|
+
url = object_or_url.is_a?(String) ? object_or_url : resource(object_or_url)
|
|
398
|
+
button_text = (contents || 'Delete')
|
|
399
|
+
tag :form, :class => 'delete-btn', :action => url, :method => :post do
|
|
400
|
+
tag(:input, :type => :hidden, :name => "_method", :value => "DELETE") <<
|
|
401
|
+
tag(:input, attrs.merge(:value => button_text, :type => :submit))
|
|
402
|
+
end
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# Generates a HTML submit button.
|
|
406
|
+
#
|
|
407
|
+
# ==== Parameters
|
|
408
|
+
# value<String>:: Sets the value="" attribute
|
|
409
|
+
# attrs<Hash>:: HTML attributes
|
|
410
|
+
#
|
|
411
|
+
# ==== Returns
|
|
412
|
+
# String:: HTML
|
|
413
|
+
#
|
|
414
|
+
# ==== Example
|
|
415
|
+
# <%= submit "Process" %>
|
|
416
|
+
def submit(contents, attrs = {})
|
|
417
|
+
current_form_context.submit(contents, attrs)
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
# Provides a HTML formatted display of resource errors in an unordered list with a h2 form submission error
|
|
421
|
+
#
|
|
422
|
+
# ==== Parameters
|
|
423
|
+
# obj<Object>:: Model or Resource
|
|
424
|
+
# error_class<String>:: CSS class to use for error container
|
|
425
|
+
# build_li<String>:: Custom li tag to wrap each error in
|
|
426
|
+
# header<String>:: Custom header text for the error container
|
|
427
|
+
# before<Boolean>:: Display the errors before or inside of the form
|
|
428
|
+
#
|
|
429
|
+
# ==== Returns
|
|
430
|
+
# String:: HTML
|
|
431
|
+
#
|
|
432
|
+
# ==== Examples
|
|
433
|
+
# <%= error_messages_for @person %>
|
|
434
|
+
# <%= error_messages_for @person {|errors| "You can has probs nao: #{errors.size} of em!"}
|
|
435
|
+
# <%= error_messages_for @person, lambda{|error| "<li class='aieeee'>#{error.join(' ')}"} %>
|
|
436
|
+
# <%= error_messages_for @person, nil, 'bad_mojo' %>
|
|
437
|
+
def error_messages_for(obj = nil, opts = {})
|
|
438
|
+
current_form_context.error_messages_for(obj, opts[:error_class] || "error",
|
|
439
|
+
opts[:build_li] || "<li>%s</li>",
|
|
440
|
+
opts[:header] || "<h2>Form submission failed because of %s problem%s</h2>",
|
|
441
|
+
opts.key?(:before) ? opts[:before] : true)
|
|
442
|
+
end
|
|
443
|
+
alias error_messages error_messages_for
|
|
444
|
+
|
|
445
|
+
private
|
|
446
|
+
|
|
447
|
+
def bound?(*args)
|
|
448
|
+
args.first.is_a?(Symbol)
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
load File.dirname(__FILE__) / "form" / "helpers.rb"
|
|
4
|
+
load File.dirname(__FILE__) / "form" / "builder.rb"
|
|
5
|
+
|
|
6
|
+
module Rango::Helpers
|
|
7
|
+
include Rango::Helpers::Form
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
class Rango::Controller
|
|
11
|
+
class_inheritable_accessor :_default_builder
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Rango::BootLoader.after_app_loads do
|
|
15
|
+
# class Rango::Controller
|
|
16
|
+
# self._default_builder =
|
|
17
|
+
# Object.full_const_get(Rango::Plugins.config[:helpers][:default_builder]) rescue Rango::Helpers::Form::Builder::ResourcefulFormWithErrors
|
|
18
|
+
# end
|
|
19
|
+
# end
|