archangel 0.0.2
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.
- checksums.yaml +7 -0
- data/.codeclimate.yml +17 -0
- data/.editorconfig +19 -0
- data/.eslintignore +6 -0
- data/.eslintrc.json +40 -0
- data/.github/ISSUE_TEMPLATE.md +23 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +18 -0
- data/.gitignore +22 -0
- data/.hound.yml +21 -0
- data/.mdlrc +2 -0
- data/.reek +35 -0
- data/.rspec +4 -0
- data/.rubocop.yml +28 -0
- data/.rubocop_disabled.yml +2 -0
- data/.rubocop_enabled.yml +2 -0
- data/.rubocop_todo.yml +7 -0
- data/.scss-lint.yml +22 -0
- data/.travis.yml +16 -0
- data/.yardopts +10 -0
- data/CODE_OF_CONDUCT.md +43 -0
- data/CONTRIBUTING.md +150 -0
- data/Gemfile +36 -0
- data/MIT-LICENSE +21 -0
- data/README.md +129 -0
- data/Rakefile +27 -0
- data/app/assets/config/archangel_manifest.js +14 -0
- data/app/assets/images/archangel/fallback/asset.png +0 -0
- data/app/assets/images/archangel/fallback/avatar.png +0 -0
- data/app/assets/images/archangel/fallback/default.png +0 -0
- data/app/assets/images/archangel/fallback/favicon.ico +0 -0
- data/app/assets/images/archangel/fallback/large_avatar.png +0 -0
- data/app/assets/images/archangel/fallback/large_logo.png +0 -0
- data/app/assets/images/archangel/fallback/logo.png +0 -0
- data/app/assets/images/archangel/fallback/medium_avatar.png +0 -0
- data/app/assets/images/archangel/fallback/medium_logo.png +0 -0
- data/app/assets/images/archangel/fallback/small_asset.png +0 -0
- data/app/assets/images/archangel/fallback/small_avatar.png +0 -0
- data/app/assets/images/archangel/fallback/small_logo.png +0 -0
- data/app/assets/images/archangel/fallback/tiny_asset.png +0 -0
- data/app/assets/images/archangel/fallback/tiny_avatar.png +0 -0
- data/app/assets/images/archangel/fallback/tiny_logo.png +0 -0
- data/app/assets/javascripts/archangel/input/datetime_picker.js +46 -0
- data/app/assets/javascripts/archangel/input/meta_keywords.js +22 -0
- data/app/assets/javascripts/archangel/input/parent/collection.js +0 -0
- data/app/assets/javascripts/archangel/input/parent/field.js +0 -0
- data/app/assets/javascripts/archangel/input/parent/page.js +0 -0
- data/app/assets/javascripts/archangel/input/wysiwyg.js.erb +51 -0
- data/app/assets/javascripts/archangel/object/flash.js +49 -0
- data/app/assets/javascripts/archangel/object/routes/auth.js +22 -0
- data/app/assets/javascripts/archangel/object/routes/backend.js +103 -0
- data/app/assets/javascripts/archangel/object/routes/frontend.js +24 -0
- data/app/assets/javascripts/archangel/object/routes.js.erb +84 -0
- data/app/assets/javascripts/archangel/object/translate/datetime_picker.js.erb +26 -0
- data/app/assets/javascripts/archangel/object/translate/sortable.js.erb +10 -0
- data/app/assets/javascripts/archangel/object/translate.js +8 -0
- data/app/assets/javascripts/archangel/object/url.js +24 -0
- data/app/assets/javascripts/archangel/object.js +25 -0
- data/app/assets/javascripts/archangel/sortable.js +72 -0
- data/app/assets/stylesheets/archangel/.keep +0 -0
- data/app/controllers/archangel/application_controller.rb +177 -0
- data/app/controllers/archangel/auth/registrations_controller.rb +22 -0
- data/app/controllers/archangel/auth_controller.rb +20 -0
- data/app/controllers/archangel/backend/assets_controller.rb +338 -0
- data/app/controllers/archangel/backend/collections_controller.rb +257 -0
- data/app/controllers/archangel/backend/dashboards_controller.rb +27 -0
- data/app/controllers/archangel/backend/entries_controller.rb +344 -0
- data/app/controllers/archangel/backend/pages_controller.rb +299 -0
- data/app/controllers/archangel/backend/profiles_controller.rb +211 -0
- data/app/controllers/archangel/backend/sites_controller.rb +175 -0
- data/app/controllers/archangel/backend/templates_controller.rb +270 -0
- data/app/controllers/archangel/backend/users_controller.rb +366 -0
- data/app/controllers/archangel/backend/widgets_controller.rb +264 -0
- data/app/controllers/archangel/backend_controller.rb +21 -0
- data/app/controllers/archangel/frontend/pages_controller.rb +158 -0
- data/app/controllers/archangel/frontend_controller.rb +10 -0
- data/app/controllers/concerns/archangel/actionable_concern.rb +152 -0
- data/app/controllers/concerns/archangel/authenticatable_concern.rb +14 -0
- data/app/controllers/concerns/archangel/authorizable_concern.rb +14 -0
- data/app/controllers/concerns/archangel/paginatable_concern.rb +34 -0
- data/app/controllers/concerns/archangel/seoable_concern.rb +40 -0
- data/app/controllers/concerns/archangel/skip_authorizable_concern.rb +14 -0
- data/app/controllers/concerns/archangel/themable_concern.rb +27 -0
- data/app/helpers/archangel/application_helper.rb +34 -0
- data/app/helpers/archangel/auth_helper.rb +9 -0
- data/app/helpers/archangel/backend/assets_helper.rb +14 -0
- data/app/helpers/archangel/backend/collections_helper.rb +14 -0
- data/app/helpers/archangel/backend/dashboards_helper.rb +14 -0
- data/app/helpers/archangel/backend/entries_helper.rb +14 -0
- data/app/helpers/archangel/backend/pages_helper.rb +14 -0
- data/app/helpers/archangel/backend/sites_helper.rb +14 -0
- data/app/helpers/archangel/backend/templates_helper.rb +14 -0
- data/app/helpers/archangel/backend/users_helper.rb +14 -0
- data/app/helpers/archangel/backend/widgets_helper.rb +14 -0
- data/app/helpers/archangel/backend_helper.rb +9 -0
- data/app/helpers/archangel/flash_helper.rb +22 -0
- data/app/helpers/archangel/frontend/pages_helper.rb +14 -0
- data/app/helpers/archangel/frontend_helper.rb +9 -0
- data/app/inputs/archangel/date_picker_input.rb +27 -0
- data/app/inputs/archangel/date_time_picker_input.rb +27 -0
- data/app/inputs/archangel/field_classification_input.rb +32 -0
- data/app/inputs/archangel/language_input.rb +31 -0
- data/app/inputs/archangel/meta_keywords_input.rb +27 -0
- data/app/inputs/archangel/role_input.rb +31 -0
- data/app/inputs/archangel/theme_input.rb +29 -0
- data/app/inputs/archangel/time_picker_input.rb +27 -0
- data/app/inputs/archangel/wysiwyg_input.rb +15 -0
- data/app/jobs/archangel/application_job.rb +9 -0
- data/app/mailers/archangel/application_mailer.rb +12 -0
- data/app/models/archangel/application_record.rb +10 -0
- data/app/models/archangel/asset.rb +42 -0
- data/app/models/archangel/collection.rb +51 -0
- data/app/models/archangel/entry.rb +22 -0
- data/app/models/archangel/field.rb +30 -0
- data/app/models/archangel/page.rb +123 -0
- data/app/models/archangel/site.rb +54 -0
- data/app/models/archangel/template.rb +37 -0
- data/app/models/archangel/user.rb +62 -0
- data/app/models/archangel/widget.rb +62 -0
- data/app/policies/archangel/application_policy.rb +142 -0
- data/app/policies/archangel/asset_policy.rb +17 -0
- data/app/policies/archangel/collection_policy.rb +9 -0
- data/app/policies/archangel/entry_policy.rb +17 -0
- data/app/policies/archangel/page_policy.rb +9 -0
- data/app/policies/archangel/site_policy.rb +27 -0
- data/app/policies/archangel/template_policy.rb +9 -0
- data/app/policies/archangel/user_policy.rb +9 -0
- data/app/policies/archangel/widget_policy.rb +9 -0
- data/app/services/archangel/render_service.rb +98 -0
- data/app/services/archangel/template_render_service.rb +40 -0
- data/app/themes/default/assets/javascripts/default/auth/.keep +0 -0
- data/app/themes/default/assets/javascripts/default/auth.js +18 -0
- data/app/themes/default/assets/javascripts/default/backend/core.js +7 -0
- data/app/themes/default/assets/javascripts/default/backend.js +50 -0
- data/app/themes/default/assets/javascripts/default/common/cards.js +28 -0
- data/app/themes/default/assets/javascripts/default/common/flash.js +48 -0
- data/app/themes/default/assets/javascripts/default/common/navigation.js +30 -0
- data/app/themes/default/assets/javascripts/default/common/sidebar.js +114 -0
- data/app/themes/default/assets/javascripts/default/frontend/.keep +0 -0
- data/app/themes/default/assets/javascripts/default/frontend.js +18 -0
- data/app/themes/default/assets/stylesheets/default/auth/core.scss +15 -0
- data/app/themes/default/assets/stylesheets/default/auth.css +13 -0
- data/app/themes/default/assets/stylesheets/default/backend/core.scss +22 -0
- data/app/themes/default/assets/stylesheets/default/backend.css +13 -0
- data/app/themes/default/assets/stylesheets/default/common/_bootstrap.scss +49 -0
- data/app/themes/default/assets/stylesheets/default/common/_selectize.scss +299 -0
- data/app/themes/default/assets/stylesheets/default/common/_variables.scss +82 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_animate.scss +27 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_aside.scss +67 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_avatars.scss +42 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_badge.scss +3 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_breadcrumb-menu.scss +36 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_breadcrumb.scss +4 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_buttons.scss +408 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_callout.scss +58 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_card.scss +199 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_charts.scss +9 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_dropdown-menu-right.scss +8 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_dropdown.scss +70 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_footer.scss +9 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_forms.scss +4 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_grid.scss +15 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_input-group.scss +5 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_layout.scss +390 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_loading.scss +128 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_mixins.scss +1 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_mobile.scss +0 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_modal.scss +12 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_nav.scss +39 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_navbar.scss +122 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_others.scss +4 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_progress.scss +15 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_rtl.scss +287 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_sidebar.scss +462 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_switches.scss +286 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_tables.scss +20 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_temp.scss +39 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_typography.scss +36 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_utilities.scss +3 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_variables.scss +208 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/_widgets.scss +251 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/mixins/_all.scss +117 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/utilities/_background.scss +20 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/utilities/_borders.scss +17 -0
- data/app/themes/default/assets/stylesheets/default/common/bootstrap/utilities/_display.scss +14 -0
- data/app/themes/default/assets/stylesheets/default/frontend/core.scss +15 -0
- data/app/themes/default/assets/stylesheets/default/frontend.css +13 -0
- data/app/themes/default/views/layouts/auth.html.erb +35 -0
- data/app/themes/default/views/layouts/backend/_footer.html.erb +7 -0
- data/app/themes/default/views/layouts/backend/_header.html.erb +31 -0
- data/app/themes/default/views/layouts/backend/_sidebar.html.erb +53 -0
- data/app/themes/default/views/layouts/backend.html.erb +37 -0
- data/app/themes/default/views/layouts/frontend.liquid +22 -0
- data/app/uploaders/archangel/application_uploader.rb +65 -0
- data/app/uploaders/archangel/asset_uploader.rb +52 -0
- data/app/uploaders/archangel/avatar_uploader.rb +44 -0
- data/app/uploaders/archangel/favicon_uploader.rb +38 -0
- data/app/uploaders/archangel/logo_uploader.rb +44 -0
- data/app/views/archangel/backend/assets/_buttons.html.erb +18 -0
- data/app/views/archangel/backend/assets/_form.html.erb +27 -0
- data/app/views/archangel/backend/assets/edit.html.erb +21 -0
- data/app/views/archangel/backend/assets/index.html.erb +64 -0
- data/app/views/archangel/backend/assets/new.html.erb +21 -0
- data/app/views/archangel/backend/assets/show.html.erb +53 -0
- data/app/views/archangel/backend/collections/_buttons.html.erb +20 -0
- data/app/views/archangel/backend/collections/_field_fields.html.erb +9 -0
- data/app/views/archangel/backend/collections/_form.html.erb +24 -0
- data/app/views/archangel/backend/collections/edit.html.erb +21 -0
- data/app/views/archangel/backend/collections/index.html.erb +60 -0
- data/app/views/archangel/backend/collections/new.html.erb +21 -0
- data/app/views/archangel/backend/collections/show.html.erb +44 -0
- data/app/views/archangel/backend/dashboards/_buttons.html.erb +3 -0
- data/app/views/archangel/backend/dashboards/show.html.erb +23 -0
- data/app/views/archangel/backend/entries/_buttons.html.erb +20 -0
- data/app/views/archangel/backend/entries/_form.html.erb +25 -0
- data/app/views/archangel/backend/entries/edit.html.erb +21 -0
- data/app/views/archangel/backend/entries/index.html.erb +68 -0
- data/app/views/archangel/backend/entries/new.html.erb +21 -0
- data/app/views/archangel/backend/entries/show.html.erb +28 -0
- data/app/views/archangel/backend/pages/_buttons.html.erb +18 -0
- data/app/views/archangel/backend/pages/_form.html.erb +19 -0
- data/app/views/archangel/backend/pages/edit.html.erb +21 -0
- data/app/views/archangel/backend/pages/index.html.erb +68 -0
- data/app/views/archangel/backend/pages/new.html.erb +21 -0
- data/app/views/archangel/backend/pages/show.html.erb +49 -0
- data/app/views/archangel/backend/profiles/_buttons.html.erb +9 -0
- data/app/views/archangel/backend/profiles/_form.html.erb +31 -0
- data/app/views/archangel/backend/profiles/edit.html.erb +21 -0
- data/app/views/archangel/backend/profiles/show.html.erb +36 -0
- data/app/views/archangel/backend/sites/_additional_colors.html.erb +49 -0
- data/app/views/archangel/backend/sites/_alerts.html.erb +130 -0
- data/app/views/archangel/backend/sites/_badge.html.erb +99 -0
- data/app/views/archangel/backend/sites/_button.html.erb +243 -0
- data/app/views/archangel/backend/sites/_buttons.html.erb +9 -0
- data/app/views/archangel/backend/sites/_buttons_group.html.erb +230 -0
- data/app/views/archangel/backend/sites/_cards.html.erb +441 -0
- data/app/views/archangel/backend/sites/_carousel.html.erb +159 -0
- data/app/views/archangel/backend/sites/_colors.html.erb +41 -0
- data/app/views/archangel/backend/sites/_display_headings.html.erb +41 -0
- data/app/views/archangel/backend/sites/_dl.html.erb +38 -0
- data/app/views/archangel/backend/sites/_dropdowns.html.erb +475 -0
- data/app/views/archangel/backend/sites/_form.html.erb +37 -0
- data/app/views/archangel/backend/sites/_forms.html.erb +1176 -0
- data/app/views/archangel/backend/sites/_grays.html.erb +21 -0
- data/app/views/archangel/backend/sites/_headings.html.erb +21 -0
- data/app/views/archangel/backend/sites/_inline_text.html.erb +45 -0
- data/app/views/archangel/backend/sites/_jumbotron.html.erb +45 -0
- data/app/views/archangel/backend/sites/_list_group.html.erb +254 -0
- data/app/views/archangel/backend/sites/_modals.html.erb +41 -0
- data/app/views/archangel/backend/sites/_navs.html.erb +389 -0
- data/app/views/archangel/backend/sites/_pagination.html.erb +160 -0
- data/app/views/archangel/backend/sites/_social_buttons.html.erb +746 -0
- data/app/views/archangel/backend/sites/_tables.html.erb +372 -0
- data/app/views/archangel/backend/sites/edit.html.erb +21 -0
- data/app/views/archangel/backend/sites/sample.html.erb +38 -0
- data/app/views/archangel/backend/sites/show.html.erb +48 -0
- data/app/views/archangel/backend/templates/_buttons.html.erb +18 -0
- data/app/views/archangel/backend/templates/_form.html.erb +14 -0
- data/app/views/archangel/backend/templates/edit.html.erb +21 -0
- data/app/views/archangel/backend/templates/index.html.erb +60 -0
- data/app/views/archangel/backend/templates/new.html.erb +21 -0
- data/app/views/archangel/backend/templates/show.html.erb +34 -0
- data/app/views/archangel/backend/users/_buttons.html.erb +18 -0
- data/app/views/archangel/backend/users/_form.html.erb +24 -0
- data/app/views/archangel/backend/users/edit.html.erb +21 -0
- data/app/views/archangel/backend/users/index.html.erb +62 -0
- data/app/views/archangel/backend/users/new.html.erb +21 -0
- data/app/views/archangel/backend/users/show.html.erb +36 -0
- data/app/views/archangel/backend/widgets/_buttons.html.erb +18 -0
- data/app/views/archangel/backend/widgets/_form.html.erb +14 -0
- data/app/views/archangel/backend/widgets/edit.html.erb +21 -0
- data/app/views/archangel/backend/widgets/index.html.erb +60 -0
- data/app/views/archangel/backend/widgets/new.html.erb +21 -0
- data/app/views/archangel/backend/widgets/show.html.erb +42 -0
- data/app/views/archangel/errors/error_401.html.erb +13 -0
- data/app/views/archangel/errors/error_401.json.erb +4 -0
- data/app/views/archangel/errors/error_404.html.erb +13 -0
- data/app/views/archangel/errors/error_404.json.erb +4 -0
- data/app/views/archangel/frontend/pages/show.json.jbuilder +9 -0
- data/app/views/archangel/shared/_auth_token.html.erb +8 -0
- data/app/views/archangel/shared/_flash_messages.html.erb +9 -0
- data/app/views/devise/confirmations/new.html.erb +18 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/email_changed.html.erb +7 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +28 -0
- data/app/views/devise/passwords/new.html.erb +18 -0
- data/app/views/devise/registrations/edit.html.erb +45 -0
- data/app/views/devise/registrations/new.html.erb +41 -0
- data/app/views/devise/sessions/new.html.erb +28 -0
- data/app/views/devise/shared/_links.html.erb +41 -0
- data/app/views/devise/unlocks/new.html.erb +18 -0
- data/app/views/kaminari/_first_page.html.erb +11 -0
- data/app/views/kaminari/_gap.html.erb +8 -0
- data/app/views/kaminari/_last_page.html.erb +11 -0
- data/app/views/kaminari/_next_page.html.erb +11 -0
- data/app/views/kaminari/_page.html.erb +12 -0
- data/app/views/kaminari/_paginator.html.erb +25 -0
- data/app/views/kaminari/_prev_page.html.erb +11 -0
- data/archangel.gemspec +52 -0
- data/archangel.png +0 -0
- data/bin/rails +13 -0
- data/config/brakeman.yml +3 -0
- data/config/initializers/assets.rb +12 -0
- data/config/initializers/carrierwave.rb +14 -0
- data/config/initializers/devise.rb +341 -0
- data/config/initializers/kaminari.rb +13 -0
- data/config/initializers/liquid.rb +4 -0
- data/config/initializers/meta_tags.rb +31 -0
- data/config/initializers/simple_form.rb +177 -0
- data/config/initializers/simple_form_bootstrap.rb +177 -0
- data/config/locales/active_record.en.yml +80 -0
- data/config/locales/devise.en.yml +64 -0
- data/config/locales/devise_invitable.en.yml +31 -0
- data/config/locales/en.yml +109 -0
- data/config/locales/kaminari.en.yml +17 -0
- data/config/locales/responders.en.yml +12 -0
- data/config/locales/simple_form.en.yml +34 -0
- data/config/routes.rb +176 -0
- data/db/migrate/20171003191001_create_archangel_sites.rb +19 -0
- data/db/migrate/20171003210347_create_archangel_users.rb +68 -0
- data/db/migrate/20171005205520_create_archangel_templates.rb +18 -0
- data/db/migrate/20171005224054_create_archangel_pages.rb +30 -0
- data/db/migrate/20171006175939_create_archangel_widgets.rb +20 -0
- data/db/migrate/20171006184844_create_archangel_assets.rb +18 -0
- data/db/migrate/20171006194044_create_archangel_collections.rb +17 -0
- data/db/migrate/20171006194855_create_archangel_fields.rb +23 -0
- data/db/migrate/20171006195023_create_archangel_entries.rb +18 -0
- data/db/seeds.rb +65 -0
- data/docs/Developers.md +3 -0
- data/docs/ExtensionDevelopers.md +3 -0
- data/docs/ExtensionIdeas.md +132 -0
- data/docs/Release.md +25 -0
- data/docs/ThemeDevelopers.md +3 -0
- data/lib/archangel/application_responder.rb +15 -0
- data/lib/archangel/config.rb +21 -0
- data/lib/archangel/constants/language.rb +13 -0
- data/lib/archangel/constants/role.rb +13 -0
- data/lib/archangel/constants/theme.rb +18 -0
- data/lib/archangel/engine.rb +70 -0
- data/lib/archangel/i18n.rb +40 -0
- data/lib/archangel/liquid/drop.rb +119 -0
- data/lib/archangel/liquid/drops/page_drop.rb +33 -0
- data/lib/archangel/liquid/drops/site_drop.rb +30 -0
- data/lib/archangel/liquid/filters/link_to_filter.rb +35 -0
- data/lib/archangel/liquid/tags/application_tag.rb +17 -0
- data/lib/archangel/liquid/tags/asset_tag.rb +146 -0
- data/lib/archangel/liquid/tags/collection_tag.rb +135 -0
- data/lib/archangel/liquid/tags/collectionfor_tag.rb +91 -0
- data/lib/archangel/liquid/tags/csrf_meta_tags_tag.rb +28 -0
- data/lib/archangel/liquid/tags/gist_tag.rb +102 -0
- data/lib/archangel/liquid/tags/locale_tag.rb +27 -0
- data/lib/archangel/liquid/tags/meta_tags_tag.rb +30 -0
- data/lib/archangel/liquid/tags/text_direction_tag.rb +28 -0
- data/lib/archangel/liquid/tags/theme_javascript_tag.rb +30 -0
- data/lib/archangel/liquid/tags/theme_stylesheet_tag.rb +30 -0
- data/lib/archangel/liquid/tags/vimeo_tag.rb +125 -0
- data/lib/archangel/liquid/tags/widget_tag.rb +91 -0
- data/lib/archangel/liquid/tags/youtube_tag.rb +138 -0
- data/lib/archangel/liquid_view.rb +92 -0
- data/lib/archangel/testing_support/context/view_controller_context.rb +55 -0
- data/lib/archangel/testing_support/factories/archangel_assets.rb +20 -0
- data/lib/archangel/testing_support/factories/archangel_collections.rb +23 -0
- data/lib/archangel/testing_support/factories/archangel_entries.rb +17 -0
- data/lib/archangel/testing_support/factories/archangel_fields.rb +20 -0
- data/lib/archangel/testing_support/factories/archangel_pages.rb +39 -0
- data/lib/archangel/testing_support/factories/archangel_sites.rb +22 -0
- data/lib/archangel/testing_support/factories/archangel_templates.rb +22 -0
- data/lib/archangel/testing_support/factories/archangel_users.rb +53 -0
- data/lib/archangel/testing_support/factories/archangel_widgets.rb +19 -0
- data/lib/archangel/testing_support/fixtures/favicon.png +0 -0
- data/lib/archangel/testing_support/fixtures/image.gif +0 -0
- data/lib/archangel/testing_support/fixtures/stylesheet.css +3 -0
- data/lib/archangel/testing_support/helpers/authorization_helpers.rb +58 -0
- data/lib/archangel/testing_support/helpers/controller_helpers.rb +20 -0
- data/lib/archangel/testing_support/helpers/form_helpers.rb +18 -0
- data/lib/archangel/testing_support/helpers/routing_helpers.rb +22 -0
- data/lib/archangel/testing_support/matchers/match_stdout.rb +37 -0
- data/lib/archangel/testing_support/matchers/pundit.rb +17 -0
- data/lib/archangel/testing_support/rake/dummy_rake.rb +63 -0
- data/lib/archangel/testing_support/shared_contexts/rake.rb +26 -0
- data/lib/archangel/testing_support/support/capybara.rb +9 -0
- data/lib/archangel/testing_support/support/carrierwave.rb +13 -0
- data/lib/archangel/testing_support/support/controller.rb +11 -0
- data/lib/archangel/testing_support/support/database_cleaner.rb +22 -0
- data/lib/archangel/testing_support/support/devise.rb +7 -0
- data/lib/archangel/testing_support/support/factory_bot.rb +17 -0
- data/lib/archangel/testing_support/support/inputs.rb +24 -0
- data/lib/archangel/testing_support/support/liquid_filters.rb +23 -0
- data/lib/archangel/testing_support/support/liquid_tags.rb +23 -0
- data/lib/archangel/testing_support/support/shoulda.rb +12 -0
- data/lib/archangel/testing_support/support/verify_partial_doubles.rb +21 -0
- data/lib/archangel/testing_support/support.rb +26 -0
- data/lib/archangel/theme/themable_controller.rb +90 -0
- data/lib/archangel/version.rb +16 -0
- data/lib/archangel.rb +93 -0
- data/lib/generators/archangel/dummy/dummy_generator.rb +148 -0
- data/lib/generators/archangel/dummy/templates/config/database.yml +48 -0
- data/lib/generators/archangel/install/install_generator.rb +202 -0
- data/lib/generators/archangel/install/templates/.env.sample +4 -0
- data/lib/generators/archangel/install/templates/config/archangel.yml +54 -0
- data/lib/generators/archangel/install/templates/config/initializers/carrierwave.rb +15 -0
- data/lib/generators/archangel/install/templates/config/initializers/devise.rb +17 -0
- data/lib/generators/archangel/install/templates/vendor/assets/javascripts/archangel/auth.js +3 -0
- data/lib/generators/archangel/install/templates/vendor/assets/javascripts/archangel/backend.js +3 -0
- data/lib/generators/archangel/install/templates/vendor/assets/javascripts/archangel/frontend.js +3 -0
- data/lib/generators/archangel/install/templates/vendor/assets/stylesheets/archangel/auth.css +5 -0
- data/lib/generators/archangel/install/templates/vendor/assets/stylesheets/archangel/backend.css +5 -0
- data/lib/generators/archangel/install/templates/vendor/assets/stylesheets/archangel/frontend.css +5 -0
- data/lib/tasks/archangel/version_task.rake +8 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/package.json +33 -0
- data/spec/controllers/archangel/application_controller_spec.rb +183 -0
- data/spec/controllers/archangel/auth/registrations_controller_spec.rb +10 -0
- data/spec/controllers/archangel/auth_controller_spec.rb +8 -0
- data/spec/controllers/archangel/backend/assets_controller_spec.rb +237 -0
- data/spec/controllers/archangel/backend/collections_controller_spec.rb +252 -0
- data/spec/controllers/archangel/backend/dashboards_controller_spec.rb +27 -0
- data/spec/controllers/archangel/backend/entries_controller_spec.rb +273 -0
- data/spec/controllers/archangel/backend/pages_controller_spec.rb +204 -0
- data/spec/controllers/archangel/backend/profiles_controller_spec.rb +115 -0
- data/spec/controllers/archangel/backend/sites_controller_spec.rb +137 -0
- data/spec/controllers/archangel/backend/templates_controller_spec.rb +190 -0
- data/spec/controllers/archangel/backend/users_controller_spec.rb +181 -0
- data/spec/controllers/archangel/backend/widgets_controller_spec.rb +190 -0
- data/spec/controllers/archangel/backend_controller_spec.rb +8 -0
- data/spec/controllers/archangel/frontend/pages_controller_spec.rb +54 -0
- data/spec/controllers/archangel/frontend_controller_spec.rb +8 -0
- data/spec/features/auth/log_in_spec.rb +96 -0
- data/spec/features/auth/log_out_spec.rb +18 -0
- data/spec/features/auth/registration_spec.rb +27 -0
- data/spec/features/backend/duplicate_page_slugs_spec.rb +41 -0
- data/spec/features/frontend/drop_variables_spec.rb +125 -0
- data/spec/features/frontend/homepage_redirect_spec.rb +15 -0
- data/spec/helpers/archangel/application_helper_spec.rb +30 -0
- data/spec/helpers/archangel/auth_helper_spec.rb +8 -0
- data/spec/helpers/archangel/backend/assets_helper_spec.rb +10 -0
- data/spec/helpers/archangel/backend/collections_helper_spec.rb +10 -0
- data/spec/helpers/archangel/backend/dashboards_helper_spec.rb +10 -0
- data/spec/helpers/archangel/backend/entries_helper_spec.rb +10 -0
- data/spec/helpers/archangel/backend/pages_helper_spec.rb +10 -0
- data/spec/helpers/archangel/backend/sites_helper_spec.rb +10 -0
- data/spec/helpers/archangel/backend/templates_helper_spec.rb +10 -0
- data/spec/helpers/archangel/backend/users_helper_spec.rb +10 -0
- data/spec/helpers/archangel/backend/widgets_helper_spec.rb +10 -0
- data/spec/helpers/archangel/backend_helper_spec.rb +8 -0
- data/spec/helpers/archangel/flash_helper_spec.rb +29 -0
- data/spec/helpers/archangel/frontend/pages_helper_spec.rb +10 -0
- data/spec/helpers/archangel/frontend_helper_spec.rb +8 -0
- data/spec/inputs/archangel/date_picker_input_spec.rb +15 -0
- data/spec/inputs/archangel/date_time_picker_input_spec.rb +15 -0
- data/spec/inputs/archangel/field_classification_input_spec.rb +19 -0
- data/spec/inputs/archangel/language_input_spec.rb +17 -0
- data/spec/inputs/archangel/meta_keywords_input_spec.rb +13 -0
- data/spec/inputs/archangel/role_input_spec.rb +18 -0
- data/spec/inputs/archangel/theme_input_spec.rb +17 -0
- data/spec/inputs/archangel/time_picker_input_spec.rb +15 -0
- data/spec/inputs/archangel/wysiwyg_input_spec.rb +15 -0
- data/spec/jobs/archangel/application_job_spec.rb +8 -0
- data/spec/lib/archangel/liquid/filters/link_to_filter_spec.rb +63 -0
- data/spec/lib/archangel/liquid/tags/application_tag_spec.rb +12 -0
- data/spec/lib/archangel/liquid/tags/asset_tag_spec.rb +90 -0
- data/spec/lib/archangel/liquid/tags/collection_tag_spec.rb +105 -0
- data/spec/lib/archangel/liquid/tags/collectionfor_tag_spec.rb +164 -0
- data/spec/lib/archangel/liquid/tags/csrf_meta_tags_tag_spec.rb +33 -0
- data/spec/lib/archangel/liquid/tags/gist_tag_spec.rb +42 -0
- data/spec/lib/archangel/liquid/tags/locale_tag_spec.rb +22 -0
- data/spec/lib/archangel/liquid/tags/meta_tags_tag_spec.rb +24 -0
- data/spec/lib/archangel/liquid/tags/text_direction_tag_spec.rb +32 -0
- data/spec/lib/archangel/liquid/tags/theme_javascript_tag_spec.rb +25 -0
- data/spec/lib/archangel/liquid/tags/theme_stylesheet_tag_spec.rb +27 -0
- data/spec/lib/archangel/liquid/tags/vimeo_tag_spec.rb +39 -0
- data/spec/lib/archangel/liquid/tags/widget_tag_spec.rb +59 -0
- data/spec/lib/archangel/liquid/tags/youtube_tag_spec.rb +39 -0
- data/spec/lib/tasks/archangel/version_task_spec.rb +13 -0
- data/spec/mailers/archangel/application_job_spec.rb +8 -0
- data/spec/models/archangel/asset_spec.rb +32 -0
- data/spec/models/archangel/collection_spec.rb +25 -0
- data/spec/models/archangel/entry_spec.rb +20 -0
- data/spec/models/archangel/field_spec.rb +29 -0
- data/spec/models/archangel/page_spec.rb +94 -0
- data/spec/models/archangel/site_spec.rb +11 -0
- data/spec/models/archangel/template_spec.rb +24 -0
- data/spec/models/archangel/user_spec.rb +66 -0
- data/spec/models/archangel/widget_spec.rb +29 -0
- data/spec/policies/archangel/application_policy_spec.rb +8 -0
- data/spec/policies/archangel/asset_policy_spec.rb +22 -0
- data/spec/policies/archangel/collection_policy_spec.rb +20 -0
- data/spec/policies/archangel/entries_policy_spec.rb +22 -0
- data/spec/policies/archangel/page_policy_spec.rb +20 -0
- data/spec/policies/archangel/site_policy_spec.rb +30 -0
- data/spec/policies/archangel/template_policy_spec.rb +20 -0
- data/spec/policies/archangel/user_policy_spec.rb +20 -0
- data/spec/policies/archangel/widget_policy_spec.rb +20 -0
- data/spec/rails_helper.rb +46 -0
- data/spec/services/archangel/render_service_spec.rb +37 -0
- data/spec/services/archangel/template_render_service_spec.rb +42 -0
- data/spec/spec_helper.rb +23 -0
- data/spec/support/coveralls.rb +5 -0
- data/spec/uploaders/archangel/application_uploader_spec.rb +15 -0
- data/spec/uploaders/archangel/asset_uploader_spec.rb +71 -0
- data/spec/uploaders/archangel/avatar_uploader_spec.rb +50 -0
- data/spec/uploaders/archangel/favicon_uploader_spec.rb +39 -0
- data/spec/uploaders/archangel/logo_uploader_spec.rb +50 -0
- data/vendor/assets/icons/trumbowyg/icons.svg +1 -0
- data/vendor/assets/javascripts/sortable/sortable.js +3 -0
- data/vendor/assets/javascripts/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.js +143 -0
- data/vendor/assets/javascripts/trumbowyg/plugins/base64/trumbowyg.base64.js +129 -0
- data/vendor/assets/javascripts/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.js +110 -0
- data/vendor/assets/javascripts/trumbowyg/plugins/colors/trumbowyg.colors.js +183 -0
- data/vendor/assets/javascripts/trumbowyg/plugins/noembed/trumbowyg.noembed.js +104 -0
- data/vendor/assets/javascripts/trumbowyg/plugins/upload/trumbowyg.upload.js +261 -0
- data/vendor/assets/javascripts/trumbowyg/trumbowyg.js +1765 -0
- data/vendor/assets/stylesheets/trumbowyg/_trumbowyg.scss +831 -0
- data/vendor/assets/stylesheets/trumbowyg/plugins/colors/_trumbowyg.colors.scss +38 -0
- metadata +1003 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<ul class="nav justify-content-center">
|
|
2
|
+
<%- if controller_name != "sessions" %>
|
|
3
|
+
<li class="nav-item">
|
|
4
|
+
<%= link_to("Log in", new_session_path(resource_name), class: "nav-link") %>
|
|
5
|
+
</li>
|
|
6
|
+
<% end -%>
|
|
7
|
+
|
|
8
|
+
<%- if Archangel.config.allow_registration && devise_mapping.registerable? && controller_name != "registrations" %>
|
|
9
|
+
<li class="nav-item">
|
|
10
|
+
<%= link_to("Sign up", new_registration_path(resource_name), class: "nav-link") %>
|
|
11
|
+
</li>
|
|
12
|
+
<% end -%>
|
|
13
|
+
|
|
14
|
+
<%- if devise_mapping.recoverable? && controller_name != "passwords" && controller_name != "registrations" %>
|
|
15
|
+
<li class="nav-item">
|
|
16
|
+
<%= link_to("Forgot your password?", new_password_path(resource_name), class: "nav-link") %>
|
|
17
|
+
</li>
|
|
18
|
+
<% end -%>
|
|
19
|
+
|
|
20
|
+
<%- if devise_mapping.confirmable? && controller_name != "confirmations" %>
|
|
21
|
+
<li class="nav-item">
|
|
22
|
+
<%= link_to("Didn't receive confirmation instructions?", new_confirmation_path(resource_name), class: "nav-link") %>
|
|
23
|
+
</li>
|
|
24
|
+
<% end -%>
|
|
25
|
+
|
|
26
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != "unlocks" %>
|
|
27
|
+
<li class="nav-item">
|
|
28
|
+
<%= link_to("Didn't receive unlock instructions?", new_unlock_path(resource_name), class: "nav-link") %>
|
|
29
|
+
</li>
|
|
30
|
+
<% end -%>
|
|
31
|
+
</ul>
|
|
32
|
+
|
|
33
|
+
<%- if devise_mapping.omniauthable? %>
|
|
34
|
+
<ul class="nav justify-content-center">
|
|
35
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
|
36
|
+
<li class="nav-item">
|
|
37
|
+
<%= link_to("Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), class: "nav-link") %>
|
|
38
|
+
</li>
|
|
39
|
+
<% end -%>
|
|
40
|
+
</ul>
|
|
41
|
+
<% end -%>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<h2>Resend unlock instructions</h2>
|
|
2
|
+
|
|
3
|
+
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
|
4
|
+
<%= devise_error_messages! %>
|
|
5
|
+
|
|
6
|
+
<div class="form-inputs">
|
|
7
|
+
<div class="form-group string required email">
|
|
8
|
+
<%= f.label :email, class: "control-label string email required" %>
|
|
9
|
+
<%= f.email_field :email, autofocus: true, class: "form-control string email required" %>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="form-actions text-right">
|
|
14
|
+
<%= f.submit "Resend unlock instructions", class: "btn btn-default" %>
|
|
15
|
+
</div>
|
|
16
|
+
<% end %>
|
|
17
|
+
|
|
18
|
+
<%= render "devise/shared/links" %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# Link to the "First" page
|
|
2
|
+
- available local variables
|
|
3
|
+
url: url to the first page
|
|
4
|
+
current_page: a page object for the currently displayed page
|
|
5
|
+
total_pages: total number of pages
|
|
6
|
+
per_page: number of items to fetch per page
|
|
7
|
+
remote: data-remote
|
|
8
|
+
-%>
|
|
9
|
+
<span class="first">
|
|
10
|
+
<%= link_to_unless current_page.first?, t('views.pagination.first').html_safe, url, remote: remote %>
|
|
11
|
+
</span>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%# Non-link tag that stands for skipped pages...
|
|
2
|
+
- available local variables
|
|
3
|
+
current_page: a page object for the currently displayed page
|
|
4
|
+
total_pages: total number of pages
|
|
5
|
+
per_page: number of items to fetch per page
|
|
6
|
+
remote: data-remote
|
|
7
|
+
-%>
|
|
8
|
+
<span class="page gap"><%= t('views.pagination.truncate').html_safe %></span>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# Link to the "Last" page
|
|
2
|
+
- available local variables
|
|
3
|
+
url: url to the last page
|
|
4
|
+
current_page: a page object for the currently displayed page
|
|
5
|
+
total_pages: total number of pages
|
|
6
|
+
per_page: number of items to fetch per page
|
|
7
|
+
remote: data-remote
|
|
8
|
+
-%>
|
|
9
|
+
<span class="last">
|
|
10
|
+
<%= link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, remote: remote %>
|
|
11
|
+
</span>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# Link to the "Next" page
|
|
2
|
+
- available local variables
|
|
3
|
+
url: url to the next page
|
|
4
|
+
current_page: a page object for the currently displayed page
|
|
5
|
+
total_pages: total number of pages
|
|
6
|
+
per_page: number of items to fetch per page
|
|
7
|
+
remote: data-remote
|
|
8
|
+
-%>
|
|
9
|
+
<span class="next">
|
|
10
|
+
<%= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, rel: 'next', remote: remote %>
|
|
11
|
+
</span>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%# Link showing page number
|
|
2
|
+
- available local variables
|
|
3
|
+
page: a page object for "this" page
|
|
4
|
+
url: url to this page
|
|
5
|
+
current_page: a page object for the currently displayed page
|
|
6
|
+
total_pages: total number of pages
|
|
7
|
+
per_page: number of items to fetch per page
|
|
8
|
+
remote: data-remote
|
|
9
|
+
-%>
|
|
10
|
+
<span class="page<%= ' current' if page.current? %>">
|
|
11
|
+
<%= link_to_unless page.current?, page, url, {remote: remote, rel: page.rel} %>
|
|
12
|
+
</span>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<%# The container tag
|
|
2
|
+
- available local variables
|
|
3
|
+
current_page: a page object for the currently displayed page
|
|
4
|
+
total_pages: total number of pages
|
|
5
|
+
per_page: number of items to fetch per page
|
|
6
|
+
remote: data-remote
|
|
7
|
+
paginator: the paginator that renders the pagination tags inside
|
|
8
|
+
-%>
|
|
9
|
+
<%= paginator.render do -%>
|
|
10
|
+
<nav class="pagination">
|
|
11
|
+
<%= first_page_tag unless current_page.first? %>
|
|
12
|
+
<%= prev_page_tag unless current_page.first? %>
|
|
13
|
+
<% each_page do |page| -%>
|
|
14
|
+
<% if page.display_tag? -%>
|
|
15
|
+
<%= page_tag page %>
|
|
16
|
+
<% elsif !page.was_truncated? -%>
|
|
17
|
+
<%= gap_tag %>
|
|
18
|
+
<% end -%>
|
|
19
|
+
<% end -%>
|
|
20
|
+
<% unless current_page.out_of_range? %>
|
|
21
|
+
<%= next_page_tag unless current_page.last? %>
|
|
22
|
+
<%= last_page_tag unless current_page.last? %>
|
|
23
|
+
<% end %>
|
|
24
|
+
</nav>
|
|
25
|
+
<% end -%>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# Link to the "Previous" page
|
|
2
|
+
- available local variables
|
|
3
|
+
url: url to the previous page
|
|
4
|
+
current_page: a page object for the currently displayed page
|
|
5
|
+
total_pages: total number of pages
|
|
6
|
+
per_page: number of items to fetch per page
|
|
7
|
+
remote: data-remote
|
|
8
|
+
-%>
|
|
9
|
+
<span class="prev">
|
|
10
|
+
<%= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, url, rel: 'prev', remote: remote %>
|
|
11
|
+
</span>
|
data/archangel.gemspec
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
|
4
|
+
|
|
5
|
+
require "archangel/version"
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |s|
|
|
8
|
+
s.platform = Gem::Platform::RUBY
|
|
9
|
+
s.name = "archangel"
|
|
10
|
+
s.version = Archangel.version
|
|
11
|
+
s.authors = ["David Freerksen"]
|
|
12
|
+
s.email = ["dfreerksen@gmail.com"]
|
|
13
|
+
s.homepage = "https://github.com/archangel/archangel"
|
|
14
|
+
s.summary = "Archangel CMS"
|
|
15
|
+
s.description = "Archangel is a Rails CMS"
|
|
16
|
+
s.license = "MIT"
|
|
17
|
+
s.files = `git ls-files`.split($ORS)
|
|
18
|
+
|
|
19
|
+
s.required_ruby_version = ">= 2.2.10"
|
|
20
|
+
|
|
21
|
+
s.add_dependency "jquery-rails", "~> 4.1", ">= 4.1.0"
|
|
22
|
+
s.add_dependency "rails", "~> 5.1", ">= 5.1.4"
|
|
23
|
+
s.add_dependency "sass-rails", "~> 5.0", ">= 5.0.0"
|
|
24
|
+
s.add_dependency "uglifier", "~> 4.1", ">= 4.1.8"
|
|
25
|
+
|
|
26
|
+
s.add_dependency "acts_as_list", "~> 0.9"
|
|
27
|
+
s.add_dependency "acts_as_tree", "~> 2.7"
|
|
28
|
+
s.add_dependency "anyway_config", "~> 1.2"
|
|
29
|
+
s.add_dependency "bootstrap", "~> 4.1"
|
|
30
|
+
s.add_dependency "bootstrap3-datetimepicker-rails", "~> 4.17"
|
|
31
|
+
s.add_dependency "carrierwave", "~> 1.2"
|
|
32
|
+
s.add_dependency "cocoon", "~> 1.2"
|
|
33
|
+
s.add_dependency "date_validator", "~> 0.9"
|
|
34
|
+
s.add_dependency "devise", "~> 4.4"
|
|
35
|
+
s.add_dependency "devise_invitable", "~> 1.7"
|
|
36
|
+
s.add_dependency "file_validators", "~> 2.1"
|
|
37
|
+
s.add_dependency "font-awesome-rails", "~> 4.7"
|
|
38
|
+
s.add_dependency "highline", "~> 1.7"
|
|
39
|
+
s.add_dependency "jbuilder", "~> 2.7"
|
|
40
|
+
s.add_dependency "kaminari", "~> 1.1"
|
|
41
|
+
s.add_dependency "liquid", "~> 4.0"
|
|
42
|
+
s.add_dependency "meta-tags", "~> 2.9"
|
|
43
|
+
s.add_dependency "mini_magick", "~> 4.8"
|
|
44
|
+
s.add_dependency "momentjs-rails", "~> 2.20"
|
|
45
|
+
s.add_dependency "paranoia", "~> 2.4"
|
|
46
|
+
s.add_dependency "popper_js", "~> 1.12"
|
|
47
|
+
s.add_dependency "pundit", "~> 1.1"
|
|
48
|
+
s.add_dependency "responders", "~> 2.4"
|
|
49
|
+
s.add_dependency "selectize-rails", "~> 0.12"
|
|
50
|
+
s.add_dependency "simple_form", "~> 4.0"
|
|
51
|
+
s.add_dependency "validates", "~> 1.0"
|
|
52
|
+
end
|
data/archangel.png
ADDED
|
Binary file
|
data/bin/rails
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
ENGINE_ROOT = File.expand_path("../..", __FILE__)
|
|
4
|
+
ENGINE_PATH = File.expand_path("../../lib/archangel/engine", __FILE__)
|
|
5
|
+
|
|
6
|
+
APP_PATH = File.expand_path("../../spec/dummy/config/application", __FILE__)
|
|
7
|
+
|
|
8
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
|
|
9
|
+
|
|
10
|
+
require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
|
|
11
|
+
|
|
12
|
+
require "rails/all"
|
|
13
|
+
require "rails/engine/commands"
|
data/config/brakeman.yml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
Rails.application.config.assets.precompile += [
|
|
4
|
+
"*.gif", "*.ico", "*.jpeg", "*.jpg", "*.png",
|
|
5
|
+
"*.eot", "*.svg", "*.ttf", "*.woff", "*.woff2",
|
|
6
|
+
"auth.css", "auth.js",
|
|
7
|
+
"archangel/auth.css", "archangel/auth.js",
|
|
8
|
+
"backend.css", "backend.js",
|
|
9
|
+
"archangel/backend.css", "archangel/backend.js",
|
|
10
|
+
"frontend.css", "frontend.js",
|
|
11
|
+
"archangel/frontend.css", "archangel/frontend.js"
|
|
12
|
+
]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
CarrierWave.configure do |config|
|
|
4
|
+
# Local file storage
|
|
5
|
+
config.permissions = 0o666
|
|
6
|
+
config.directory_permissions = 0o777
|
|
7
|
+
config.storage = :file
|
|
8
|
+
|
|
9
|
+
# Use local file storage for tests
|
|
10
|
+
if Rails.env.test?
|
|
11
|
+
config.storage = :file
|
|
12
|
+
config.enable_processing = false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
Devise.setup do |config|
|
|
4
|
+
# The secret key used by Devise. Devise uses this key to generate
|
|
5
|
+
# random tokens. Changing this key will render invalid all existing
|
|
6
|
+
# confirmation, reset password and unlock tokens in the database.
|
|
7
|
+
# Devise will use the `secret_key_base` as its `secret_key`
|
|
8
|
+
# by default. You can change it below and use your own secret key.
|
|
9
|
+
# config.secret_key = "187e19794141eac9ab63acd9d898e6ed41b486453969f2c570c97d"
|
|
10
|
+
|
|
11
|
+
# ==> Mailer Configuration
|
|
12
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
|
13
|
+
# note that it will be overwritten if you use your own mailer class
|
|
14
|
+
# with default "from" parameter.
|
|
15
|
+
config.mailer_sender = "noreply@example.com"
|
|
16
|
+
|
|
17
|
+
# Configure the class responsible to send e-mails.
|
|
18
|
+
# config.mailer = "Devise::Mailer"
|
|
19
|
+
|
|
20
|
+
# Configure the parent class responsible to send e-mails.
|
|
21
|
+
# config.parent_mailer = "ActionMailer::Base"
|
|
22
|
+
|
|
23
|
+
# ==> ORM configuration
|
|
24
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
|
25
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
|
26
|
+
# available as additional gems.
|
|
27
|
+
require "devise/orm/active_record"
|
|
28
|
+
|
|
29
|
+
# ==> Configuration for any authentication mechanism
|
|
30
|
+
# Configure which keys are used when authenticating a user. The default is
|
|
31
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
|
32
|
+
# authenticating a user, both parameters are required. Remember that those
|
|
33
|
+
# parameters are used only when authenticating and not when retrieving from
|
|
34
|
+
# session. If you need permissions, you should implement that in a before
|
|
35
|
+
# filter. You can also supply a hash where the value is a boolean determining
|
|
36
|
+
# whether or not authentication should be aborted when the value is not
|
|
37
|
+
# present.
|
|
38
|
+
# config.authentication_keys = [:email]
|
|
39
|
+
|
|
40
|
+
# Configure parameters from the request object used for authentication. Each
|
|
41
|
+
# entry given should be a request method and it will automatically be passed
|
|
42
|
+
# to the find_for_authentication method and considered in your model lookup.
|
|
43
|
+
# For instance, if you set :request_keys to [:subdomain], :subdomain will be
|
|
44
|
+
# used on authentication. The same considerations mentioned for
|
|
45
|
+
# authentication_keys also apply to request_keys.
|
|
46
|
+
# config.request_keys = []
|
|
47
|
+
|
|
48
|
+
# Configure which authentication keys should be case-insensitive.
|
|
49
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
|
50
|
+
# to authenticate or find a user. Default is :email.
|
|
51
|
+
config.case_insensitive_keys = [:email]
|
|
52
|
+
|
|
53
|
+
# Configure which authentication keys should have whitespace stripped.
|
|
54
|
+
# These keys will have whitespace before and after removed upon creating or
|
|
55
|
+
# modifying a user and when used to authenticate or find a user. Default
|
|
56
|
+
# is :email.
|
|
57
|
+
config.strip_whitespace_keys = [:email]
|
|
58
|
+
|
|
59
|
+
# Tell if authentication through request.params is enabled. True by default.
|
|
60
|
+
# It can be set to an array that will enable params authentication only for
|
|
61
|
+
# the given strategies, for example,
|
|
62
|
+
# `config.params_authenticatable = [:database]` will enable it only for
|
|
63
|
+
# database (email + password) authentication.
|
|
64
|
+
# config.params_authenticatable = true
|
|
65
|
+
|
|
66
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
|
67
|
+
# It can be set to an array that will enable http authentication only for the
|
|
68
|
+
# given strategies, for example, `config.http_authenticatable = [:database]`
|
|
69
|
+
# will enable it only for database authentication. The supported strategies
|
|
70
|
+
# are:
|
|
71
|
+
# :database = Support basic authentication with authentication key + password
|
|
72
|
+
# config.http_authenticatable = false
|
|
73
|
+
|
|
74
|
+
# If 401 status code should be returned for AJAX requests. True by default.
|
|
75
|
+
# config.http_authenticatable_on_xhr = true
|
|
76
|
+
|
|
77
|
+
# The realm used in Http Basic Authentication. "Application" by default.
|
|
78
|
+
config.http_authentication_realm = "Archangel"
|
|
79
|
+
|
|
80
|
+
# It will change confirmation, password recovery and other workflows
|
|
81
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
|
82
|
+
# Does not affect registerable.
|
|
83
|
+
# config.paranoid = true
|
|
84
|
+
|
|
85
|
+
# By default Devise will store the user in session. You can skip storage for
|
|
86
|
+
# particular strategies by setting this option.
|
|
87
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
|
88
|
+
# may want to disable generating routes to Devise's sessions controller by
|
|
89
|
+
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
|
90
|
+
config.skip_session_storage = [:http_auth]
|
|
91
|
+
|
|
92
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
|
93
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
|
94
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
|
95
|
+
# from the server. You can disable this option at your own risk.
|
|
96
|
+
# config.clean_up_csrf_token_on_authentication = true
|
|
97
|
+
|
|
98
|
+
# When false, Devise will not attempt to reload routes on eager load.
|
|
99
|
+
# This can reduce the time taken to boot the app but if your application
|
|
100
|
+
# requires the Devise mappings to be loaded during boot time the application
|
|
101
|
+
# won't boot properly.
|
|
102
|
+
# config.reload_routes = true
|
|
103
|
+
|
|
104
|
+
# ==> Configuration for :database_authenticatable
|
|
105
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 11. If
|
|
106
|
+
# using other algorithms, it sets how many times you want the password to be
|
|
107
|
+
# hashed.
|
|
108
|
+
#
|
|
109
|
+
# Limiting the stretches to just one in testing will increase the performance
|
|
110
|
+
# of your test suite dramatically. However, it is STRONGLY RECOMMENDED to not
|
|
111
|
+
# use a value less than 10 in other environments. Note that, for bcrypt (the
|
|
112
|
+
# default algorithm), the cost increases exponentially with the number of
|
|
113
|
+
# stretches (e.g. a value of 20 is already extremely slow: approx. 60 seconds
|
|
114
|
+
# for 1 calculation).
|
|
115
|
+
config.stretches = Rails.env.test? ? 1 : 11
|
|
116
|
+
|
|
117
|
+
# Set up a pepper to generate the hashed password.
|
|
118
|
+
# config.pepper = "2605340af8548662f070a63b977a0aaf69ef09cce0066a51970210ef83"
|
|
119
|
+
|
|
120
|
+
# Send a notification to the original email when the user's email is changed.
|
|
121
|
+
# config.send_email_changed_notification = false
|
|
122
|
+
|
|
123
|
+
# Send a notification email when the user's password is changed.
|
|
124
|
+
# config.send_password_change_notification = false
|
|
125
|
+
|
|
126
|
+
# ==> Configuration for :invitable
|
|
127
|
+
# The period the generated invitation token is valid, after
|
|
128
|
+
# this period, the invited resource won't be able to accept the invitation.
|
|
129
|
+
# When invite_for is 0 (the default), the invitation won't expire.
|
|
130
|
+
config.invite_for = 1.week
|
|
131
|
+
|
|
132
|
+
# Number of invitations users can send.
|
|
133
|
+
# - If invitation_limit is nil, there is no limit for invitations, users can
|
|
134
|
+
# send unlimited invitations, invitation_limit column is not used.
|
|
135
|
+
# - If invitation_limit is 0, users can't send invitations by default.
|
|
136
|
+
# - If invitation_limit n > 0, users can send n invitations.
|
|
137
|
+
# You can change invitation_limit column for some users so they can send more
|
|
138
|
+
# or less invitations, even with global invitation_limit = 0
|
|
139
|
+
# Default: nil
|
|
140
|
+
# config.invitation_limit = 5
|
|
141
|
+
|
|
142
|
+
# The key to be used to check existing users when sending an invitation
|
|
143
|
+
# and the regexp used to test it when validate_on_invite is not set.
|
|
144
|
+
# config.invite_key = {:email => /\A[^@]+@[^@]+\z/}
|
|
145
|
+
# config.invite_key = {:email => /\A[^@]+@[^@]+\z/, :username => nil}
|
|
146
|
+
|
|
147
|
+
# Flag that force a record to be valid before being actually invited
|
|
148
|
+
# Default: false
|
|
149
|
+
# config.validate_on_invite = true
|
|
150
|
+
|
|
151
|
+
# Resend invitation if user with invited status is invited again
|
|
152
|
+
# Default: true
|
|
153
|
+
# config.resend_invitation = false
|
|
154
|
+
|
|
155
|
+
# The class name of the inviting model. If this is nil,
|
|
156
|
+
# the #invited_by association is declared to be polymorphic.
|
|
157
|
+
# Default: nil
|
|
158
|
+
# config.invited_by_class_name = "User"
|
|
159
|
+
|
|
160
|
+
# The foreign key to the inviting model (if invited_by_class_name is set)
|
|
161
|
+
# Default: :invited_by_id
|
|
162
|
+
# config.invited_by_foreign_key = :invited_by_id
|
|
163
|
+
|
|
164
|
+
# The column name used for counter_cache column. If this is nil,
|
|
165
|
+
# the #invited_by association is declared without counter_cache.
|
|
166
|
+
# Default: nil
|
|
167
|
+
# config.invited_by_counter_cache = :invitations_count
|
|
168
|
+
|
|
169
|
+
# Auto-login after the user accepts the invite. If this is false,
|
|
170
|
+
# the user will need to manually log in after accepting the invite.
|
|
171
|
+
# Default: true
|
|
172
|
+
# config.allow_insecure_sign_in_after_accept = false
|
|
173
|
+
|
|
174
|
+
# ==> Configuration for :confirmable
|
|
175
|
+
# A period that the user is allowed to access the website even without
|
|
176
|
+
# confirming their account. For instance, if set to 2.days, the user will be
|
|
177
|
+
# able to access the website for two days without confirming their account,
|
|
178
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
|
179
|
+
# the user cannot access the website without confirming their account.
|
|
180
|
+
# config.allow_unconfirmed_access_for = 2.days
|
|
181
|
+
|
|
182
|
+
# A period that the user is allowed to confirm their account before their
|
|
183
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
|
184
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
|
185
|
+
# their account can't be confirmed with the token any more.
|
|
186
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
|
187
|
+
# before confirming their account.
|
|
188
|
+
config.confirm_within = 2.days
|
|
189
|
+
|
|
190
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
|
191
|
+
# initial account confirmation) to be applied. Requires additional
|
|
192
|
+
# unconfirmed_email db field (see migrations). Until confirmed, new email is
|
|
193
|
+
# stored in unconfirmed_email column, and copied to email column on successful
|
|
194
|
+
# confirmation.
|
|
195
|
+
config.reconfirmable = true
|
|
196
|
+
|
|
197
|
+
# Defines which key will be used when confirming an account
|
|
198
|
+
# config.confirmation_keys = [:email]
|
|
199
|
+
|
|
200
|
+
# ==> Configuration for :rememberable
|
|
201
|
+
# The time the user will be remembered without asking for credentials again.
|
|
202
|
+
config.remember_for = 8.hours
|
|
203
|
+
|
|
204
|
+
# Invalidates all the remember me tokens when the user signs out.
|
|
205
|
+
config.expire_all_remember_me_on_sign_out = true
|
|
206
|
+
|
|
207
|
+
# If true, extends the user's remember period when remembered via cookie.
|
|
208
|
+
# config.extend_remember_period = false
|
|
209
|
+
|
|
210
|
+
# Options to be passed to the created cookie. For instance, you can set
|
|
211
|
+
# secure: true in order to force SSL only cookies.
|
|
212
|
+
# config.rememberable_options = {}
|
|
213
|
+
|
|
214
|
+
# ==> Configuration for :validatable
|
|
215
|
+
# Range for password length.
|
|
216
|
+
config.password_length = 6..128
|
|
217
|
+
|
|
218
|
+
# Email regex used to validate email formats. It simply asserts that
|
|
219
|
+
# one (and only one) @ exists in the given string. This is mainly
|
|
220
|
+
# to give user feedback and not to assert the e-mail validity.
|
|
221
|
+
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
|
|
222
|
+
|
|
223
|
+
# ==> Configuration for :timeoutable
|
|
224
|
+
# The time you want to timeout the user session without activity. After this
|
|
225
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
|
226
|
+
config.timeout_in = 30.minutes
|
|
227
|
+
|
|
228
|
+
# ==> Configuration for :lockable
|
|
229
|
+
# Defines which strategy will be used to lock an account.
|
|
230
|
+
# :failed_attempts = Locks an account after a number of failed attempts to
|
|
231
|
+
# sign in.
|
|
232
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
|
233
|
+
config.lock_strategy = :failed_attempts
|
|
234
|
+
|
|
235
|
+
# Defines which key will be used when locking and unlocking an account
|
|
236
|
+
# config.unlock_keys = [:email]
|
|
237
|
+
|
|
238
|
+
# Defines which strategy will be used to unlock an account.
|
|
239
|
+
# :email = Sends an unlock link to the user email
|
|
240
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in
|
|
241
|
+
# below)
|
|
242
|
+
# :both = Enables both strategies
|
|
243
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
|
244
|
+
config.unlock_strategy = :both
|
|
245
|
+
|
|
246
|
+
# Number of authentication tries before locking an account if lock_strategy
|
|
247
|
+
# is failed attempts.
|
|
248
|
+
config.maximum_attempts = 4
|
|
249
|
+
|
|
250
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
|
251
|
+
config.unlock_in = 1.hour
|
|
252
|
+
|
|
253
|
+
# Warn on the last attempt before the account is locked.
|
|
254
|
+
# config.last_attempt_warning = true
|
|
255
|
+
|
|
256
|
+
# ==> Configuration for :recoverable
|
|
257
|
+
#
|
|
258
|
+
# Defines which key will be used when recovering the password for an account
|
|
259
|
+
# config.reset_password_keys = [:email]
|
|
260
|
+
|
|
261
|
+
# Time interval you can reset your password with a reset password key.
|
|
262
|
+
# Don't put a too small interval or your users won't have the time to
|
|
263
|
+
# change their passwords.
|
|
264
|
+
config.reset_password_within = 6.hours
|
|
265
|
+
|
|
266
|
+
# When set to false, does not sign a user in automatically after their
|
|
267
|
+
# password is reset. Defaults to true, so a user is signed in automatically
|
|
268
|
+
# after a reset.
|
|
269
|
+
# config.sign_in_after_reset_password = true
|
|
270
|
+
|
|
271
|
+
# ==> Configuration for :encryptable
|
|
272
|
+
# Allow you to use another hashing or encryption algorithm besides bcrypt
|
|
273
|
+
# (default). You can use :sha1, :sha512 or algorithms from others
|
|
274
|
+
# authentication tools as :clearance_sha1, :authlogic_sha512 (then you should
|
|
275
|
+
# set stretches above to 20 for default behavior) and
|
|
276
|
+
# :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
|
277
|
+
# REST_AUTH_SITE_KEY to pepper).
|
|
278
|
+
#
|
|
279
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
|
280
|
+
# config.encryptor = :sha512
|
|
281
|
+
|
|
282
|
+
# ==> Scopes configuration
|
|
283
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check
|
|
284
|
+
# for "users/sessions/new". It's turned off by default because it's slower if
|
|
285
|
+
# you are using only default views.
|
|
286
|
+
# config.scoped_views = false
|
|
287
|
+
|
|
288
|
+
# Configure the default scope given to Warden. By default it's the first
|
|
289
|
+
# devise role declared in your routes (usually :user).
|
|
290
|
+
# config.default_scope = :user
|
|
291
|
+
|
|
292
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
|
293
|
+
# only the current scope. By default, Devise signs out all scopes.
|
|
294
|
+
# config.sign_out_all_scopes = true
|
|
295
|
+
|
|
296
|
+
# ==> Navigation configuration
|
|
297
|
+
# Lists the formats that should be treated as navigational. Formats like
|
|
298
|
+
# :html, should redirect to the sign in page when the user does not have
|
|
299
|
+
# access, but formats like :xml or :json, should return 401.
|
|
300
|
+
#
|
|
301
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
|
302
|
+
# should add them to the navigational formats lists.
|
|
303
|
+
#
|
|
304
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
|
305
|
+
# config.navigational_formats = ["*/*", :html]
|
|
306
|
+
|
|
307
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
|
308
|
+
config.sign_out_via = :delete
|
|
309
|
+
|
|
310
|
+
# ==> OmniAuth
|
|
311
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
|
312
|
+
# up on your models and hooks.
|
|
313
|
+
# config.omniauth :github, "APP_ID", "APP_SECRET", scope: "user,public_repo"
|
|
314
|
+
|
|
315
|
+
# ==> Warden configuration
|
|
316
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
|
317
|
+
# change the failure app, you can configure them inside the config.warden
|
|
318
|
+
# block.
|
|
319
|
+
#
|
|
320
|
+
# config.warden do |manager|
|
|
321
|
+
# manager.intercept_401 = false
|
|
322
|
+
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
|
323
|
+
# end
|
|
324
|
+
|
|
325
|
+
# ==> Mountable engine configurations
|
|
326
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this
|
|
327
|
+
# engine is mountable, there are some extra configurations to be taken into
|
|
328
|
+
# account. The following options are available, assuming the engine is
|
|
329
|
+
# mounted as:
|
|
330
|
+
#
|
|
331
|
+
# mount MyEngine, at: "/my_engine"
|
|
332
|
+
#
|
|
333
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
|
334
|
+
config.router_name = :archangel
|
|
335
|
+
|
|
336
|
+
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
|
337
|
+
# so you need to do it manually. For the users scope, it would be:
|
|
338
|
+
# config.omniauth_path_prefix = "/my_engine/users/auth"
|
|
339
|
+
|
|
340
|
+
config.parent_controller = "Archangel::AuthController"
|
|
341
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
Kaminari.configure do |config|
|
|
4
|
+
config.default_per_page = 24
|
|
5
|
+
config.max_per_page = 240
|
|
6
|
+
# config.window = 4
|
|
7
|
+
# config.outer_window = 0
|
|
8
|
+
# config.left = 0
|
|
9
|
+
# config.right = 0
|
|
10
|
+
config.page_method_name = :page
|
|
11
|
+
config.param_name = :page
|
|
12
|
+
# config.params_on_first_page = false
|
|
13
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
MetaTags.configure do |config|
|
|
4
|
+
# How many characters should the title meta tag have at most. Default is 70.
|
|
5
|
+
# Set to nil or 0 to remove limits.
|
|
6
|
+
# config.title_limit = 70
|
|
7
|
+
|
|
8
|
+
# When true, site title will be truncated instead of title. Default is false.
|
|
9
|
+
# config.truncate_site_title_first = false
|
|
10
|
+
|
|
11
|
+
# Maximum length of the page description. Default is 160.
|
|
12
|
+
# Set to nil or 0 to remove limits.
|
|
13
|
+
# config.description_limit = 160
|
|
14
|
+
|
|
15
|
+
# Maxumum length of the keywords meta tag. Default is 255.
|
|
16
|
+
# config.keywords_limit = 255
|
|
17
|
+
|
|
18
|
+
# Default separator for keywords meta tag (used when an Array passed with
|
|
19
|
+
# the list of keywords). Default is ", ".
|
|
20
|
+
# config.keywords_separator = ", "
|
|
21
|
+
|
|
22
|
+
# When true, keywords will be converted to lowercase, otherwise they will
|
|
23
|
+
# appear on the page as is. Default is true.
|
|
24
|
+
# config.keywords_lowercase = true
|
|
25
|
+
|
|
26
|
+
# List of additional meta tags that should use "property" attribute instead
|
|
27
|
+
# of "name" attribute in <meta> tags.
|
|
28
|
+
# config.property_tags.push(
|
|
29
|
+
# "x-hearthstone:deck",
|
|
30
|
+
# )
|
|
31
|
+
end
|