lc_alchemy_cms 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +23 -0
- data/.gitignore +21 -0
- data/.hound.yml +2 -0
- data/.rspec +1 -0
- data/.rubocop.yml +861 -0
- data/.teatro.yml +7 -0
- data/.travis.yml +27 -0
- data/.yardopts +5 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/CONTRIBUTING.md +73 -0
- data/Gemfile +34 -0
- data/LICENSE +27 -0
- data/README.md +297 -0
- data/Rakefile +48 -0
- data/alchemy_cms.gemspec +81 -0
- data/app/assets/fonts/alchemy/icons.eot +0 -0
- data/app/assets/fonts/alchemy/icons.svg +71 -0
- data/app/assets/fonts/alchemy/icons.ttf +0 -0
- data/app/assets/fonts/alchemy/icons.woff +0 -0
- data/app/assets/images/alchemy/alchemy-logo.svg +70 -0
- data/app/assets/images/alchemy/favicon.ico +0 -0
- data/app/assets/images/alchemy/icon.svg +14 -0
- data/app/assets/images/alchemy/icons.png +0 -0
- data/app/assets/images/alchemy/lupe.cur +0 -0
- data/app/assets/images/alchemy/ui-icons_666666_256x240.png +0 -0
- data/app/assets/images/sassy-ie-overlay.png +0 -0
- data/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee +30 -0
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +142 -0
- data/app/assets/javascripts/alchemy/alchemy.browser.js.coffee +22 -0
- data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +32 -0
- data/app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee +19 -0
- data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +85 -0
- data/app/assets/javascripts/alchemy/alchemy.custom.js +1 -0
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +31 -0
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +266 -0
- data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +70 -0
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +84 -0
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +138 -0
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +89 -0
- data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +63 -0
- data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +27 -0
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +22 -0
- data/app/assets/javascripts/alchemy/alchemy.hotkeys.js.coffee +49 -0
- data/app/assets/javascripts/alchemy/alchemy.html5.js +22 -0
- data/app/assets/javascripts/alchemy/alchemy.i18n.js.coffee +26 -0
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js.coffee +44 -0
- data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +63 -0
- data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +42 -0
- data/app/assets/javascripts/alchemy/alchemy.js +52 -0
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +250 -0
- data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +49 -0
- data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +48 -0
- data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +106 -0
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +58 -0
- data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +50 -0
- data/app/assets/javascripts/alchemy/alchemy.spinner.js.coffee +49 -0
- data/app/assets/javascripts/alchemy/alchemy.string_extension.js.coffee +11 -0
- data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee +66 -0
- data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +132 -0
- data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +102 -0
- data/app/assets/javascripts/alchemy/alchemy.windows.js.coffee +42 -0
- data/app/assets/javascripts/alchemy/menubar.js.coffee +8 -0
- data/app/assets/javascripts/alchemy/preview.js +1 -0
- data/app/assets/javascripts/tinymce/plugins/alchemy_link/plugin.min.js +19 -0
- data/app/assets/stylesheets/alchemy/_defaults.scss +8 -0
- data/app/assets/stylesheets/alchemy/_extends.scss +93 -0
- data/app/assets/stylesheets/alchemy/_mixins.scss +112 -0
- data/app/assets/stylesheets/alchemy/_variables.scss +61 -0
- data/app/assets/stylesheets/alchemy/admin.scss +31 -0
- data/app/assets/stylesheets/alchemy/archive.scss +436 -0
- data/app/assets/stylesheets/alchemy/base.scss +609 -0
- data/app/assets/stylesheets/alchemy/buttons.scss +259 -0
- data/app/assets/stylesheets/alchemy/custom.scss +1 -0
- data/app/assets/stylesheets/alchemy/dashboard.scss +104 -0
- data/app/assets/stylesheets/alchemy/dialogs.scss +214 -0
- data/app/assets/stylesheets/alchemy/elements.scss +772 -0
- data/app/assets/stylesheets/alchemy/errors.scss +39 -0
- data/app/assets/stylesheets/alchemy/flash.scss +65 -0
- data/app/assets/stylesheets/alchemy/form_fields.scss +89 -0
- data/app/assets/stylesheets/alchemy/forms.scss +193 -0
- data/app/assets/stylesheets/alchemy/frame.scss +301 -0
- data/app/assets/stylesheets/alchemy/icon-font.scss +67 -0
- data/app/assets/stylesheets/alchemy/icons.scss +324 -0
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +1511 -0
- data/app/assets/stylesheets/alchemy/menubar.scss +81 -0
- data/app/assets/stylesheets/alchemy/modules.scss +33 -0
- data/app/assets/stylesheets/alchemy/notices.scss +64 -0
- data/app/assets/stylesheets/alchemy/pagination.scss +65 -0
- data/app/assets/stylesheets/alchemy/print.scss +34 -0
- data/app/assets/stylesheets/alchemy/search.scss +73 -0
- data/app/assets/stylesheets/alchemy/selects.scss +235 -0
- data/app/assets/stylesheets/alchemy/sitemap.scss +385 -0
- data/app/assets/stylesheets/alchemy/tables.scss +218 -0
- data/app/assets/stylesheets/alchemy/toolbar.scss +146 -0
- data/app/assets/stylesheets/alchemy/upload.scss +121 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +90 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/readme.md +1 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.svg +175 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.svg +153 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/anchor.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/loader.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/object.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/trans.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/wline.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.ie7.min.css +1 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +1810 -0
- data/app/controllers/alchemy/admin/attachments_controller.rb +106 -0
- data/app/controllers/alchemy/admin/base_controller.rb +168 -0
- data/app/controllers/alchemy/admin/clipboard_controller.rb +51 -0
- data/app/controllers/alchemy/admin/contents_controller.rb +76 -0
- data/app/controllers/alchemy/admin/dashboard_controller.rb +89 -0
- data/app/controllers/alchemy/admin/elements_controller.rb +190 -0
- data/app/controllers/alchemy/admin/essence_files_controller.rb +47 -0
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +120 -0
- data/app/controllers/alchemy/admin/languages_controller.rb +17 -0
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +19 -0
- data/app/controllers/alchemy/admin/legacy_page_urls_controller.rb +39 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +359 -0
- data/app/controllers/alchemy/admin/pictures_controller.rb +168 -0
- data/app/controllers/alchemy/admin/resources_controller.rb +185 -0
- data/app/controllers/alchemy/admin/sites_controller.rb +6 -0
- data/app/controllers/alchemy/admin/tags_controller.rb +76 -0
- data/app/controllers/alchemy/admin/trash_controller.rb +27 -0
- data/app/controllers/alchemy/api/base_controller.rb +19 -0
- data/app/controllers/alchemy/api/contents_controller.rb +35 -0
- data/app/controllers/alchemy/api/elements_controller.rb +29 -0
- data/app/controllers/alchemy/api/pages_controller.rb +32 -0
- data/app/controllers/alchemy/attachments_controller.rb +35 -0
- data/app/controllers/alchemy/base_controller.rb +106 -0
- data/app/controllers/alchemy/elements_controller.rb +27 -0
- data/app/controllers/alchemy/messages_controller.rb +114 -0
- data/app/controllers/alchemy/pages_controller.rb +211 -0
- data/app/controllers/alchemy/pictures_controller.rb +82 -0
- data/app/helpers/alchemy/admin/attachments_helper.rb +12 -0
- data/app/helpers/alchemy/admin/base_helper.rb +471 -0
- data/app/helpers/alchemy/admin/contents_helper.rb +113 -0
- data/app/helpers/alchemy/admin/elements_helper.rb +134 -0
- data/app/helpers/alchemy/admin/essences_helper.rb +120 -0
- data/app/helpers/alchemy/admin/form_helper.rb +30 -0
- data/app/helpers/alchemy/admin/navigation_helper.rb +238 -0
- data/app/helpers/alchemy/admin/pages_helper.rb +70 -0
- data/app/helpers/alchemy/admin/pictures_helper.rb +30 -0
- data/app/helpers/alchemy/admin/tags_helper.rb +102 -0
- data/app/helpers/alchemy/base_helper.rb +81 -0
- data/app/helpers/alchemy/elements_block_helper.rb +162 -0
- data/app/helpers/alchemy/elements_helper.rb +291 -0
- data/app/helpers/alchemy/essences_helper.rb +138 -0
- data/app/helpers/alchemy/pages_helper.rb +417 -0
- data/app/helpers/alchemy/url_helper.rb +76 -0
- data/app/mailers/alchemy/messages.rb +15 -0
- data/app/models/alchemy.rb +7 -0
- data/app/models/alchemy/attachment.rb +129 -0
- data/app/models/alchemy/cell.rb +94 -0
- data/app/models/alchemy/content.rb +255 -0
- data/app/models/alchemy/content/factory.rb +190 -0
- data/app/models/alchemy/element.rb +513 -0
- data/app/models/alchemy/element/definitions.rb +52 -0
- data/app/models/alchemy/element/presenters.rb +87 -0
- data/app/models/alchemy/element_to_page.rb +7 -0
- data/app/models/alchemy/essence_boolean.rb +19 -0
- data/app/models/alchemy/essence_date.rb +24 -0
- data/app/models/alchemy/essence_file.rb +42 -0
- data/app/models/alchemy/essence_html.rb +23 -0
- data/app/models/alchemy/essence_link.rb +20 -0
- data/app/models/alchemy/essence_picture.rb +152 -0
- data/app/models/alchemy/essence_richtext.rb +47 -0
- data/app/models/alchemy/essence_select.rb +18 -0
- data/app/models/alchemy/essence_text.rb +22 -0
- data/app/models/alchemy/folded_page.rb +16 -0
- data/app/models/alchemy/language.rb +144 -0
- data/app/models/alchemy/language/code.rb +22 -0
- data/app/models/alchemy/legacy_page_url.rb +20 -0
- data/app/models/alchemy/message.rb +40 -0
- data/app/models/alchemy/page.rb +409 -0
- data/app/models/alchemy/page/page_cells.rb +71 -0
- data/app/models/alchemy/page/page_elements.rb +272 -0
- data/app/models/alchemy/page/page_naming.rb +122 -0
- data/app/models/alchemy/page/page_natures.rb +114 -0
- data/app/models/alchemy/page/page_scopes.rb +95 -0
- data/app/models/alchemy/page/page_users.rb +58 -0
- data/app/models/alchemy/picture.rb +220 -0
- data/app/models/alchemy/picture/sweeping.rb +17 -0
- data/app/models/alchemy/picture/transformations.rb +256 -0
- data/app/models/alchemy/site.rb +91 -0
- data/app/models/alchemy/site/layout.rb +38 -0
- data/app/models/alchemy/tag.rb +24 -0
- data/app/models/alchemy/translations.rb +7 -0
- data/app/models/alchemy/translations/essence_body_updater.rb +64 -0
- data/app/models/alchemy/translations/translation_pusher.rb +18 -0
- data/app/models/alchemy/tree_node.rb +4 -0
- data/app/serializers/alchemy/attachment_serializer.rb +15 -0
- data/app/serializers/alchemy/cell_serializer.rb +18 -0
- data/app/serializers/alchemy/content_serializer.rb +20 -0
- data/app/serializers/alchemy/element_serializer.rb +20 -0
- data/app/serializers/alchemy/essence_boolean_serializer.rb +11 -0
- data/app/serializers/alchemy/essence_date_serializer.rb +11 -0
- data/app/serializers/alchemy/essence_file_serializer.rb +12 -0
- data/app/serializers/alchemy/essence_html_serializer.rb +11 -0
- data/app/serializers/alchemy/essence_link_serializer.rb +14 -0
- data/app/serializers/alchemy/essence_picture_serializer.rb +28 -0
- data/app/serializers/alchemy/essence_richtext_serializer.rb +12 -0
- data/app/serializers/alchemy/essence_select_serializer.rb +11 -0
- data/app/serializers/alchemy/essence_text_serializer.rb +22 -0
- data/app/serializers/alchemy/legacy_element_serializer.rb +17 -0
- data/app/serializers/alchemy/page_serializer.rb +29 -0
- data/app/serializers/alchemy/picture_serializer.rb +16 -0
- data/app/views/alchemy/_menubar.html.erb +16 -0
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +32 -0
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +63 -0
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +15 -0
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +39 -0
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +11 -0
- data/app/views/alchemy/admin/attachments/_tag_list.html.erb +14 -0
- data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +7 -0
- data/app/views/alchemy/admin/attachments/create.js.erb +11 -0
- data/app/views/alchemy/admin/attachments/destroy.js.erb +1 -0
- data/app/views/alchemy/admin/attachments/edit.html.erb +10 -0
- data/app/views/alchemy/admin/attachments/index.html.erb +29 -0
- data/app/views/alchemy/admin/attachments/new.html.erb +14 -0
- data/app/views/alchemy/admin/attachments/show.html.erb +3 -0
- data/app/views/alchemy/admin/clipboard/clear.js.erb +3 -0
- data/app/views/alchemy/admin/clipboard/index.html.erb +22 -0
- data/app/views/alchemy/admin/clipboard/insert.js.erb +19 -0
- data/app/views/alchemy/admin/clipboard/remove.js.erb +10 -0
- data/app/views/alchemy/admin/contents/_missing.html.erb +19 -0
- data/app/views/alchemy/admin/contents/create.js.erb +56 -0
- data/app/views/alchemy/admin/contents/destroy.js.erb +4 -0
- data/app/views/alchemy/admin/contents/new.html.erb +11 -0
- data/app/views/alchemy/admin/contents/order.js.erb +3 -0
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +38 -0
- data/app/views/alchemy/admin/dashboard/_recent_pages.html.erb +22 -0
- data/app/views/alchemy/admin/dashboard/_sites.html.erb +23 -0
- data/app/views/alchemy/admin/dashboard/_users.html.erb +19 -0
- data/app/views/alchemy/admin/dashboard/help.html.erb +21 -0
- data/app/views/alchemy/admin/dashboard/index.html.erb +44 -0
- data/app/views/alchemy/admin/dashboard/info.html.erb +64 -0
- data/app/views/alchemy/admin/elements/_add_picture.html.erb +14 -0
- data/app/views/alchemy/admin/elements/_element.html.erb +23 -0
- data/app/views/alchemy/admin/elements/_element_foot.html.erb +36 -0
- data/app/views/alchemy/admin/elements/_element_head.html.erb +23 -0
- data/app/views/alchemy/admin/elements/_new_element_form.html.erb +26 -0
- data/app/views/alchemy/admin/elements/_picture_gallery_editor.html.erb +24 -0
- data/app/views/alchemy/admin/elements/_refresh_editor.js.erb +8 -0
- data/app/views/alchemy/admin/elements/create.js.erb +46 -0
- data/app/views/alchemy/admin/elements/fold.js.erb +28 -0
- data/app/views/alchemy/admin/elements/index.html.erb +26 -0
- data/app/views/alchemy/admin/elements/list.html.erb +16 -0
- data/app/views/alchemy/admin/elements/new.html.erb +25 -0
- data/app/views/alchemy/admin/elements/order.js.erb +14 -0
- data/app/views/alchemy/admin/elements/trash.js.erb +12 -0
- data/app/views/alchemy/admin/elements/update.js.erb +28 -0
- data/app/views/alchemy/admin/essence_files/assign.js.erb +9 -0
- data/app/views/alchemy/admin/essence_files/edit.html.erb +18 -0
- data/app/views/alchemy/admin/essence_pictures/assign.js.erb +18 -0
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +50 -0
- data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +24 -0
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +28 -0
- data/app/views/alchemy/admin/essence_pictures/save_link.js.erb +3 -0
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +9 -0
- data/app/views/alchemy/admin/languages/_form.html.erb +14 -0
- data/app/views/alchemy/admin/languages/_language.html.erb +42 -0
- data/app/views/alchemy/admin/languages/_table.html.erb +37 -0
- data/app/views/alchemy/admin/languages/index.html.erb +23 -0
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +63 -0
- data/app/views/alchemy/admin/layoutpages/edit.html.erb +15 -0
- data/app/views/alchemy/admin/layoutpages/index.html.erb +41 -0
- data/app/views/alchemy/admin/leave.html.erb +11 -0
- data/app/views/alchemy/admin/legacy_page_urls/_form.html.erb +5 -0
- data/app/views/alchemy/admin/legacy_page_urls/_label.html.erb +1 -0
- data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +13 -0
- data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +20 -0
- data/app/views/alchemy/admin/legacy_page_urls/create.js.erb +10 -0
- data/app/views/alchemy/admin/legacy_page_urls/destroy.js.erb +6 -0
- data/app/views/alchemy/admin/legacy_page_urls/update.js.erb +2 -0
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +54 -0
- data/app/views/alchemy/admin/pages/_external_link.html.erb +31 -0
- data/app/views/alchemy/admin/pages/_file_link.html.erb +31 -0
- data/app/views/alchemy/admin/pages/_form.html.erb +62 -0
- data/app/views/alchemy/admin/pages/_internal_link.html.erb +41 -0
- data/app/views/alchemy/admin/pages/_legacy_urls.html.erb +23 -0
- data/app/views/alchemy/admin/pages/_locked_page.html.erb +24 -0
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +11 -0
- data/app/views/alchemy/admin/pages/_page.html.erb +112 -0
- data/app/views/alchemy/admin/pages/_page_for_links.html.erb +45 -0
- data/app/views/alchemy/admin/pages/_page_status.html.erb +14 -0
- data/app/views/alchemy/admin/pages/_sitemap.html.erb +8 -0
- data/app/views/alchemy/admin/pages/_tinymce_custom_config.html.erb +13 -0
- data/app/views/alchemy/admin/pages/configure.html.erb +16 -0
- data/app/views/alchemy/admin/pages/configure_external.html.erb +33 -0
- data/app/views/alchemy/admin/pages/destroy.js.erb +19 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +206 -0
- data/app/views/alchemy/admin/pages/flush.js.erb +2 -0
- data/app/views/alchemy/admin/pages/fold.js.erb +3 -0
- data/app/views/alchemy/admin/pages/index.html.erb +101 -0
- data/app/views/alchemy/admin/pages/info.html.erb +43 -0
- data/app/views/alchemy/admin/pages/link.html.erb +16 -0
- data/app/views/alchemy/admin/pages/locked.html.erb +3 -0
- data/app/views/alchemy/admin/pages/new.html.erb +26 -0
- data/app/views/alchemy/admin/pages/show.html.erb +1 -0
- data/app/views/alchemy/admin/pages/sort.js.erb +5 -0
- data/app/views/alchemy/admin/pages/unlock.js.erb +8 -0
- data/app/views/alchemy/admin/pages/update.js.erb +37 -0
- data/app/views/alchemy/admin/partials/_autocomplete_tag_list.html.erb +1 -0
- data/app/views/alchemy/admin/partials/_flash.html.erb +4 -0
- data/app/views/alchemy/admin/partials/_flash_notices.html.erb +5 -0
- data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +11 -0
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +12 -0
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +33 -0
- data/app/views/alchemy/admin/partials/_routes.html.erb +25 -0
- data/app/views/alchemy/admin/partials/_search_form.html.erb +20 -0
- data/app/views/alchemy/admin/partials/_sub_navigation.html.erb +8 -0
- data/app/views/alchemy/admin/partials/_toolbar_button.html.erb +25 -0
- data/app/views/alchemy/admin/partials/_upload_form.html.erb +67 -0
- data/app/views/alchemy/admin/pictures/_archive.html.erb +53 -0
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +14 -0
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +78 -0
- data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +33 -0
- data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +11 -0
- data/app/views/alchemy/admin/pictures/_picture.html.erb +87 -0
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +28 -0
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +16 -0
- data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +8 -0
- data/app/views/alchemy/admin/pictures/edit.html.erb +13 -0
- data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +30 -0
- data/app/views/alchemy/admin/pictures/flush.js.erb +2 -0
- data/app/views/alchemy/admin/pictures/index.html.erb +109 -0
- data/app/views/alchemy/admin/pictures/index.js.erb +3 -0
- data/app/views/alchemy/admin/pictures/info.html.erb +38 -0
- data/app/views/alchemy/admin/pictures/new.html.erb +16 -0
- data/app/views/alchemy/admin/pictures/show.html.erb +11 -0
- data/app/views/alchemy/admin/resources/_form.html.erb +13 -0
- data/app/views/alchemy/admin/resources/_resource.html.erb +30 -0
- data/app/views/alchemy/admin/resources/_table.html.erb +25 -0
- data/app/views/alchemy/admin/resources/edit.html.erb +1 -0
- data/app/views/alchemy/admin/resources/index.csv.erb +13 -0
- data/app/views/alchemy/admin/resources/index.html.erb +32 -0
- data/app/views/alchemy/admin/resources/new.html.erb +1 -0
- data/app/views/alchemy/admin/sites/index.html.erb +23 -0
- data/app/views/alchemy/admin/tags/_radio_tag.html.erb +6 -0
- data/app/views/alchemy/admin/tags/_tag.html.erb +30 -0
- data/app/views/alchemy/admin/tags/edit.html.erb +24 -0
- data/app/views/alchemy/admin/tags/index.html.erb +52 -0
- data/app/views/alchemy/admin/tags/new.html.erb +7 -0
- data/app/views/alchemy/admin/trash/clear.js.erb +4 -0
- data/app/views/alchemy/admin/trash/index.html.erb +29 -0
- data/app/views/alchemy/attachments/show.html.erb +1 -0
- data/app/views/alchemy/base/500.html.erb +26 -0
- data/app/views/alchemy/base/error_notice.html.erb +1 -0
- data/app/views/alchemy/base/error_notice.js.erb +2 -0
- data/app/views/alchemy/base/permission_denied.js.erb +3 -0
- data/app/views/alchemy/base/redirect.js.erb +12 -0
- data/app/views/alchemy/base/update.js.erb +5 -0
- data/app/views/alchemy/breadcrumb/_page.html.erb +16 -0
- data/app/views/alchemy/breadcrumb/_separator.html.erb +1 -0
- data/app/views/alchemy/breadcrumb/_wrapper.html.erb +13 -0
- data/app/views/alchemy/elements/_editor_not_found.html.erb +5 -0
- data/app/views/alchemy/elements/_view_not_found.html.erb +1 -0
- data/app/views/alchemy/elements/show.html.erb +1 -0
- data/app/views/alchemy/elements/show.js.erb +1 -0
- data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +16 -0
- data/app/views/alchemy/essences/_essence_boolean_view.html.erb +3 -0
- data/app/views/alchemy/essences/_essence_date_editor.html.erb +19 -0
- data/app/views/alchemy/essences/_essence_date_view.html.erb +11 -0
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +57 -0
- data/app/views/alchemy/essences/_essence_file_view.html.erb +10 -0
- data/app/views/alchemy/essences/_essence_html_editor.html.erb +9 -0
- data/app/views/alchemy/essences/_essence_html_view.html.erb +3 -0
- data/app/views/alchemy/essences/_essence_link_editor.html.erb +25 -0
- data/app/views/alchemy/essences/_essence_link_view.html.erb +11 -0
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +59 -0
- data/app/views/alchemy/essences/_essence_picture_view.html.erb +5 -0
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +13 -0
- data/app/views/alchemy/essences/_essence_richtext_view.html.erb +5 -0
- data/app/views/alchemy/essences/_essence_select_editor.html.erb +25 -0
- data/app/views/alchemy/essences/_essence_select_view.html.erb +3 -0
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +18 -0
- data/app/views/alchemy/essences/_essence_text_view.html.erb +18 -0
- data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +61 -0
- data/app/views/alchemy/essences/shared/_linkable_essence_tools.html.erb +19 -0
- data/app/views/alchemy/language_links/_language.html.erb +12 -0
- data/app/views/alchemy/language_links/_spacer.html.erb +1 -0
- data/app/views/alchemy/messages/contact_form_mail.de.text.erb +12 -0
- data/app/views/alchemy/messages/contact_form_mail.en.text.erb +12 -0
- data/app/views/alchemy/messages/contact_form_mail.es.text.erb +12 -0
- data/app/views/alchemy/messages/new.html.erb +1 -0
- data/app/views/alchemy/navigation/_image_link.html.erb +14 -0
- data/app/views/alchemy/navigation/_link.html.erb +20 -0
- data/app/views/alchemy/navigation/_renderer.html.erb +30 -0
- data/app/views/alchemy/pages/show.html.erb +1 -0
- data/app/views/alchemy/pages/show.rss.builder +20 -0
- data/app/views/alchemy/pages/sitemap.xml.erb +6 -0
- data/app/views/kaminari/alchemy/_first_page.html.erb +11 -0
- data/app/views/kaminari/alchemy/_gap.html.erb +8 -0
- data/app/views/kaminari/alchemy/_last_page.html.erb +11 -0
- data/app/views/kaminari/alchemy/_next_page.html.erb +13 -0
- data/app/views/kaminari/alchemy/_page.html.erb +14 -0
- data/app/views/kaminari/alchemy/_paginator.html.erb +23 -0
- data/app/views/kaminari/alchemy/_prev_page.html.erb +13 -0
- data/app/views/layouts/alchemy/admin.html.erb +109 -0
- data/app/views/layouts/alchemy/sitemap.xml.erb +4 -0
- data/bin/alchemy +267 -0
- data/bin/rails +8 -0
- data/config/alchemy/config.yml +189 -0
- data/config/alchemy/modules.yml +88 -0
- data/config/initializers/dragonfly.rb +25 -0
- data/config/initializers/simple_form.rb +144 -0
- data/config/locales/alchemy.de.yml +918 -0
- data/config/locales/alchemy.en.yml +920 -0
- data/config/locales/alchemy.es.yml +958 -0
- data/config/locales/alchemy.fr.yml +942 -0
- data/config/locales/alchemy.nl.yml +921 -0
- data/config/locales/alchemy.ru.yml +837 -0
- data/config/locales/simple_form.de.yml +26 -0
- data/config/locales/simple_form.en.yml +25 -0
- data/config/locales/simple_form.es.yml +6 -0
- data/config/locales/simple_form.fr.yml +26 -0
- data/config/locales/simple_form.nl.yml +25 -0
- data/config/locales/simple_form.ru.yml +25 -0
- data/config/routes.rb +164 -0
- data/db/migrate/20130827094554_alchemy_two_point_six.rb +380 -0
- data/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +5 -0
- data/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +5 -0
- data/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +5 -0
- data/lib/alchemy/auth_accessors.rb +104 -0
- data/lib/alchemy/cache_digests/template_tracker.rb +65 -0
- data/lib/alchemy/config.rb +65 -0
- data/lib/alchemy/configuration_methods.rb +29 -0
- data/lib/alchemy/controller_actions.rb +138 -0
- data/lib/alchemy/engine.rb +104 -0
- data/lib/alchemy/errors.rb +82 -0
- data/lib/alchemy/essence.rb +232 -0
- data/lib/alchemy/filetypes.rb +33 -0
- data/lib/alchemy/forms/builder.rb +23 -0
- data/lib/alchemy/hints.rb +57 -0
- data/lib/alchemy/i18n.rb +70 -0
- data/lib/alchemy/kaminari/scoped_pagination_url_helper.rb +13 -0
- data/lib/alchemy/locale.rb +65 -0
- data/lib/alchemy/logger.rb +15 -0
- data/lib/alchemy/middleware/rescue_old_cookies.rb +27 -0
- data/lib/alchemy/modules.rb +75 -0
- data/lib/alchemy/mount_point.rb +47 -0
- data/lib/alchemy/name_conversions.rb +28 -0
- data/lib/alchemy/on_page_layout.rb +58 -0
- data/lib/alchemy/page_layout.rb +183 -0
- data/lib/alchemy/permissions.rb +221 -0
- data/lib/alchemy/picture_attributes.rb +29 -0
- data/lib/alchemy/resource.rb +238 -0
- data/lib/alchemy/resources_helper.rb +135 -0
- data/lib/alchemy/routing_constraints.rb +49 -0
- data/lib/alchemy/seeder.rb +53 -0
- data/lib/alchemy/shell.rb +102 -0
- data/lib/alchemy/ssl_protection.rb +30 -0
- data/lib/alchemy/tasks/helpers.rb +83 -0
- data/lib/alchemy/test_support/controller_requests.rb +73 -0
- data/lib/alchemy/test_support/essence_shared_examples.rb +286 -0
- data/lib/alchemy/test_support/factories.rb +147 -0
- data/lib/alchemy/test_support/integration_helpers.rb +33 -0
- data/lib/alchemy/tinymce.rb +68 -0
- data/lib/alchemy/touching.rb +41 -0
- data/lib/alchemy/upgrader.rb +80 -0
- data/lib/alchemy/upgrader/three_point_one.rb +54 -0
- data/lib/alchemy/upgrader/three_point_two.rb +69 -0
- data/lib/alchemy/upgrader/three_point_zero.rb +93 -0
- data/lib/alchemy/userstamp.rb +10 -0
- data/lib/alchemy/version.rb +7 -0
- data/lib/alchemy_cms.rb +5 -0
- data/lib/rails/generators/alchemy/base.rb +41 -0
- data/lib/rails/generators/alchemy/elements/elements_generator.rb +37 -0
- data/lib/rails/generators/alchemy/elements/templates/editor.html.erb +14 -0
- data/lib/rails/generators/alchemy/elements/templates/editor.html.haml +13 -0
- data/lib/rails/generators/alchemy/elements/templates/editor.html.slim +12 -0
- data/lib/rails/generators/alchemy/elements/templates/view.html.erb +27 -0
- data/lib/rails/generators/alchemy/elements/templates/view.html.haml +20 -0
- data/lib/rails/generators/alchemy/elements/templates/view.html.slim +20 -0
- data/lib/rails/generators/alchemy/essence/essence_generator.rb +52 -0
- data/lib/rails/generators/alchemy/essence/templates/editor.html.erb +17 -0
- data/lib/rails/generators/alchemy/essence/templates/view.html.erb +2 -0
- data/lib/rails/generators/alchemy/install/files/_article_editor.html.erb +5 -0
- data/lib/rails/generators/alchemy/install/files/_article_view.html.erb +7 -0
- data/lib/rails/generators/alchemy/install/files/_standard.html.erb +1 -0
- data/lib/rails/generators/alchemy/install/files/alchemy.de.yml +31 -0
- data/lib/rails/generators/alchemy/install/files/alchemy.elements.css.scss +30 -0
- data/lib/rails/generators/alchemy/install/files/alchemy.en.yml +31 -0
- data/lib/rails/generators/alchemy/install/files/alchemy.es.yml +31 -0
- data/lib/rails/generators/alchemy/install/files/application.html.erb +14 -0
- data/lib/rails/generators/alchemy/install/install_generator.rb +69 -0
- data/lib/rails/generators/alchemy/install/templates/elements.yml.tt +21 -0
- data/lib/rails/generators/alchemy/install/templates/page_layouts.yml.tt +10 -0
- data/lib/rails/generators/alchemy/module/module_generator.rb +30 -0
- data/lib/rails/generators/alchemy/module/templates/ability.rb.tt +11 -0
- data/lib/rails/generators/alchemy/module/templates/controller.rb.tt +2 -0
- data/lib/rails/generators/alchemy/module/templates/module_config.rb.tt +17 -0
- data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +24 -0
- data/lib/rails/generators/alchemy/page_layouts/templates/layout.html.erb +1 -0
- data/lib/rails/generators/alchemy/page_layouts/templates/layout.html.haml +1 -0
- data/lib/rails/generators/alchemy/page_layouts/templates/layout.html.slim +1 -0
- data/lib/rails/generators/alchemy/site_layouts/site_layouts_generator.rb +23 -0
- data/lib/rails/generators/alchemy/site_layouts/templates/layout.html.erb +1 -0
- data/lib/rails/generators/alchemy/site_layouts/templates/layout.html.haml +1 -0
- data/lib/rails/generators/alchemy/site_layouts/templates/layout.html.slim +1 -0
- data/lib/rails/generators/alchemy/views/views_generator.rb +41 -0
- data/lib/rails/templates/alchemy.rb +7 -0
- data/lib/tasks/alchemy/convert.rake +39 -0
- data/lib/tasks/alchemy/db.rake +22 -0
- data/lib/tasks/alchemy/install.rake +61 -0
- data/lib/tasks/alchemy/tidy.rake +102 -0
- data/lib/tasks/alchemy/upgrade.rake +28 -0
- data/spec/controllers/admin/attachments_controller_spec.rb +211 -0
- data/spec/controllers/admin/base_controller_spec.rb +74 -0
- data/spec/controllers/admin/clipboard_controller_spec.rb +60 -0
- data/spec/controllers/admin/contents_controller_spec.rb +72 -0
- data/spec/controllers/admin/dashboard_controller_spec.rb +139 -0
- data/spec/controllers/admin/elements_controller_spec.rb +473 -0
- data/spec/controllers/admin/essence_files_controller_spec.rb +71 -0
- data/spec/controllers/admin/essence_pictures_controller_spec.rb +202 -0
- data/spec/controllers/admin/languages_controller_spec.rb +61 -0
- data/spec/controllers/admin/layoutpages_controller_spec.rb +27 -0
- data/spec/controllers/admin/pages_controller_spec.rb +553 -0
- data/spec/controllers/admin/pictures_controller_spec.rb +358 -0
- data/spec/controllers/admin/resources_controller_spec.rb +53 -0
- data/spec/controllers/admin/trash_controller_spec.rb +68 -0
- data/spec/controllers/alchemy/admin/tags_controller_spec.rb +63 -0
- data/spec/controllers/alchemy/api/contents_controller_spec.rb +126 -0
- data/spec/controllers/alchemy/api/elements_controller_spec.rb +125 -0
- data/spec/controllers/alchemy/api/pages_controller_spec.rb +134 -0
- data/spec/controllers/attachments_controller_spec.rb +64 -0
- data/spec/controllers/base_controller_spec.rb +51 -0
- data/spec/controllers/elements_controller_spec.rb +48 -0
- data/spec/controllers/messages_controller_spec.rb +199 -0
- data/spec/controllers/pages_controller_spec.rb +265 -0
- data/spec/controllers/pictures_controller_spec.rb +393 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/admin/events_controller.rb +3 -0
- data/spec/dummy/app/controllers/application_controller.rb +15 -0
- data/spec/dummy/app/controllers/login_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/ability.rb +9 -0
- data/spec/dummy/app/models/dummy_model.rb +3 -0
- data/spec/dummy/app/models/dummy_user.rb +11 -0
- data/spec/dummy/app/models/event.rb +10 -0
- data/spec/dummy/app/models/location.rb +3 -0
- data/spec/dummy/app/views/alchemy/elements/_all_you_can_eat_editor.html.erb +11 -0
- data/spec/dummy/app/views/alchemy/elements/_article_editor.html.erb +10 -0
- data/spec/dummy/app/views/alchemy/elements/_article_view.html.erb +25 -0
- data/spec/dummy/app/views/alchemy/elements/_headline_editor.html.erb +1 -0
- data/spec/dummy/app/views/alchemy/elements/_headline_view.html.erb +1 -0
- data/spec/dummy/app/views/alchemy/elements/_news_view.html.erb +11 -0
- data/spec/dummy/app/views/alchemy/page_layouts/_standard.html.erb +14 -0
- data/spec/dummy/app/views/layouts/application.html.erb +17 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/alchemy/cells.yml +5 -0
- data/spec/dummy/config/alchemy/elements.yml +112 -0
- data/spec/dummy/config/alchemy/page_layouts.yml +32 -0
- data/spec/dummy/config/application.rb +32 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +32 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +77 -0
- data/spec/dummy/config/environments/test.rb +43 -0
- data/spec/dummy/config/initializers/alchemy.rb +2 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/routes.rb +12 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/migrate/20121026104128_create_events.rb +20 -0
- data/spec/dummy/db/migrate/20130328101418_create_locations.rb +9 -0
- data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +380 -0
- data/spec/dummy/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +5 -0
- data/spec/dummy/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +5 -0
- data/spec/dummy/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +5 -0
- data/spec/dummy/db/migrate/20131209225243_create_dummy_users.rb +9 -0
- data/spec/dummy/db/migrate/20150122213511_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +31 -0
- data/spec/dummy/db/migrate/20150122213512_add_missing_unique_indices.acts_as_taggable_on_engine.rb +20 -0
- data/spec/dummy/db/migrate/20150122213513_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +15 -0
- data/spec/dummy/db/migrate/20150122213514_add_missing_taggable_index.acts_as_taggable_on_engine.rb +10 -0
- data/spec/dummy/db/migrate/20150412103152_create_dummy_model.rb +7 -0
- data/spec/dummy/db/schema.rb +322 -0
- data/spec/dummy/db/seeds.rb +1 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/features/admin/dashboard_spec.rb +82 -0
- data/spec/features/admin/language_tree_feature_spec.rb +33 -0
- data/spec/features/admin/legacy_page_url_management_spec.rb +62 -0
- data/spec/features/admin/link_overlay_spec.rb +54 -0
- data/spec/features/admin/locale_select_feature_spec.rb +25 -0
- data/spec/features/admin/modules_integration_spec.rb +24 -0
- data/spec/features/admin/navigation_feature_spec.rb +13 -0
- data/spec/features/admin/page_creation_feature_spec.rb +51 -0
- data/spec/features/admin/page_editing_feature_spec.rb +135 -0
- data/spec/features/admin/picture_library_integration_spec.rb +62 -0
- data/spec/features/admin/resources_integration_spec.rb +133 -0
- data/spec/features/admin/site_select_feature_spec.rb +32 -0
- data/spec/features/admin/tinymce_feature_spec.rb +34 -0
- data/spec/features/navigation_spec.rb +9 -0
- data/spec/features/page_feature_spec.rb +287 -0
- data/spec/features/picture_security_spec.rb +35 -0
- data/spec/features/security_spec.rb +24 -0
- data/spec/features/translation_integration_spec.rb +51 -0
- data/spec/fixtures/500x500.png +0 -0
- data/spec/fixtures/80x60.png +0 -0
- data/spec/fixtures/image with spaces.png +0 -0
- data/spec/fixtures/image.png +0 -0
- data/spec/fixtures/image2.PNG +0 -0
- data/spec/fixtures/image3.jpeg +0 -0
- data/spec/helpers/admin/attachments_helper_spec.rb +15 -0
- data/spec/helpers/admin/base_helper_spec.rb +270 -0
- data/spec/helpers/admin/contents_helper_spec.rb +65 -0
- data/spec/helpers/admin/elements_helper_spec.rb +178 -0
- data/spec/helpers/admin/essences_helper_spec.rb +140 -0
- data/spec/helpers/admin/navigation_helper_spec.rb +288 -0
- data/spec/helpers/admin/pages_helper_spec.rb +95 -0
- data/spec/helpers/admin/pictures_helper_spec.rb +29 -0
- data/spec/helpers/admin/tags_helper_spec.rb +113 -0
- data/spec/helpers/base_helper_spec.rb +45 -0
- data/spec/helpers/elements_block_helper_spec.rb +135 -0
- data/spec/helpers/elements_helper_spec.rb +311 -0
- data/spec/helpers/essences_helper_spec.rb +156 -0
- data/spec/helpers/pages_helper_spec.rb +413 -0
- data/spec/helpers/picture_url_helpers_spec.rb +35 -0
- data/spec/helpers/url_helper_spec.rb +174 -0
- data/spec/javascripts/alchemy/dialog_spec.coffee +82 -0
- data/spec/javascripts/alchemy/link_overlay_spec.coffee +25 -0
- data/spec/javascripts/alchemy_integration_spec.coffee +3 -0
- data/spec/javascripts/fixtures/select.html +3 -0
- data/spec/javascripts/helpers/mock-ajax.js +199 -0
- data/spec/javascripts/helpers/test_responses/test_responses.js +1 -0
- data/spec/javascripts/support/jasmine.yml +29 -0
- data/spec/libraries/auth_accessors_spec.rb +40 -0
- data/spec/libraries/config_spec.rb +112 -0
- data/spec/libraries/controller_actions_spec.rb +133 -0
- data/spec/libraries/i18n_spec.rb +30 -0
- data/spec/libraries/kaminari/scoped_pagination_url_helper_spec.rb +30 -0
- data/spec/libraries/modules_spec.rb +67 -0
- data/spec/libraries/mount_point_spec.rb +77 -0
- data/spec/libraries/on_page_layout_spec.rb +112 -0
- data/spec/libraries/page_layout_spec.rb +144 -0
- data/spec/libraries/permissions_spec.rb +261 -0
- data/spec/libraries/resource_spec.rb +371 -0
- data/spec/libraries/resources_helper_spec.rb +144 -0
- data/spec/libraries/shell_spec.rb +125 -0
- data/spec/libraries/template_tracker_spec.rb +94 -0
- data/spec/libraries/tinymce_spec.rb +67 -0
- data/spec/libraries/userstamp_spec.rb +10 -0
- data/spec/mailers/messages_spec.rb +23 -0
- data/spec/models/attachment_spec.rb +227 -0
- data/spec/models/cell_spec.rb +102 -0
- data/spec/models/content_spec.rb +404 -0
- data/spec/models/dummy_model_spec.rb +11 -0
- data/spec/models/element_spec.rb +617 -0
- data/spec/models/element_to_page_spec.rb +14 -0
- data/spec/models/essence_boolean_spec.rb +10 -0
- data/spec/models/essence_date_spec.rb +29 -0
- data/spec/models/essence_file_spec.rb +43 -0
- data/spec/models/essence_html_spec.rb +18 -0
- data/spec/models/essence_link_spec.rb +10 -0
- data/spec/models/essence_picture_spec.rb +183 -0
- data/spec/models/essence_richtext_spec.rb +18 -0
- data/spec/models/essence_select_spec.rb +10 -0
- data/spec/models/essence_text_spec.rb +114 -0
- data/spec/models/language_spec.rb +123 -0
- data/spec/models/legacy_page_url_spec.rb +21 -0
- data/spec/models/message_spec.rb +55 -0
- data/spec/models/page_spec.rb +1896 -0
- data/spec/models/picture_spec.rb +330 -0
- data/spec/models/site_spec.rb +233 -0
- data/spec/models/tag_spec.rb +31 -0
- data/spec/routing/api_routing_spec.rb +150 -0
- data/spec/routing/routing_spec.rb +234 -0
- data/spec/spec_helper.rb +89 -0
- data/spec/support/ci/install_phantomjs +7 -0
- data/spec/support/hint_examples.rb +30 -0
- data/spec/support/rspec-activemodel-mocks_patch.rb +8 -0
- data/spec/support/test_tweaks.rb +31 -0
- data/spec/support/transformation_examples.rb +180 -0
- data/spec/tasks/helpers_spec.rb +219 -0
- data/spec/views/essences/essence_boolean_editor_spec.rb +33 -0
- data/spec/views/essences/essence_boolean_view_spec.rb +25 -0
- data/spec/views/essences/essence_date_view_spec.rb +39 -0
- data/spec/views/essences/essence_file_editor_spec.rb +61 -0
- data/spec/views/essences/essence_file_view_spec.rb +24 -0
- data/spec/views/essences/essence_html_view_spec.rb +22 -0
- data/spec/views/essences/essence_link_view_spec.rb +41 -0
- data/spec/views/essences/essence_picture_view_spec.rb +129 -0
- data/spec/views/essences/essence_richtext_view_spec.rb +32 -0
- data/spec/views/essences/essence_select_view_spec.rb +12 -0
- data/spec/views/essences/essence_text_view_spec.rb +52 -0
- data/vendor/assets/images/Jcrop.gif +0 -0
- data/vendor/assets/javascripts/fileupload/jquery.fileupload-process.js +175 -0
- data/vendor/assets/javascripts/fileupload/jquery.fileupload-validate.js +122 -0
- data/vendor/assets/javascripts/fileupload/jquery.fileupload.js +1467 -0
- data/vendor/assets/javascripts/fileupload/jquery.iframe-transport.js +217 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js +22 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.floatThead.min.js +3 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js +7 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.nestedSortable.js +435 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +296 -0
- data/vendor/assets/javascripts/keymaster.js +296 -0
- data/vendor/assets/javascripts/requestAnimationFrame.js +31 -0
- data/vendor/assets/javascripts/spin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/langs/de.js +200 -0
- data/vendor/assets/javascripts/tinymce/langs/es.js +200 -0
- data/vendor/assets/javascripts/tinymce/langs/fr.js +200 -0
- data/vendor/assets/javascripts/tinymce/langs/nl.js +200 -0
- data/vendor/assets/javascripts/tinymce/langs/ru.js +200 -0
- data/vendor/assets/javascripts/tinymce/license.txt +504 -0
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.min.js +1 -0
- data/vendor/assets/javascripts/tinymce/tinymce.min.js +13 -0
- data/vendor/assets/stylesheets/jquery.Jcrop.min.css +28 -0
- metadata +1453 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 940944cd5eba098b4e9e545e86b102a8200cc7dd
|
4
|
+
data.tar.gz: 99085a1795212529e6a83ffea2f28c06620c0036
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8c4572e28d7a37d71603956b5ec3b8cee9b85986176a45e52b769701a4137244c25950a12fd235762b339aa56d848ff9293e214ddd5e77fcc8a936fb8a22d575
|
7
|
+
data.tar.gz: 4892b8c4dc662984496887ede638288e4a07f958fdbaddc46b34e643c58960e9c6f5cfb290e16fd00f7f42d4b275bd53a4293f393ba8664ea5347f53e66397bc
|
data/.editorconfig
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# EditorConfig is awesome: http://EditorConfig.org
|
2
|
+
|
3
|
+
# top-most EditorConfig file
|
4
|
+
root = true
|
5
|
+
|
6
|
+
# Unix-style newlines with a newline ending every file
|
7
|
+
[*]
|
8
|
+
charset = utf-8
|
9
|
+
end_of_line = lf
|
10
|
+
indent_size = 2
|
11
|
+
indent_style = space
|
12
|
+
insert_final_newline = true
|
13
|
+
trim_trailing_whitespace = true
|
14
|
+
tab_width = 2
|
15
|
+
|
16
|
+
[**.rb]
|
17
|
+
max_line_length = 100
|
18
|
+
|
19
|
+
[**.js, **.coffee]
|
20
|
+
max_line_length = 100
|
21
|
+
|
22
|
+
[*.md]
|
23
|
+
trim_trailing_whitespace = false
|
data/.gitignore
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
.idea
|
2
|
+
.yardoc
|
3
|
+
.DS_Store
|
4
|
+
.svn
|
5
|
+
doc/
|
6
|
+
rdoc/
|
7
|
+
Gemfile.lock
|
8
|
+
pkg
|
9
|
+
tmp
|
10
|
+
log
|
11
|
+
.sass-cache
|
12
|
+
spec/dummy/uploads/
|
13
|
+
spec/dummy/db/*.sqlite3*
|
14
|
+
spec/dummy/public/assets
|
15
|
+
spec/dummy/config/locales/**/*
|
16
|
+
.rvmrc
|
17
|
+
/coverage/
|
18
|
+
*.gem
|
19
|
+
/index/
|
20
|
+
/.bundle/
|
21
|
+
.rbenv-version
|
data/.hound.yml
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,861 @@
|
|
1
|
+
AllCops:
|
2
|
+
# Include common Ruby source files.
|
3
|
+
Include:
|
4
|
+
- '**/*.gemspec'
|
5
|
+
- '**/*.jbuilder'
|
6
|
+
- '**/*.rake'
|
7
|
+
- '**/Gemfile'
|
8
|
+
- '**/Rakefile'
|
9
|
+
- '**/Guardfile'
|
10
|
+
Exclude:
|
11
|
+
- 'vendor/**/*'
|
12
|
+
- 'db/schema.rb'
|
13
|
+
- 'spec/**/*'
|
14
|
+
- '*.gemspec'
|
15
|
+
# By default, the rails cops are not run. Override in project or home
|
16
|
+
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
17
|
+
RunRailsCops: true
|
18
|
+
# Cop names are not displayed in offense messages by default. Change behavior
|
19
|
+
# by overriding DisplayCopNames, or by giving the -D/--display-cop-names
|
20
|
+
# option.
|
21
|
+
DisplayCopNames: true
|
22
|
+
# Style guide URLs are not displayed in offense messages by default. Change
|
23
|
+
# behavior by overriding DisplayStyleGuide, or by giving the
|
24
|
+
# -S/--display-style-guide option.
|
25
|
+
DisplayStyleGuide: true
|
26
|
+
# Additional cops that do not reference a style guide rule may be enabled by
|
27
|
+
# default. Change behavior by overriding StyleGuideCopsOnly, or by giving
|
28
|
+
# the --only-guide-cops option.
|
29
|
+
StyleGuideCopsOnly: true
|
30
|
+
|
31
|
+
# Indent private/protected/public as deep as method definitions
|
32
|
+
Style/AccessModifierIndentation:
|
33
|
+
EnforcedStyle: indent
|
34
|
+
SupportedStyles:
|
35
|
+
- outdent
|
36
|
+
- indent
|
37
|
+
|
38
|
+
# Align the elements of a hash literal if they span more than one line.
|
39
|
+
Style/AlignHash:
|
40
|
+
# Alignment of entries using hash rocket as separator. Valid values are:
|
41
|
+
#
|
42
|
+
# key - left alignment of keys
|
43
|
+
# 'a' => 2
|
44
|
+
# 'bb' => 3
|
45
|
+
# separator - alignment of hash rockets, keys are right aligned
|
46
|
+
# 'a' => 2
|
47
|
+
# 'bb' => 3
|
48
|
+
# table - left alignment of keys, hash rockets, and values
|
49
|
+
# 'a' => 2
|
50
|
+
# 'bb' => 3
|
51
|
+
EnforcedHashRocketStyle: key
|
52
|
+
# Alignment of entries using colon as separator. Valid values are:
|
53
|
+
#
|
54
|
+
# key - left alignment of keys
|
55
|
+
# a: 0
|
56
|
+
# bb: 1
|
57
|
+
# separator - alignment of colons, keys are right aligned
|
58
|
+
# a: 0
|
59
|
+
# bb: 1
|
60
|
+
# table - left alignment of keys and values
|
61
|
+
# a: 0
|
62
|
+
# bb: 1
|
63
|
+
EnforcedColonStyle: key
|
64
|
+
# Select whether hashes that are the last argument in a method call should be
|
65
|
+
# inspected? Valid values are:
|
66
|
+
#
|
67
|
+
# always_inspect - Inspect both implicit and explicit hashes.
|
68
|
+
# Registers an offense for:
|
69
|
+
# function(a: 1,
|
70
|
+
# b: 2)
|
71
|
+
# Registers an offense for:
|
72
|
+
# function({a: 1,
|
73
|
+
# b: 2})
|
74
|
+
# always_ignore - Ignore both implicit and explicit hashes.
|
75
|
+
# Accepts:
|
76
|
+
# function(a: 1,
|
77
|
+
# b: 2)
|
78
|
+
# Accepts:
|
79
|
+
# function({a: 1,
|
80
|
+
# b: 2})
|
81
|
+
# ignore_implicit - Ignore only implicit hashes.
|
82
|
+
# Accepts:
|
83
|
+
# function(a: 1,
|
84
|
+
# b: 2)
|
85
|
+
# Registers an offense for:
|
86
|
+
# function({a: 1,
|
87
|
+
# b: 2})
|
88
|
+
# ignore_explicit - Ignore only explicit hashes.
|
89
|
+
# Accepts:
|
90
|
+
# function({a: 1,
|
91
|
+
# b: 2})
|
92
|
+
# Registers an offense for:
|
93
|
+
# function(a: 1,
|
94
|
+
# b: 2)
|
95
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
96
|
+
SupportedLastArgumentHashStyles:
|
97
|
+
- always_inspect
|
98
|
+
- always_ignore
|
99
|
+
- ignore_implicit
|
100
|
+
- ignore_explicit
|
101
|
+
|
102
|
+
Style/AlignParameters:
|
103
|
+
# Alignment of parameters in multi-line method calls.
|
104
|
+
#
|
105
|
+
# The `with_first_parameter` style aligns the following lines along the same
|
106
|
+
# column as the first parameter.
|
107
|
+
#
|
108
|
+
# method_call(a,
|
109
|
+
# b)
|
110
|
+
#
|
111
|
+
# The `with_fixed_indentation` style aligns the following lines with one
|
112
|
+
# level of indentation relative to the start of the line with the method call.
|
113
|
+
#
|
114
|
+
# method_call(a,
|
115
|
+
# b)
|
116
|
+
EnforcedStyle: with_fixed_indentation
|
117
|
+
SupportedStyles:
|
118
|
+
- with_first_parameter
|
119
|
+
- with_fixed_indentation
|
120
|
+
|
121
|
+
Style/AndOr:
|
122
|
+
# Whether `and` and `or` are banned only in conditionals (conditionals)
|
123
|
+
# or completely (always).
|
124
|
+
EnforcedStyle: conditionals
|
125
|
+
SupportedStyles:
|
126
|
+
- always
|
127
|
+
- conditionals
|
128
|
+
|
129
|
+
# Checks if usage of %() or %Q() matches configuration.
|
130
|
+
Style/BarePercentLiterals:
|
131
|
+
EnforcedStyle: bare_percent
|
132
|
+
SupportedStyles:
|
133
|
+
- percent_q
|
134
|
+
- bare_percent
|
135
|
+
|
136
|
+
Style/BlockDelimiters:
|
137
|
+
EnforcedStyle: semantic
|
138
|
+
SupportedStyles:
|
139
|
+
# The `line_count_based` style enforces braces around single line blocks and
|
140
|
+
# do..end around multi-line blocks.
|
141
|
+
- line_count_based
|
142
|
+
# The `semantic` style enforces braces around functional blocks, where the
|
143
|
+
# primary purpose of the block is to return a value and do..end for
|
144
|
+
# procedural blocks, where the primary purpose of the block is its
|
145
|
+
# side-effects.
|
146
|
+
#
|
147
|
+
# This looks at the usage of a block's method to determine its type (e.g. is
|
148
|
+
# the result of a `map` assigned to a variable or passed to another
|
149
|
+
# method) but exceptions are permitted in the `ProceduralMethods`,
|
150
|
+
# `FunctionalMethods` and `IgnoredMethods` sections below.
|
151
|
+
- semantic
|
152
|
+
ProceduralMethods:
|
153
|
+
# Methods that are known to be procedural in nature but look functional from
|
154
|
+
# their usage, e.g.
|
155
|
+
#
|
156
|
+
# time = Benchmark.realtime do
|
157
|
+
# foo.bar
|
158
|
+
# end
|
159
|
+
#
|
160
|
+
# Here, the return value of the block is discarded but the return value of
|
161
|
+
# `Benchmark.realtime` is used.
|
162
|
+
- benchmark
|
163
|
+
- bm
|
164
|
+
- bmbm
|
165
|
+
- create
|
166
|
+
- each_with_object
|
167
|
+
- measure
|
168
|
+
- new
|
169
|
+
- realtime
|
170
|
+
- tap
|
171
|
+
- with_object
|
172
|
+
FunctionalMethods:
|
173
|
+
# Methods that are known to be functional in nature but look procedural from
|
174
|
+
# their usage, e.g.
|
175
|
+
#
|
176
|
+
# let(:foo) { Foo.new }
|
177
|
+
#
|
178
|
+
# Here, the return value of `Foo.new` is used to define a `foo` helper but
|
179
|
+
# doesn't appear to be used from the return value of `let`.
|
180
|
+
- let
|
181
|
+
- let!
|
182
|
+
- subject
|
183
|
+
- watch
|
184
|
+
IgnoredMethods:
|
185
|
+
# Methods that can be either procedural or functional and cannot be
|
186
|
+
# categorised from their usage alone, e.g.
|
187
|
+
#
|
188
|
+
# foo = lambda do |x|
|
189
|
+
# puts "Hello, #{x}"
|
190
|
+
# end
|
191
|
+
#
|
192
|
+
# foo = lambda do |x|
|
193
|
+
# x * 100
|
194
|
+
# end
|
195
|
+
#
|
196
|
+
# Here, it is impossible to tell from the return value of `lambda` whether
|
197
|
+
# the inner block's return value is significant.
|
198
|
+
- lambda
|
199
|
+
- proc
|
200
|
+
- it
|
201
|
+
|
202
|
+
Style/BracesAroundHashParameters:
|
203
|
+
Enabled: false
|
204
|
+
EnforcedStyle: context_dependent
|
205
|
+
SupportedStyles:
|
206
|
+
# The `braces` style enforces braces around all method parameters that are
|
207
|
+
# hashes.
|
208
|
+
- braces
|
209
|
+
# The `no_braces` style checks that the last parameter doesn't have braces
|
210
|
+
# around it.
|
211
|
+
- no_braces
|
212
|
+
# The `context_dependent` style checks that the last parameter doesn't have
|
213
|
+
# braces around it, but requires braces if the second to last parameter is
|
214
|
+
# also a hash literal.
|
215
|
+
- context_dependent
|
216
|
+
|
217
|
+
# Indentation of `when`.
|
218
|
+
Style/CaseIndentation:
|
219
|
+
IndentWhenRelativeTo: case
|
220
|
+
SupportedStyles:
|
221
|
+
- case
|
222
|
+
- end
|
223
|
+
IndentOneStep: true
|
224
|
+
|
225
|
+
Style/ClassAndModuleChildren:
|
226
|
+
# Checks the style of children definitions at classes and modules.
|
227
|
+
#
|
228
|
+
# Basically there are two different styles:
|
229
|
+
#
|
230
|
+
# `nested` - have each child on a separate line
|
231
|
+
# class Foo
|
232
|
+
# class Bar
|
233
|
+
# end
|
234
|
+
# end
|
235
|
+
#
|
236
|
+
# `compact` - combine definitions as much as possible
|
237
|
+
# class Foo::Bar
|
238
|
+
# end
|
239
|
+
#
|
240
|
+
# The compact style is only forced, for classes / modules with one child.
|
241
|
+
EnforcedStyle: nested
|
242
|
+
SupportedStyles:
|
243
|
+
- nested
|
244
|
+
- compact
|
245
|
+
|
246
|
+
Style/ClassCheck:
|
247
|
+
EnforcedStyle: is_a?
|
248
|
+
SupportedStyles:
|
249
|
+
- is_a?
|
250
|
+
- kind_of?
|
251
|
+
|
252
|
+
# Align with the style guide.
|
253
|
+
Style/CollectionMethods:
|
254
|
+
# Mapping from undesired method to desired_method
|
255
|
+
# e.g. to use `detect` over `find`:
|
256
|
+
#
|
257
|
+
# CollectionMethods:
|
258
|
+
# PreferredMethods:
|
259
|
+
# find: detect
|
260
|
+
PreferredMethods:
|
261
|
+
# collect: 'map'
|
262
|
+
# collect!: 'map!'
|
263
|
+
inject: 'reduce'
|
264
|
+
detect: 'find'
|
265
|
+
# find_all: 'select'
|
266
|
+
|
267
|
+
# Use ` or %x around command literals.
|
268
|
+
Style/CommandLiteral:
|
269
|
+
EnforcedStyle: mixed
|
270
|
+
# backticks: Always use backticks.
|
271
|
+
# percent_x: Always use %x.
|
272
|
+
# mixed: Use backticks on single-line commands, and %x on multi-line commands.
|
273
|
+
SupportedStyles:
|
274
|
+
- backticks
|
275
|
+
- percent_x
|
276
|
+
- mixed
|
277
|
+
# If false, the cop will always recommend using %x if one or more backticks
|
278
|
+
# are found in the command string.
|
279
|
+
AllowInnerBackticks: false
|
280
|
+
|
281
|
+
# Checks formatting of special comments
|
282
|
+
Style/CommentAnnotation:
|
283
|
+
Keywords:
|
284
|
+
- TODO
|
285
|
+
- FIXME
|
286
|
+
- OPTIMIZE
|
287
|
+
- HACK
|
288
|
+
- REVIEW
|
289
|
+
|
290
|
+
# Checks that you have put a copyright in a comment before any code.
|
291
|
+
#
|
292
|
+
# You can override the default Notice in your .rubocop.yml file.
|
293
|
+
#
|
294
|
+
# In order to use autocorrect, you must supply a value for the
|
295
|
+
# AutocorrectNotice key that matches the regexp Notice. A blank
|
296
|
+
# AutocorrectNotice will cause an error during autocorrect.
|
297
|
+
#
|
298
|
+
# Autocorrect will add a copyright notice in a comment at the top
|
299
|
+
# of the file immediately after any shebang or encoding comments.
|
300
|
+
#
|
301
|
+
# Example rubocop.yml:
|
302
|
+
#
|
303
|
+
# Style/Copyright:
|
304
|
+
# Enabled: true
|
305
|
+
# Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
|
306
|
+
# AutocorrectNotice: '# Copyright (c) 2015 Yahoo! Inc.'
|
307
|
+
#
|
308
|
+
Style/Copyright:
|
309
|
+
Enabled: false
|
310
|
+
Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
|
311
|
+
AutocorrectNotice: ''
|
312
|
+
|
313
|
+
Style/Documentation:
|
314
|
+
Enabled: false
|
315
|
+
|
316
|
+
# Multi-line method chaining should be done with leading dots.
|
317
|
+
Style/DotPosition:
|
318
|
+
EnforcedStyle: leading
|
319
|
+
SupportedStyles:
|
320
|
+
- leading
|
321
|
+
- trailing
|
322
|
+
|
323
|
+
# Warn on empty else statements
|
324
|
+
# empty - warn only on empty else
|
325
|
+
# nil - warn on else with nil in it
|
326
|
+
# both - warn on empty else and else with nil in it
|
327
|
+
Style/EmptyElse:
|
328
|
+
EnforcedStyle: both
|
329
|
+
SupportedStyles:
|
330
|
+
- empty
|
331
|
+
- nil
|
332
|
+
- both
|
333
|
+
|
334
|
+
# Use empty lines between defs.
|
335
|
+
Style/EmptyLineBetweenDefs:
|
336
|
+
# If true, this parameter means that single line method definitions don't
|
337
|
+
# need an empty line between them.
|
338
|
+
AllowAdjacentOneLineDefs: false
|
339
|
+
|
340
|
+
Style/EmptyLinesAroundBlockBody:
|
341
|
+
EnforcedStyle: no_empty_lines
|
342
|
+
SupportedStyles:
|
343
|
+
- empty_lines
|
344
|
+
- no_empty_lines
|
345
|
+
|
346
|
+
Style/EmptyLinesAroundClassBody:
|
347
|
+
EnforcedStyle: no_empty_lines
|
348
|
+
SupportedStyles:
|
349
|
+
- empty_lines
|
350
|
+
- no_empty_lines
|
351
|
+
|
352
|
+
Style/EmptyLinesAroundModuleBody:
|
353
|
+
EnforcedStyle: no_empty_lines
|
354
|
+
SupportedStyles:
|
355
|
+
- empty_lines
|
356
|
+
- no_empty_lines
|
357
|
+
|
358
|
+
# Checks whether the source file has a utf-8 encoding comment or not
|
359
|
+
# AutoCorrectEncodingComment must match the regex
|
360
|
+
# /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
|
361
|
+
Style/Encoding:
|
362
|
+
Enabled: false
|
363
|
+
EnforcedStyle: always
|
364
|
+
SupportedStyles:
|
365
|
+
- when_needed
|
366
|
+
- always
|
367
|
+
AutoCorrectEncodingComment: '# encoding: utf-8'
|
368
|
+
|
369
|
+
Style/FileName:
|
370
|
+
# File names listed in AllCops:Include are excluded by default. Add extra
|
371
|
+
# excludes here.
|
372
|
+
Exclude: []
|
373
|
+
|
374
|
+
Style/FirstParameterIndentation:
|
375
|
+
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
376
|
+
SupportedStyles:
|
377
|
+
# The first parameter should always be indented one step more than the
|
378
|
+
# preceding line.
|
379
|
+
- consistent
|
380
|
+
# The first parameter should normally be indented one step more than the
|
381
|
+
# preceding line, but if it's a parameter for a method call that is itself
|
382
|
+
# a parameter in a method call, then the inner parameter should be indented
|
383
|
+
# relative to the inner method.
|
384
|
+
- special_for_inner_method_call
|
385
|
+
# Same as special_for_inner_method_call except that the special rule only
|
386
|
+
# applies if the outer method call encloses its arguments in parentheses.
|
387
|
+
- special_for_inner_method_call_in_parentheses
|
388
|
+
|
389
|
+
# Checks use of for or each in multiline loops.
|
390
|
+
Style/For:
|
391
|
+
EnforcedStyle: each
|
392
|
+
SupportedStyles:
|
393
|
+
- for
|
394
|
+
- each
|
395
|
+
|
396
|
+
# Enforce the method used for string formatting.
|
397
|
+
Style/FormatString:
|
398
|
+
EnforcedStyle: format
|
399
|
+
SupportedStyles:
|
400
|
+
- format
|
401
|
+
- sprintf
|
402
|
+
- percent
|
403
|
+
|
404
|
+
# Built-in global variables are allowed by default.
|
405
|
+
Style/GlobalVars:
|
406
|
+
AllowedVariables: []
|
407
|
+
|
408
|
+
# `MinBodyLength` defines the number of lines of the a body of an if / unless
|
409
|
+
# needs to have to trigger this cop
|
410
|
+
Style/GuardClause:
|
411
|
+
MinBodyLength: 1
|
412
|
+
|
413
|
+
Style/HashSyntax:
|
414
|
+
EnforcedStyle: ruby19
|
415
|
+
SupportedStyles:
|
416
|
+
- ruby19
|
417
|
+
- ruby19_no_mixed_keys
|
418
|
+
- hash_rockets
|
419
|
+
# Force hashes that have a symbol value to use hash rockets
|
420
|
+
UseHashRocketsWithSymbolValues: false
|
421
|
+
|
422
|
+
Style/IfUnlessModifier:
|
423
|
+
MaxLineLength: 80
|
424
|
+
|
425
|
+
Style/IndentationConsistency:
|
426
|
+
# The difference between `rails` and `normal` is that the `rails` style
|
427
|
+
# prescribes that in classes and modules the `protected` and `private`
|
428
|
+
# modifier keywords shall be indented the same as public methods and that
|
429
|
+
# protected and private members shall be indented one step more than the
|
430
|
+
# modifiers. Other than that, both styles mean that entities on the same
|
431
|
+
# logical depth shall have the same indentation.
|
432
|
+
EnforcedStyle: normal
|
433
|
+
SupportedStyles:
|
434
|
+
- normal
|
435
|
+
- rails
|
436
|
+
|
437
|
+
Style/IndentationWidth:
|
438
|
+
# Number of spaces for each indentation level.
|
439
|
+
Width: 2
|
440
|
+
|
441
|
+
# Checks the indentation of the first key in a hash literal.
|
442
|
+
Style/IndentHash:
|
443
|
+
# The value `special_inside_parentheses` means that hash literals with braces
|
444
|
+
# that have their opening brace on the same line as a surrounding opening
|
445
|
+
# round parenthesis, shall have their first key indented relative to the
|
446
|
+
# first position inside the parenthesis.
|
447
|
+
# The value `consistent` means that the indentation of the first key shall
|
448
|
+
# always be relative to the first position of the line where the opening
|
449
|
+
# brace is.
|
450
|
+
EnforcedStyle: consistent
|
451
|
+
SupportedStyles:
|
452
|
+
- special_inside_parentheses
|
453
|
+
- consistent
|
454
|
+
|
455
|
+
Style/LambdaCall:
|
456
|
+
EnforcedStyle: call
|
457
|
+
SupportedStyles:
|
458
|
+
- call
|
459
|
+
- braces
|
460
|
+
|
461
|
+
Style/Next:
|
462
|
+
# With `always` all conditions at the end of an iteration needs to be
|
463
|
+
# replaced by next - with `skip_modifier_ifs` the modifier if like this one
|
464
|
+
# are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
|
465
|
+
EnforcedStyle: skip_modifier_ifs
|
466
|
+
# `MinBodyLength` defines the number of lines of the a body of an if / unless
|
467
|
+
# needs to have to trigger this cop
|
468
|
+
MinBodyLength: 3
|
469
|
+
SupportedStyles:
|
470
|
+
- skip_modifier_ifs
|
471
|
+
- always
|
472
|
+
|
473
|
+
Style/NonNilCheck:
|
474
|
+
Enabled: false
|
475
|
+
# With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
|
476
|
+
# `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
|
477
|
+
# **usually** OK, but might change behavior.
|
478
|
+
#
|
479
|
+
# With `IncludeSemanticChanges` set to `false`, this cop does not report
|
480
|
+
# offenses for `!x.nil?` and does no changes that might change behavior.
|
481
|
+
IncludeSemanticChanges: false
|
482
|
+
|
483
|
+
Style/MethodDefParentheses:
|
484
|
+
EnforcedStyle: require_parentheses
|
485
|
+
SupportedStyles:
|
486
|
+
- require_parentheses
|
487
|
+
- require_no_parentheses
|
488
|
+
|
489
|
+
Style/MethodName:
|
490
|
+
EnforcedStyle: snake_case
|
491
|
+
SupportedStyles:
|
492
|
+
- snake_case
|
493
|
+
- camelCase
|
494
|
+
|
495
|
+
Style/MultilineOperationIndentation:
|
496
|
+
EnforcedStyle: indented
|
497
|
+
SupportedStyles:
|
498
|
+
- aligned
|
499
|
+
- indented
|
500
|
+
|
501
|
+
Style/NumericLiterals:
|
502
|
+
MinDigits: 5
|
503
|
+
|
504
|
+
# Allow safe assignment in conditions.
|
505
|
+
Style/ParenthesesAroundCondition:
|
506
|
+
AllowSafeAssignment: true
|
507
|
+
|
508
|
+
Style/PercentLiteralDelimiters:
|
509
|
+
PreferredDelimiters:
|
510
|
+
'%': ()
|
511
|
+
'%i': ()
|
512
|
+
'%q': ()
|
513
|
+
'%Q': ()
|
514
|
+
'%r': '{}'
|
515
|
+
'%s': ()
|
516
|
+
'%w': ()
|
517
|
+
'%W': ()
|
518
|
+
'%x': ()
|
519
|
+
|
520
|
+
Style/PercentQLiterals:
|
521
|
+
Enabled: false
|
522
|
+
EnforcedStyle: lower_case_q
|
523
|
+
SupportedStyles:
|
524
|
+
- lower_case_q # Use %q when possible, %Q when necessary
|
525
|
+
- upper_case_q # Always use %Q
|
526
|
+
|
527
|
+
Style/PredicateName:
|
528
|
+
Enabled: false
|
529
|
+
# Predicate name prefices.
|
530
|
+
NamePrefix:
|
531
|
+
- is_
|
532
|
+
- has_
|
533
|
+
- have_
|
534
|
+
# Predicate name prefices that should be removed.
|
535
|
+
NamePrefixBlacklist:
|
536
|
+
- is_
|
537
|
+
- has_
|
538
|
+
- have_
|
539
|
+
|
540
|
+
Style/RaiseArgs:
|
541
|
+
Enabled: false
|
542
|
+
EnforcedStyle: exploded
|
543
|
+
SupportedStyles:
|
544
|
+
- compact # raise Exception.new(msg)
|
545
|
+
- exploded # raise Exception, msg
|
546
|
+
|
547
|
+
Style/RedundantReturn:
|
548
|
+
# When true allows code like `return x, y`.
|
549
|
+
AllowMultipleReturnValues: false
|
550
|
+
|
551
|
+
# Use / or %r around regular expressions.
|
552
|
+
Style/RegexpLiteral:
|
553
|
+
EnforcedStyle: mixed
|
554
|
+
# slashes: Always use slashes.
|
555
|
+
# percent_r: Always use %r.
|
556
|
+
# mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
|
557
|
+
SupportedStyles:
|
558
|
+
- slashes
|
559
|
+
- percent_r
|
560
|
+
- mixed
|
561
|
+
# If false, the cop will always recommend using %r if one or more slashes
|
562
|
+
# are found in the regexp string.
|
563
|
+
AllowInnerSlashes: false
|
564
|
+
|
565
|
+
Style/Semicolon:
|
566
|
+
# Allow ; to separate several expressions on the same line.
|
567
|
+
AllowAsExpressionSeparator: false
|
568
|
+
|
569
|
+
Style/SignalException:
|
570
|
+
Enabled: false
|
571
|
+
EnforcedStyle: semantic
|
572
|
+
SupportedStyles:
|
573
|
+
- only_raise
|
574
|
+
- only_fail
|
575
|
+
- semantic
|
576
|
+
|
577
|
+
Style/SingleLineBlockParams:
|
578
|
+
Methods:
|
579
|
+
- reduce:
|
580
|
+
- a
|
581
|
+
- e
|
582
|
+
- inject:
|
583
|
+
- a
|
584
|
+
- e
|
585
|
+
|
586
|
+
Style/SingleLineMethods:
|
587
|
+
AllowIfMethodIsEmpty: true
|
588
|
+
|
589
|
+
Style/SingleSpaceBeforeFirstArg:
|
590
|
+
Enabled: false
|
591
|
+
|
592
|
+
Style/StringLiterals:
|
593
|
+
Enabled: false
|
594
|
+
EnforcedStyle: single_quotes
|
595
|
+
SupportedStyles:
|
596
|
+
- single_quotes
|
597
|
+
- double_quotes
|
598
|
+
|
599
|
+
Style/StringLiteralsInInterpolation:
|
600
|
+
EnforcedStyle: single_quotes
|
601
|
+
SupportedStyles:
|
602
|
+
- single_quotes
|
603
|
+
- double_quotes
|
604
|
+
|
605
|
+
Style/SpaceAroundBlockParameters:
|
606
|
+
EnforcedStyleInsidePipes: no_space
|
607
|
+
SupportedStyles:
|
608
|
+
- space
|
609
|
+
- no_space
|
610
|
+
|
611
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
612
|
+
EnforcedStyle: space
|
613
|
+
SupportedStyles:
|
614
|
+
- space
|
615
|
+
- no_space
|
616
|
+
|
617
|
+
Style/SpaceAroundOperators:
|
618
|
+
MultiSpaceAllowedForOperators:
|
619
|
+
- '='
|
620
|
+
- '=>'
|
621
|
+
|
622
|
+
Style/SpaceBeforeBlockBraces:
|
623
|
+
EnforcedStyle: space
|
624
|
+
SupportedStyles:
|
625
|
+
- space
|
626
|
+
- no_space
|
627
|
+
|
628
|
+
Style/SpaceInsideBlockBraces:
|
629
|
+
EnforcedStyle: space
|
630
|
+
SupportedStyles:
|
631
|
+
- space
|
632
|
+
- no_space
|
633
|
+
# Valid values are: space, no_space
|
634
|
+
EnforcedStyleForEmptyBraces: no_space
|
635
|
+
# Space between { and |. Overrides EnforcedStyle if there is a conflict.
|
636
|
+
SpaceBeforeBlockParameters: true
|
637
|
+
|
638
|
+
Style/SpaceInsideHashLiteralBraces:
|
639
|
+
EnforcedStyle: no_space
|
640
|
+
EnforcedStyleForEmptyBraces: no_space
|
641
|
+
SupportedStyles:
|
642
|
+
- space
|
643
|
+
- no_space
|
644
|
+
|
645
|
+
Style/SymbolProc:
|
646
|
+
# A list of method names to be ignored by the check.
|
647
|
+
# The names should be fairly unique, otherwise you'll end up ignoring lots of code.
|
648
|
+
IgnoredMethods:
|
649
|
+
- respond_to
|
650
|
+
|
651
|
+
Style/TrailingBlankLines:
|
652
|
+
EnforcedStyle: final_newline
|
653
|
+
SupportedStyles:
|
654
|
+
- final_newline
|
655
|
+
- final_blank_line
|
656
|
+
|
657
|
+
Style/TrailingComma:
|
658
|
+
# If EnforcedStyleForMultiline is comma, the cop requires a comma after the
|
659
|
+
# last item of a list, but only for lists where each item is on its own line.
|
660
|
+
# If EnforcedStyleForMultiline is consistent_comma, the cop requires a comma
|
661
|
+
# after the last item of a list, for all lists.
|
662
|
+
EnforcedStyleForMultiline: no_comma
|
663
|
+
SupportedStyles:
|
664
|
+
- comma
|
665
|
+
- consistent_comma
|
666
|
+
- no_comma
|
667
|
+
|
668
|
+
# TrivialAccessors requires exact name matches and doesn't allow
|
669
|
+
# predicated methods by default.
|
670
|
+
Style/TrivialAccessors:
|
671
|
+
# When set to false the cop will suggest the use of accessor methods
|
672
|
+
# in situations like:
|
673
|
+
#
|
674
|
+
# def name
|
675
|
+
# @other_name
|
676
|
+
# end
|
677
|
+
#
|
678
|
+
# This way you can uncover "hidden" attributes in your code.
|
679
|
+
ExactNameMatch: true
|
680
|
+
AllowPredicates: false
|
681
|
+
# Allows trivial writers that don't end in an equal sign. e.g.
|
682
|
+
#
|
683
|
+
# def on_exception(action)
|
684
|
+
# @on_exception=action
|
685
|
+
# end
|
686
|
+
# on_exception :restart
|
687
|
+
#
|
688
|
+
# Commonly used in DSLs
|
689
|
+
AllowDSLWriters: false
|
690
|
+
IgnoreClassMethods: false
|
691
|
+
Whitelist:
|
692
|
+
- to_ary
|
693
|
+
- to_a
|
694
|
+
- to_c
|
695
|
+
- to_enum
|
696
|
+
- to_h
|
697
|
+
- to_hash
|
698
|
+
- to_i
|
699
|
+
- to_int
|
700
|
+
- to_io
|
701
|
+
- to_open
|
702
|
+
- to_path
|
703
|
+
- to_proc
|
704
|
+
- to_r
|
705
|
+
- to_regexp
|
706
|
+
- to_str
|
707
|
+
- to_s
|
708
|
+
- to_sym
|
709
|
+
|
710
|
+
Style/UnneededCapitalW:
|
711
|
+
Enabled: false
|
712
|
+
|
713
|
+
Style/VariableName:
|
714
|
+
EnforcedStyle: snake_case
|
715
|
+
SupportedStyles:
|
716
|
+
- snake_case
|
717
|
+
- camelCase
|
718
|
+
|
719
|
+
Style/WhileUntilModifier:
|
720
|
+
MaxLineLength: 80
|
721
|
+
|
722
|
+
Style/WordArray:
|
723
|
+
MinSize: 0
|
724
|
+
# The regular expression WordRegex decides what is considered a word.
|
725
|
+
WordRegex: !ruby/regexp '/\A[\p{Word}]+\z/'
|
726
|
+
|
727
|
+
##################### Metrics ##################################
|
728
|
+
|
729
|
+
Metrics/AbcSize:
|
730
|
+
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
|
731
|
+
# a Float.
|
732
|
+
Max: 15
|
733
|
+
|
734
|
+
Metrics/BlockNesting:
|
735
|
+
Max: 3
|
736
|
+
|
737
|
+
Metrics/ClassLength:
|
738
|
+
CountComments: false # count full line comments?
|
739
|
+
Max: 100
|
740
|
+
|
741
|
+
Metrics/ModuleLength:
|
742
|
+
CountComments: false # count full line comments?
|
743
|
+
Max: 100
|
744
|
+
|
745
|
+
# Avoid complex methods.
|
746
|
+
Metrics/CyclomaticComplexity:
|
747
|
+
Max: 6
|
748
|
+
|
749
|
+
Metrics/LineLength:
|
750
|
+
Max: 100
|
751
|
+
# To make it possible to copy or click on URIs in the code, we allow lines
|
752
|
+
# contaning a URI to be longer than Max.
|
753
|
+
AllowURI: true
|
754
|
+
URISchemes:
|
755
|
+
- http
|
756
|
+
- https
|
757
|
+
|
758
|
+
Metrics/MethodLength:
|
759
|
+
CountComments: false # count full line comments?
|
760
|
+
Max: 10
|
761
|
+
|
762
|
+
Metrics/ParameterLists:
|
763
|
+
Max: 5
|
764
|
+
CountKeywordArgs: true
|
765
|
+
|
766
|
+
Metrics/PerceivedComplexity:
|
767
|
+
Max: 7
|
768
|
+
|
769
|
+
##################### Lint ##################################
|
770
|
+
|
771
|
+
# Allow safe assignment in conditions.
|
772
|
+
Lint/AssignmentInCondition:
|
773
|
+
AllowSafeAssignment: true
|
774
|
+
|
775
|
+
# Align ends correctly.
|
776
|
+
Lint/EndAlignment:
|
777
|
+
# The value `keyword` means that `end` should be aligned with the matching
|
778
|
+
# keyword (if, while, etc.).
|
779
|
+
# The value `variable` means that in assignments, `end` should be aligned
|
780
|
+
# with the start of the variable on the left hand side of `=`. In all other
|
781
|
+
# situations, `end` should still be aligned with the keyword.
|
782
|
+
AlignWith: keyword
|
783
|
+
SupportedStyles:
|
784
|
+
- keyword
|
785
|
+
- variable
|
786
|
+
AutoCorrect: false
|
787
|
+
|
788
|
+
Lint/DefEndAlignment:
|
789
|
+
# The value `def` means that `end` should be aligned with the def keyword.
|
790
|
+
# The value `start_of_line` means that `end` should be aligned with method
|
791
|
+
# calls like `private`, `public`, etc, if present in front of the `def`
|
792
|
+
# keyword on the same line.
|
793
|
+
AlignWith: start_of_line
|
794
|
+
SupportedStyles:
|
795
|
+
- start_of_line
|
796
|
+
- def
|
797
|
+
AutoCorrect: false
|
798
|
+
|
799
|
+
##################### Rails ##################################
|
800
|
+
|
801
|
+
Rails/ActionFilter:
|
802
|
+
EnforcedStyle: action
|
803
|
+
SupportedStyles:
|
804
|
+
- action
|
805
|
+
- filter
|
806
|
+
Include:
|
807
|
+
- app/controllers/**/*.rb
|
808
|
+
|
809
|
+
Rails/Date:
|
810
|
+
# The value `always` disallows usage of `Date.today`, `Date.current`,
|
811
|
+
# `Date#to_time` etc.
|
812
|
+
# The value `acceptable` allows usage of `Date.current`, `Date.yesterday`, etc
|
813
|
+
# (but not `Date.today`) which are overriden by ActiveSupport to handle current
|
814
|
+
# time zone.
|
815
|
+
EnforcedStyle: always
|
816
|
+
SupportedStyles:
|
817
|
+
- always
|
818
|
+
- acceptable
|
819
|
+
|
820
|
+
Rails/DefaultScope:
|
821
|
+
Include:
|
822
|
+
- app/models/**/*.rb
|
823
|
+
|
824
|
+
Rails/FindBy:
|
825
|
+
Include:
|
826
|
+
- app/models/**/*.rb
|
827
|
+
|
828
|
+
Rails/FindEach:
|
829
|
+
Include:
|
830
|
+
- app/models/**/*.rb
|
831
|
+
|
832
|
+
Rails/HasAndBelongsToMany:
|
833
|
+
Include:
|
834
|
+
- app/models/**/*.rb
|
835
|
+
|
836
|
+
Rails/Output:
|
837
|
+
Include:
|
838
|
+
- app/**/*.rb
|
839
|
+
- config/**/*.rb
|
840
|
+
- db/**/*.rb
|
841
|
+
- lib/**/*.rb
|
842
|
+
|
843
|
+
Rails/ReadWriteAttribute:
|
844
|
+
Include:
|
845
|
+
- app/models/**/*.rb
|
846
|
+
|
847
|
+
Rails/ScopeArgs:
|
848
|
+
Include:
|
849
|
+
- app/models/**/*.rb
|
850
|
+
|
851
|
+
Rails/TimeZone:
|
852
|
+
# The value `always` means that `Time` should be used with `zone`.
|
853
|
+
# The value `acceptable` allows usage of `in_time_zone` instead of `zone`.
|
854
|
+
EnforcedStyle: always
|
855
|
+
SupportedStyles:
|
856
|
+
- always
|
857
|
+
- acceptable
|
858
|
+
|
859
|
+
Rails/Validation:
|
860
|
+
Include:
|
861
|
+
- app/models/**/*.rb
|