zena 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../../../../../test/test_helper'
|
|
2
|
+
|
|
3
|
+
class CurrencyTest < Zena::Unit::TestCase
|
|
4
|
+
APP_ID_PATH = File.join(Zena::ROOT, 'config', 'currency_app_id.txt')
|
|
5
|
+
include Bricks::Currency::ViewMethods
|
|
6
|
+
|
|
7
|
+
if File.exist?(APP_ID_PATH)
|
|
8
|
+
Bricks::Currency.app_id = File.read(APP_ID_PATH).strip
|
|
9
|
+
|
|
10
|
+
context 'with an app_id' do
|
|
11
|
+
should 'get currencies' do
|
|
12
|
+
list = Bricks::Currency.get_currencies
|
|
13
|
+
assert_equal 'Swiss Franc', list['CHF']
|
|
14
|
+
assert_equal 'Peruvian Nuevo Sol', list['PEN']
|
|
15
|
+
assert_equal 'Euro', list['EUR']
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
should 'get rates' do
|
|
19
|
+
list = Bricks::Currency.get_rates(%w{EUR CHF USD}, 'CHF')
|
|
20
|
+
eur = list[0]
|
|
21
|
+
chf = list[1]
|
|
22
|
+
usd = list[2]
|
|
23
|
+
|
|
24
|
+
assert_equal 'CHF', chf[0]
|
|
25
|
+
assert_equal 1.0, chf[1]
|
|
26
|
+
assert_equal 'Swiss Franc', chf[2]
|
|
27
|
+
|
|
28
|
+
assert_equal 'EUR', eur[0]
|
|
29
|
+
assert_kind_of Float, eur[1]
|
|
30
|
+
assert_equal 'Euro', eur[2]
|
|
31
|
+
|
|
32
|
+
assert_equal 'USD', usd[0]
|
|
33
|
+
assert_kind_of Float, usd[1]
|
|
34
|
+
assert_equal 'United States Dollar', usd[2]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
should 'get rates for views' do
|
|
38
|
+
res = currency_rates(%w{EUR CHF USD}, 'CHF')
|
|
39
|
+
assert_match /^\[\["EUR", [0-9\.]+, "Euro"\], \["CHF", 1.0, "Swiss Franc"\], \["USD", [0-9\.]+, "United States Dollar"\]\]$/, res
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
<h2 do='t'>search results</h2>
|
|
5
5
|
|
|
6
|
-
<ul id='search_results' do='
|
|
6
|
+
<ul id='search_results' do='nodes where fulltext match #{params[:q]} in site'>
|
|
7
7
|
<li class='result_entry' do='each'>
|
|
8
8
|
<p class='result_image' do='if' kind_of='Document'> <r:link format='data' do='img' alt_src='icon' mode='pv'/><r:else do='img' alt_src='icon' mode='pv' link='self'/></p>
|
|
9
9
|
<p class='result_name'><r:link/></p>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../../../../../test/test_helper'
|
|
2
|
+
|
|
3
|
+
class FsSkinViewTest < Zena::View::TestCase
|
|
4
|
+
|
|
5
|
+
context 'A page using a fs_skin Skin' do
|
|
6
|
+
setup do
|
|
7
|
+
login(:lion)
|
|
8
|
+
skin = secure(Skin) { Skin.create(:title => 'foo', :z_fs_skin => 'fs_skin-blog', :parent_id => nodes_id(:skins), :v_status => Zena::Status::Pub)}
|
|
9
|
+
assert skin.errors.empty?
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
context 'with a normal user' do
|
|
13
|
+
setup do
|
|
14
|
+
login(:anon)
|
|
15
|
+
visiting(:status)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
should 'build template partial on template_path_from_template_url and ignore skin' do
|
|
19
|
+
puts "\n\n\n\n ********************************************************"
|
|
20
|
+
puts " ********************************************************"
|
|
21
|
+
puts " ******************** RUNNING FS_SKIN TESTS **************"
|
|
22
|
+
puts " ********************************************************"
|
|
23
|
+
puts " ********************************************************\n\n\n"
|
|
24
|
+
fullpath = fullpath_from_template_url('$fs_skin-blog/Node/pages', false)
|
|
25
|
+
main_path = fullpath_from_template_url('$fs_skin-blog/Node/_main', false)
|
|
26
|
+
FileUtils.rm(fullpath) if File.exist?(fullpath)
|
|
27
|
+
FileUtils.rm(main_path) if File.exist?(main_path)
|
|
28
|
+
assert_equal '/test.host/zafu/$fs_skin-blog/Node/en/pages.erb', template_path_from_template_url('', '$fs_skin-blog/Node/pages', true)
|
|
29
|
+
assert File.exist?(main_path)
|
|
30
|
+
assert File.exist?(fullpath)
|
|
31
|
+
FileUtils.rm(fullpath)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end # A page using a fs_skin Skin
|
|
35
|
+
end
|
|
@@ -71,7 +71,7 @@ module Bricks
|
|
|
71
71
|
template_path = template_url(opts)
|
|
72
72
|
|
|
73
73
|
# Produce html
|
|
74
|
-
data = render_to_string(:file => template_path, :layout=>false)
|
|
74
|
+
data = render_to_string(:file => template_path, :layout => false)
|
|
75
75
|
|
|
76
76
|
target_file = Tempfile.new('trg').path + '.pdf'
|
|
77
77
|
|
data/bricks/sphinx/zena/init.rb
CHANGED
|
@@ -4,3 +4,17 @@ if errors = Bricks.runtime_requirement_errors('sphinx')
|
|
|
4
4
|
end
|
|
5
5
|
|
|
6
6
|
Node.send(:include, Bricks::Sphinx::NodeSearch)
|
|
7
|
+
|
|
8
|
+
# add 'sphinx match xxxx' to QueryNode
|
|
9
|
+
Node.query_compiler.add_fulltext_field('sphinx') do |processor, table, right|
|
|
10
|
+
helper = processor.instance_variable_get(:@rubyless_helper)
|
|
11
|
+
case right[0]
|
|
12
|
+
when :string, :dstring, :real, :integer
|
|
13
|
+
value = RubyLess.translate_string(helper, right[1])
|
|
14
|
+
when :rubyless
|
|
15
|
+
value = RubyLess.translate(helper, right[1])
|
|
16
|
+
else
|
|
17
|
+
raise ::QueryBuilder::Error.new("Can only match against literal or rubyless values.")
|
|
18
|
+
end
|
|
19
|
+
"#{table}.id IN (#{processor.send(:insert_bind, "Node.search_for_ids(#{value})")})"
|
|
20
|
+
end
|
|
@@ -46,4 +46,8 @@ checkbox_tagged:
|
|
|
46
46
|
|
|
47
47
|
tag_cloud:
|
|
48
48
|
src: "<r:void do='tag_cloud from nodes in site' do='each' join=', '><r:name/> (<r:link_count/>)</r:void>"
|
|
49
|
-
res: "blue (2), sky (1)"
|
|
49
|
+
res: "blue (2), sky (1)"
|
|
50
|
+
|
|
51
|
+
tag_cloud_where:
|
|
52
|
+
src: "<r:void do='tag_cloud where name like \"s%\" from nodes in site' do='each' join=', '><r:name/> (<r:link_count/>)</r:void>"
|
|
53
|
+
res: "sky (1)"
|
|
@@ -5,12 +5,13 @@ module Bricks
|
|
|
5
5
|
include RubyLess
|
|
6
6
|
set_table_name :delayed_jobs
|
|
7
7
|
|
|
8
|
-
safe_method :run_at => Time, :created_at => Time, :info => String
|
|
8
|
+
safe_method :run_at => Time, :created_at => Time, :info => {:class => String, :html_safe => true}
|
|
9
9
|
# can be nil
|
|
10
10
|
safe_context :locked_at => Time, :locked_by => String
|
|
11
11
|
|
|
12
12
|
def info
|
|
13
|
-
|
|
13
|
+
# We load struct, not just a hash
|
|
14
|
+
obj = YAML.load(self[:handler], :safe => false)
|
|
14
15
|
if obj.respond_to?(:info)
|
|
15
16
|
obj.info
|
|
16
17
|
else
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class CountLoginAttempts < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
add_column :users, :login_attempt_count, :integer
|
|
4
|
+
add_column :users, :login_attempted_at, :datetime
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def self.down
|
|
8
|
+
remove_column :users, :login_attempt_count
|
|
9
|
+
remove_column :users, :login_attempted_at
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
class IndexFullpath < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
# 255 length = InnoDB limit
|
|
4
|
+
add_index "nodes", ["fullpath", "site_id"], :name => "index_on_fullpath_and_site_id", :length => {"fullpath"=>"255", "site_id"=>nil}
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def self.down
|
|
8
|
+
remove_index :nodes, :column => ['fullpath', 'site_id']
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class AddProfileToUsers < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
add_column :users, :is_profile, :boolean
|
|
4
|
+
add_column :users, :profile_id, :integer
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def self.down
|
|
8
|
+
remove_column :users, :profile_id
|
|
9
|
+
remove_column :users, :is_profile
|
|
10
|
+
end
|
|
11
|
+
end
|
data/config/bricks.yml
CHANGED
|
@@ -4,16 +4,19 @@ test:
|
|
|
4
4
|
captcha: ON
|
|
5
5
|
acls: ON
|
|
6
6
|
grid: ON
|
|
7
|
-
fs_skin:
|
|
7
|
+
fs_skin: ON
|
|
8
8
|
sphinx: OFF
|
|
9
9
|
worker: OFF
|
|
10
10
|
uv: OFF
|
|
11
11
|
spreadsheet: ON
|
|
12
12
|
activity: ON
|
|
13
|
-
|
|
13
|
+
currency:
|
|
14
|
+
switch: ON
|
|
15
|
+
app_id: test_app_id_xxx # APP_ID for testing is in config/currency_app_id.txt
|
|
14
16
|
|
|
15
17
|
development:
|
|
16
|
-
# asset_port: 7999
|
|
18
|
+
# asset_port: 7999
|
|
19
|
+
cache_path: '/public'
|
|
17
20
|
activity: ON
|
|
18
21
|
mongrel: OFF
|
|
19
22
|
passenger: ON
|
|
@@ -61,8 +64,9 @@ production:
|
|
|
61
64
|
# When external rendering engines (pdf) cannot get non-public assets, add the server ip to
|
|
62
65
|
# what Zena considers 'local'
|
|
63
66
|
# local_ips: 123.45.67.89, 127.0.0.1
|
|
67
|
+
# index_on_fullpath: ON
|
|
64
68
|
activity: ON
|
|
65
|
-
cache_path: '/public
|
|
69
|
+
cache_path: '/public'
|
|
66
70
|
mongrel: OFF
|
|
67
71
|
passenger: ON
|
|
68
72
|
uv:
|
data/config/gems.yml
CHANGED
|
@@ -11,6 +11,8 @@ fast_gettext: '~> 0.4.16'
|
|
|
11
11
|
will_paginate: '~> 2.3.12'
|
|
12
12
|
differ: '= 0.1.2'
|
|
13
13
|
shoulda: '= 2.10.3'
|
|
14
|
+
#rubyzip: '= 0.9.9'
|
|
15
|
+
httparty: '= 0.7.8'
|
|
14
16
|
httmultiparty : '= 0.3.8'
|
|
15
17
|
open4:
|
|
16
18
|
daemons: # upload progress
|
|
@@ -18,11 +20,11 @@ gem_plugin: # upload progress
|
|
|
18
20
|
simple_xlsx_writer: # spreadsheet
|
|
19
21
|
lib: 'simple_xlsx'
|
|
20
22
|
|
|
21
|
-
querybuilder: '= 1.2.
|
|
23
|
+
querybuilder: '= 1.2.3'
|
|
22
24
|
yamltest: '= 0.7.0'
|
|
23
25
|
safe_yaml: '= 0.8.0'
|
|
24
|
-
rubyless: '= 0.8.
|
|
25
|
-
property: '= 2.3.
|
|
26
|
+
rubyless: '= 0.8.11'
|
|
27
|
+
property: '= 2.3.4'
|
|
26
28
|
versions: '= 0.3.1'
|
|
27
29
|
|
|
28
30
|
RedCloth:
|
|
@@ -14,6 +14,7 @@ a:hover { color:#04a;}
|
|
|
14
14
|
table { margin:20px;}
|
|
15
15
|
td { padding:5px; }
|
|
16
16
|
#login_form { border:1px solid grey; background:#eee; width:400px; margin:120px auto; padding:0;}
|
|
17
|
+
.error {background:#fcc; padding:8px; border-bottom:1px solid #333}
|
|
17
18
|
</style>
|
|
18
19
|
</head>
|
|
19
20
|
|
|
@@ -31,7 +32,13 @@ td { padding:5px; }
|
|
|
31
32
|
|
|
32
33
|
<td><input name="password" size="20" type="password" /></td>
|
|
33
34
|
</tr>
|
|
34
|
-
<tr
|
|
35
|
+
<tr>
|
|
36
|
+
<td></td>
|
|
37
|
+
<td>
|
|
38
|
+
<input name="commit" type="submit" value=" login " /> <p class='cancel' do='link' do='t'>cancel</p>
|
|
39
|
+
<input name='lang' type='hidden' value='#{visitor.lang}'/>
|
|
40
|
+
</td>
|
|
41
|
+
</tr>
|
|
35
42
|
</table>
|
|
36
43
|
</form>
|
|
37
44
|
</div>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<h2 do='t'>search results</h2>
|
|
6
6
|
|
|
7
|
-
<ul id='search_results' do='
|
|
7
|
+
<ul id='search_results' do='nodes where fulltext match #{params[:q]} in site'>
|
|
8
8
|
<li class='result_entry' do='each'>
|
|
9
9
|
<p class='result_image' do='Document?'>
|
|
10
10
|
<r:link format='data' do='img' alt_src='icon' mode='pv'/>
|
data/lib/bricks/loader.rb
CHANGED
|
@@ -133,11 +133,11 @@ module Bricks
|
|
|
133
133
|
require mod_path
|
|
134
134
|
mod = eval "Bricks::#{mod.camelcase}"
|
|
135
135
|
Zena.use mod
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
init_rb = "#{path}/zena/init.rb"
|
|
139
|
+
if File.exist?(init_rb)
|
|
140
|
+
require init_rb
|
|
141
141
|
end
|
|
142
142
|
end
|
|
143
143
|
end
|
data/lib/gettext_strings.rb
CHANGED
|
@@ -50,6 +50,8 @@ module Zena
|
|
|
50
50
|
N_('img_custom_inherit') # icon
|
|
51
51
|
N_('img_user') # edit users (admin)
|
|
52
52
|
N_('img_user_admin') # edit users (admin)
|
|
53
|
+
N_('img_user_manager') # edit users (admin)
|
|
54
|
+
N_('img_user_profile') # edit users (admin)
|
|
53
55
|
N_('img_user_su') # edit users (admin)
|
|
54
56
|
N_('img_user_pub') # edit users (admin)
|
|
55
57
|
N_('img_group') # edit groups (admin)
|
|
@@ -155,6 +157,7 @@ module Zena
|
|
|
155
157
|
|
|
156
158
|
N_('User name:') # login form
|
|
157
159
|
N_('Password:') # login form
|
|
160
|
+
N_('Login for') # login form
|
|
158
161
|
|
|
159
162
|
# temporary (seems like the updatepo script does not parse 'templates' directory)
|
|
160
163
|
N_('you are editing the original')
|
data/lib/tasks/zena.rake
CHANGED
|
@@ -42,11 +42,15 @@ def symlink_assets(from, to)
|
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
def copy_assets(from, to)
|
|
45
|
+
def copy_assets(from, to, copy_all = false)
|
|
46
46
|
from = File.expand_path(from)
|
|
47
47
|
to = File.expand_path(to)
|
|
48
48
|
return if from == to
|
|
49
|
-
|
|
49
|
+
folders = ['public/**/*']
|
|
50
|
+
if copy_all
|
|
51
|
+
folders += ['config/mongrel_upload_progress.conf', 'lib/upload_progress_server.rb', 'config/deploy.rb', 'config/bricks.yml']
|
|
52
|
+
end
|
|
53
|
+
folders.each do |base_path|
|
|
50
54
|
if base_path =~ /\*/
|
|
51
55
|
Dir["#{from}/#{base_path}"].each do |path|
|
|
52
56
|
path = path[(from.length + 1)..-1]
|
|
@@ -103,6 +107,15 @@ def copy_files(from, to)
|
|
|
103
107
|
end
|
|
104
108
|
|
|
105
109
|
namespace :zena do
|
|
110
|
+
desc "Copy all assets including gem and deploy config from zena gem to application."
|
|
111
|
+
task :all_assets => :zena_config do
|
|
112
|
+
if Zena::ROOT == RAILS_ROOT
|
|
113
|
+
puts "Copy all assets should only be used when zena is loaded externally (via gem for example)."
|
|
114
|
+
else
|
|
115
|
+
copy_assets(Zena::ROOT, RAILS_ROOT, true)
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
106
119
|
desc "Copy latest assets from zena gem to application (images, stylesheets, javascripts)."
|
|
107
120
|
task :assets => :zena_config do
|
|
108
121
|
if Zena::ROOT == RAILS_ROOT
|
|
@@ -235,28 +248,16 @@ namespace :zena do
|
|
|
235
248
|
end
|
|
236
249
|
|
|
237
250
|
desc "Remove all zafu compiled templates"
|
|
238
|
-
task :clear_zafu => :
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
next if site =~ /^\./
|
|
242
|
-
FileUtils.rmtree(File.join(SITES_ROOT, site, 'zafu'))
|
|
243
|
-
end
|
|
251
|
+
task :clear_zafu => :environment do
|
|
252
|
+
Site.all.each do |site|
|
|
253
|
+
site.clear_zafu
|
|
244
254
|
end
|
|
245
255
|
end
|
|
246
256
|
|
|
247
257
|
desc "Remove all cached data" # FIXME: cachedPages db should be cleared to
|
|
248
258
|
task :clear_cache => :environment do
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
next if site =~ /^\./ || !File.exist?(File.join(SITES_ROOT,site,'public'))
|
|
252
|
-
Dir.foreach(File.join(SITES_ROOT,site,'public')) do |elem|
|
|
253
|
-
next unless elem =~ /^(\w\w\.html|\w\w)$/
|
|
254
|
-
FileUtils.rmtree(File.join(SITES_ROOT, site, 'public', elem))
|
|
255
|
-
end
|
|
256
|
-
end
|
|
257
|
-
['caches', 'cached_pages', 'cached_pages_nodes'].each do |tbl|
|
|
258
|
-
Site.connection.execute "DELETE FROM #{tbl}"
|
|
259
|
-
end
|
|
259
|
+
Site.all.each do |site|
|
|
260
|
+
site.clear_cache
|
|
260
261
|
end
|
|
261
262
|
end
|
|
262
263
|
|
|
@@ -278,7 +279,7 @@ namespace :zena do
|
|
|
278
279
|
end
|
|
279
280
|
|
|
280
281
|
task :full_backup => :environment do
|
|
281
|
-
data_folders = Site.
|
|
282
|
+
data_folders = Site.all.map { |s| File.join(SITES_ROOT, s.data_path) }.reject { |p| !File.exist?(p) }
|
|
282
283
|
cmd = "tar czf #{RAILS_ROOT}/sites_data.tgz #{data_folders.join(' ')}"
|
|
283
284
|
puts cmd
|
|
284
285
|
puts `#{cmd}`
|
|
@@ -376,7 +377,7 @@ namespace :zena do
|
|
|
376
377
|
end
|
|
377
378
|
end
|
|
378
379
|
|
|
379
|
-
%w{db:fixtures:load zena:rebuild_index}.each do |task|
|
|
380
|
+
%w{db:fixtures:load fs_skin:index zena:rebuild_index}.each do |task|
|
|
380
381
|
puts "******************************* #{task}"
|
|
381
382
|
Rake::Task[task].invoke
|
|
382
383
|
end
|
|
@@ -425,8 +426,10 @@ namespace :zena do
|
|
|
425
426
|
sites = Site.master_sites
|
|
426
427
|
end
|
|
427
428
|
sites.each do |site|
|
|
429
|
+
puts "************** Rebuild paths for '#{site.host}' *************"
|
|
428
430
|
# Does not use SiteWorker.
|
|
429
|
-
site.
|
|
431
|
+
setup_visitor(site.any_admin, site)
|
|
432
|
+
site.rebuild_fullpath(nil, 1)
|
|
430
433
|
end
|
|
431
434
|
end
|
|
432
435
|
|