HornsAndHooves-publify_core 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +102 -0
- data/MIT-LICENSE +21 -0
- data/README.md +9 -0
- data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
- data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/app/assets/fonts/open-sans-bold.woff +0 -0
- data/app/assets/fonts/open-sans.woff +0 -0
- data/app/assets/images/admin/loading.gif +0 -0
- data/app/assets/images/admin/typologo.gif +0 -0
- data/app/assets/images/calendar_date_select/calendar.gif +0 -0
- data/app/assets/images/close.gif +0 -0
- data/app/assets/images/closelabel.gif +0 -0
- data/app/assets/images/go.png +0 -0
- data/app/assets/images/loading.gif +0 -0
- data/app/assets/images/nextlabel.gif +0 -0
- data/app/assets/images/overlay.png +0 -0
- data/app/assets/images/powered.gif +0 -0
- data/app/assets/images/prevlabel.gif +0 -0
- data/app/assets/images/spinner-blue.gif +0 -0
- data/app/assets/images/spinner.gif +0 -0
- data/app/assets/images/thumb_blank.jpg +0 -0
- data/app/assets/javascripts/application.js +2 -0
- data/app/assets/javascripts/bootstrap/affix.js +164 -0
- data/app/assets/javascripts/bootstrap/alert.js +95 -0
- data/app/assets/javascripts/bootstrap/button.js +125 -0
- data/app/assets/javascripts/bootstrap/collapse.js +212 -0
- data/app/assets/javascripts/bootstrap/dropdown.js +165 -0
- data/app/assets/javascripts/bootstrap/modal.js +358 -0
- data/app/assets/javascripts/bootstrap/tab.js +155 -0
- data/app/assets/javascripts/bootstrap/transition.js +59 -0
- data/app/assets/javascripts/bootstrap-sprockets.js +8 -0
- data/app/assets/javascripts/cookies.js +60 -0
- data/app/assets/javascripts/datetimepicker.js +1470 -0
- data/app/assets/javascripts/lang/da_DK.js +17 -0
- data/app/assets/javascripts/lang/default.js +21 -0
- data/app/assets/javascripts/lang/en_US.js +21 -0
- data/app/assets/javascripts/lang/fr_FR.js +21 -0
- data/app/assets/javascripts/lang/nl_NL.js +21 -0
- data/app/assets/javascripts/lang/zh_TW.js +17 -0
- data/app/assets/javascripts/lightbox.js +350 -0
- data/app/assets/javascripts/observe.js +28 -0
- data/app/assets/javascripts/publify.js +11 -0
- data/app/assets/javascripts/publify_admin.js +104 -0
- data/app/assets/javascripts/quicktags.js +448 -0
- data/app/assets/javascripts/set-timeago-lang.js +3 -0
- data/app/assets/javascripts/sidebar.js +28 -0
- data/app/assets/javascripts/spinnable.js +5 -0
- data/app/assets/javascripts/tagmanager.js +481 -0
- data/app/assets/javascripts/typeahead.js +1139 -0
- data/app/assets/stylesheets/_bootstrap-compass.scss +9 -0
- data/app/assets/stylesheets/_bootstrap-mincer.scss +19 -0
- data/app/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
- data/app/assets/stylesheets/_bootstrap.scss +43 -0
- data/app/assets/stylesheets/accounts.css.scss +7 -0
- data/app/assets/stylesheets/administration_structure.css.scss +255 -0
- data/app/assets/stylesheets/bootstrap/_alerts.scss +73 -0
- data/app/assets/stylesheets/bootstrap/_button-groups.scss +242 -0
- data/app/assets/stylesheets/bootstrap/_buttons.scss +168 -0
- data/app/assets/stylesheets/bootstrap/_close.scss +37 -0
- data/app/assets/stylesheets/bootstrap/_code.scss +69 -0
- data/app/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
- data/app/assets/stylesheets/bootstrap/_dropdowns.scss +213 -0
- data/app/assets/stylesheets/bootstrap/_forms.scss +586 -0
- data/app/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
- data/app/assets/stylesheets/bootstrap/_grid.scss +94 -0
- data/app/assets/stylesheets/bootstrap/_labels.scss +66 -0
- data/app/assets/stylesheets/bootstrap/_media.scss +66 -0
- data/app/assets/stylesheets/bootstrap/_mixins.scss +37 -0
- data/app/assets/stylesheets/bootstrap/_modals.scss +150 -0
- data/app/assets/stylesheets/bootstrap/_navbar.scss +479 -0
- data/app/assets/stylesheets/bootstrap/_navs.scss +242 -0
- data/app/assets/stylesheets/bootstrap/_normalize.scss +427 -0
- data/app/assets/stylesheets/bootstrap/_pagination.scss +86 -0
- data/app/assets/stylesheets/bootstrap/_panels.scss +222 -0
- data/app/assets/stylesheets/bootstrap/_print.scss +99 -0
- data/app/assets/stylesheets/bootstrap/_scaffolding.scss +160 -0
- data/app/assets/stylesheets/bootstrap/_tables.scss +234 -0
- data/app/assets/stylesheets/bootstrap/_theme.scss +224 -0
- data/app/assets/stylesheets/bootstrap/_type.scss +296 -0
- data/app/assets/stylesheets/bootstrap/_utilities.scss +55 -0
- data/app/assets/stylesheets/bootstrap/_variables.scss +654 -0
- data/app/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/app/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
- data/app/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
- data/app/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
- data/app/assets/stylesheets/bootstrap/mixins/_buttons.scss +56 -0
- data/app/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/app/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
- data/app/assets/stylesheets/bootstrap/mixins/_forms.scss +82 -0
- data/app/assets/stylesheets/bootstrap/mixins/_gradients.scss +56 -0
- data/app/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
- data/app/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
- data/app/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
- data/app/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
- data/app/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
- data/app/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/app/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
- data/app/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
- data/app/assets/stylesheets/bootstrap/mixins/_panels.scss +20 -0
- data/app/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/app/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
- data/app/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
- data/app/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/app/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
- data/app/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/app/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
- data/app/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- data/app/assets/stylesheets/coderay.css +135 -0
- data/app/assets/stylesheets/datetimepicker.css +306 -0
- data/app/assets/stylesheets/lightbox.css +63 -0
- data/app/assets/stylesheets/publify.css.scss +9 -0
- data/app/assets/stylesheets/publify_admin.css.scss +10 -0
- data/app/assets/stylesheets/rss.css +53 -0
- data/app/assets/stylesheets/sidebar_admin.css.scss +36 -0
- data/app/assets/stylesheets/tagmanager.css +102 -0
- data/app/assets/stylesheets/user-styles.css +29 -0
- data/app/controllers/accounts_controller.rb +4 -0
- data/app/controllers/admin/base_controller.rb +27 -0
- data/app/controllers/admin/content_controller.rb +194 -0
- data/app/controllers/admin/dashboard_controller.rb +33 -0
- data/app/controllers/admin/feedback_controller.rb +160 -0
- data/app/controllers/admin/notes_controller.rb +73 -0
- data/app/controllers/admin/pages_controller.rb +73 -0
- data/app/controllers/admin/post_types_controller.rb +57 -0
- data/app/controllers/admin/profiles_controller.rb +57 -0
- data/app/controllers/admin/redirects_controller.rb +51 -0
- data/app/controllers/admin/resources_controller.rb +36 -0
- data/app/controllers/admin/seo_controller.rb +46 -0
- data/app/controllers/admin/settings_controller.rb +53 -0
- data/app/controllers/admin/sidebar_controller.rb +67 -0
- data/app/controllers/admin/tags_controller.rb +55 -0
- data/app/controllers/admin/themes_controller.rb +31 -0
- data/app/controllers/admin/users_controller.rb +67 -0
- data/app/controllers/articles_controller.rb +215 -0
- data/app/controllers/authors_controller.rb +30 -0
- data/app/controllers/base_controller.rb +43 -0
- data/app/controllers/comments_controller.rb +67 -0
- data/app/controllers/content_controller.rb +24 -0
- data/app/controllers/feedback_controller.rb +13 -0
- data/app/controllers/notes_controller.rb +35 -0
- data/app/controllers/setup_controller.rb +61 -0
- data/app/controllers/tags_controller.rb +50 -0
- data/app/controllers/text_controller.rb +7 -0
- data/app/controllers/textfilter_controller.rb +5 -0
- data/app/controllers/theme_controller.rb +63 -0
- data/app/controllers/xml_controller.rb +20 -0
- data/app/helpers/admin/base_helper.rb +87 -0
- data/app/helpers/admin/feedback_helper.rb +53 -0
- data/app/helpers/articles_helper.rb +10 -0
- data/app/helpers/authors_helper.rb +30 -0
- data/app/helpers/base_helper.rb +257 -0
- data/app/helpers/blog_helper.rb +14 -0
- data/app/helpers/xml_helper.rb +18 -0
- data/app/jobs/application_job.rb +5 -0
- data/app/mailers/notification_mailer.rb +40 -0
- data/app/models/ability.rb +53 -0
- data/app/models/archives_sidebar.rb +45 -0
- data/app/models/article/factory.rb +64 -0
- data/app/models/article.rb +308 -0
- data/app/models/blog.rb +280 -0
- data/app/models/comment.rb +57 -0
- data/app/models/config_manager.rb +83 -0
- data/app/models/content.rb +118 -0
- data/app/models/content_base.rb +88 -0
- data/app/models/feedback.rb +250 -0
- data/app/models/meta_sidebar.rb +10 -0
- data/app/models/note.rb +152 -0
- data/app/models/page.rb +42 -0
- data/app/models/page_sidebar.rb +14 -0
- data/app/models/ping.rb +5 -0
- data/app/models/post_type.rb +16 -0
- data/app/models/redirect.rb +51 -0
- data/app/models/redirection.rb +6 -0
- data/app/models/resource.rb +12 -0
- data/app/models/search_sidebar.rb +9 -0
- data/app/models/sidebar.rb +142 -0
- data/app/models/static_sidebar.rb +22 -0
- data/app/models/tag.rb +71 -0
- data/app/models/tag_sidebar.rb +30 -0
- data/app/models/text_filter.rb +141 -0
- data/app/models/trackback.rb +46 -0
- data/app/models/trigger.rb +34 -0
- data/app/models/user.rb +142 -0
- data/app/services/title_builder.rb +88 -0
- data/app/uploaders/resource_uploader.rb +63 -0
- data/app/views/accounts/confirm.html.erb +7 -0
- data/app/views/admin/content/_article_list.html.erb +26 -0
- data/app/views/admin/content/_form.html.erb +145 -0
- data/app/views/admin/content/autosave.js.erb +5 -0
- data/app/views/admin/content/edit.html.erb +3 -0
- data/app/views/admin/content/index.html.erb +48 -0
- data/app/views/admin/content/index.js.erb +1 -0
- data/app/views/admin/content/new.html.erb +3 -0
- data/app/views/admin/dashboard/_comment.html.erb +18 -0
- data/app/views/admin/dashboard/_comments.html.erb +10 -0
- data/app/views/admin/dashboard/_drafts.html.erb +25 -0
- data/app/views/admin/dashboard/_overview.html.erb +21 -0
- data/app/views/admin/dashboard/_welcome.html.erb +28 -0
- data/app/views/admin/dashboard/index.html.erb +16 -0
- data/app/views/admin/feedback/_button.html.erb +19 -0
- data/app/views/admin/feedback/_feedback.html.erb +7 -0
- data/app/views/admin/feedback/_ham.html.erb +17 -0
- data/app/views/admin/feedback/_spam.html.erb +23 -0
- data/app/views/admin/feedback/article.html.erb +69 -0
- data/app/views/admin/feedback/edit.html.erb +48 -0
- data/app/views/admin/feedback/ham.js +1 -0
- data/app/views/admin/feedback/index.html.erb +53 -0
- data/app/views/admin/feedback/spam.js +1 -0
- data/app/views/admin/migrations/show.html.erb +39 -0
- data/app/views/admin/notes/_form.html.erb +37 -0
- data/app/views/admin/notes/_header.html.erb +6 -0
- data/app/views/admin/notes/_list.html.erb +13 -0
- data/app/views/admin/notes/_note.html.erb +14 -0
- data/app/views/admin/notes/edit.html.erb +11 -0
- data/app/views/admin/notes/index.html.erb +11 -0
- data/app/views/admin/notes/show.html.erb +14 -0
- data/app/views/admin/pages/_form.html.erb +101 -0
- data/app/views/admin/pages/_pages.html.erb +21 -0
- data/app/views/admin/pages/edit.html.erb +1 -0
- data/app/views/admin/pages/index.html.erb +17 -0
- data/app/views/admin/pages/new.html.erb +1 -0
- data/app/views/admin/post_types/_index_and_form.html.erb +65 -0
- data/app/views/admin/post_types/edit.html.erb +1 -0
- data/app/views/admin/post_types/index.html.erb +1 -0
- data/app/views/admin/profiles/index.html.erb +10 -0
- data/app/views/admin/redirects/_index_and_form.html.erb +68 -0
- data/app/views/admin/redirects/edit.html.erb +1 -0
- data/app/views/admin/redirects/index.html.erb +1 -0
- data/app/views/admin/resources/index.html.erb +72 -0
- data/app/views/admin/seo/_general.html.erb +104 -0
- data/app/views/admin/seo/_permalinks.html.erb +53 -0
- data/app/views/admin/seo/_titles.html.erb +209 -0
- data/app/views/admin/seo/show.html.erb +28 -0
- data/app/views/admin/settings/display.html.erb +101 -0
- data/app/views/admin/settings/feedback.html.erb +118 -0
- data/app/views/admin/settings/index.html.erb +73 -0
- data/app/views/admin/settings/write.html.erb +69 -0
- data/app/views/admin/shared/_edit.html.erb +4 -0
- data/app/views/admin/shared/_menu.html.erb +121 -0
- data/app/views/admin/shared/_twitter_alert.html.erb +3 -0
- data/app/views/admin/sidebar/_available.html.erb +6 -0
- data/app/views/admin/sidebar/_available.json.erb +6 -0
- data/app/views/admin/sidebar/_config.html.erb +27 -0
- data/app/views/admin/sidebar/_target.html.erb +9 -0
- data/app/views/admin/sidebar/_target_sidebar.html.erb +20 -0
- data/app/views/admin/sidebar/destroy.js.erb +1 -0
- data/app/views/admin/sidebar/index.html.erb +31 -0
- data/app/views/admin/sidebar/sortable.js.erb +3 -0
- data/app/views/admin/sidebar/update.js.erb +2 -0
- data/app/views/admin/tags/_index_and_form.html.erb +59 -0
- data/app/views/admin/tags/edit.html.erb +1 -0
- data/app/views/admin/tags/index.html.erb +1 -0
- data/app/views/admin/themes/index.html.erb +27 -0
- data/app/views/admin/users/_form.html.erb +215 -0
- data/app/views/admin/users/edit.html.erb +8 -0
- data/app/views/admin/users/index.html.erb +39 -0
- data/app/views/admin/users/new.html.erb +8 -0
- data/app/views/archives_sidebar/_content.html.erb +13 -0
- data/app/views/articles/_archives_article.html.erb +9 -0
- data/app/views/articles/_article.html.erb +9 -0
- data/app/views/articles/_article_author.html.erb +4 -0
- data/app/views/articles/_article_collection.html.erb +8 -0
- data/app/views/articles/_article_content.html.erb +5 -0
- data/app/views/articles/_article_excerpt.html.erb +15 -0
- data/app/views/articles/_article_links.html.erb +12 -0
- data/app/views/articles/_comment.html.erb +1 -0
- data/app/views/articles/_comment_errors.html.erb +2 -0
- data/app/views/articles/_comment_form.html.erb +48 -0
- data/app/views/articles/_comment_list.html.erb +5 -0
- data/app/views/articles/_comment_preview.html.erb +4 -0
- data/app/views/articles/_full_article_content.html.erb +4 -0
- data/app/views/articles/_password_form.html.erb +10 -0
- data/app/views/articles/_trackback.html.erb +6 -0
- data/app/views/articles/archives.html.erb +15 -0
- data/app/views/articles/comment.js.erb +5 -0
- data/app/views/articles/comment_failed.js.erb +3 -0
- data/app/views/articles/error.html.erb +3 -0
- data/app/views/articles/feedback_atom_feed.atom.builder +10 -0
- data/app/views/articles/feedback_rss_feed.rss.builder +21 -0
- data/app/views/articles/index.html.erb +1 -0
- data/app/views/articles/index_atom_feed.atom.builder +9 -0
- data/app/views/articles/index_rss_feed.rss.builder +20 -0
- data/app/views/articles/live_search.html.erb +10 -0
- data/app/views/articles/read.html.erb +43 -0
- data/app/views/articles/search.html.erb +8 -0
- data/app/views/articles/trackback.xml.builder +7 -0
- data/app/views/articles/view_page.html.erb +3 -0
- data/app/views/authors/show.html.erb +30 -0
- data/app/views/authors/show_atom_feed.atom.builder +9 -0
- data/app/views/authors/show_rss_feed.rss.builder +20 -0
- data/app/views/comments/_comment.html.erb +17 -0
- data/app/views/comments/preview.html.erb +1 -0
- data/app/views/comments/preview.js.erb +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +11 -0
- data/app/views/devise/passwords/edit.html.erb +28 -0
- data/app/views/devise/passwords/new.html.erb +20 -0
- data/app/views/devise/registrations/new.html.erb +36 -0
- data/app/views/devise/sessions/new.html.erb +32 -0
- data/app/views/devise/shared/_links.html.erb +11 -0
- data/app/views/errors/404.html.erb +2 -0
- data/app/views/feedback/index.atom.builder +9 -0
- data/app/views/feedback/index.rss.builder +20 -0
- data/app/views/layouts/accounts.html.erb +33 -0
- data/app/views/layouts/administration.html.erb +37 -0
- data/app/views/layouts/default.html.erb +33 -0
- data/app/views/layouts/editor.html.erb +17 -0
- data/app/views/meta_sidebar/_content.html.erb +8 -0
- data/app/views/notes/_note.html.erb +16 -0
- data/app/views/notes/error.html.erb +3 -0
- data/app/views/notes/index.html.erb +15 -0
- data/app/views/notes/show.html.erb +5 -0
- data/app/views/notes/show_in_reply.html.erb +18 -0
- data/app/views/notification_mailer/_mail_footer.html.erb +5 -0
- data/app/views/notification_mailer/_mail_header.html.erb +3 -0
- data/app/views/notification_mailer/article.html.erb +7 -0
- data/app/views/notification_mailer/comment.html.erb +12 -0
- data/app/views/notification_mailer/notif_user.html.erb +9 -0
- data/app/views/page_sidebar/_content.html.erb +12 -0
- data/app/views/search_sidebar/_content.html.erb +10 -0
- data/app/views/settings/done.html.erb +2 -0
- data/app/views/settings/install.html.erb +12 -0
- data/app/views/setup/index.html.erb +17 -0
- data/app/views/shared/_atom_header.atom.builder +6 -0
- data/app/views/shared/_atom_item_article.atom.builder +36 -0
- data/app/views/shared/_atom_item_comment.atom.builder +10 -0
- data/app/views/shared/_atom_item_trackback.atom.builder +10 -0
- data/app/views/shared/_flash.erb +10 -0
- data/app/views/shared/_google_analytics.html.erb +8 -0
- data/app/views/shared/_page_header.html.erb +23 -0
- data/app/views/shared/_rss_item_article.rss.builder +32 -0
- data/app/views/shared/_rss_item_comment.rss.builder +9 -0
- data/app/views/shared/_rss_item_trackback.rss.builder +9 -0
- data/app/views/sidebar/_row.html.erb +1 -0
- data/app/views/sidebar/_sidebar.html.erb +5 -0
- data/app/views/sidebar/display_plugins.html.erb +5 -0
- data/app/views/sidebar/show.html.erb +1 -0
- data/app/views/static_sidebar/_content.html.erb +2 -0
- data/app/views/tag_sidebar/_content.html.erb +10 -0
- data/app/views/tags/index.html.erb +15 -0
- data/app/views/tags/show.html.erb +1 -0
- data/app/views/theme/static_view_test.html.erb +1 -0
- data/app/views/xml/_googlesitemap_item_article.googlesitemap.builder +7 -0
- data/app/views/xml/_googlesitemap_item_category.googlesitemap.builder +6 -0
- data/app/views/xml/_googlesitemap_item_page.googlesitemap.builder +6 -0
- data/app/views/xml/_googlesitemap_item_tag.googlesitemap.builder +6 -0
- data/app/views/xml/sitemap.googlesitemap.builder +9 -0
- data/config/i18n-tasks.yml +49 -0
- data/config/initializers/devise.rb +271 -0
- data/config/initializers/mime_types.rb +7 -0
- data/config/locales/da.yml +769 -0
- data/config/locales/de.yml +769 -0
- data/config/locales/en.yml +770 -0
- data/config/locales/es-MX.yml +769 -0
- data/config/locales/fr.yml +769 -0
- data/config/locales/he.yml +769 -0
- data/config/locales/it.yml +769 -0
- data/config/locales/ja.yml +769 -0
- data/config/locales/lt.yml +783 -0
- data/config/locales/nb-NO.yml +769 -0
- data/config/locales/nl.yml +769 -0
- data/config/locales/pl.yml +797 -0
- data/config/locales/pt-BR.yml +769 -0
- data/config/locales/ro.yml +782 -0
- data/config/locales/ru.yml +797 -0
- data/config/locales/sidebars.da.yml +20 -0
- data/config/locales/sidebars.de.yml +20 -0
- data/config/locales/sidebars.en.yml +20 -0
- data/config/locales/sidebars.es-MX.yml +20 -0
- data/config/locales/sidebars.fr.yml +20 -0
- data/config/locales/sidebars.he.yml +20 -0
- data/config/locales/sidebars.it.yml +20 -0
- data/config/locales/sidebars.ja.yml +20 -0
- data/config/locales/sidebars.lt.yml +20 -0
- data/config/locales/sidebars.nb-NO.yml +20 -0
- data/config/locales/sidebars.nl.yml +20 -0
- data/config/locales/sidebars.pl.yml +20 -0
- data/config/locales/sidebars.pt-BR.yml +20 -0
- data/config/locales/sidebars.ro.yml +20 -0
- data/config/locales/sidebars.ru.yml +20 -0
- data/config/locales/sidebars.zh-CN.yml +20 -0
- data/config/locales/sidebars.zh-TW.yml +20 -0
- data/config/locales/zh-CN.yml +768 -0
- data/config/locales/zh-TW.yml +769 -0
- data/config/routes.rb +174 -0
- data/db/migrate/113_initial_schema.rb +210 -0
- data/db/migrate/114_fixes_buggy_articles_and_notes.rb +56 -0
- data/db/migrate/115_drops_categories_for_tags.rb +37 -0
- data/db/migrate/20150207131657_add_missing_indexes.rb +23 -0
- data/db/migrate/20150807134129_simplify_redirect_relations.rb +45 -0
- data/db/migrate/20150808052637_add_blog_ids.rb +39 -0
- data/db/migrate/20150808191127_add_blog_id_to_redirects.rb +19 -0
- data/db/migrate/20150810094754_add_blog_id_to_tags.rb +19 -0
- data/db/migrate/20160108111120_add_devise_to_users.rb +57 -0
- data/db/migrate/20160108184201_move_last_connection_to_last_sign_in_at.rb +20 -0
- data/db/migrate/20160110094906_remove_profiles_rights.rb +18 -0
- data/db/migrate/20160605103918_replace_profile_id_with_string.rb +32 -0
- data/db/migrate/20160605154632_remove_profiles.rb +31 -0
- data/db/migrate/20160701061851_demand_blog_id_on_contents.rb +13 -0
- data/db/migrate/20160701062604_add_blog_id_to_resources.rb +32 -0
- data/db/migrate/20170528093024_move_resources_to_content.rb +9 -0
- data/db/migrate/20170528094923_move_tags_to_content.rb +10 -0
- data/db/migrate/20170528201606_remove_separate_published_flag.rb +9 -0
- data/db/migrate/20170605071626_remove_extra_state_columns_from_feedback.rb +10 -0
- data/db/migrate/20170702105201_remove_published_at_from_feedback.rb +9 -0
- data/db/migrate/20190208151235_add_text_filter_name_fields.rb +11 -0
- data/db/migrate/20190208152646_move_text_filter_to_name.rb +99 -0
- data/db/migrate/20190209155717_remove_text_filter_ids.rb +21 -0
- data/db/migrate/20190209160610_remove_text_filters.rb +19 -0
- data/db/seeds.rb +25 -0
- data/lib/email_notify.rb +28 -0
- data/lib/format.rb +9 -0
- data/lib/publify_core/engine.rb +31 -0
- data/lib/publify_core/lang.rb +9 -0
- data/lib/publify_core/testing_support/dns_mock.rb +15 -0
- data/lib/publify_core/testing_support/factories.rb +242 -0
- data/lib/publify_core/testing_support/feed_assertions.rb +48 -0
- data/lib/publify_core/testing_support/fixtures/exploit.svg +4 -0
- data/lib/publify_core/testing_support/fixtures/fakepng.png +1 -0
- data/lib/publify_core/testing_support/fixtures/otherfile.txt +1 -0
- data/lib/publify_core/testing_support/fixtures/testfile.png +0 -0
- data/lib/publify_core/testing_support/fixtures/testfile.txt +1 -0
- data/lib/publify_core/testing_support/upload_fixtures.rb +15 -0
- data/lib/publify_core/version.rb +5 -0
- data/lib/publify_core.rb +46 -0
- data/lib/publify_guid.rb +11 -0
- data/lib/publify_plugins.rb +77 -0
- data/lib/publify_textfilter_markdown.rb +57 -0
- data/lib/publify_textfilter_none.rb +16 -0
- data/lib/publify_textfilter_smartypants.rb +16 -0
- data/lib/publify_textfilter_textile.rb +23 -0
- data/lib/publify_textfilter_twitterfilter.rb +39 -0
- data/lib/publify_time.rb +34 -0
- data/lib/sidebar_field.rb +127 -0
- data/lib/sidebar_registry.rb +35 -0
- data/lib/spam_protection.rb +103 -0
- data/lib/tasks/i18n.rake +9 -0
- data/lib/tasks/manifest.rake +30 -0
- data/lib/tasks/publify_core_tasks.rake +6 -0
- data/lib/text_filter_plugin.rb +183 -0
- data/lib/theme.rb +72 -0
- data/lib/transforms.rb +47 -0
- data/themes/plain/about.markdown +4 -0
- data/themes/plain/javascripts/theme.js +0 -0
- data/themes/plain/preview.png +0 -0
- data/themes/plain/stylesheets/theme.css +57 -0
- metadata +1062 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
feed.entry item, id: "urn:uuid:#{item.guid}", url: item.permalink_url do |entry|
|
4
|
+
entry.author do
|
5
|
+
entry.name item.blog_name
|
6
|
+
entry.uri item.url
|
7
|
+
end
|
8
|
+
entry.title item.feed_title, "type" => "html"
|
9
|
+
entry.summary item.excerpt, "type" => "html"
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if flash %>
|
2
|
+
<% flash.each do |alert_level, message| %>
|
3
|
+
<div id="flash" class='alert alert-<%= flash[:error] ? 'danger' : 'success'%>'>
|
4
|
+
<a class='close' href='#'>×</a>
|
5
|
+
<p class="<%= alert_level.to_s.downcase %>">
|
6
|
+
<%= message %>
|
7
|
+
</p>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
3
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
4
|
+
</script>
|
5
|
+
<script type="text/javascript">
|
6
|
+
var pageTracker = _gat._getTracker("<%= this_blog.google_analytics %>");
|
7
|
+
pageTracker._trackPageview();
|
8
|
+
</script>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
2
|
+
<%= meta_tag 'ICBM', this_blog.geourl_location if this_blog.geourl_location.present? %>
|
3
|
+
<%= meta_tag 'description', @description if @description.present? %>
|
4
|
+
<%= meta_tag 'robots', 'noindex, follow' if stop_index_robots?(this_blog) %>
|
5
|
+
<%= meta_tag 'google-site-verification', this_blog.google_verification if this_blog.google_verification.present? %>
|
6
|
+
<meta name="generator" content="Publify <%= PublifyCore::VERSION %>" />
|
7
|
+
<%= show_meta_keyword %>
|
8
|
+
<% if feed_atom %>
|
9
|
+
<link rel="alternate" type="application/atom+xml" title="Atom" href="<%= feed_atom %>" />
|
10
|
+
<% end %>
|
11
|
+
<% if feed_rss %>
|
12
|
+
<link rel="alternate" type="application/rss+xml" title="RSS" href="<%= feed_rss %>" />
|
13
|
+
<% end %>
|
14
|
+
<%= javascript_include_tag :publify, async: Rails.env.production? %>
|
15
|
+
<%= csrf_meta_tags %>
|
16
|
+
<%= stylesheet_link_tag :publify %>
|
17
|
+
<%= page_header_includes %>
|
18
|
+
<link rel="canonical" href="<%= this_blog.url_for request.fullpath %>" />
|
19
|
+
<%= raw this_blog.custom_tracking_field if this_blog.custom_tracking_field.present? %>
|
20
|
+
<%= render 'shared/google_analytics' if this_blog.google_analytics.present? %>
|
21
|
+
|
22
|
+
<%= meta_tag 'og:site_name', this_blog.blog_name %>
|
23
|
+
<%= meta_tag 'og:title', @article ? @article.title : @page_title %>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
xm.item do
|
4
|
+
if item.is_a?(Note)
|
5
|
+
xm.title truncate(item.html(:body).strip_html, length: 80, separator: " ",
|
6
|
+
omissions: "...")
|
7
|
+
else
|
8
|
+
xm.title item.title
|
9
|
+
end
|
10
|
+
content_html = fetch_html_content_for_feeds(item, this_blog)
|
11
|
+
xm.description content_html + item.rss_description
|
12
|
+
xm.pubDate item.published_at.rfc822
|
13
|
+
xm.guid "urn:uuid:#{item.guid}", "isPermaLink" => "false"
|
14
|
+
xm.dc :creator, item.author_name
|
15
|
+
|
16
|
+
if item.is_a?(Article)
|
17
|
+
xm.comments(item.permalink_url("comments"))
|
18
|
+
item.tags.each do |tag|
|
19
|
+
xm.category tag.display_name
|
20
|
+
end
|
21
|
+
# RSS 2.0 only allows a single enclosure per item, so only include the first one here.
|
22
|
+
unless item.resources.empty?
|
23
|
+
resource = item.resources.first
|
24
|
+
xm.enclosure(
|
25
|
+
url: item.blog.file_url(resource.upload_url),
|
26
|
+
length: resource.size,
|
27
|
+
type: resource.mime)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
xm.link item.permalink_url
|
32
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= row.line_html(@sidebar) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render @sidebar %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% unless sidebar.tags.blank? %>
|
2
|
+
<h3 class="sidebar-title"><%= t('.tags') %></h3>
|
3
|
+
<div class="sidebar-body">
|
4
|
+
<p style="overflow:hidden">
|
5
|
+
<% sidebar.tags.each do |tag| %>
|
6
|
+
<span style="font-size:<%= sidebar.sizes[tag] %>%"><%= link_to tag.display_name, tag_url(tag.name) %></span>
|
7
|
+
<% end %>
|
8
|
+
</p>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="post">
|
2
|
+
<h2 class="title"><%= @page_title %></h2>
|
3
|
+
<% unless @tags.empty? %>
|
4
|
+
<ul>
|
5
|
+
<% for tag in @tags.sort_by{|grp|grp.display_name} %>
|
6
|
+
<li>
|
7
|
+
<%= link_to_permalink(tag, tag.display_name) %>
|
8
|
+
</li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
<% else %>
|
12
|
+
<p><%= t('.there_are_no_tags') %></p>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
<p><%= paginate @tags %></p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'articles/article_collection', articles: @articles %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<!-- Static View Test from app/ -->
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
xml.instruct! :xml, version: "1.0", encoding: "UTF-8"
|
4
|
+
xml.urlset "xmlns" => "http://www.google.com/schemas/sitemap/0.84" do
|
5
|
+
@items.each do |item|
|
6
|
+
render "googlesitemap_item_#{item.class.name.to_s.downcase}",
|
7
|
+
item: item, xm: xml
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
|
2
|
+
|
3
|
+
# The "main" locale.
|
4
|
+
base_locale: en
|
5
|
+
|
6
|
+
# Read and write translations.
|
7
|
+
data:
|
8
|
+
# Locale files or `File.find` patterns where translations are read from:
|
9
|
+
read:
|
10
|
+
- config/locales/%{locale}.yml
|
11
|
+
- config/locales/**/*.%{locale}.yml
|
12
|
+
|
13
|
+
# Locale files to write new keys to, based on a list of key pattern => file
|
14
|
+
# rules. Matched from top to bottom:
|
15
|
+
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
16
|
+
write:
|
17
|
+
- ['*_sidebar.*', 'config/locales/sidebars.%{locale}.yml']
|
18
|
+
- config/locales/%{locale}.yml
|
19
|
+
|
20
|
+
yaml:
|
21
|
+
write:
|
22
|
+
# do not wrap lines at 80 characters
|
23
|
+
line_width: -1
|
24
|
+
|
25
|
+
# Find translate calls
|
26
|
+
search:
|
27
|
+
## Paths or `File.find` patterns to search in:
|
28
|
+
paths:
|
29
|
+
- app/
|
30
|
+
- lib/
|
31
|
+
|
32
|
+
## Root directories for relative keys resolution.
|
33
|
+
relative_roots:
|
34
|
+
- app/controllers
|
35
|
+
- app/helpers
|
36
|
+
- app/mailers
|
37
|
+
- app/presenters
|
38
|
+
- app/views
|
39
|
+
|
40
|
+
## Do not consider these keys missing:
|
41
|
+
ignore_missing:
|
42
|
+
- 'devise.*'
|
43
|
+
|
44
|
+
## Consider these keys used:
|
45
|
+
ignore_unused:
|
46
|
+
- 'time.formats.*'
|
47
|
+
- 'layouts.default.designed_by'
|
48
|
+
- 'date.*'
|
49
|
+
- 'activerecord.{attributes,errors,models}.*'
|
@@ -0,0 +1,271 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
4
|
+
# Many of these configuration options can be set straight in your model.
|
5
|
+
Devise.setup do |config|
|
6
|
+
# The secret key used by Devise. Devise uses this key to generate
|
7
|
+
# random tokens. Changing this key will render invalid all existing
|
8
|
+
# confirmation, reset password and unlock tokens in the database.
|
9
|
+
# Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
|
10
|
+
# by default. You can change it below and use your own secret key.
|
11
|
+
# config.secret_key =
|
12
|
+
# '99a1fd068906f7a32686e001fff91fdfb88703303de85657ab63ad5405ae7c3b' \
|
13
|
+
# '215c144c0dd4eaf2e68f3e3dae8c43e132968dd0b32e4c78ac1e86b202e3c6ee'
|
14
|
+
|
15
|
+
# ==> Mailer Configuration
|
16
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
17
|
+
# note that it will be overwritten if you use your own mailer class
|
18
|
+
# with default "from" parameter.
|
19
|
+
config.mailer_sender = "change-me@example.com"
|
20
|
+
|
21
|
+
# Configure the class responsible to send e-mails.
|
22
|
+
# config.mailer = 'Devise::Mailer'
|
23
|
+
|
24
|
+
# ==> ORM configuration
|
25
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
26
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
27
|
+
# available as additional gems.
|
28
|
+
require "devise/orm/active_record"
|
29
|
+
|
30
|
+
# ==> Configuration for any authentication mechanism
|
31
|
+
# Configure which keys are used when authenticating a user. The default is
|
32
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
33
|
+
# authenticating a user, both parameters are required. Remember that those
|
34
|
+
# parameters are used only when authenticating and not when retrieving from
|
35
|
+
# session. If you need permissions, you should implement that in a before filter.
|
36
|
+
# You can also supply a hash where the value is a boolean determining whether
|
37
|
+
# or not authentication should be aborted when the value is not present.
|
38
|
+
config.authentication_keys = [:login]
|
39
|
+
|
40
|
+
# Configure parameters from the request object used for authentication. Each entry
|
41
|
+
# given should be a request method and it will automatically be passed to the
|
42
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
43
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
44
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
45
|
+
# config.request_keys = []
|
46
|
+
|
47
|
+
# Configure which authentication keys should be case-insensitive.
|
48
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
49
|
+
# to authenticate or find a user. Default is :email.
|
50
|
+
config.case_insensitive_keys = [:login]
|
51
|
+
|
52
|
+
# Configure which authentication keys should have whitespace stripped.
|
53
|
+
# These keys will have whitespace before and after removed upon creating or
|
54
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
55
|
+
config.strip_whitespace_keys = [:login]
|
56
|
+
|
57
|
+
# Tell if authentication through request.params is enabled. True by default.
|
58
|
+
# It can be set to an array that will enable params authentication only for the
|
59
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
60
|
+
# enable it only for database (email + password) authentication.
|
61
|
+
# config.params_authenticatable = true
|
62
|
+
|
63
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
64
|
+
# It can be set to an array that will enable http authentication only for the
|
65
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
66
|
+
# enable it only for database authentication. The supported strategies are:
|
67
|
+
# :database = Support basic authentication with authentication key + password
|
68
|
+
# config.http_authenticatable = false
|
69
|
+
|
70
|
+
# If 401 status code should be returned for AJAX requests. True by default.
|
71
|
+
# config.http_authenticatable_on_xhr = true
|
72
|
+
|
73
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
74
|
+
# config.http_authentication_realm = 'Application'
|
75
|
+
|
76
|
+
# It will change confirmation, password recovery and other workflows
|
77
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
78
|
+
# Does not affect registerable.
|
79
|
+
config.paranoid = true
|
80
|
+
|
81
|
+
# By default Devise will store the user in session. You can skip storage for
|
82
|
+
# particular strategies by setting this option.
|
83
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
84
|
+
# may want to disable generating routes to Devise's sessions controller by
|
85
|
+
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
86
|
+
config.skip_session_storage = [:http_auth]
|
87
|
+
|
88
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
89
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
90
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
91
|
+
# from the server. You can disable this option at your own risk.
|
92
|
+
# config.clean_up_csrf_token_on_authentication = true
|
93
|
+
|
94
|
+
# ==> Configuration for :database_authenticatable
|
95
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
96
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
97
|
+
#
|
98
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
99
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
100
|
+
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
101
|
+
# encryptor), the cost increases exponentially with the number of stretches (e.g.
|
102
|
+
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
103
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
104
|
+
|
105
|
+
# Setup a pepper to generate the encrypted password.
|
106
|
+
# config.pepper =
|
107
|
+
# 'cd666dfd37982f9981838aa0bc32a04099d309a831dffcf64c3ec1814e9ae9ad' \
|
108
|
+
# '4fde148638675ee2443b5c532222ff007c032e76fc0eec24c5fb4fccfd3546a3'
|
109
|
+
|
110
|
+
# Send a notification email when the user's password is changed
|
111
|
+
# config.send_password_change_notification = false
|
112
|
+
|
113
|
+
# ==> Configuration for :confirmable
|
114
|
+
# A period that the user is allowed to access the website even without
|
115
|
+
# confirming their account. For instance, if set to 2.days, the user will be
|
116
|
+
# able to access the website for two days without confirming their account,
|
117
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
118
|
+
# the user cannot access the website without confirming their account.
|
119
|
+
# config.allow_unconfirmed_access_for = 2.days
|
120
|
+
|
121
|
+
# A period that the user is allowed to confirm their account before their
|
122
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
123
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
124
|
+
# their account can't be confirmed with the token any more.
|
125
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
126
|
+
# before confirming their account.
|
127
|
+
# config.confirm_within = 3.days
|
128
|
+
|
129
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
130
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
131
|
+
# db field (see migrations). Until confirmed, new email is stored in
|
132
|
+
# unconfirmed_email column, and copied to email column on successful confirmation.
|
133
|
+
config.reconfirmable = true
|
134
|
+
|
135
|
+
# Defines which key will be used when confirming an account
|
136
|
+
# config.confirmation_keys = [:email]
|
137
|
+
|
138
|
+
# ==> Configuration for :rememberable
|
139
|
+
# The time the user will be remembered without asking for credentials again.
|
140
|
+
# config.remember_for = 2.weeks
|
141
|
+
|
142
|
+
# Invalidates all the remember me tokens when the user signs out.
|
143
|
+
config.expire_all_remember_me_on_sign_out = true
|
144
|
+
|
145
|
+
# If true, extends the user's remember period when remembered via cookie.
|
146
|
+
# config.extend_remember_period = false
|
147
|
+
|
148
|
+
# Options to be passed to the created cookie. For instance, you can set
|
149
|
+
# secure: true in order to force SSL only cookies.
|
150
|
+
# config.rememberable_options = {}
|
151
|
+
|
152
|
+
# ==> Configuration for :validatable
|
153
|
+
# Range for password length.
|
154
|
+
config.password_length = 8..72
|
155
|
+
|
156
|
+
# Email regex used to validate email formats. It simply asserts that
|
157
|
+
# one (and only one) @ exists in the given string. This is mainly
|
158
|
+
# to give user feedback and not to assert the e-mail validity.
|
159
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
160
|
+
|
161
|
+
# ==> Configuration for :timeoutable
|
162
|
+
# The time you want to timeout the user session without activity. After this
|
163
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
164
|
+
# config.timeout_in = 30.minutes
|
165
|
+
|
166
|
+
# ==> Configuration for :lockable
|
167
|
+
# Defines which strategy will be used to lock an account.
|
168
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
169
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
170
|
+
# config.lock_strategy = :failed_attempts
|
171
|
+
|
172
|
+
# Defines which key will be used when locking and unlocking an account
|
173
|
+
# config.unlock_keys = [:email]
|
174
|
+
|
175
|
+
# Defines which strategy will be used to unlock an account.
|
176
|
+
# :email = Sends an unlock link to the user email
|
177
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
178
|
+
# :both = Enables both strategies
|
179
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
180
|
+
# config.unlock_strategy = :both
|
181
|
+
|
182
|
+
# Number of authentication tries before locking an account if lock_strategy
|
183
|
+
# is failed attempts.
|
184
|
+
# config.maximum_attempts = 20
|
185
|
+
|
186
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
187
|
+
# config.unlock_in = 1.hour
|
188
|
+
|
189
|
+
# Warn on the last attempt before the account is locked.
|
190
|
+
# config.last_attempt_warning = true
|
191
|
+
|
192
|
+
# ==> Configuration for :recoverable
|
193
|
+
#
|
194
|
+
# Defines which key will be used when recovering the password for an account
|
195
|
+
# config.reset_password_keys = [:email]
|
196
|
+
|
197
|
+
# Time interval you can reset your password with a reset password key.
|
198
|
+
# Don't put a too small interval or your users won't have the time to
|
199
|
+
# change their passwords.
|
200
|
+
config.reset_password_within = 6.hours
|
201
|
+
|
202
|
+
# When set to false, does not sign a user in automatically after their password is
|
203
|
+
# reset. Defaults to true, so a user is signed in automatically after a reset.
|
204
|
+
# config.sign_in_after_reset_password = true
|
205
|
+
|
206
|
+
# ==> Configuration for :encryptable
|
207
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
208
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
209
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
210
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
211
|
+
# REST_AUTH_SITE_KEY to pepper).
|
212
|
+
#
|
213
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
214
|
+
# config.encryptor = :sha512
|
215
|
+
|
216
|
+
# ==> Scopes configuration
|
217
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
218
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
219
|
+
# are using only default views.
|
220
|
+
# config.scoped_views = false
|
221
|
+
|
222
|
+
# Configure the default scope given to Warden. By default it's the first
|
223
|
+
# devise role declared in your routes (usually :user).
|
224
|
+
# config.default_scope = :user
|
225
|
+
|
226
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
227
|
+
# only the current scope. By default, Devise signs out all scopes.
|
228
|
+
# config.sign_out_all_scopes = true
|
229
|
+
|
230
|
+
# ==> Navigation configuration
|
231
|
+
# Lists the formats that should be treated as navigational. Formats like
|
232
|
+
# :html, should redirect to the sign in page when the user does not have
|
233
|
+
# access, but formats like :xml or :json, should return 401.
|
234
|
+
#
|
235
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
236
|
+
# should add them to the navigational formats lists.
|
237
|
+
#
|
238
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
239
|
+
# config.navigational_formats = ['*/*', :html]
|
240
|
+
|
241
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
242
|
+
config.sign_out_via = :get
|
243
|
+
|
244
|
+
# ==> OmniAuth
|
245
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
246
|
+
# up on your models and hooks.
|
247
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
248
|
+
|
249
|
+
# ==> Warden configuration
|
250
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
251
|
+
# change the failure app, you can configure them inside the config.warden block.
|
252
|
+
#
|
253
|
+
# config.warden do |manager|
|
254
|
+
# manager.intercept_401 = false
|
255
|
+
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
256
|
+
# end
|
257
|
+
|
258
|
+
# ==> Mountable engine configurations
|
259
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
260
|
+
# is mountable, there are some extra configurations to be taken into account.
|
261
|
+
# The following options are available, assuming the engine is mounted as:
|
262
|
+
#
|
263
|
+
# mount MyEngine, at: '/my_engine'
|
264
|
+
#
|
265
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
266
|
+
# config.router_name = :my_engine
|
267
|
+
#
|
268
|
+
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
269
|
+
# so you need to do it manually. For the users scope, it would be:
|
270
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
271
|
+
end
|