rango 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/lib/rango/ext.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require_relative "ext/class"
|
4
|
+
require_relative "ext/attribute"
|
5
|
+
require_relative "ext/core_ext"
|
6
|
+
require_relative "ext/kernel"
|
7
|
+
require_relative "ext/path"
|
8
|
+
require_relative "ext/hash"
|
9
|
+
require_relative "ext/string"
|
10
|
+
require_relative "ext/colored_string"
|
11
|
+
require_relative "ext/random"
|
12
|
+
require_relative "ext/try"
|
13
|
+
require_relative "ext/object_space"
|
14
|
+
require_relative "ext/time_dsl"
|
@@ -0,0 +1,140 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
# TODO: refactor similar as attr_accessor_with_default from active support
|
4
|
+
# see http://noobkit.com/show/ruby/rails/rails-stable/activesupport/module/attr_accessor_with_default.html
|
5
|
+
|
6
|
+
require "extlib"
|
7
|
+
|
8
|
+
# default value for attr
|
9
|
+
module AttributeMixin
|
10
|
+
# @since 0.0.1
|
11
|
+
# @example
|
12
|
+
# class Post
|
13
|
+
# attribute :title, "Rango rulez!"
|
14
|
+
# end
|
15
|
+
# Post.new.title
|
16
|
+
# # => "Rango rulez!"
|
17
|
+
# @param [Symbol] name Name of object variable which will be set. If you have <tt>attribute :title</tt>, then the +@title+ variable will be defined. It also create +#title+ and +#title=+ accessors.
|
18
|
+
# @param [Object, @optional] default_value Default value of the variable.
|
19
|
+
# @return [name] Returns given default value or if default value.
|
20
|
+
# @see #hattribute
|
21
|
+
def attribute(name, default_value = nil)
|
22
|
+
# define reader method
|
23
|
+
define_method(name) do
|
24
|
+
if instance_variable_get("@#{name}").nil?
|
25
|
+
# lazy loading
|
26
|
+
# TODO: why is it lazy loaded?
|
27
|
+
default_value = default_value.call if default_value.is_a?(Proc)
|
28
|
+
instance_variable_set("@#{name}", default_value.try_dup) # dup is terribly important, otherwise all the objects will points to one object. If it is for example array, all of the objects will push into one array.
|
29
|
+
end
|
30
|
+
instance_variable_get("@#{name}")
|
31
|
+
end
|
32
|
+
|
33
|
+
# define writer method
|
34
|
+
define_method("#{name}=") do |value|
|
35
|
+
instance_variable_set("@#{name}", value)
|
36
|
+
# TODO: here should be rewritten the reader for cases when user want to do foo.bar = nil because now it will still returns the default value
|
37
|
+
end
|
38
|
+
|
39
|
+
return default_value
|
40
|
+
end
|
41
|
+
|
42
|
+
# This will also define title and title= methods, but it doesn't define @title variable,
|
43
|
+
# but @__hattributes__ hash with all the attributes
|
44
|
+
|
45
|
+
# @since 0.0.1
|
46
|
+
# @example
|
47
|
+
# class Post
|
48
|
+
# hattribute :title, "Rango rulez!"
|
49
|
+
# end
|
50
|
+
# Post.new.title
|
51
|
+
# # => "Rango rulez!"
|
52
|
+
# @param [Symbol] name Name of attribute his accessor methods will be defined. It's similar as +#attribute+, but it doesn't define +@name+ variable, but it will be key in +@__hattributes__+ hash. It's useful when you don't like to mess the object namespace with many variables or if you like to separate the attributes from the instance variables.
|
53
|
+
# @param [Object, @optional] default_value Default value of the variable.
|
54
|
+
# @return [name] Returns given default value or if default value.
|
55
|
+
# @see #attribute
|
56
|
+
def default_hattribute_names
|
57
|
+
# this can't be hash because in case the value will be lambda, we can't call it,
|
58
|
+
# because lambda is evaluated in scope of instance
|
59
|
+
@default_hattribute_names ||= Array.new
|
60
|
+
end
|
61
|
+
|
62
|
+
def hattribute(name, default_value = nil)
|
63
|
+
self.default_hattribute_names.push(name)
|
64
|
+
|
65
|
+
define_method(:hattributes) do
|
66
|
+
@__hattributes__ ||= Hash.new
|
67
|
+
# this is importat for initialization @__hattributes__
|
68
|
+
self.class.default_hattribute_names.each do |hattribute|
|
69
|
+
self.send(hattribute)
|
70
|
+
end
|
71
|
+
return @__hattributes__
|
72
|
+
end
|
73
|
+
|
74
|
+
# define reader method
|
75
|
+
if default_value.is_a?(Proc)
|
76
|
+
define_method(name) do
|
77
|
+
properties = instance_variable_get("@__hattributes__") || Hash.new
|
78
|
+
if properties[name].nil?
|
79
|
+
# instance_variable_set("@#{name}", default_value)
|
80
|
+
# lazy loading
|
81
|
+
properties[name] = self.instance_eval(&default_value)
|
82
|
+
end
|
83
|
+
# instance_variable_get("@#{name}")
|
84
|
+
properties[name]
|
85
|
+
end
|
86
|
+
else
|
87
|
+
define_method(name) do
|
88
|
+
properties = instance_variable_get("@__hattributes__") || Hash.new
|
89
|
+
# properties = @__hattributes__
|
90
|
+
if properties[name].nil?
|
91
|
+
# instance_variable_set("@#{name}", default_value)
|
92
|
+
# lazy loading
|
93
|
+
properties[name] = default_value.try_dup
|
94
|
+
end
|
95
|
+
# instance_variable_get("@#{name}")
|
96
|
+
properties[name]
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# define writer method
|
101
|
+
define_method("#{name}=") do |value|
|
102
|
+
instance_variable_set("@__hattributes__", Hash.new) unless instance_variable_get("@__hattributes__")
|
103
|
+
instance_variable_get("@__hattributes__")[name] = value
|
104
|
+
end
|
105
|
+
|
106
|
+
return default_value
|
107
|
+
end
|
108
|
+
|
109
|
+
# class << self.class
|
110
|
+
# def hattributes
|
111
|
+
# raise "Y"
|
112
|
+
# end
|
113
|
+
# end
|
114
|
+
|
115
|
+
# class Post
|
116
|
+
# questionable :updated, true
|
117
|
+
# end
|
118
|
+
# Post.new.updated?
|
119
|
+
# # => true
|
120
|
+
# @since 0.0.2
|
121
|
+
def questionable(name, default_value)
|
122
|
+
define_method("#{name}?") do
|
123
|
+
unless self.instance_variables.include?(name.to_sym)
|
124
|
+
self.instance_variable_set("@#{name}", default_value)
|
125
|
+
end
|
126
|
+
self.instance_variable_get("@#{name}")
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
Class.send(:include, AttributeMixin)
|
132
|
+
Module.send(:include, AttributeMixin)
|
133
|
+
|
134
|
+
# class Test
|
135
|
+
# hattribute :bar, -> { "value" }
|
136
|
+
# end
|
137
|
+
#
|
138
|
+
# t = Test.new
|
139
|
+
# p t.bar
|
140
|
+
# p t.hattributes
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
# class Test
|
4
|
+
# extend Rango::Hookable
|
5
|
+
# install_hook do |instance|
|
6
|
+
# p instance
|
7
|
+
# end
|
8
|
+
#
|
9
|
+
# def initialize
|
10
|
+
# p self
|
11
|
+
# end
|
12
|
+
# end
|
13
|
+
#
|
14
|
+
# Test.new
|
15
|
+
|
16
|
+
class Rango
|
17
|
+
module Hookable
|
18
|
+
def new(*args)
|
19
|
+
instance = super(*args)
|
20
|
+
self.hooks.each { |hook| hook.call(instance) }
|
21
|
+
return instance
|
22
|
+
end
|
23
|
+
|
24
|
+
def hooks
|
25
|
+
@hooks ||= Array.new
|
26
|
+
end
|
27
|
+
|
28
|
+
def install_hook(&block)
|
29
|
+
self.hooks.push(block)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# from merb-core
|
35
|
+
class Rango
|
36
|
+
module Chainable
|
37
|
+
# Allows the definition of methods on a class that will be available via
|
38
|
+
# super.
|
39
|
+
#
|
40
|
+
# ==== Examples
|
41
|
+
# class Foo
|
42
|
+
# extend Rango::Chainable
|
43
|
+
# chainable do
|
44
|
+
# def hello
|
45
|
+
# "hello"
|
46
|
+
# end
|
47
|
+
# end
|
48
|
+
# end
|
49
|
+
#
|
50
|
+
# class Foo
|
51
|
+
# def hello
|
52
|
+
# super + " Merb!"
|
53
|
+
# end
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# # Example with mixin:
|
57
|
+
# module TestMixin
|
58
|
+
# extend Rango::Chainable
|
59
|
+
# chainable do
|
60
|
+
# def test
|
61
|
+
# "from mixin!"
|
62
|
+
# end
|
63
|
+
# end
|
64
|
+
# end
|
65
|
+
#
|
66
|
+
# class Test
|
67
|
+
# include TestMixin
|
68
|
+
# def test
|
69
|
+
# "hello " + super
|
70
|
+
# end
|
71
|
+
# end
|
72
|
+
#
|
73
|
+
# puts Test.new.test
|
74
|
+
#
|
75
|
+
#
|
76
|
+
# Foo.new.hello #=> "hello Merb!"
|
77
|
+
#
|
78
|
+
# ==== Parameters
|
79
|
+
# &block::
|
80
|
+
# a block containing method definitions that should be
|
81
|
+
# marked as chainable
|
82
|
+
#
|
83
|
+
# ==== Returns
|
84
|
+
# Module:: The anonymous module that was created
|
85
|
+
def chainable(method = nil, &block)
|
86
|
+
if method.nil? && block_given?
|
87
|
+
mixin = Module.new(&block)
|
88
|
+
include mixin
|
89
|
+
return mixin
|
90
|
+
elsif method && ! block_given?
|
91
|
+
# TODO
|
92
|
+
# def test
|
93
|
+
# # ...
|
94
|
+
# end
|
95
|
+
# chainable :test
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require "delegate"
|
4
|
+
require "extlib"
|
5
|
+
require_relative "string"
|
6
|
+
require_relative "attribute"
|
7
|
+
|
8
|
+
class ColoredString
|
9
|
+
ATTRIBUTES = {
|
10
|
+
clear: 0,
|
11
|
+
reset: 0, # synonym for :clear
|
12
|
+
bold: 1,
|
13
|
+
dark: 2,
|
14
|
+
italic: 3, # not widely implemented
|
15
|
+
underline: 4,
|
16
|
+
underscore: 4, # synonym for :underline
|
17
|
+
blink: 5,
|
18
|
+
rapid_blink: 6, # not widely implemented
|
19
|
+
negative: 7, # no reverse because of String#reverse
|
20
|
+
concealed: 8,
|
21
|
+
strikethrough: 9, # not widely implemented
|
22
|
+
black: 30,
|
23
|
+
red: 31,
|
24
|
+
green: 32,
|
25
|
+
yellow: 33,
|
26
|
+
blue: 34,
|
27
|
+
magenta: 35,
|
28
|
+
cyan: 36,
|
29
|
+
white: 37,
|
30
|
+
on_black: 40,
|
31
|
+
on_red: 41,
|
32
|
+
on_green: 42,
|
33
|
+
on_yellow: 43,
|
34
|
+
on_blue: 44,
|
35
|
+
on_magenta: 45,
|
36
|
+
on_cyan: 46,
|
37
|
+
on_white: 47,
|
38
|
+
}
|
39
|
+
|
40
|
+
class << self
|
41
|
+
# ColoredString.coloring?
|
42
|
+
# Returns true, if the coloring function of this module
|
43
|
+
# is switched on, false otherwise.
|
44
|
+
#
|
45
|
+
# ColoredString.coloring = boolean
|
46
|
+
# Turns the coloring on or off globally, so you can easily do
|
47
|
+
# this for example:
|
48
|
+
# Term::ANSIColor::coloring = STDOUT.isatty
|
49
|
+
questionable :coloring, true
|
50
|
+
|
51
|
+
# <red.bold>Title</red.bold>
|
52
|
+
# - u, i/em, b/strong
|
53
|
+
def template(string)
|
54
|
+
return string # TODO
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
attr_accessor :colors
|
59
|
+
def initialize(string = "")
|
60
|
+
@string = string
|
61
|
+
@colors = Array.new
|
62
|
+
end
|
63
|
+
|
64
|
+
ATTRIBUTES.each do |color, code|
|
65
|
+
define_method(color) do
|
66
|
+
@colors.push(color)
|
67
|
+
self
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def to_s
|
72
|
+
if ! @colors.empty? && self.class.coloring?
|
73
|
+
sequences = ""
|
74
|
+
@colors.each do |name|
|
75
|
+
code = ATTRIBUTES[name]
|
76
|
+
sequences << "\e[#{code}m"
|
77
|
+
end
|
78
|
+
return "#{sequences}#{@string}\e[0m"
|
79
|
+
else
|
80
|
+
@string
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def inspect
|
85
|
+
"#<ColoredString:#@string>"
|
86
|
+
end
|
87
|
+
|
88
|
+
def raw
|
89
|
+
@string
|
90
|
+
end
|
91
|
+
|
92
|
+
def method_missing(method, *args, &block)
|
93
|
+
returned = @string.send(method, *args, &block)
|
94
|
+
# Bang methods like upcase!
|
95
|
+
if returned.is_a?(String) and @string.equal?(returned) # same object
|
96
|
+
@string.replace(returned)
|
97
|
+
return self
|
98
|
+
# upcase
|
99
|
+
elsif returned.is_a?(String) and not @string.equal?(returned) # different object
|
100
|
+
return self.class.new(returned)
|
101
|
+
else # not string, String#split etc
|
102
|
+
return returned
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
# TODO: spec it
|
4
|
+
class Hash
|
5
|
+
# @since 0.0.2
|
6
|
+
def to_html_attrs
|
7
|
+
self.map { |key, value| "#{key}='#{value}'" }.join(" ")
|
8
|
+
end
|
9
|
+
|
10
|
+
def symbolize_keys
|
11
|
+
output = Hash.new
|
12
|
+
self.each do |key, value|
|
13
|
+
output[key.to_sym] = value
|
14
|
+
end
|
15
|
+
return output
|
16
|
+
end
|
17
|
+
|
18
|
+
def symbolize_keys!
|
19
|
+
self.replace(self.symbolize_keys)
|
20
|
+
end
|
21
|
+
|
22
|
+
def deep_symbolize_keys
|
23
|
+
output = Hash.new
|
24
|
+
self.each do |key, value|
|
25
|
+
if value.is_a?(Hash)
|
26
|
+
output[key.to_sym] = value.symbolize_keys
|
27
|
+
else
|
28
|
+
output[key.to_sym] = value
|
29
|
+
end
|
30
|
+
end
|
31
|
+
return output
|
32
|
+
end
|
33
|
+
|
34
|
+
def deep_symbolize_keys!
|
35
|
+
self.replace(self.deep_symbolize_keys)
|
36
|
+
end
|
37
|
+
|
38
|
+
# Returns the value of self for each argument and deletes those entries.
|
39
|
+
#
|
40
|
+
# ==== Parameters
|
41
|
+
# *args:: the keys whose values should be extracted and deleted.
|
42
|
+
#
|
43
|
+
# ==== Returns
|
44
|
+
# Array[Object]:: The values of the provided arguments in corresponding order.
|
45
|
+
#
|
46
|
+
# :api: public
|
47
|
+
def extract!(*args)
|
48
|
+
args.map do |arg|
|
49
|
+
self.delete(arg)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
class Hash
|
4
|
+
def to_url_attrs
|
5
|
+
self.map { |key, value| "#{key}=#{value}" }.join("&")
|
6
|
+
end
|
7
|
+
|
8
|
+
def to_native
|
9
|
+
self.each do |key, value|
|
10
|
+
value = case value
|
11
|
+
when "true" then true
|
12
|
+
when "false" then false
|
13
|
+
when "nil" then nil
|
14
|
+
when /^\d+$/ then value.to_i
|
15
|
+
when /^\d+\.\d+$/ then value.to_f
|
16
|
+
else value end
|
17
|
+
self[key.to_sym] = value
|
18
|
+
end
|
19
|
+
return self
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
module Kernel
|
4
|
+
# @since 0.0.2
|
5
|
+
def metaclass
|
6
|
+
class << self
|
7
|
+
self
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
# @since 0.0.1
|
12
|
+
# @example
|
13
|
+
# try_require "term/ansicolor", "term-ansicolor"
|
14
|
+
# @param [String] library Library to require.
|
15
|
+
# @param [String, @optional] gemname Name of gem which contains required library. Will be used for displaying message.
|
16
|
+
# @return [Boolean] True if require was successful, false otherwise.
|
17
|
+
def try_require(library, gemname = library)
|
18
|
+
begin
|
19
|
+
require library
|
20
|
+
rescue LoadError
|
21
|
+
message = "Gem #{gemname} isn't installed. Run sudo gem install #{gemname}."
|
22
|
+
if defined?(Rango.logger)
|
23
|
+
Rango.logger.warn(message)
|
24
|
+
return false
|
25
|
+
else
|
26
|
+
puts(message)
|
27
|
+
return false
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def command(command)
|
33
|
+
puts command
|
34
|
+
puts %x[#{command}]
|
35
|
+
end
|
36
|
+
|
37
|
+
def quiet(&block)
|
38
|
+
old_stdout = STDOUT.dup
|
39
|
+
STDOUT.reopen("/dev/null")
|
40
|
+
returned = block.call
|
41
|
+
STDOUT.reopen(old_stdout)
|
42
|
+
return returned
|
43
|
+
end
|
44
|
+
|
45
|
+
def quiet!(&block)
|
46
|
+
old_stderr = STDERR.dup
|
47
|
+
STDERR.reopen("/dev/null", "a")
|
48
|
+
returned = quiet(&block)
|
49
|
+
STDERR.reopen(old_stderr)
|
50
|
+
return returned
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
# TODO: try_require and try_require_gem (diff require 'readline' vs require 'term/ansicolor')
|
55
|
+
|
56
|
+
# for quick inspection
|
57
|
+
# @since 0.0.2
|
58
|
+
def puts_and_return(*args)
|
59
|
+
puts(*args)
|
60
|
+
return *args
|
61
|
+
end
|
62
|
+
|
63
|
+
# @since 0.0.2
|
64
|
+
def p_and_return(*args)
|
65
|
+
p(*args)
|
66
|
+
return *args
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class Class
|
71
|
+
def controller?
|
72
|
+
false
|
73
|
+
end
|
74
|
+
end
|