zena 1.2.7 → 1.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +80 -25
- data/Rakefile +2 -2
- data/app/controllers/columns_controller.rb +2 -2
- data/app/controllers/nodes_controller.rb +22 -29
- data/app/controllers/user_sessions_controller.rb +35 -10
- data/app/controllers/users_controller.rb +2 -2
- data/app/controllers/versions_controller.rb +2 -2
- data/app/models/group.rb +15 -1
- data/app/models/node.rb +109 -8
- data/app/models/role.rb +4 -0
- data/app/models/site.rb +64 -58
- data/app/models/template.rb +1 -1
- data/app/models/user.rb +135 -29
- data/app/models/user_session.rb +0 -1
- data/app/models/virtual_class.rb +11 -6
- data/app/views/columns/_form.html.erb +3 -1
- data/app/views/columns/_li.html.erb +1 -1
- data/app/views/columns/create.rjs +1 -1
- data/app/views/groups/_form.rhtml +16 -13
- data/app/views/relations/_form.erb +18 -6
- data/app/views/sites/_form.erb +12 -6
- data/app/views/users/_form.rhtml +23 -8
- data/app/views/users/_li.rhtml +14 -3
- data/app/views/users/index.rhtml +1 -1
- data/app/views/virtual_classes/_form.erb +12 -2
- data/app/views/zafu/default/Node-+login.zafu +8 -1
- data/app/views/zafu/default/Node-+search.zafu +1 -1
- data/bricks/acls/lib/bricks/acls.rb +1 -0
- data/bricks/acls/zena/migrate/20130903150356_longer_names_for_acl.rb +9 -0
- data/bricks/acls/zena/test/integration/acl_integration_test.rb +2 -2
- data/bricks/currency/lib/bricks/currency.rb +120 -0
- data/bricks/currency/zena/test/unit/currency_test.rb +43 -0
- data/bricks/fs_skin/lib/bricks/fs_skin.rb +1 -1
- data/bricks/fs_skin/zena/skins/blog/Node-+search.zafu +1 -1
- data/bricks/fs_skin/zena/skins/blog/Node.zafu +1 -1
- data/bricks/fs_skin/zena/test/unit/fs_skin_view_test.rb +35 -0
- data/bricks/pdf/lib/bricks/pdf.rb +1 -1
- data/bricks/sphinx/lib/bricks/sphinx.rb +2 -0
- data/bricks/sphinx/zena/init.rb +14 -0
- data/bricks/tags/zena/test/zafu/tags.yml +5 -1
- data/bricks/worker/lib/bricks/worker.rb +3 -2
- data/bricks/zena/zena/migrate/20130829093753_add_versioned_flag_to_column.rb +10 -0
- data/bricks/zena/zena/migrate/20130903084909_count_login_attempts.rb +11 -0
- data/bricks/zena/zena/migrate/20131104153126_index_fullpath.rb +10 -0
- data/bricks/zena/zena/migrate/20131104210011_rebuild_fullpath_after_change.rb +10 -0
- data/bricks/zena/zena/migrate/20131105160420_add_skin_id_to_sites.rb +9 -0
- data/bricks/zena/zena/migrate/20131105175822_add_profile_to_users.rb +11 -0
- data/bricks/zena/zena/migrate/20140213120038_fix_idx_scope.rb +13 -0
- data/bricks/zena/zena/migrate/20140628140247_add_site_readonly.rb +9 -0
- data/config/bricks.yml +8 -4
- data/config/gems.yml +5 -3
- data/db/init/base/skins/default/Node-+login.zafu +8 -1
- data/db/init/base/skins/default/Node-+search.zafu +1 -1
- data/lib/bricks/loader.rb +5 -5
- data/lib/gettext_strings.rb +3 -0
- data/lib/tasks/zena.rake +25 -22
- data/lib/zafu/process/context.rb +4 -0
- data/lib/zena/acts/secure_node.rb +3 -3
- data/lib/zena/app.rb +1 -0
- data/lib/zena/deploy.rb +1 -1
- data/lib/zena/deploy/template.rb +1 -1
- data/lib/zena/foxy_parser.rb +5 -2
- data/lib/zena/info.rb +1 -1
- data/lib/zena/site_worker.rb +2 -2
- data/lib/zena/test_controller.rb +5 -2
- data/lib/zena/use/action.rb +9 -2
- data/lib/zena/use/ajax.rb +20 -4
- data/lib/zena/use/ancestry.rb +89 -15
- data/lib/zena/use/authlogic.rb +8 -2
- data/lib/zena/use/context.rb +1 -0
- data/lib/zena/use/display.rb +1 -97
- data/lib/zena/use/forms.rb +28 -8
- data/lib/zena/use/html_tags.rb +16 -7
- data/lib/zena/use/i18n.rb +1 -1
- data/lib/zena/use/prop_eval.rb +6 -1
- data/lib/zena/use/query_node.rb +69 -4
- data/lib/zena/use/recursion.rb +1 -1
- data/lib/zena/use/refactor.rb +5 -2
- data/lib/zena/use/relations.rb +1 -0
- data/lib/zena/use/rendering.rb +7 -4
- data/lib/zena/use/test_helper.rb +8 -4
- data/lib/zena/use/upload.rb +14 -0
- data/lib/zena/use/urls.rb +39 -23
- data/lib/zena/use/version_hash.rb +5 -2
- data/lib/zena/use/workflow.rb +116 -70
- data/lib/zena/use/zafu_eval.rb +41 -0
- data/lib/zena/use/zafu_safe_definitions.rb +1 -0
- data/lib/zena/use/zafu_templates.rb +32 -26
- data/lib/zena/use/zazen.rb +8 -7
- data/locale/app.pot +5 -1
- data/locale/de/LC_MESSAGES/zena.mo +0 -0
- data/locale/de/zena.po +385 -281
- data/locale/en/LC_MESSAGES/zena.mo +0 -0
- data/locale/en/zena.po +378 -271
- data/locale/fr/LC_MESSAGES/zena.mo +0 -0
- data/locale/fr/zena.po +387 -272
- data/locale/it/LC_MESSAGES/zena.mo +0 -0
- data/locale/it/zena.po +433 -404
- data/locale/zena.pot +362 -268
- data/public/javascripts/grid.js +280 -104
- data/public/javascripts/zena.js +43 -15
- data/public/stylesheets/admin.css +8 -2
- data/public/stylesheets/grid.css +5 -2
- data/public/stylesheets/popup.css +1 -1
- data/test/fixtures/files/TestNode.zafu +51 -0
- data/test/functional/nodes_controller_test.rb +20 -5
- data/test/functional/user_sessions_controller_test.rb +41 -6
- data/test/functional/users_controller_test.rb +1 -2
- data/test/integration/navigation_test.rb +22 -4
- data/test/integration/query_node/basic.yml +7 -0
- data/test/integration/query_node/complex.yml +1 -1
- data/test/integration/query_node/errors.yml +1 -1
- data/test/integration/query_node/filters.yml +34 -1
- data/test/integration/query_node/relations.yml +6 -13
- data/test/integration/query_node_test.rb +22 -3
- data/test/integration/zafu_compiler/action.yml +1 -1
- data/test/integration/zafu_compiler/alias_site.yml +52 -0
- data/test/integration/zafu_compiler/complex.yml +1 -1
- data/test/integration/zafu_compiler/complex_ok.yml +5 -5
- data/test/integration/zafu_compiler/context.yml +1 -1
- data/test/integration/zafu_compiler/display.yml +56 -5
- data/test/integration/zafu_compiler/forms.yml +35 -2
- data/test/integration/zafu_compiler/meta.yml +4 -0
- data/test/integration/zafu_compiler/rubyless.yml +1 -1
- data/test/integration/zafu_compiler/safe_definitions.yml +4 -0
- data/test/integration/zafu_compiler/security.yml +10 -0
- data/test/integration/zafu_compiler/site.yml +5 -1
- data/test/integration/zafu_compiler/urls.yml +8 -2
- data/test/integration/zafu_compiler/zafu_attributes.yml +2 -1
- data/test/integration/zafu_compiler/zazen.yml +4 -0
- data/test/integration/zafu_compiler_test.rb +47 -4
- data/test/selenium/Grid/grid1.rsel +8 -8
- data/test/sites/complex/sites.yml +2 -2
- data/test/sites/complex/users.yml +1 -0
- data/test/sites/zena/columns.yml +4 -0
- data/test/sites/zena/sites.yml +1 -0
- data/test/sites/zena/users.yml +1 -0
- data/test/unit/node_test.rb +53 -5
- data/test/unit/note_test.rb +1 -1
- data/test/unit/relation_proxy_test.rb +20 -0
- data/test/unit/role_test.rb +2 -0
- data/test/unit/site_test.rb +28 -6
- data/test/unit/user_test.rb +332 -1
- data/test/unit/virtual_class_test.rb +55 -0
- data/test/unit/workflow_test.rb +175 -0
- data/test/unit/zena/use/ancestry_test.rb +52 -10
- data/test/unit/zena/use/prop_eval_test.rb +44 -0
- data/test/unit/zena/use/rendering_test.rb +48 -2
- data/test/unit/zena/use/upload_test.rb +15 -13
- data/test/unit/zena/use/urls_test.rb +1 -0
- data/vendor/plugins/ar_mysql_full_text/lib/ar_mysql_full_text.rb +39 -25
- data/zena.gemspec +69 -307
- metadata +143 -368
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run 2.tmCommand +0 -24
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Context.tmCommand +0 -58
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Focused Should.tmCommand +0 -88
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run.tmCommand +0 -27
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/YAML to Shoulda.tmCommand +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Context.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Should.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory attributes for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory build.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define with class.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_next.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_sequence.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_bad_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_contains.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_does_not_contain.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_good_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_same_elements.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_save.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_sent_email.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_valid.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/association.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/attribute.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/before_should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block get.tmSnippet +0 -22
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block post.tmSnippet +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block with setup.tmSnippet +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/setup.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block with before proc.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful denied.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_belong_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change by.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change from to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_at_least.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_is.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_value_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_eventually.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_filter_params.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_and_belong_to_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_class_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_column.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_columns.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_index.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_indices.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_instance_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_named_scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_one.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_readonly_attributes.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_mass_assignment_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_change.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_set_the_flash.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_redirect_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_a_form.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_template.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_with_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_without_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with_content_type.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_return_from_session.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_route.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_set_the_flash_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_acceptance_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_numericality_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_presence_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of with scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/run_script.rb +0 -104
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/test.rb +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/todo.txt +0 -13
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/bin/yaml_to_shoulda.rb +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Syntaxes/Ruby on Rails (Shoulda).tmLanguage +0 -166
- data/vendor/TextMate/Ruby Shoulda.tmbundle/info.plist +0 -304
- data/vendor/TextMate/Zena.tmbundle/Commands/Run all yaml tests.tmCommand +0 -37
- data/vendor/TextMate/Zena.tmbundle/Commands/Run focused yaml test.tmCommand +0 -52
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/run_script.rb +0 -118
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- data/vendor/TextMate/Zena.tmbundle/info.plist +0 -17
- data/vendor/plugins/selenium-on-rails/CHANGELOG +0 -125
- data/vendor/plugins/selenium-on-rails/LICENSE-2.0.txt +0 -202
- data/vendor/plugins/selenium-on-rails/README.md +0 -202
- data/vendor/plugins/selenium-on-rails/Rakefile +0 -38
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumController.html +0 -265
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumHelper.html +0 -148
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails.html +0 -126
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/FixtureLoader.html +0 -231
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/PartialsSupport.html +0 -195
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Paths.html +0 -295
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/RSelenese.html +0 -219
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Renderer.html +0 -156
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Selenese.html +0 -179
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/SuiteRenderer.html +0 -223
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilder.html +0 -441
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderAccessors.html +0 -3098
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderActions.html +0 -2080
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserAccessors.html +0 -116
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserActions.html +0 -116
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRailsConfig.html +0 -150
- data/vendor/plugins/selenium-on-rails/doc/files/CHANGELOG.html +0 -422
- data/vendor/plugins/selenium-on-rails/doc/files/README.html +0 -321
- data/vendor/plugins/selenium-on-rails/doc/files/lib/controllers/selenium_controller_rb.html +0 -108
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_helper_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/acceptance_test_runner_rb.html +0 -222
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/fixture_loader_rb.html +0 -109
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/partials_support_rb.html +0 -111
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/paths_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/renderer_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/rselenese_rb.html +0 -118
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/selenese_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/suite_renderer_rb.html +0 -101
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_accessors_rb.html +0 -114
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_actions_rb.html +0 -113
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_rb.html +0 -120
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_config_rb.html +0 -108
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_rb.html +0 -115
- data/vendor/plugins/selenium-on-rails/doc/fr_class_index.html +0 -42
- data/vendor/plugins/selenium-on-rails/doc/fr_file_index.html +0 -43
- data/vendor/plugins/selenium-on-rails/doc/fr_method_index.html +0 -182
- data/vendor/plugins/selenium-on-rails/doc/index.html +0 -24
- data/vendor/plugins/selenium-on-rails/doc/rdoc-style.css +0 -208
- data/vendor/plugins/selenium-on-rails/generators/selenium/USAGE +0 -19
- data/vendor/plugins/selenium-on-rails/generators/selenium/selenium_generator.rb +0 -50
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rhtml.rhtml +0 -16
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rselenese.rhtml +0 -14
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/selenese.rhtml +0 -11
- data/vendor/plugins/selenium-on-rails/init.rb +0 -15
- data/vendor/plugins/selenium-on-rails/lib/controllers/selenium_controller.rb +0 -122
- data/vendor/plugins/selenium-on-rails/lib/controllers/switch_environment_controller.rb +0 -16
- data/vendor/plugins/selenium-on-rails/lib/selenium_helper.rb +0 -8
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails.rb +0 -11
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/acceptance_test_runner.rb +0 -215
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/fixture_loader.rb +0 -57
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/partials_support.rb +0 -36
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/paths.rb +0 -61
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/renderer.rb +0 -20
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/rselenese.rb +0 -44
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/selenese.rb +0 -87
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/suite_renderer.rb +0 -56
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder.rb +0 -116
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_accessors.rb +0 -1002
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_actions.rb +0 -514
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_accessors.rb.example +0 -91
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_actions.rb.example +0 -24
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails_config.rb +0 -30
- data/vendor/plugins/selenium-on-rails/lib/views/layouts/layout.rhtml +0 -18
- data/vendor/plugins/selenium-on-rails/lib/views/record.rhtml +0 -5
- data/vendor/plugins/selenium-on-rails/lib/views/selenium_helper.rb +0 -9
- data/vendor/plugins/selenium-on-rails/lib/views/setup.rhtml +0 -67
- data/vendor/plugins/selenium-on-rails/lib/views/test_suite.rhtml +0 -26
- data/vendor/plugins/selenium-on-rails/routes.rb +0 -24
- data/vendor/plugins/selenium-on-rails/selenium-core/Blank.html +0 -7
- data/vendor/plugins/selenium-on-rails/selenium-core/InjectedRemoteRunner.html +0 -8
- data/vendor/plugins/selenium-on-rails/selenium-core/RemoteRunner.html +0 -110
- data/vendor/plugins/selenium-on-rails/selenium-core/SeleniumLog.html +0 -109
- data/vendor/plugins/selenium-on-rails/selenium-core/TestPrompt.html +0 -145
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner-splash.html +0 -55
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.hta +0 -177
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.html +0 -177
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butmin.gif +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butplus.gif +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.css +0 -298
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.html +0 -16
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/selenium-domviewer.js +0 -205
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/all.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/selected.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/step.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/step_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/iedoc-core.xml +0 -1759
- data/vendor/plugins/selenium-on-rails/selenium-core/iedoc.xml +0 -1800
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/cssQuery-p.js +0 -6
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level2.js +0 -142
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level3.js +0 -150
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-standard.js +0 -53
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery.js +0 -356
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/prototype.js +0 -2006
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/builder.js +0 -101
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/controls.js +0 -815
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/dragdrop.js +0 -915
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/effects.js +0 -958
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/scriptaculous.js +0 -47
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/slider.js +0 -283
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/unittest.js +0 -383
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/snapsie.js +0 -91
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/find_matching_child.js +0 -69
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/htmlutils.js +0 -1616
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/injection.html +0 -72
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-api.js +0 -3184
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserbot.js +0 -2300
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserdetect.js +0 -153
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-commandhandlers.js +0 -377
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-executionloop.js +0 -175
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-logging.js +0 -148
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-remoterunner.js +0 -695
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-testrunner.js +0 -1362
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-version.js +0 -5
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-doc.html +0 -803
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-element.js +0 -1537
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-map-sample.js +0 -979
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js +0 -3
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js.sample +0 -75
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/xmlextras.js +0 -153
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-logo.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-test.css +0 -43
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium.css +0 -316
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/dom.js +0 -566
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/javascript-xpath-0.1.11.js +0 -2816
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/util.js +0 -549
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xmltoken.js +0 -149
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xpath.js +0 -2450
- data/vendor/plugins/selenium-on-rails/tasks/test_acceptance.rake +0 -8
- data/vendor/plugins/selenium-on-rails/test/fixtures/config.yml +0 -37
- data/vendor/plugins/selenium-on-rails/test/fixtures/selenium.yml +0 -27
- data/vendor/plugins/selenium-on-rails/test/paths_test.rb +0 -72
- data/vendor/plugins/selenium-on-rails/test/renderer_test.rb +0 -157
- data/vendor/plugins/selenium-on-rails/test/rselenese_test.rb +0 -708
- data/vendor/plugins/selenium-on-rails/test/selenese_test.rb +0 -242
- data/vendor/plugins/selenium-on-rails/test/selenium_controller_test.rb +0 -67
- data/vendor/plugins/selenium-on-rails/test/selenium_on_rails_config_test.rb +0 -43
- data/vendor/plugins/selenium-on-rails/test/selenium_support_test.rb +0 -35
- data/vendor/plugins/selenium-on-rails/test/setup_test.rb +0 -31
- data/vendor/plugins/selenium-on-rails/test/suite_renderer_test.rb +0 -109
- data/vendor/plugins/selenium-on-rails/test/switch_environment_controller_test.rb +0 -17
- data/vendor/plugins/selenium-on-rails/test/test_builder_functions_authortest.rb +0 -51
- data/vendor/plugins/selenium-on-rails/test/test_helper.rb +0 -101
- data/vendor/plugins/selenium-on-rails/test_data/_partial.rsel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/own_layout.html +0 -12
- data/vendor/plugins/selenium-on-rails/test_data/partials/_html.html +0 -6
- data/vendor/plugins/selenium-on-rails/test_data/partials/_nesting.rsel +0 -2
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rhtml.rhtml +0 -6
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rsel.rsel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/partials/_sel.sel +0 -5
- data/vendor/plugins/selenium-on-rails/test_data/partials/all_partials.rsel +0 -5
- data/vendor/plugins/selenium-on-rails/test_data/rhtml.rhtml +0 -7
- data/vendor/plugins/selenium-on-rails/test_data/rselenese.rsel +0 -8
- data/vendor/plugins/selenium-on-rails/test_data/selenese.sel +0 -7
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/subsuite/suite_one_subsuite_testcase.sel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase1.sel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase2.sel +0 -1
- data/vendor/plugins/selenium-on-rails/test_data/suite_two/suite_two_testcase.sel +0 -1
@@ -155,3 +155,10 @@ coalesce:
|
|
155
155
|
src: "nodes in site order by parent_id.coalesce(0) asc limit 1"
|
156
156
|
sql: "%Q{SELECT nodes.* FROM nodes WHERE #{secure_scope('nodes')} ORDER BY COALESCE(nodes.parent_id,0) ASC LIMIT 1}"
|
157
157
|
res: "Zena the wild CMS"
|
158
|
+
|
159
|
+
in_sub_nodes:
|
160
|
+
context:
|
161
|
+
node: cleanWater
|
162
|
+
src: pages in sub_nodes
|
163
|
+
sql: "/nodes.fullpath LIKE CONCAT.\?,'/%'./"
|
164
|
+
res: "Etat des travaux, crocodiles"
|
@@ -3,7 +3,7 @@ default:
|
|
3
3
|
node_name: '@node'
|
4
4
|
node: complex
|
5
5
|
visitor: complex_admin
|
6
|
-
|
6
|
+
host: complex.host
|
7
7
|
src: ""
|
8
8
|
sql: "[%Q{SELECT nodes.* FROM nodes WHERE #{secure_scope('nodes')} AND nodes.parent_id = ? ORDER BY nodes.zip ASC}, @node.id]"
|
9
9
|
res: "cskin, list of employees, jobs, courses list"
|
@@ -178,4 +178,37 @@ quoted_literal:
|
|
178
178
|
coalesce_in_filter:
|
179
179
|
src: "posts select date.coalesce('2011-11-01') as da in site"
|
180
180
|
sql: "%Q{SELECT nodes.*,COALESCE(nodes.idx_datetime1,'2011-11-01') AS `da` FROM nodes WHERE #{secure_scope('nodes')} AND nodes.kpath LIKE 'NNP%' ORDER BY nodes.zip ASC}"
|
181
|
-
res: 'super ouverture'
|
181
|
+
res: 'super ouverture'
|
182
|
+
|
183
|
+
match:
|
184
|
+
src: "pages where fulltext match 'wiki' in site"
|
185
|
+
sql: "/ve1.idx_text_high LIKE '%wiki%'/"
|
186
|
+
|
187
|
+
match_string_dyn:
|
188
|
+
src: "pages where fulltext match 'wiki#{params[:foo]}' in site"
|
189
|
+
sql: "/ve1.idx_text_high LIKE \?.*\"%wiki#\{params\[:foo\]\}/"
|
190
|
+
|
191
|
+
match_dstring:
|
192
|
+
src: "pages where fulltext match \"ho#{params[:foo]}\" in site"
|
193
|
+
sql: "/ve1.idx_text_high LIKE \?.*\"%ho#\{params\[:foo\]\}/"
|
194
|
+
|
195
|
+
match_dstring_no_rb:
|
196
|
+
src: "pages where fulltext match \"ho\" in site"
|
197
|
+
sql: "/ve1.idx_text_high LIKE '%ho%'/"
|
198
|
+
|
199
|
+
match_number:
|
200
|
+
src: "pages where fulltext match 123 in site"
|
201
|
+
sql: "/ve1.idx_text_high LIKE '%123%'/"
|
202
|
+
|
203
|
+
match_rubyless:
|
204
|
+
src: "pages where fulltext match #{params[:foo]} in site"
|
205
|
+
sql: "/ve1.idx_text_high LIKE \?.*, \"%#\{params\[:foo\]\}%\"/"
|
206
|
+
|
207
|
+
match_field:
|
208
|
+
src: "pages where fulltext match id in site"
|
209
|
+
sql: "Can only match against literal or rubyless values."
|
210
|
+
|
211
|
+
match_sphinx:
|
212
|
+
src: "pages where sphinx match #{params[:foo]} in site"
|
213
|
+
sql: "[%Q{SELECT nodes.* FROM nodes WHERE #{secure_scope('nodes')} AND nodes.zip IN (?) AND nodes.kpath LIKE 'NP%' ORDER BY nodes.zip ASC}, test_search_for_ids(params[:foo])]"
|
214
|
+
res: 'Zena the wild CMS, projects list, a wiki with Zena'
|
@@ -83,22 +83,15 @@ project_as_blog:
|
|
83
83
|
src: "Blog:project"
|
84
84
|
sql: "[%Q{SELECT nodes.* FROM nodes WHERE #{secure_scope('nodes')} AND nodes.kpath LIKE 'NPPB%' AND nodes.id = ? ORDER BY nodes.zip ASC}, @node.get_project_id]"
|
85
85
|
|
86
|
-
from_root:
|
87
|
-
context:
|
88
|
-
site: alias
|
89
|
-
src: nodes from root limit 3
|
90
|
-
res: 'people, projects list, Collections'
|
91
|
-
|
92
|
-
from_home:
|
93
|
-
context:
|
94
|
-
site: alias
|
95
|
-
src: nodes from home limit 3
|
96
|
-
res: 'bird, flower'
|
97
|
-
|
98
86
|
# openging in art(33) and news(34)
|
99
87
|
having_on_relation_count:
|
100
88
|
context:
|
101
89
|
params:
|
102
90
|
ids: '33,34'
|
103
91
|
src: 'tagged from tag select id.count as t_count where id in (#{params[:ids].split(",")}) in site having t_count = #{params[:ids].split(",").size}'
|
104
|
-
res: 'super ouverture'
|
92
|
+
res: 'super ouverture'
|
93
|
+
|
94
|
+
# TODO: change how fullpath is built should solve this issue.
|
95
|
+
in_home:
|
96
|
+
src: "images in home"
|
97
|
+
res: it's a lake, bird, flower, Autumn Tree
|
@@ -1,6 +1,26 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
require 'yamltest'
|
3
3
|
|
4
|
+
# Mock sphinx search
|
5
|
+
|
6
|
+
# add 'sphinx match xxxx' to QueryNode
|
7
|
+
Node.query_compiler.add_fulltext_field('sphinx') do |processor, table, right|
|
8
|
+
helper = processor.instance_variable_get(:@rubyless_helper)
|
9
|
+
case right[0]
|
10
|
+
when :string, :dstring, :real, :integer
|
11
|
+
value = RubyLess.translate_string(helper, right[1])
|
12
|
+
when :rubyless
|
13
|
+
value = RubyLess.translate(helper, right[1])
|
14
|
+
else
|
15
|
+
raise ::QueryBuilder::Error.new("Can only match against literal or rubyless values.")
|
16
|
+
end
|
17
|
+
"#{table}.zip IN (#{processor.send(:insert_bind, "test_search_for_ids(#{value})")})"
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_search_for_ids(fld)
|
21
|
+
[11, 18, 29]
|
22
|
+
end
|
23
|
+
|
4
24
|
class QueryNodeTest < Zena::Unit::TestCase
|
5
25
|
include RubyLess
|
6
26
|
safe_method :date => Time
|
@@ -37,9 +57,8 @@ class QueryNodeTest < Zena::Unit::TestCase
|
|
37
57
|
(@context[:params] || {}).each do |k,v|
|
38
58
|
params[k.to_sym] = v
|
39
59
|
end
|
40
|
-
|
41
|
-
|
42
|
-
login(@context[:visitor].to_sym, $_test_site)
|
60
|
+
|
61
|
+
login(@context[:visitor].to_sym, @context[:host])
|
43
62
|
|
44
63
|
@context[:rubyless_helper] = self
|
45
64
|
defaults = (@context[:default] ||= {})
|
@@ -20,7 +20,7 @@ login_link:
|
|
20
20
|
# Forces NodesController type of url and params
|
21
21
|
fake_controller: 'nodes'
|
22
22
|
src: "<r:login_link/>"
|
23
|
-
res: '<a href="/oo/projects-list/Clean-Water-project/page22.html" rel="nofollow">login</a>'
|
23
|
+
res: '<a href="/oo/projects-list/Clean-Water-project/page22.html?lang=en" rel="nofollow">login</a>'
|
24
24
|
|
25
25
|
logout_link_other_controller:
|
26
26
|
src: "<r:login_link/>"
|
@@ -0,0 +1,52 @@
|
|
1
|
+
default:
|
2
|
+
context:
|
3
|
+
lang: 'en'
|
4
|
+
host: alias.host
|
5
|
+
visitor: 'ant'
|
6
|
+
node: 'status'
|
7
|
+
src: "<r:site do='host'/>: <r:home do='title'/>"
|
8
|
+
tem: "/visitor.site.home_node"
|
9
|
+
res: "alias.host: a wiki with Zena"
|
10
|
+
|
11
|
+
test_home:
|
12
|
+
context:
|
13
|
+
node: wiki
|
14
|
+
src: "<r:if test='id == home.id'>ok</r:if>"
|
15
|
+
res: 'ok'
|
16
|
+
|
17
|
+
all_sub_nodes:
|
18
|
+
src: "<r:void do=\"nodes where fullpath like '#{home.fullpath}/%' in site\" do='each' join=', ' do='title'/>"
|
19
|
+
tem: '/visitor.site.home_node.fullpath/'
|
20
|
+
res: 'bird, flower'
|
21
|
+
|
22
|
+
from_root:
|
23
|
+
context:
|
24
|
+
host: alias.host
|
25
|
+
src: <r:void do='nodes from root limit 3' do='each' join=', ' do='title'/>
|
26
|
+
res: 'Collections, Kill the bugs, Nature'
|
27
|
+
|
28
|
+
# For this test, we add some sub-nodes in wiki
|
29
|
+
from_home:
|
30
|
+
context:
|
31
|
+
host: alias.host
|
32
|
+
src: <r:void do='nodes from home' do='each' join=', ' do='title'/>
|
33
|
+
res: 'bird, flower, one'
|
34
|
+
|
35
|
+
# For this test, we add some sub-nodes in wiki
|
36
|
+
in_home:
|
37
|
+
src: <r:void do='nodes in home' do='each' join=', ' do='title'/>
|
38
|
+
res: bird, flower, one, three, two
|
39
|
+
|
40
|
+
link_to_home:
|
41
|
+
src: <r:void do='home' do='link'/>
|
42
|
+
res: <a href='/oo'>a wiki with Zena</a>
|
43
|
+
|
44
|
+
link_with_custom_base:
|
45
|
+
# custom base is set on 'home' before this test
|
46
|
+
src: <r:void do='image in home' find='first' do='link'/> <r:void do='page where title = "three" in home' find='first' do='link'/>
|
47
|
+
res: <a href='/oo/image30.html'>bird</a> <a href='/oo/one/page68.html'>three</a>
|
48
|
+
|
49
|
+
link_with_custom_base_out_of_home:
|
50
|
+
# custom base is set on 'home' before this test
|
51
|
+
src: <r:void do='page where id = 22 in site' find='first' do='link'/>
|
52
|
+
res: <a href='/oo/projects-list/Clean-Water-project/page22.html'>status title</a>
|
@@ -58,7 +58,7 @@ default:
|
|
58
58
|
node_name: '@node'
|
59
59
|
node: roger
|
60
60
|
visitor: complex_admin
|
61
|
-
|
61
|
+
host: complex.host
|
62
62
|
ref_date: 2004-09-01
|
63
63
|
src: "<r:emp_form_dates where='repeat_every is not null' do='each' join=', '><r:show attr='title'/>(<r:show attr='priority'/>, <r:show attr='last_date' format='%Y-%m-%d'/>, <r:show attr='next_date' format='%Y-%m-%d'/>)</r:emp_form_dates>"
|
64
64
|
res: "secure_a_site(10, , ), winch_usage(10, , ), dangerous_transportations(10, 2004-03-15, 2006-03-15), engine(5, , ), transmit_information(5, 2002-05-05, 2003-05-05), fiber_junction(5, 2003-03-03, 2005-03-03), radio_usage(1, , )"
|
@@ -3,7 +3,7 @@ it_should_compile_custom_select:
|
|
3
3
|
node_name: '@node'
|
4
4
|
node: roger
|
5
5
|
visitor: complex_admin
|
6
|
-
|
6
|
+
host: complex.host
|
7
7
|
ref_date: 2004-09-01
|
8
8
|
src: "<r:emp_form_dates do='each' join=', '><r:show attr='title'/>(<r:priority/>)[<r:last_date format='%Y-%m'/>]</r:emp_form_dates>"
|
9
9
|
tem: '/var2.attributes\["priority"\].*\[<%= format_date\(var2.rcast\("last_date", :time\), :format => "%Y-%m"\) %>\]/'
|
@@ -14,7 +14,7 @@ type_cast_to_time_using_existing_field:
|
|
14
14
|
node_name: '@node'
|
15
15
|
node: roger
|
16
16
|
visitor: complex_admin
|
17
|
-
|
17
|
+
host: complex.host
|
18
18
|
ref_date: 2004-09-01
|
19
19
|
src: "<r:emp_form_dates where='idx_datetime1 is not null' do='each' join=', ' do='idx_datetime1' format='%d.%m.%Y %H:%M'/>"
|
20
20
|
tem: '/format_date\(var2.idx_datetime1/'
|
@@ -25,7 +25,7 @@ type_cast_to_time_custom_field:
|
|
25
25
|
node_name: '@node'
|
26
26
|
node: roger
|
27
27
|
visitor: complex_admin
|
28
|
-
|
28
|
+
host: complex.host
|
29
29
|
ref_date: 2004-09-01
|
30
30
|
src: "<r:emp_form_dates where='next_date is not null' do='each' join=', ' do='next_date' format='%d.%m.%Y %H:%M'/>"
|
31
31
|
tem: '/format_date\(var2.rcast\("next_date", :time/'
|
@@ -36,7 +36,7 @@ it_should_group_by_custom_select:
|
|
36
36
|
node_name: '@node'
|
37
37
|
node: roger
|
38
38
|
visitor: complex_admin
|
39
|
-
|
39
|
+
host: complex.host
|
40
40
|
ref_date: 2004-09-01
|
41
41
|
src: "<r:emp_form_dates do='group' by='priority' do='each_group' join=', '><r:show attr='priority'/></r:emp_form_dates>"
|
42
42
|
res: '10, 5, 1'
|
@@ -46,7 +46,7 @@ it_should_secure_table:
|
|
46
46
|
node_name: '@node'
|
47
47
|
node: roger
|
48
48
|
visitor: complex_admin
|
49
|
-
|
49
|
+
host: complex.host
|
50
50
|
ref_date: 2004-09-01
|
51
51
|
src: "<r:secure_tables do='count'/>"
|
52
52
|
tem: "/secure_scope\('other'\)/"
|
@@ -396,10 +396,12 @@ set_class_before_query:
|
|
396
396
|
src: "<div class='foo_#{first.title}' do='images in site'></div>"
|
397
397
|
res: "<div class='foo_Autumn Tree'></div>"
|
398
398
|
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
399
|
+
flash:
|
400
|
+
context:
|
401
|
+
flash: "Ho ho"
|
402
|
+
src: "<r:void do='flash[\"error\"]'/>"
|
403
|
+
tem: "<%=h zafu_flash[\"error\"] %>"
|
404
|
+
res: "Ho ho"
|
403
405
|
|
404
406
|
date_without_set_var:
|
405
407
|
context:
|
@@ -440,6 +442,10 @@ default_host:
|
|
440
442
|
tem: '/zazen.*:host.*visitor.site.host/'
|
441
443
|
res: "/href=\"http://b.test.host/oo/section12.html\">link.*src='http://b.test.host/en/image30_std.75a9a.jpg/"
|
442
444
|
|
445
|
+
visitor_site_host:
|
446
|
+
src: "<r:eval>visitor.site.host</r:eval>"
|
447
|
+
res: "test.host"
|
448
|
+
|
443
449
|
zazen_without_markup:
|
444
450
|
src: "<r:void do='zazen(title)'/>"
|
445
451
|
res: "<p>status title</p>"
|
@@ -520,4 +526,49 @@ uuid:
|
|
520
526
|
use_first_in_list:
|
521
527
|
src: "<r:void do='contacts where id = 13 in site'><r:first do='link'/> // <r:first do='title'/></r:void>"
|
522
528
|
tem: "/var1.first.*var1.first/"
|
523
|
-
res: "<a href='/oo/contact13.html'>Solenopsis Invicta</a> // Solenopsis Invicta"
|
529
|
+
res: "<a href='/oo/contact13.html'>Solenopsis Invicta</a> // Solenopsis Invicta"
|
530
|
+
|
531
|
+
# Make sure variables do not reach...
|
532
|
+
zafu_eval:
|
533
|
+
context:
|
534
|
+
code: "<r:title/>"
|
535
|
+
src: "<r:title/>: [<r:parent do='zafu_eval' code='params[:code]'/>]"
|
536
|
+
tem: "/<%= zafu_eval\(var1/"
|
537
|
+
res: 'status title: [Clean Water project]'
|
538
|
+
|
539
|
+
fetch_html:
|
540
|
+
src: "HELLO: <r:void do='fetch_html(\"http://zenadmin.org/en\")' h='false'/>"
|
541
|
+
tem: "HELLO: <%= fetch_html(\"http://zenadmin.org/en\") %>"
|
542
|
+
res: "/HELLO:.*DOCTYPE.*zenadmin.org/en/features/"
|
543
|
+
|
544
|
+
section_id:
|
545
|
+
context:
|
546
|
+
node: wiki_Node_zafu
|
547
|
+
src: "section: <p do='section_id'/>"
|
548
|
+
res: 'section: <p>43</p>'
|
549
|
+
|
550
|
+
project_id:
|
551
|
+
context:
|
552
|
+
node: wiki_Node_zafu
|
553
|
+
src: "project: <p do='project_id'/>"
|
554
|
+
res: 'project: <p>11</p>'
|
555
|
+
|
556
|
+
parent_id:
|
557
|
+
context:
|
558
|
+
node: ant
|
559
|
+
src: "parent: <p do='parent_id'/>"
|
560
|
+
res: 'parent: <p>12</p>'
|
561
|
+
|
562
|
+
fsize:
|
563
|
+
src: "<b do='fsize(32*1024)'/> <b do='fsize(3.45*1024*1024)'/>"
|
564
|
+
res: "<b>32 Kb</b> <b>3.5 Mb</b>"
|
565
|
+
|
566
|
+
group_id_to_name_ant:
|
567
|
+
src: "<r:title/>: auth = <r:void do='visitor.group_id_to_name(rgroup_id)'/> // <r:void do='visitor.group_id_to_name(dgroup_id) || \"unknown\"'/>"
|
568
|
+
res: "status title: auth = public // unknown"
|
569
|
+
|
570
|
+
group_id_to_name:
|
571
|
+
context:
|
572
|
+
visitor: lion
|
573
|
+
src: "<r:title/>: auth = <r:void do='visitor.group_id_to_name(rgroup_id)'/> // <r:void do='visitor.group_id_to_name(dgroup_id) || \"unknown\"'/>"
|
574
|
+
res: "status title: auth = public // managers"
|
@@ -169,7 +169,7 @@ checkbox_checked_hash_value:
|
|
169
169
|
node: test
|
170
170
|
src: "<r:input type='checkbox' name='settings[one]' value='un'/> <r:input type='checkbox' name='settings[one]' value='deux'/>"
|
171
171
|
tem: "/@node.prop\[.settings.\]\[.one.\] : nil\) == .un. \? . checked='checked'/"
|
172
|
-
res: "<input type='hidden' name='node[settings][one]' value=''/><input type='checkbox' name='node[settings][one]' value='un' checked='checked'
|
172
|
+
res: "<input type='hidden' name='node[settings][one]' value=''/><input type='checkbox' name='node[settings][one]' value='un' checked='checked'/> <input type='hidden' name='node[settings][one]' value=''/><input type='checkbox' name='node[settings][one]' value='deux'/>"
|
173
173
|
|
174
174
|
checkbox_unchecked_value:
|
175
175
|
src: "<r:input type='checkbox' name='tagged[foo]'/>"
|
@@ -374,4 +374,37 @@ form_rel_status:
|
|
374
374
|
node: 'cleanWater'
|
375
375
|
src: "<r:input name='set_tag_status'/>"
|
376
376
|
tem: "/other_status/"
|
377
|
-
res: "<input type='text' name='node[set_tag_status]' value='10.0'/>"
|
377
|
+
res: "<input type='text' name='node[set_tag_status]' value='10.0'/>"
|
378
|
+
|
379
|
+
# Before change, tiger uses ant as profile
|
380
|
+
auth_profile:
|
381
|
+
context:
|
382
|
+
node: tiger
|
383
|
+
src: "<b do='auth[\"profile\"]'/>: <r:select name='auth[profile]' type='profile'/>"
|
384
|
+
res: "<b>ant</b>: <select name='node[auth][profile]'><option value=\"ant\" selected=\"selected\">ant</option></select>"
|
385
|
+
|
386
|
+
auth_login:
|
387
|
+
context:
|
388
|
+
node: ant
|
389
|
+
src: "<r:input name='auth[login]'/>"
|
390
|
+
res: "<input type='text' name='node[auth][login]' value='ant'/>"
|
391
|
+
|
392
|
+
auth_password:
|
393
|
+
context:
|
394
|
+
node: ant
|
395
|
+
src: "<r:input type='password' name='auth[password]'/>"
|
396
|
+
res: "<input type='password' name='node[auth][password]' value=''/>"
|
397
|
+
|
398
|
+
tlabel_with_default_label:
|
399
|
+
context:
|
400
|
+
lang: fr
|
401
|
+
src: "<r:default label='t'><r:input name='title' tlabel='Monday'/></r:default>"
|
402
|
+
res: '/<label>lundi</label>/'
|
403
|
+
|
404
|
+
p_do_input:
|
405
|
+
src: "<p class='foo' do='input' name='title'/>"
|
406
|
+
res: "<p class='foo'><input type='text' name='node[title]' value='status title'/></p>"
|
407
|
+
|
408
|
+
p_do_input_with_label:
|
409
|
+
src: "<p class='foo' do='input' name='title' label='t'/>"
|
410
|
+
res: "<p class='foo'><label>title</label> <span><input type='text' name='node[title]' value='status title'/></span></p>"
|
@@ -58,6 +58,10 @@ include_part_replace_method:
|
|
58
58
|
src: "include_part: <r:include template='/meta/id/name' part='bob' do='title'/>"
|
59
59
|
tem: "include_part: <b><%=h @node.prop['title'] %></b>"
|
60
60
|
|
61
|
+
include_no_template_no_part:
|
62
|
+
src: "<r:include temalate='/foo/bar'/>"
|
63
|
+
tem: "/missing 'template' or 'part' parameter/"
|
64
|
+
|
61
65
|
id_do:
|
62
66
|
src: "<h1 id='logo' do='title'/>"
|
63
67
|
res: "<h1 id='logo'>status title</h1>"
|
@@ -100,4 +100,4 @@ class_new:
|
|
100
100
|
class_new_with_attr:
|
101
101
|
src: "<div do='set' p='Post.new(:title => \"yes\")'><p do='p.klass'/>.<p do='p.title'/></div>"
|
102
102
|
tem: "/VirtualClass\[.Post.\].zafu_new.*_zp.klass.*_zp.prop\[.title.\]/"
|
103
|
-
res: "<div><p>Post</p>.<p>yes</p></div>"
|
103
|
+
res: "<div><p>Post</p>.<p>yes</p></div>"
|
@@ -45,6 +45,10 @@ string_strip:
|
|
45
45
|
tem: "<%= \" #{@node.zip}\".strip %>"
|
46
46
|
res: "22"
|
47
47
|
|
48
|
+
string_split:
|
49
|
+
src: "<r:void do=\"'one,two'.split(',')\"><span do='each' join=' ' do='this'/></r:void>"
|
50
|
+
res: '<span>one</span> <span>two</span>'
|
51
|
+
|
48
52
|
string_to_i:
|
49
53
|
eval: "%Q{ #{id}}.to_i"
|
50
54
|
tem: "<%= \" #{@node.zip}\".to_i %>"
|
@@ -114,3 +114,13 @@ build_erb_with_rubyless:
|
|
114
114
|
multiple_trans:
|
115
115
|
src: "<r:t text='<'/><r:t text='%'/>"
|
116
116
|
tem: "<%"
|
117
|
+
|
118
|
+
zafu_eval:
|
119
|
+
context:
|
120
|
+
code: "<%= 3.class %>"
|
121
|
+
src: "<r:zafu_eval code='params[:code]'/>"
|
122
|
+
res: '<%= 3.class %>'
|
123
|
+
|
124
|
+
eval_in_query:
|
125
|
+
src: "<r:void do=\"nodes where title like '#{puts Time.now}/%' in site\"/>"
|
126
|
+
res: /Unknown constant 'Time'/
|
@@ -124,12 +124,14 @@ link_root:
|
|
124
124
|
res: "<a href='/oo'>status title</a>"
|
125
125
|
|
126
126
|
link_anchor:
|
127
|
-
|
127
|
+
old_src: "<r:link anchor='true'/>"
|
128
|
+
src: "<a href='#node#{id}' do='title'/>"
|
128
129
|
res: "<a href='#node22'>status title</a>"
|
129
130
|
|
130
131
|
link_anchor_title:
|
131
132
|
old_src: "<r:link anchor='[name]'/>"
|
132
|
-
|
133
|
+
old_src: "<r:link anchor='#{title.url_name}'/>"
|
134
|
+
src: "<a href='##{title.url_name}' do='title'/>"
|
133
135
|
res: "<a href='#status-title'>status title</a>"
|
134
136
|
|
135
137
|
link_anchor_in:
|
@@ -141,6 +143,10 @@ link_anchor_name_in:
|
|
141
143
|
src: "<r:link anchor='#{title.url_name}' href='parent'/>"
|
142
144
|
res: "<a href='/oo/projects-list/Clean-Water-project#status-title'>status title</a>"
|
143
145
|
|
146
|
+
link_anchor_lit:
|
147
|
+
src: <r:void do='node where id=18 in site' do='link' anchor='foo'/>
|
148
|
+
res: "<a href='/oo/page18.html#foo'>projects list</a>"
|
149
|
+
|
144
150
|
link_stored:
|
145
151
|
old_src: "<r:void store='foo'><r:parent><r:link href='foo' do='title'/></r:parent></r:void>"
|
146
152
|
src: "<r:void set_foo='this'><r:parent><r:link href='foo' do='title'/></r:parent></r:void>"
|