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
data/History.txt
CHANGED
@@ -1,3 +1,58 @@
|
|
1
|
+
In this history, elements listed with a '~' still need to be documented.
|
2
|
+
|
3
|
+
== 1.2.8
|
4
|
+
|
5
|
+
* Major changes
|
6
|
+
* Added "update_attributes_without_clone" and "save_without_clone" to update attributes
|
7
|
+
without versioning (used to sync attributes with external app). This does not change
|
8
|
+
timestamps nor version or node author.
|
9
|
+
* Added login retry wait delay on failures.
|
10
|
+
* Added support for 'in home' or 'from home' in sqliss.
|
11
|
+
* Added support for any scope with 'in sub_nodes' (uses fullpath field).
|
12
|
+
~ Added forced skin setting for sites (overwrites all but ACL skin settings).
|
13
|
+
~ Added support for profile users.
|
14
|
+
* Added support to edit auth_user (linked user) through node's pseudo attribute 'auth' (admin only) or
|
15
|
+
through 'auth_user'.
|
16
|
+
~ Created 'manager' user status: can edit users (only through 'auth').
|
17
|
+
~ Created 'currency' brick to fetch openexchangerates.org exchange rates.
|
18
|
+
* Do not render an older Ajax reply if a newer one has already been received. This fixes the
|
19
|
+
live query confusion.
|
20
|
+
* Fixed loose requirements of httparty and rubyzip preventing installation.
|
21
|
+
* Added 'fsize' method in view to display human readable octet size.
|
22
|
+
~ Added 'pasteTable' option to disable (by setting false) multi cell paste in grid.
|
23
|
+
~ Using contenteditable in grid instead of input form. Turn off with contenteditable option.
|
24
|
+
* Fixed grid bug when leaving page while in input field.
|
25
|
+
~ Implemented 'fulltext match' or 'sphinx match' to use fulltext search in node query.
|
26
|
+
~ Added 'group_id_to_name' to visitor (enables group name display from node auth settings).
|
27
|
+
~ Added 'site_readonly' attribute to site with 'site.readonly?' rubyless. Useful for locking site during updates or migrations.
|
28
|
+
|
29
|
+
* Minor changes
|
30
|
+
* Fixed gemspec to not include TextMate helper and selenium plugin.
|
31
|
+
* Fixed xml generated file caching.
|
32
|
+
~ Added NODE_ID in 'redir' param on node creation (replaced by actual id).
|
33
|
+
* Added fetch_html rubyless method to views (does an HTTP GET and returns body).
|
34
|
+
* Fixed a bug in site alias zafu compilation (wrong home reference).
|
35
|
+
* Fixed anchor in zazen url "":22#foo should link to anchor #foo in node '22'.
|
36
|
+
* Prop eval returning nil for title properly replaces title with class name.
|
37
|
+
* Type ctrl+return to enter a newline inside a grid.
|
38
|
+
* Checking for defined accessors on links before passing to relation proxy (this enables custom code
|
39
|
+
on relation modification without passing through RelationProxy).
|
40
|
+
* Refuses to delete user node unless visitor is a manager.
|
41
|
+
* Marks user as deleted and remove profile if node is destroyed.
|
42
|
+
~ Enable 'parent_id', 'project_id', 'section_id' Rubyless methods.
|
43
|
+
* Fixed a critical bug related to changing a virtual class' superclass.
|
44
|
+
* Do not trigger Ajax 'loading' unless it takes more then 300 ms (avoid blink).
|
45
|
+
* Fixed tlabel on [input] when there is a default label (should overwride default).
|
46
|
+
* Fixed "<p do='input'..." so that the "p" tag is preserved.
|
47
|
+
* Using shift+enter to insert carriage return in grid.
|
48
|
+
* Improved jobs display.
|
49
|
+
* Fixed a cache handling bug where a page could exist in the filesystem without having a cache entry
|
50
|
+
in the database.
|
51
|
+
* Fixed building templates on the fly with fs_skin on JS call.
|
52
|
+
* Fixed rebuild_fullpath and added link in sites on web interface.
|
53
|
+
* Removing bricks.yml and other initial config files from 'rake zena:assets'.
|
54
|
+
* Request for 'login' page while logged in redirects to home page instead of clearing session (fixes iPhone login issues).
|
55
|
+
|
1
56
|
== 1.2.6, 1.2.7 2013-08-16
|
2
57
|
|
3
58
|
* Major changes
|
@@ -5,8 +60,8 @@
|
|
5
60
|
* Added support for wkhtmltopdf (Thanks Jean-Baptiste).
|
6
61
|
|
7
62
|
* Minor changes
|
8
|
-
|
9
|
-
|
63
|
+
~ Added 'cmd' option for pdf brick.
|
64
|
+
~ Added 'local_ips' option to bricks.yml (used when pdf engine cannot render non-public assets).
|
10
65
|
* Fixed dependency on newer versions of rails.
|
11
66
|
|
12
67
|
== 1.2.5 2013-07-15
|
@@ -16,14 +71,14 @@
|
|
16
71
|
implies changes to vhost files !
|
17
72
|
* WARN: Properties in list context do not resolve with first element anymore. "first" prefix needed.
|
18
73
|
* Enable VirtualClass on native classes !
|
19
|
-
|
20
|
-
|
74
|
+
~ Added 'activity' brick which records visitor's last "seen_at" date.
|
75
|
+
~ Support for site alias (other domain pointing to same data) "rake mkalias".
|
21
76
|
|
22
77
|
* Minor changes
|
23
78
|
* Fixed encode_params in Ajax requests.
|
24
79
|
* Fixed cached path in vhost file.
|
25
|
-
|
26
|
-
|
80
|
+
~ Added "uuid" method (generates a unique id).
|
81
|
+
~ Added support for JSON String in [string_hash]
|
27
82
|
* Added 'login_info' to Node.
|
28
83
|
* Added 'group_names' to User class.
|
29
84
|
* Fixed [headers] when 'Status' is set (change to redirect on 300).
|
@@ -31,10 +86,10 @@
|
|
31
86
|
== 1.2.4 2013-06-13
|
32
87
|
|
33
88
|
* Major changes
|
34
|
-
|
89
|
+
~ Added class filtering to Acl in 'create' action.
|
35
90
|
* Uploading html files does not transform them into zafu (use .zafu ext for this)
|
36
91
|
* Added file upload support from zena remote API.
|
37
|
-
|
92
|
+
~ Added 'content_type' regexp to force virtual class on Document creation.
|
38
93
|
* Extended "create group" in vclass to be "allow group" (edit).
|
39
94
|
* Added support for [versions_list] to display list of versions and status.
|
40
95
|
|
@@ -42,7 +97,7 @@
|
|
42
97
|
* Support for raw html in zazen with '<notextile>' or '<html>' tag. Must be allowed with notextile='true' on [zazen] tag.
|
43
98
|
* Fixed preview of content with ACL (considering the POST on /zafu as a 'read').
|
44
99
|
* Added support for "class not like Image" or "class <> Image" to sqliss.
|
45
|
-
|
100
|
+
~ Added url to clear cache with /sites/clear_cache (admin only).
|
46
101
|
* encode_params now supports arrays.
|
47
102
|
* Add 'id' to date input.
|
48
103
|
* Fixed 404 error.
|
@@ -64,20 +119,20 @@
|
|
64
119
|
* html_escape all properties by default
|
65
120
|
* Better support for Passenger (default deployment method now)
|
66
121
|
* Simplified caching (using cachestamp in filename)
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
* Added support for tag clouds through sqliss (<r:void do='tag_cloud from nodes in site' do='each' join=', '><r:name/> (<r:link_count/>)</r:void>).
|
122
|
+
~ Added preview='dom_id' to [form]. (Use preview_node to show preview content.)
|
123
|
+
~ Added "in_group" zafu method on visitor.
|
124
|
+
~ Added [upload_field] method to zafu to allow custom upload forms.
|
125
|
+
~ Added support for custom images on nodes with the "img_tag_{mode}" string attribute or the 'img_tag' hash attribute.
|
126
|
+
* Added support for tag clouds through sqliss (<r:void do='tag_cloud from nodes in site' do='each' join=', '><r:name/> (<r:link_count/>)</r:void>).
|
72
127
|
|
73
128
|
* Minor changes
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
129
|
+
~ Support for 'lang_list' when creating vhost file
|
130
|
+
~ Support for Range in zafu.
|
131
|
+
~ Added options to query_parse to ignore unwanted parameters
|
132
|
+
~ Added 'hparams' option to only return Hash parameters from params.
|
78
133
|
* Fixed query_parse to convert dates to UTC.
|
79
134
|
* Fixed form preview inside block.
|
80
|
-
|
135
|
+
~ Added unique id to img_tag_{mode} code generated 'UUID'.
|
81
136
|
* Added PATH_mode.format and [JS] marker to img_tag_{mode}.
|
82
137
|
* Fixed form preview with long text (use POST).
|
83
138
|
|
@@ -100,12 +155,12 @@
|
|
100
155
|
* Minor changes
|
101
156
|
* Fixed label traduction for param.
|
102
157
|
* Enable ajax response on Node destroy (use dummy update parameter).
|
103
|
-
|
158
|
+
~ Added 'sum' method on array.
|
104
159
|
* Added 'loading' option to [filter].
|
105
160
|
* Added 'master_template' zafu method to access the master template used for compilation.
|
106
161
|
* Fixed creation of modules bug.
|
107
162
|
* Using latest QueryBuilder (fixes default scope bug).
|
108
|
-
|
163
|
+
~ Added 'ssl_on_auth' option to force https after (and during) login.
|
109
164
|
* Removing evaluated strings if copy_id is blank.
|
110
165
|
* Exporting relations by class name instead of kpath (may differ from site to site).
|
111
166
|
* Using any character to build kpath if no character from the class name can be used.
|
@@ -113,7 +168,7 @@
|
|
113
168
|
* Added support for "target" in [zazen] when rendering links.
|
114
169
|
* Fixed kpath propagation to relations on kpath change.
|
115
170
|
* Fixed [block] in [block] with [filter] bug.
|
116
|
-
|
171
|
+
~ Added support for KPATH_VALUE(ClassName) in custom queries.
|
117
172
|
* Fixed class scoping Contact? when current node is more specialized.
|
118
173
|
* Fixed bug on syntax error in Acl query.
|
119
174
|
* Fixed cache expire bug (some pages were not properly removed).
|
@@ -124,7 +179,7 @@
|
|
124
179
|
* Added 'remove_from_db' method to remove a site from the database.
|
125
180
|
* Fixed asset caching PLEASE FIX YOUR VHOST FILES: rake zena:create_vhost -s host='xxxxx'.
|
126
181
|
* Fixed deadlock_retry (a bug in the error message aborted the retry).
|
127
|
-
|
182
|
+
~ Created 'spreadsheet' brick to ease xlsx and csv generation.
|
128
183
|
* Better JS based grid editor.
|
129
184
|
|
130
185
|
* Minor changes
|
@@ -134,9 +189,9 @@
|
|
134
189
|
* Enabled 'alt_class' to work on multiple elements ([each]).
|
135
190
|
* Fixed ajax bugs with dom_ids in nested partials.
|
136
191
|
* Better Acl display, comments on relations.
|
137
|
-
|
192
|
+
~ Support for 'to_date' on time object with proper timezone translation.
|
138
193
|
* Time to 'year' should use timezone.
|
139
|
-
|
194
|
+
~ Added tprefix to [select] (with default value) to ease translated options for select.
|
140
195
|
* Fixed bug when using [input] checkbox with param.
|
141
196
|
* Added jobs list in admin links.
|
142
197
|
|
data/Rakefile
CHANGED
@@ -26,8 +26,8 @@ begin
|
|
26
26
|
gemspec.rubyforge_project = 'zena'
|
27
27
|
|
28
28
|
gemspec.files.exclude 'config/routes.rb'
|
29
|
-
gemspec.files.exclude
|
30
|
-
gemspec.files.exclude
|
29
|
+
gemspec.files.exclude %r{^vendor/plugins/selenium-on-rails}
|
30
|
+
gemspec.files.exclude %r{vendor/TextMate}
|
31
31
|
|
32
32
|
|
33
33
|
# Gem dependecies
|
@@ -25,7 +25,7 @@ class ColumnsController < ApplicationController
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
@column = Column.new
|
28
|
+
@column = Column.new(:versioned => true)
|
29
29
|
|
30
30
|
respond_to do |format|
|
31
31
|
format.html # index.html.erb
|
@@ -47,7 +47,7 @@ class ColumnsController < ApplicationController
|
|
47
47
|
# GET /columns/new
|
48
48
|
# GET /columns/new.xml
|
49
49
|
def new
|
50
|
-
@column = Column.new
|
50
|
+
@column = Column.new(:versioned => true)
|
51
51
|
|
52
52
|
respond_to do |format|
|
53
53
|
format.html # new.html.erb
|
@@ -18,7 +18,10 @@ Examples:
|
|
18
18
|
|
19
19
|
=end
|
20
20
|
class NodesController < ApplicationController
|
21
|
+
before_filter :check_not_readonly, :except => [:index, :show, :search, :zafu, :not_found]
|
22
|
+
|
21
23
|
before_filter :check_is_admin, :only => [:export]
|
24
|
+
|
22
25
|
before_filter :check_api_group
|
23
26
|
if Bricks.raw_config['passenger']
|
24
27
|
before_filter :escape_path, :only => [:index, :show]
|
@@ -269,7 +272,10 @@ class NodesController < ApplicationController
|
|
269
272
|
if @node.errors.empty?
|
270
273
|
flash.now[:notice] = 'Node was successfully created.'
|
271
274
|
format.html {
|
272
|
-
|
275
|
+
if redir = params[:redir]
|
276
|
+
redir = redir.gsub('NODE_ID', @node.zip.to_s)
|
277
|
+
end
|
278
|
+
redirect_to redir || zen_path(@node, :mode => params[:mode], :new => 'true')
|
273
279
|
}
|
274
280
|
format.js do
|
275
281
|
if params[:zjs]
|
@@ -320,8 +326,7 @@ class NodesController < ApplicationController
|
|
320
326
|
respond_to do |format|
|
321
327
|
format.html do
|
322
328
|
if @node.destroy
|
323
|
-
|
324
|
-
# flash[:notice] = _("Node destroyed.")
|
329
|
+
flash[:notice] = _("Node destroyed.")
|
325
330
|
redirect_to params[:redir] || zen_path(@node.parent)
|
326
331
|
else
|
327
332
|
flash.now[:notice] = _("Could not destroy node.")
|
@@ -423,11 +428,18 @@ class NodesController < ApplicationController
|
|
423
428
|
params['node'] ||= {}
|
424
429
|
file, file_error = get_attachment
|
425
430
|
params['node']['file'] = file if file
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
+
|
432
|
+
#============= [TRANSACTION HERE to prevent double version bug on double submit
|
433
|
+
# This can only fix the issue if Version creation/saving is not done after_commit !!
|
434
|
+
Node.transaction do
|
435
|
+
# Make sure we load the correct version for edited v_lang
|
436
|
+
lang = params['node']['v_lang'] || visitor.lang
|
437
|
+
@node.version(lang)
|
438
|
+
@v_status_before_update = @node.v_status
|
439
|
+
@node.update_attributes_with_transformation(params['node'])
|
440
|
+
end
|
441
|
+
#============= TO HERE TRANSACTION]
|
442
|
+
|
431
443
|
# What is this 'extfile' thing ?
|
432
444
|
@node.errors.add('extfile', file_error) if file_error
|
433
445
|
|
@@ -456,27 +468,8 @@ class NodesController < ApplicationController
|
|
456
468
|
redirect_to params[:redir] || zen_path(@node, :mode => params[:mode])
|
457
469
|
end
|
458
470
|
else
|
459
|
-
|
460
|
-
|
461
|
-
route = ActionController::Routing::Routes.recognize_path(request.referer[%r{https?://[^/]+(.*)},1])
|
462
|
-
else
|
463
|
-
route = {:action => 'show'}
|
464
|
-
end
|
465
|
-
if route[:action] == 'index'
|
466
|
-
mode = '+index'
|
467
|
-
elsif route[:action] == 'search'
|
468
|
-
mode = '+search'
|
469
|
-
elsif path = route[:path]
|
470
|
-
if path.last =~ Zena::Use::Urls::ALLOWED_REGEXP
|
471
|
-
zip = $3
|
472
|
-
name = $4
|
473
|
-
mode = $5 == '' ? nil : $5[1..-1]
|
474
|
-
end
|
475
|
-
end
|
476
|
-
rescue ActionController::RoutingError
|
477
|
-
mode = nil
|
478
|
-
end
|
479
|
-
render_and_cache :mode => mode, :cache => false
|
471
|
+
flash[:error] = error_messages_for(:node, :object => @node).html_safe
|
472
|
+
redirect_to zen_path(@node, :mode => params[:mode])
|
480
473
|
end
|
481
474
|
end # html
|
482
475
|
|
@@ -8,21 +8,41 @@ class UserSessionsController < ApplicationController
|
|
8
8
|
|
9
9
|
# /login
|
10
10
|
def new
|
11
|
-
|
12
|
-
|
11
|
+
# If user is already logged in, redirect to home page
|
12
|
+
if !visitor.is_anon?
|
13
|
+
redirect_to home_path(:prefix => prefix)
|
14
|
+
else
|
15
|
+
@node = visitor.site.root_node
|
16
|
+
render_and_cache :mode => '+login'
|
17
|
+
end
|
13
18
|
end
|
14
19
|
|
15
20
|
def create
|
16
21
|
User.send(:with_scope, :find => {:conditions => ['site_id = ?', visitor.site.id]}) do
|
22
|
+
if user = User.find_by_login(params[:login])
|
23
|
+
# FAIL: 1s, FAIL: 2s, FAIL: 4s, FAIL: 8s, FAIL: 16s, FAIL: 32s, FAIL: 64s
|
24
|
+
wait_in_seconds = 2 ** user.login_attempt_count.to_i
|
25
|
+
elapsed = Time.now.to_i - user.login_attempted_at.to_i
|
26
|
+
if elapsed < wait_in_seconds
|
27
|
+
w = Time.at(wait_in_seconds - elapsed)
|
28
|
+
msg = _("You need to wait %ih %im %is before any new attempt (%i failed attempts).")
|
29
|
+
flash[:error] = msg % [w.hour, w.min, w.sec, user.login_attempt_count.to_i]
|
30
|
+
return redirect_to login_path
|
31
|
+
end
|
32
|
+
else
|
33
|
+
flash[:error] = _("Invalid login or password.")
|
34
|
+
return redirect_to login_path
|
35
|
+
end
|
17
36
|
@user_session = UserSession.new(:login=>params[:login], :password=>params[:password])
|
18
37
|
if @user_session.save
|
19
|
-
#
|
38
|
+
# Reset login attempts count
|
39
|
+
Zena::Db.set_attribute(user, 'login_attempt_count', 0)
|
40
|
+
Zena::Db.set_attribute(user, 'login_attempted_at', nil)
|
20
41
|
redirect_to redirect_after_login
|
21
42
|
else
|
22
|
-
flash[:
|
23
|
-
|
24
|
-
|
25
|
-
sleep(2)
|
43
|
+
flash[:error] = _("Invalid login or password.")
|
44
|
+
Zena::Db.set_attribute(user, 'login_attempt_count', user.login_attempt_count.to_i + 1)
|
45
|
+
Zena::Db.set_attribute(user, 'login_attempted_at', Time.now.utc)
|
26
46
|
redirect_to login_path
|
27
47
|
end
|
28
48
|
end
|
@@ -41,7 +61,7 @@ class UserSessionsController < ApplicationController
|
|
41
61
|
else
|
42
62
|
# Keep current host and port settings
|
43
63
|
host = host_with_port
|
44
|
-
http = host =~
|
64
|
+
http = host =~ /:443/ ? 'https' : 'http'
|
45
65
|
end
|
46
66
|
#flash.now[:notice] = _("Successfully logged out.")
|
47
67
|
redirect_to "#{http}://#{host}#{params[:redirect] || home_path(:prefix => prefix)}"
|
@@ -57,8 +77,13 @@ class UserSessionsController < ApplicationController
|
|
57
77
|
unless site = Site.find_by_host(request.host)
|
58
78
|
raise ActiveRecord::RecordNotFound.new("host not found #{request.host}")
|
59
79
|
end
|
60
|
-
|
61
|
-
|
80
|
+
|
81
|
+
if params[:action] == 'new'
|
82
|
+
# keep visitor
|
83
|
+
super
|
84
|
+
else
|
85
|
+
setup_visitor(anonymous_visitor(site), site)
|
86
|
+
end
|
62
87
|
end
|
63
88
|
|
64
89
|
def redirect_after_login
|
@@ -15,7 +15,7 @@ class UsersController < ApplicationController
|
|
15
15
|
# Show the list of users. Rendered in the admin layout.
|
16
16
|
def index
|
17
17
|
secure!(User) do
|
18
|
-
@users = User.paginate(:all, :order => 'status DESC, login ASC', :page => params[:page], :per_page => 20)
|
18
|
+
@users = User.paginate(:all, :order => 'COALESCE(is_profile,0) DESC, status DESC, login ASC', :page => params[:page], :per_page => 20)
|
19
19
|
end
|
20
20
|
|
21
21
|
get_groups_list
|
@@ -151,7 +151,7 @@ class UsersController < ApplicationController
|
|
151
151
|
if params[:user]
|
152
152
|
# visitor changing his/her own info : restrict fields
|
153
153
|
params[:user].keys.each do |k|
|
154
|
-
params[:user].delete(k) unless [
|
154
|
+
params[:user].delete(k) unless ['login', 'time_zone', 'lang', 'password', 'time_zone', 'retype_password', 'old_password'].include?(k.to_s)
|
155
155
|
end
|
156
156
|
end
|
157
157
|
else
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'differ'
|
2
2
|
class VersionsController < ApplicationController
|
3
3
|
layout :popup_layout, :except => [:preview, :diff, :show]
|
4
|
-
before_filter :find_version, :verify_access
|
4
|
+
before_filter :find_version, :check_not_readonly, :verify_access
|
5
5
|
|
6
6
|
# Display a specific version of a node
|
7
7
|
def show
|
@@ -284,7 +284,7 @@ class VersionsController < ApplicationController
|
|
284
284
|
# make the flash available to rjs helpers
|
285
285
|
@flash = flash
|
286
286
|
respond_to do |format|
|
287
|
-
format.html { redirect_to params[:redir] || @redirect_url || request.env['HTTP_REFERER'] ||
|
287
|
+
format.html { redirect_to params[:redir] || @redirect_url || request.env['HTTP_REFERER'] || zen_path(@node)}
|
288
288
|
# js = call from 'drive' popup
|
289
289
|
format.js { render :action => 'update' }
|
290
290
|
end
|
data/app/models/group.rb
CHANGED
@@ -21,6 +21,7 @@ class Group < ActiveRecord::Base
|
|
21
21
|
before_save :do_replace_by
|
22
22
|
before_destroy :check_can_destroy
|
23
23
|
belongs_to :site
|
24
|
+
after_save :update_dependant_users
|
24
25
|
|
25
26
|
# FIXME: test translate_pseudo_id for groups
|
26
27
|
def self.translate_pseudo_id(id,sym=:id)
|
@@ -116,7 +117,9 @@ class Group < ActiveRecord::Base
|
|
116
117
|
errors.add('base', 'you cannot add or remove users from this group')
|
117
118
|
return false
|
118
119
|
end
|
119
|
-
|
120
|
+
|
121
|
+
@model_users = self.users.select {|u| u.is_profile?}
|
122
|
+
model_user_ids = @model_users.map(&:id)
|
120
123
|
self.users = []
|
121
124
|
visitor_added = false
|
122
125
|
@defined_user_ids.each do |id|
|
@@ -125,6 +128,9 @@ class Group < ActiveRecord::Base
|
|
125
128
|
next
|
126
129
|
end
|
127
130
|
self.users << user
|
131
|
+
if user.is_profile?
|
132
|
+
@model_users << user unless model_user_ids.include?(user.id)
|
133
|
+
end
|
128
134
|
visitor_added = user[:id] == visitor[:id]
|
129
135
|
end
|
130
136
|
end
|
@@ -144,4 +150,12 @@ class Group < ActiveRecord::Base
|
|
144
150
|
end
|
145
151
|
return errors.empty?
|
146
152
|
end
|
153
|
+
|
154
|
+
def update_dependant_users
|
155
|
+
if list = @model_users
|
156
|
+
list.each do |u|
|
157
|
+
u.save # Force sync
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
147
161
|
end
|
data/app/models/node.rb
CHANGED
@@ -149,6 +149,9 @@ class Node < ActiveRecord::Base
|
|
149
149
|
include Property::Serialization::JSON
|
150
150
|
|
151
151
|
store_properties_in :version
|
152
|
+
|
153
|
+
invalid_property_failover 'title' => 'INVALID PROPERTY', 'ext' => 'txt', 'content/type' => 'text/plain'
|
154
|
+
|
152
155
|
|
153
156
|
property do |p|
|
154
157
|
# Multilingual string index on 'title'
|
@@ -185,6 +188,7 @@ class Node < ActiveRecord::Base
|
|
185
188
|
before_create :node_before_create
|
186
189
|
after_save :spread_project_and_section
|
187
190
|
after_create :node_after_create
|
191
|
+
before_destroy :node_before_destroy
|
188
192
|
after_destroy :node_after_destroy
|
189
193
|
attr_protected :zip, :id, :section_id, :project_id, :publish_from, :created_at, :updated_at
|
190
194
|
attr_protected :site_id
|
@@ -230,7 +234,9 @@ class Node < ActiveRecord::Base
|
|
230
234
|
|
231
235
|
# we use safe_method because the columns can be null, but the values are never null
|
232
236
|
safe_method :kpath => String, :user_zip => Number, :user_id => Number,
|
233
|
-
:
|
237
|
+
:parent_id => {:class => Number, :method => 'parent_zip'}, :parent_zip => Number,
|
238
|
+
:project_id => {:class => Number, :method => 'project_zip'}, :project_zip => Number,
|
239
|
+
:section_id => {:class => Number, :method => 'section_zip'}, :section_zip => Number,
|
234
240
|
:ref_lang => String,
|
235
241
|
:position => Number, :rgroup_id => Number,
|
236
242
|
:wgroup_id => Number, :dgroup_id => Number, :custom_base => Boolean,
|
@@ -244,8 +250,10 @@ class Node < ActiveRecord::Base
|
|
244
250
|
:versions => {:class => ['Version'], :method => 'zafu_versions'},
|
245
251
|
:version => 'Version', :v_status => Number, :v_lang => String,
|
246
252
|
:v_publish_from => Time, :v_backup => Boolean,
|
247
|
-
:zip
|
253
|
+
:zip => Number, :parent_id => {:class => Number, :nil => true, :method => 'parent_zip'},
|
248
254
|
:user => 'User',
|
255
|
+
:auth_user => {:class => 'User', :nil => true},
|
256
|
+
:auth => StringHash,
|
249
257
|
:author => author_proc,
|
250
258
|
:vclass => {:class => 'VirtualClass', :method => 'virtual_class'},
|
251
259
|
:new_record? => Boolean,
|
@@ -640,7 +648,7 @@ class Node < ActiveRecord::Base
|
|
640
648
|
if attributes['file'] && !(klass.kpath =~ %r{^ND})
|
641
649
|
klass = VirtualClass['Document']
|
642
650
|
end
|
643
|
-
|
651
|
+
|
644
652
|
if klass.kind_of?(VirtualClass)
|
645
653
|
node = secure(klass.real_class) { klass.new_instance(attributes) }
|
646
654
|
else
|
@@ -1037,7 +1045,7 @@ class Node < ActiveRecord::Base
|
|
1037
1045
|
|
1038
1046
|
# check inheritance chain through kpath
|
1039
1047
|
def kpath_match?(kpath)
|
1040
|
-
|
1048
|
+
self.kpath =~ /^#{kpath}/
|
1041
1049
|
end
|
1042
1050
|
|
1043
1051
|
# virtual class
|
@@ -1472,6 +1480,45 @@ class Node < ActiveRecord::Base
|
|
1472
1480
|
return nil unless type = virtual_class.safe_method_type([method])
|
1473
1481
|
res = eval(type[:method])
|
1474
1482
|
res ? res.to_s : nil
|
1483
|
+
end
|
1484
|
+
|
1485
|
+
def auth=(params)
|
1486
|
+
return unless visitor.is_manager?
|
1487
|
+
if !users = auth_users
|
1488
|
+
# Create user
|
1489
|
+
user = secure(User) { User.new }
|
1490
|
+
users = @auth_users = [user]
|
1491
|
+
@auth_user = user
|
1492
|
+
end
|
1493
|
+
users.each do |user|
|
1494
|
+
user.attributes = params
|
1495
|
+
end
|
1496
|
+
@auth = nil
|
1497
|
+
end
|
1498
|
+
|
1499
|
+
# Find all users using this node as contact node.
|
1500
|
+
def auth_users
|
1501
|
+
@auth_users ||= new_record? ? nil : secure(User) { User.all(:conditions => {:node_id => self.id}) }
|
1502
|
+
end
|
1503
|
+
|
1504
|
+
def auth
|
1505
|
+
@auth ||= if l = auth_user
|
1506
|
+
h = StringHash.new
|
1507
|
+
[:login, :lang, :profile].each do |k|
|
1508
|
+
h[k] = auth_user.send(k)
|
1509
|
+
end
|
1510
|
+
h
|
1511
|
+
else
|
1512
|
+
{}
|
1513
|
+
end
|
1514
|
+
end
|
1515
|
+
|
1516
|
+
# Find first user using this node as contact node
|
1517
|
+
def auth_user
|
1518
|
+
@auth_user ||= begin
|
1519
|
+
l = auth_users
|
1520
|
+
l && l.first
|
1521
|
+
end
|
1475
1522
|
end
|
1476
1523
|
|
1477
1524
|
protected
|
@@ -1611,7 +1658,8 @@ class Node < ActiveRecord::Base
|
|
1611
1658
|
|
1612
1659
|
# Make sure the node is complete before creating it (check parent and project references)
|
1613
1660
|
def validate_node
|
1614
|
-
|
1661
|
+
# Make sure title is never blank
|
1662
|
+
self.title = vclass.name if title.blank?
|
1615
1663
|
|
1616
1664
|
if @parent_zip_error
|
1617
1665
|
errors.add('parent_id', @parent_zip_error)
|
@@ -1663,9 +1711,21 @@ class Node < ActiveRecord::Base
|
|
1663
1711
|
if vclass.auto_create_discussion
|
1664
1712
|
Discussion.create(:node_id=>self[:id], :lang=>v_lang, :inside => false)
|
1665
1713
|
end
|
1714
|
+
|
1715
|
+
update_auth_user
|
1716
|
+
end
|
1717
|
+
|
1718
|
+
def node_before_destroy
|
1719
|
+
if !visitor.is_manager? && auth_users
|
1720
|
+
errors.add(:base, 'Cannot destroy: node is a user')
|
1721
|
+
false
|
1722
|
+
else
|
1723
|
+
true
|
1724
|
+
end
|
1666
1725
|
end
|
1667
1726
|
|
1668
1727
|
def node_after_destroy
|
1728
|
+
update_auth_user
|
1669
1729
|
sweep_cache
|
1670
1730
|
end
|
1671
1731
|
|
@@ -1747,7 +1807,7 @@ class Node < ActiveRecord::Base
|
|
1747
1807
|
allOK
|
1748
1808
|
end
|
1749
1809
|
|
1750
|
-
# This method is run whenever 'apply' is called.
|
1810
|
+
# This method is run whenever 'apply' is called (not on create or destroy).
|
1751
1811
|
def after_all
|
1752
1812
|
return unless super
|
1753
1813
|
if @add_comment
|
@@ -1762,8 +1822,49 @@ class Node < ActiveRecord::Base
|
|
1762
1822
|
remove_instance_variable(:@add_comment)
|
1763
1823
|
end
|
1764
1824
|
remove_instance_variable(:@discussion) if defined?(@discussion) # force reload
|
1765
|
-
|
1766
|
-
|
1825
|
+
|
1826
|
+
update_auth_user
|
1827
|
+
end
|
1828
|
+
|
1829
|
+
def update_auth_user
|
1830
|
+
if destroyed?
|
1831
|
+
if users = auth_users
|
1832
|
+
users.each do |user|
|
1833
|
+
user.profile_id = nil
|
1834
|
+
user.node_id = nil
|
1835
|
+
user.status = User::Status[:deleted]
|
1836
|
+
if !user.save
|
1837
|
+
user.errors.each do |k,v|
|
1838
|
+
errors.add("user[#{k}]", v)
|
1839
|
+
end
|
1840
|
+
end
|
1841
|
+
end
|
1842
|
+
end
|
1843
|
+
errors.empty?
|
1844
|
+
elsif users = auth_users
|
1845
|
+
auth_user = users.first
|
1846
|
+
if auth_user.new_record? || auth_user.changed?
|
1847
|
+
users.each do |user|
|
1848
|
+
if user.new_record?
|
1849
|
+
# Creating user
|
1850
|
+
user.node_id = self.id
|
1851
|
+
end
|
1852
|
+
|
1853
|
+
if user.login.blank?
|
1854
|
+
user.login = title.strip
|
1855
|
+
end
|
1856
|
+
|
1857
|
+
if !user.save
|
1858
|
+
user.errors.each do |k,v|
|
1859
|
+
errors.add("user[#{k}]", v)
|
1860
|
+
end
|
1861
|
+
end
|
1862
|
+
end
|
1863
|
+
end
|
1864
|
+
errors.empty?
|
1865
|
+
else
|
1866
|
+
true
|
1867
|
+
end
|
1767
1868
|
end
|
1768
1869
|
|
1769
1870
|
def change_klass
|