virgo 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +37 -0
- data/app/assets/javascripts/tinymce/manifest.coffee +1 -0
- data/app/assets/javascripts/tinymce/plugins/image_manager/plugin.coffee +234 -0
- data/app/assets/javascripts/virgo/admin/page_modules/edit_form.coffee +4 -0
- data/app/assets/javascripts/virgo/admin/page_modules/edit_subject_form.coffee +29 -0
- data/app/assets/javascripts/virgo/admin/posts/edit_locking.coffee +35 -0
- data/app/assets/javascripts/virgo/admin/posts/form.coffee +183 -0
- data/app/assets/javascripts/virgo/admin/slides/form.coffee +27 -0
- data/app/assets/javascripts/virgo/admin/slideshows/form.coffee +26 -0
- data/app/assets/javascripts/virgo/admin_only.coffee +1 -0
- data/app/assets/javascripts/virgo/application.coffee +51 -0
- data/app/assets/javascripts/virgo/common.coffee +83 -0
- data/app/assets/javascripts/virgo/common/character_counter.coffee +27 -0
- data/app/assets/javascripts/virgo/components/header.coffee +47 -0
- data/app/assets/javascripts/virgo/components/media_modal.coffee +151 -0
- data/app/assets/javascripts/virgo/components/share_bar.coffee +53 -0
- data/app/assets/javascripts/virgo/components/slideshow.coffee +35 -0
- data/app/assets/javascripts/virgo/lib/jquery-ui-multiselect.js +342 -0
- data/app/assets/javascripts/virgo/lib/jquery.browser.js +184 -0
- data/app/assets/javascripts/virgo/lib/jquery.cookie.js +114 -0
- data/app/assets/javascripts/virgo/lib/jquery.pjax.js +932 -0
- data/app/assets/javascripts/virgo/lib/jquery_ext.coffee +0 -0
- data/app/assets/javascripts/virgo/lib/manifest.coffee +5 -0
- data/app/assets/javascripts/virgo/lib/ouibounce.js +194 -0
- data/app/assets/javascripts/virgo/page_modules.coffee +175 -0
- data/app/assets/javascripts/virgo/posts/show.coffee +32 -0
- data/app/assets/stylesheets/tinymce/skin.sass +2 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/content.min.sass +82 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.svg +62 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.svg +63 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/anchor.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/loader.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/object.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/trans.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/skin.min.sass +1703 -0
- data/app/assets/stylesheets/virgo/_common.sass +65 -0
- data/app/assets/stylesheets/virgo/admin.sass +301 -0
- data/app/assets/stylesheets/virgo/admin/columns.sass +3 -0
- data/app/assets/stylesheets/virgo/admin/images.sass +14 -0
- data/app/assets/stylesheets/virgo/admin/media_modal.sass +72 -0
- data/app/assets/stylesheets/virgo/admin/post.sass +102 -0
- data/app/assets/stylesheets/virgo/admin/slideshow.sass +35 -0
- data/app/assets/stylesheets/virgo/admin/users.sass +2 -0
- data/app/assets/stylesheets/virgo/admin_only.sass +1 -0
- data/app/assets/stylesheets/virgo/application.sass +605 -0
- data/app/assets/stylesheets/virgo/columns.sass +51 -0
- data/app/assets/stylesheets/virgo/install.sass +15 -0
- data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-imports.sass +9 -0
- data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-overrides.sass +51 -0
- data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-variables.sass +27 -0
- data/app/assets/stylesheets/virgo/lib/jquery-ui-multiselect.css +30 -0
- data/app/assets/stylesheets/virgo/lib/manifest.sass +3 -0
- data/app/assets/stylesheets/virgo/lib/ouibounce.css +222 -0
- data/app/assets/stylesheets/virgo/lib/select2-imports.sass +8 -0
- data/app/assets/stylesheets/virgo/page_modules.sass +54 -0
- data/app/assets/stylesheets/virgo/pages/authors.sass +30 -0
- data/app/assets/stylesheets/virgo/posts.sass +782 -0
- data/app/assets/stylesheets/virgo/search.sass +36 -0
- data/app/assets/stylesheets/virgo/ui.sass +434 -0
- data/app/assets/stylesheets/virgo/users.sass +9 -0
- data/app/controllers/virgo/admin/base_controller.rb +22 -0
- data/app/controllers/virgo/admin/categories_controller.rb +90 -0
- data/app/controllers/virgo/admin/columns_controller.rb +65 -0
- data/app/controllers/virgo/admin/images_controller.rb +89 -0
- data/app/controllers/virgo/admin/media_modal_controller.rb +101 -0
- data/app/controllers/virgo/admin/newsletters_controller.rb +37 -0
- data/app/controllers/virgo/admin/page_modules_controller.rb +62 -0
- data/app/controllers/virgo/admin/pages_controller.rb +6 -0
- data/app/controllers/virgo/admin/posts_controller.rb +173 -0
- data/app/controllers/virgo/admin/sites_controller.rb +31 -0
- data/app/controllers/virgo/admin/slides_controller.rb +71 -0
- data/app/controllers/virgo/admin/slideshows_controller.rb +66 -0
- data/app/controllers/virgo/admin/tags_controller.rb +98 -0
- data/app/controllers/virgo/admin/users/sessions_controller.rb +21 -0
- data/app/controllers/virgo/admin/users_controller.rb +84 -0
- data/app/controllers/virgo/application_controller.rb +151 -0
- data/app/controllers/virgo/categories_controller.rb +20 -0
- data/app/controllers/virgo/columns_controller.rb +24 -0
- data/app/controllers/virgo/images_controller.rb +9 -0
- data/app/controllers/virgo/install_controller.rb +46 -0
- data/app/controllers/virgo/page_modules_controller.rb +23 -0
- data/app/controllers/virgo/pages_controller.rb +29 -0
- data/app/controllers/virgo/posts_controller.rb +101 -0
- data/app/controllers/virgo/search_controller.rb +35 -0
- data/app/controllers/virgo/subscribers_controller.rb +54 -0
- data/app/controllers/virgo/tags_controller.rb +15 -0
- data/app/controllers/virgo/users/confirmations_controller.rb +18 -0
- data/app/controllers/virgo/users/passwords_controller.rb +31 -0
- data/app/controllers/virgo/users/registrations_controller.rb +41 -0
- data/app/controllers/virgo/users/sessions_controller.rb +32 -0
- data/app/controllers/virgo/users_controller.rb +15 -0
- data/app/helpers/virgo/admin/post_helper.rb +54 -0
- data/app/helpers/virgo/admin_helper.rb +15 -0
- data/app/helpers/virgo/application_helper.rb +124 -0
- data/app/helpers/virgo/hooks_helper.rb +30 -0
- data/app/helpers/virgo/page_modules_helper.rb +4 -0
- data/app/helpers/virgo/post_helper.rb +159 -0
- data/app/helpers/virgo/render_helper.rb +33 -0
- data/app/helpers/virgo/search_helper.rb +49 -0
- data/app/helpers/virgo/shortcode_helper.rb +7 -0
- data/app/helpers/virgo/text_helper.rb +12 -0
- data/app/helpers/virgo/video_helper.rb +34 -0
- data/app/models/concerns/virgo/common/slug_history.rb +36 -0
- data/app/models/concerns/virgo/common/uuid.rb +22 -0
- data/app/models/concerns/virgo/post/recommendations.rb +15 -0
- data/app/models/concerns/virgo/post/search.rb +100 -0
- data/app/models/concerns/virgo/user/search.rb +39 -0
- data/app/models/virgo/ability.rb +59 -0
- data/app/models/virgo/category.rb +44 -0
- data/app/models/virgo/column.rb +25 -0
- data/app/models/virgo/form_model.rb +19 -0
- data/app/models/virgo/image.rb +63 -0
- data/app/models/virgo/page_module.rb +42 -0
- data/app/models/virgo/page_module_post.rb +8 -0
- data/app/models/virgo/post.rb +391 -0
- data/app/models/virgo/post_category.rb +8 -0
- data/app/models/virgo/post_search.rb +7 -0
- data/app/models/virgo/post_tag.rb +10 -0
- data/app/models/virgo/site.rb +36 -0
- data/app/models/virgo/slide.rb +23 -0
- data/app/models/virgo/slideshow.rb +37 -0
- data/app/models/virgo/slug_history.rb +5 -0
- data/app/models/virgo/subscriber.rb +5 -0
- data/app/models/virgo/tag.rb +34 -0
- data/app/models/virgo/user.rb +145 -0
- data/app/uploaders/virgo/application_uploader.rb +11 -0
- data/app/uploaders/virgo/avatar_uploader.rb +21 -0
- data/app/uploaders/virgo/featured_image_uploader.rb +28 -0
- data/app/uploaders/virgo/image_uploader.rb +40 -0
- data/app/uploaders/virgo/slide_uploader.rb +19 -0
- data/app/views/layouts/virgo/admin.haml +16 -0
- data/app/views/layouts/virgo/admin/site_settings.haml +14 -0
- data/app/views/layouts/virgo/application.haml +63 -0
- data/app/views/layouts/virgo/errors.haml +42 -0
- data/app/views/layouts/virgo/main.haml +5 -0
- data/app/views/layouts/virgo/posts.haml +10 -0
- data/app/views/virgo/admin/categories/_form.haml +19 -0
- data/app/views/virgo/admin/categories/edit.haml +7 -0
- data/app/views/virgo/admin/categories/index.haml +38 -0
- data/app/views/virgo/admin/categories/modal_form.haml +11 -0
- data/app/views/virgo/admin/categories/new.haml +7 -0
- data/app/views/virgo/admin/categories/success_modal.haml +14 -0
- data/app/views/virgo/admin/columns/_form.haml +30 -0
- data/app/views/virgo/admin/columns/edit.haml +1 -0
- data/app/views/virgo/admin/columns/index.haml +30 -0
- data/app/views/virgo/admin/columns/new.haml +1 -0
- data/app/views/virgo/admin/images/_form.haml +46 -0
- data/app/views/virgo/admin/images/edit.haml +1 -0
- data/app/views/virgo/admin/images/index.haml +32 -0
- data/app/views/virgo/admin/images/new.haml +1 -0
- data/app/views/virgo/admin/media_modal/_image_settings.haml +17 -0
- data/app/views/virgo/admin/media_modal/_library_panel.haml +26 -0
- data/app/views/virgo/admin/media_modal/_upload_panel.haml +21 -0
- data/app/views/virgo/admin/media_modal/_upload_success.haml +7 -0
- data/app/views/virgo/admin/media_modal/index.haml +19 -0
- data/app/views/virgo/admin/newsletters/changelog.haml +25 -0
- data/app/views/virgo/admin/newsletters/edit.haml +6 -0
- data/app/views/virgo/admin/page_modules/edit.haml +33 -0
- data/app/views/virgo/admin/page_modules/edit_subject.haml +43 -0
- data/app/views/virgo/admin/pages/help.haml +114 -0
- data/app/views/virgo/admin/posts/_author_dropdown.haml +1 -0
- data/app/views/virgo/admin/posts/_categories_form.haml +7 -0
- data/app/views/virgo/admin/posts/_category.haml +22 -0
- data/app/views/virgo/admin/posts/_form.haml +201 -0
- data/app/views/virgo/admin/posts/_revisions.haml +40 -0
- data/app/views/virgo/admin/posts/edit.haml +9 -0
- data/app/views/virgo/admin/posts/index.haml +59 -0
- data/app/views/virgo/admin/posts/new.haml +1 -0
- data/app/views/virgo/admin/posts/revision_detail.haml +28 -0
- data/app/views/virgo/admin/posts/revisions.haml +3 -0
- data/app/views/virgo/admin/sites/edit.haml +12 -0
- data/app/views/virgo/admin/slides/_form.haml +41 -0
- data/app/views/virgo/admin/slides/edit.haml +1 -0
- data/app/views/virgo/admin/slides/new.haml +1 -0
- data/app/views/virgo/admin/slideshows/_form.haml +49 -0
- data/app/views/virgo/admin/slideshows/edit.haml +1 -0
- data/app/views/virgo/admin/slideshows/index.haml +43 -0
- data/app/views/virgo/admin/slideshows/new.haml +1 -0
- data/app/views/virgo/admin/tags/_form.haml +16 -0
- data/app/views/virgo/admin/tags/edit.haml +7 -0
- data/app/views/virgo/admin/tags/index.haml +33 -0
- data/app/views/virgo/admin/tags/modal_form.haml +12 -0
- data/app/views/virgo/admin/tags/new.haml +7 -0
- data/app/views/virgo/admin/tags/success_modal.haml +14 -0
- data/app/views/virgo/admin/users/_form.haml +62 -0
- data/app/views/virgo/admin/users/edit.haml +1 -0
- data/app/views/virgo/admin/users/index.haml +34 -0
- data/app/views/virgo/admin/users/new.haml +1 -0
- data/app/views/virgo/application/sitemap.xml.builder +0 -0
- data/app/views/virgo/authors/_profile_long.haml +13 -0
- data/app/views/virgo/authors/_profile_short.haml +10 -0
- data/app/views/virgo/categories/show.haml +24 -0
- data/app/views/virgo/columns/index.haml +19 -0
- data/app/views/virgo/columns/show.haml +18 -0
- data/app/views/virgo/common/_admin_navbar.haml +100 -0
- data/app/views/virgo/common/_alerts.haml +40 -0
- data/app/views/virgo/common/_analytics.html.erb +1 -0
- data/app/views/virgo/common/_base_errors.haml +8 -0
- data/app/views/virgo/common/_category_heading.haml +26 -0
- data/app/views/virgo/common/_disqus.html.erb +24 -0
- data/app/views/virgo/common/_disqus_comment_count.html.erb +12 -0
- data/app/views/virgo/common/_fb_api.html.erb +30 -0
- data/app/views/virgo/common/_fonts.html.erb +1 -0
- data/app/views/virgo/common/_footer.haml +13 -0
- data/app/views/virgo/common/_footer_javascript.html.erb +0 -0
- data/app/views/virgo/common/_header_analytics.html.erb +9 -0
- data/app/views/virgo/common/_list_signup.haml +20 -0
- data/app/views/virgo/common/_ouibounce_modal.haml +26 -0
- data/app/views/virgo/common/_public_nav.haml +58 -0
- data/app/views/virgo/common/_search_form.haml +8 -0
- data/app/views/virgo/common/_share_bar.haml +45 -0
- data/app/views/virgo/common/_user_vars.haml +2 -0
- data/app/views/virgo/errors/404.haml +10 -0
- data/app/views/virgo/errors/500.haml +10 -0
- data/app/views/virgo/images/_shortcode.haml +4 -0
- data/app/views/virgo/install/index.haml +58 -0
- data/app/views/virgo/install/success.haml +12 -0
- data/app/views/virgo/page_modules/_latest_posts.haml +29 -0
- data/app/views/virgo/page_modules/_popular_posts.haml +51 -0
- data/app/views/virgo/pages/authors.haml +8 -0
- data/app/views/virgo/pages/home.haml +0 -0
- data/app/views/virgo/pages/show.haml +6 -0
- data/app/views/virgo/posts/_author_info.haml +16 -0
- data/app/views/virgo/posts/_post_full.haml +63 -0
- data/app/views/virgo/posts/_post_short.haml +30 -0
- data/app/views/virgo/posts/_post_thumb_box.haml +13 -0
- data/app/views/virgo/posts/_recommendations.haml +12 -0
- data/app/views/virgo/posts/_sidebar_thumb.haml +4 -0
- data/app/views/virgo/posts/index.haml +22 -0
- data/app/views/virgo/posts/latest.haml +16 -0
- data/app/views/virgo/posts/more.haml +10 -0
- data/app/views/virgo/posts/rss.xml.builder +17 -0
- data/app/views/virgo/posts/show.haml +17 -0
- data/app/views/virgo/search/_form.haml +5 -0
- data/app/views/virgo/search/_item.haml +22 -0
- data/app/views/virgo/search/index.haml +11 -0
- data/app/views/virgo/search/new.haml +4 -0
- data/app/views/virgo/shortcode_templates/blockquote.haml +9 -0
- data/app/views/virgo/shortcode_templates/h1.haml +1 -0
- data/app/views/virgo/shortcode_templates/h2.haml +1 -0
- data/app/views/virgo/shortcode_templates/h3.haml +1 -0
- data/app/views/virgo/shortcode_templates/h4.haml +1 -0
- data/app/views/virgo/shortcode_templates/image.haml +17 -0
- data/app/views/virgo/shortcode_templates/pullquote.haml +3 -0
- data/app/views/virgo/shortcode_templates/slideshow.haml +35 -0
- data/app/views/virgo/shortcode_templates/tweet.haml +3 -0
- data/app/views/virgo/shortcode_templates/video.haml +8 -0
- data/app/views/virgo/subscribers/_success_modal.haml +13 -0
- data/app/views/virgo/subscribers/modal.haml +15 -0
- data/app/views/virgo/tags/show.haml +16 -0
- data/app/views/virgo/users/confirmations/new.html.haml +10 -0
- data/app/views/virgo/users/devise_mailer/confirmation_instructions.html.erb +7 -0
- data/app/views/virgo/users/devise_mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/virgo/users/devise_mailer/unlock_instructions.html.haml +5 -0
- data/app/views/virgo/users/passwords/edit.html.haml +14 -0
- data/app/views/virgo/users/passwords/new.html.haml +14 -0
- data/app/views/virgo/users/registrations/edit.html.haml +30 -0
- data/app/views/virgo/users/registrations/new.html.haml +13 -0
- data/app/views/virgo/users/sessions/new.html.haml +12 -0
- data/app/views/virgo/users/shared/_links.haml +26 -0
- data/app/views/virgo/users/show.haml +11 -0
- data/app/views/virgo/users/unlocks/new.html.haml +9 -0
- data/config/initializers/action_mailer.rb +7 -0
- data/config/initializers/active_record.rb +72 -0
- data/config/initializers/active_record_symbolize.rb +18 -0
- data/config/initializers/assets.rb +17 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/carrierwave.rb +36 -0
- data/config/initializers/cookies_serializer.rb +3 -0
- data/config/initializers/devise.rb +257 -0
- data/config/initializers/filter_parameter_logging.rb +4 -0
- data/config/initializers/hash.rb +5 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/mime_types.rb +4 -0
- data/config/initializers/nil_class.rb +13 -0
- data/config/initializers/non_digest_assets.rb +3 -0
- data/config/initializers/paper_trail.rb +30 -0
- data/config/initializers/schema_plus.rb +5 -0
- data/config/initializers/session_store.rb +3 -0
- data/config/initializers/shortcode.rb +12 -0
- data/config/initializers/simple_form.rb +170 -0
- data/config/initializers/simple_form_bootstrap.rb +136 -0
- data/config/initializers/string.rb +5 -0
- data/config/initializers/time_formatting.rb +23 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/devise.en.yml +60 -0
- data/config/routes.rb +96 -0
- data/config/schedule.rb +3 -0
- data/db/migrate/20150729174510_create_virgo_schema.rb +225 -0
- data/lib/generators/virgo/install/install_generator.rb +16 -0
- data/lib/generators/virgo/views/views_generator.rb +22 -0
- data/lib/tasks/virgo_tasks.rake +7 -0
- data/lib/virgo.rb +4 -0
- data/lib/virgo/development_mail_interceptor.rb +6 -0
- data/lib/virgo/email_validator.rb +6 -0
- data/lib/virgo/engine.rb +73 -0
- data/lib/virgo/reduce_validator.rb +6 -0
- data/lib/virgo/upload_helpers.rb +89 -0
- data/lib/virgo/version.rb +3 -0
- data/lib/virgo/view_help.rb +3 -0
- metadata +1051 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
devise:
|
5
|
+
confirmations:
|
6
|
+
confirmed: "Your email address has been successfully confirmed."
|
7
|
+
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
|
8
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
|
9
|
+
failure:
|
10
|
+
already_authenticated: "You are already signed in."
|
11
|
+
inactive: "Your account is not activated yet."
|
12
|
+
invalid: "Invalid %{authentication_keys} or password."
|
13
|
+
locked: "Your account is locked."
|
14
|
+
last_attempt: "You have one more attempt before your account is locked."
|
15
|
+
not_found_in_database: "Invalid %{authentication_keys} or password."
|
16
|
+
timeout: "Your session expired. Please sign in again to continue."
|
17
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
+
unconfirmed: "You have to confirm your email address before continuing."
|
19
|
+
mailer:
|
20
|
+
confirmation_instructions:
|
21
|
+
subject: "Confirmation instructions"
|
22
|
+
reset_password_instructions:
|
23
|
+
subject: "Reset password instructions"
|
24
|
+
unlock_instructions:
|
25
|
+
subject: "Unlock instructions"
|
26
|
+
omniauth_callbacks:
|
27
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
28
|
+
success: "Successfully authenticated from %{kind} account."
|
29
|
+
passwords:
|
30
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
31
|
+
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
|
32
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
33
|
+
updated: "Your password has been changed successfully. You are now signed in."
|
34
|
+
updated_not_active: "Your password has been changed successfully."
|
35
|
+
registrations:
|
36
|
+
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
|
37
|
+
signed_up: "Welcome! You have signed up successfully."
|
38
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
39
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
40
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
|
41
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
|
42
|
+
updated: "Your account has been updated successfully."
|
43
|
+
sessions:
|
44
|
+
signed_in: "Signed in successfully."
|
45
|
+
signed_out: "Signed out successfully."
|
46
|
+
already_signed_out: "Signed out successfully."
|
47
|
+
unlocks:
|
48
|
+
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
|
49
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
|
50
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
51
|
+
errors:
|
52
|
+
messages:
|
53
|
+
already_confirmed: "was already confirmed, please try signing in"
|
54
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
55
|
+
expired: "has expired, please request a new one"
|
56
|
+
not_found: "not found"
|
57
|
+
not_locked: "was not locked"
|
58
|
+
not_saved:
|
59
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
60
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
data/config/routes.rb
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
Virgo::Engine.routes.draw do
|
2
|
+
root to: 'posts#index'
|
3
|
+
get 'login', to: redirect('/users/sign_in')
|
4
|
+
|
5
|
+
resources :posts, except: [:show] do
|
6
|
+
get :track, on: :member
|
7
|
+
get :popular, on: :collection
|
8
|
+
get :more, on: :collection
|
9
|
+
end
|
10
|
+
|
11
|
+
resources :install do
|
12
|
+
get :success, on: :collection
|
13
|
+
end
|
14
|
+
|
15
|
+
resources :columns
|
16
|
+
resources :tags
|
17
|
+
resources :search
|
18
|
+
resources :users, path: '/author'
|
19
|
+
resources :subscribers do
|
20
|
+
match :modal, on: :collection, via: [:get, :post]
|
21
|
+
end
|
22
|
+
|
23
|
+
resources :page_modules do
|
24
|
+
get '/popular_posts' => 'page_modules#popular_posts', on: :collection
|
25
|
+
end
|
26
|
+
|
27
|
+
get '/news' => 'posts#latest', as: :latest_posts
|
28
|
+
get '/feed.rss' => 'posts#rss', as: :feed
|
29
|
+
get '/feed.xml' => 'posts#rss', as: :feed_alt
|
30
|
+
get '/authors' => 'pages#authors', as: :authors
|
31
|
+
get '/admin/help' => 'admin/pages#help', as: :admin_help
|
32
|
+
|
33
|
+
|
34
|
+
devise_for :users, class_name: "Virgo::User", controllers: {
|
35
|
+
sessions: 'virgo/users/sessions',
|
36
|
+
registrations: 'virgo/users/registrations',
|
37
|
+
passwords: 'virgo/users/passwords',
|
38
|
+
confirmations: 'virgo/users/confirmations'
|
39
|
+
}
|
40
|
+
|
41
|
+
namespace :admin do
|
42
|
+
get '/admin/posts/revision_detail/:version_id' => 'posts#revision_detail', as: :revision_detail
|
43
|
+
|
44
|
+
resources :media_modal do
|
45
|
+
post :upload, on: :collection
|
46
|
+
get :library_panel, on: :collection
|
47
|
+
match :upload_panel, on: :collection, via: [:get, :post]
|
48
|
+
match '/image_settings/:image_id' => 'media_modal#image_settings', on: :collection, via: [:get, :patch], as: :image_settings
|
49
|
+
end
|
50
|
+
|
51
|
+
resources :slideshows do
|
52
|
+
resources :slides, shallow: true
|
53
|
+
end
|
54
|
+
|
55
|
+
post '/admin/slides/positions' => 'slides#positions'
|
56
|
+
|
57
|
+
resources :posts do
|
58
|
+
get :revisions, on: :member
|
59
|
+
get 'author_dropdown' => 'posts#author_dropdown', on: :collection
|
60
|
+
match 'editing' => 'posts#editing', on: :member, via: [:get, :post]
|
61
|
+
delete 'featured_image' => 'posts#delete_featured_image', on: :member
|
62
|
+
delete 'thumbnail_image' => 'posts#delete_thumbnail_image', on: :member
|
63
|
+
patch :tag_ordering, on: :member
|
64
|
+
get :find, on: :collection
|
65
|
+
end
|
66
|
+
|
67
|
+
resources :columns
|
68
|
+
|
69
|
+
get '/site/edit' => 'sites#edit'
|
70
|
+
patch '/site' => 'sites#update'
|
71
|
+
|
72
|
+
get '/page_modules/edit' => 'page_modules#edit'
|
73
|
+
patch '/page_modules' => 'page_modules#update'
|
74
|
+
match '/page_modules/:id/edit_subject' => 'page_modules#edit_subject', via: [:get, :patch], as: :edit_page_module_subject
|
75
|
+
get '/newsletter/edit' => 'newsletters#edit'
|
76
|
+
patch '/newsletter' => 'newsletters#update'
|
77
|
+
get '/newsletter/changelog' => 'newsletters#changelog'
|
78
|
+
|
79
|
+
resources :tags do
|
80
|
+
get 'modal_form', on: :collection
|
81
|
+
end
|
82
|
+
resources :categories do
|
83
|
+
get 'modal_form', on: :collection
|
84
|
+
end
|
85
|
+
resources :users do
|
86
|
+
resources :sessions, controller: 'users/sessions'
|
87
|
+
end
|
88
|
+
resources :images do
|
89
|
+
post :upload, on: :collection
|
90
|
+
get :embed, on: :member
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
get '/sections/:id' => 'categories#show', as: :category
|
95
|
+
get '/:id' => 'posts#show', as: :post_detail
|
96
|
+
end
|
data/config/schedule.rb
ADDED
@@ -0,0 +1,225 @@
|
|
1
|
+
class CreateVirgoSchema < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
# These are extensions that must be enabled in order to support this database
|
4
|
+
enable_extension "plpgsql"
|
5
|
+
enable_extension "pg_trgm"
|
6
|
+
enable_extension "hstore"
|
7
|
+
|
8
|
+
create_table "versions", force: :cascade do |t|
|
9
|
+
t.string "item_type", null: false, index: {name: "index_versions_on_item_type_and_item_id", with: ["item_id"]}
|
10
|
+
t.integer "item_id", null: false
|
11
|
+
t.string "event", null: false
|
12
|
+
t.string "whodunnit"
|
13
|
+
t.text "object"
|
14
|
+
t.datetime "created_at"
|
15
|
+
t.text "object_changes"
|
16
|
+
end
|
17
|
+
|
18
|
+
create_table "virgo_categories", force: :cascade do |t|
|
19
|
+
t.string "name", index: {name: "index_virgo_categories_on_name"}
|
20
|
+
t.datetime "created_at"
|
21
|
+
t.datetime "updated_at"
|
22
|
+
t.integer "parent_id", index: {name: "index_virgo_categories_on_parent_id"}
|
23
|
+
t.string "slug", index: {name: "index_virgo_categories_on_slug"}
|
24
|
+
t.integer "created_by_id", index: {name: "index_virgo_categories_on_created_by_id"}
|
25
|
+
t.boolean "display_in_navbar", index: {name: "index_virgo_categories_on_display_in_navbar"}
|
26
|
+
t.integer "navbar_weight", default: 0, index: {name: "index_virgo_categories_on_navbar_weight"}
|
27
|
+
t.boolean "visible", default: true, index: {name: "index_virgo_categories_on_visible"}
|
28
|
+
end
|
29
|
+
|
30
|
+
create_table "virgo_columns", force: :cascade do |t|
|
31
|
+
t.string "name"
|
32
|
+
t.string "slug", index: {name: "index_virgo_columns_on_slug"}
|
33
|
+
t.text "description"
|
34
|
+
t.string "image"
|
35
|
+
t.integer "weight", default: 0, index: {name: "index_virgo_columns_on_weight"}
|
36
|
+
t.datetime "created_at"
|
37
|
+
t.datetime "updated_at"
|
38
|
+
end
|
39
|
+
|
40
|
+
create_table "virgo_images", force: :cascade do |t|
|
41
|
+
t.integer "user_id", index: {name: "index_virgo_images_on_user_id"}
|
42
|
+
t.string "name", index: {name: "index_virgo_images_on_name"}
|
43
|
+
t.string "slug", index: {name: "index_virgo_images_on_slug"}
|
44
|
+
t.string "image"
|
45
|
+
t.integer "width"
|
46
|
+
t.integer "height"
|
47
|
+
t.text "data_file_name"
|
48
|
+
t.text "data_content_type"
|
49
|
+
t.integer "data_file_size"
|
50
|
+
t.datetime "created_at"
|
51
|
+
t.datetime "updated_at"
|
52
|
+
t.text "alt_text"
|
53
|
+
t.text "description"
|
54
|
+
t.text "credit"
|
55
|
+
end
|
56
|
+
|
57
|
+
create_table "virgo_page_module_posts", force: :cascade do |t|
|
58
|
+
t.integer "page_module_id", index: {name: "index_virgo_page_module_posts_on_page_module_id"}
|
59
|
+
t.integer "post_id", index: {name: "index_virgo_page_module_posts_on_post_id"}
|
60
|
+
t.integer "position"
|
61
|
+
t.datetime "created_at"
|
62
|
+
t.datetime "updated_at"
|
63
|
+
end
|
64
|
+
|
65
|
+
create_table "virgo_page_modules", force: :cascade do |t|
|
66
|
+
t.string "name"
|
67
|
+
t.string "template_path"
|
68
|
+
t.boolean "enabled", index: {name: "index_virgo_page_modules_on_enabled"}
|
69
|
+
t.integer "weight", default: 0, index: {name: "index_virgo_page_modules_on_weight"}
|
70
|
+
t.datetime "created_at"
|
71
|
+
t.datetime "updated_at"
|
72
|
+
t.integer "subject_id", index: {name: "index_virgo_page_modules_on_subject_id"}
|
73
|
+
t.string "subject_type", index: {name: "index_virgo_page_modules_on_subject_type"}
|
74
|
+
t.boolean "editable_subject", default: false
|
75
|
+
t.string "image"
|
76
|
+
t.boolean "can_set_posts", default: false
|
77
|
+
t.boolean "hidden_from_admins", default: false
|
78
|
+
end
|
79
|
+
|
80
|
+
create_table "virgo_post_categories", force: :cascade do |t|
|
81
|
+
t.integer "post_id", index: {name: "index_virgo_post_categories_on_post_id"}
|
82
|
+
t.integer "category_id", index: {name: "index_virgo_post_categories_on_category_id"}
|
83
|
+
end
|
84
|
+
|
85
|
+
create_table "virgo_post_tags", force: :cascade do |t|
|
86
|
+
t.integer "post_id", index: {name: "index_virgo_post_tags_on_post_id"}
|
87
|
+
t.integer "tag_id", index: {name: "index_virgo_post_tags_on_tag_id"}
|
88
|
+
t.integer "position", default: 0, index: {name: "index_virgo_post_tags_on_position"}
|
89
|
+
end
|
90
|
+
|
91
|
+
create_table "virgo_posts", force: :cascade do |t|
|
92
|
+
t.string "post_type", default: "post", index: {name: "index_virgo_posts_on_post_type"}
|
93
|
+
t.string "slug", index: {name: "index_virgo_posts_on_slug"}
|
94
|
+
t.integer "author_id", index: {name: "index_virgo_posts_on_author_id"}
|
95
|
+
t.text "headline"
|
96
|
+
t.text "subhead"
|
97
|
+
t.text "excerpt"
|
98
|
+
t.text "body"
|
99
|
+
t.string "status", default: "draft", index: {name: "index_virgo_posts_on_status"}
|
100
|
+
t.datetime "publish_at", index: {name: "index_virgo_posts_on_publish_at"}
|
101
|
+
t.boolean "feature_on_front_page", default: false, index: {name: "index_virgo_posts_on_feature_on_front_page"}
|
102
|
+
t.boolean "feature_on_category_page", default: false, index: {name: "index_virgo_posts_on_feature_on_category_page"}
|
103
|
+
t.boolean "show_excerpt", default: true
|
104
|
+
t.text "citation_name"
|
105
|
+
t.text "citation_url"
|
106
|
+
t.datetime "created_at"
|
107
|
+
t.datetime "updated_at", index: {name: "index_virgo_posts_on_updated_at"}
|
108
|
+
t.integer "created_by_id", index: {name: "index_virgo_posts_on_created_by_id"}
|
109
|
+
t.string "title_tag_text"
|
110
|
+
t.text "meta_description_tag_value"
|
111
|
+
t.integer "editing_user_id", index: {name: "index_virgo_posts_on_editing_user_id"}
|
112
|
+
t.datetime "editing_timestamp", index: {name: "index_virgo_posts_on_editing_timestamp"}
|
113
|
+
t.boolean "live", default: true, index: {name: "index_virgo_posts_on_live"}
|
114
|
+
t.integer "view_count", default: 0, index: {name: "index_virgo_posts_on_view_count"}
|
115
|
+
t.integer "featured_image_id"
|
116
|
+
t.text "search_document", index: {name: "virgo_post_search_document_index", using: :gin, operator_class: "gin_trgm_ops"}
|
117
|
+
t.string "uuid", index: {name: "index_virgo_posts_on_uuid"}
|
118
|
+
t.integer "column_id", index: {name: "index_virgo_posts_on_column_id"}
|
119
|
+
t.boolean "comments_enabled", default: false
|
120
|
+
t.boolean "show_feature_image_on_post_page", default: true
|
121
|
+
t.hstore "meta"
|
122
|
+
t.decimal "popularity", precision: 12, scale: 3, index: {name: "index_virgo_posts_on_popularity"}
|
123
|
+
t.integer "thumbnail_image_id", index: {name: "index_virgo_posts_on_thumbnail_image_id"}
|
124
|
+
end
|
125
|
+
|
126
|
+
create_table "virgo_sites", force: :cascade do |t|
|
127
|
+
t.text "tagline"
|
128
|
+
t.datetime "created_at"
|
129
|
+
t.datetime "updated_at"
|
130
|
+
t.boolean "recommendations_enabled", default: true
|
131
|
+
t.text "name"
|
132
|
+
t.text "description"
|
133
|
+
t.string "disqus_app_id"
|
134
|
+
t.string "twitter_handle"
|
135
|
+
t.string "instagram_account_name"
|
136
|
+
t.string "pinterest_account_name"
|
137
|
+
end
|
138
|
+
|
139
|
+
create_table "virgo_slides", force: :cascade do |t|
|
140
|
+
t.text "text"
|
141
|
+
t.integer "slideshow_id", index: {name: "index_virgo_slides_on_slideshow_id"}
|
142
|
+
t.integer "position", index: {name: "index_virgo_slides_on_position"}
|
143
|
+
t.datetime "created_at"
|
144
|
+
t.datetime "updated_at"
|
145
|
+
t.text "video_embed"
|
146
|
+
t.text "title"
|
147
|
+
t.integer "image_id", index: {name: "fk__virgo_slides_image_rel_id"}, foreign_key: {references: "virgo_images", name: "fk_virgo_slides_image_rel_id", on_update: :no_action, on_delete: :no_action}
|
148
|
+
end
|
149
|
+
add_index "virgo_slides", ["image_id"], name: "index_virgo_slides_on_image_id"
|
150
|
+
|
151
|
+
create_table "virgo_slideshows", force: :cascade do |t|
|
152
|
+
t.integer "author_id", index: {name: "index_virgo_slideshows_on_author_id"}
|
153
|
+
t.string "name"
|
154
|
+
t.datetime "created_at"
|
155
|
+
t.datetime "updated_at"
|
156
|
+
end
|
157
|
+
|
158
|
+
create_table "virgo_slug_histories", force: :cascade do |t|
|
159
|
+
t.integer "record_id", index: {name: "index_virgo_slug_histories_on_record_id"}
|
160
|
+
t.string "record_type", index: {name: "index_virgo_slug_histories_on_record_type"}
|
161
|
+
t.string "slug", index: {name: "index_virgo_slug_histories_on_slug"}
|
162
|
+
t.datetime "created_at"
|
163
|
+
t.datetime "updated_at"
|
164
|
+
end
|
165
|
+
|
166
|
+
create_table "virgo_subscribers", force: :cascade do |t|
|
167
|
+
t.string "email", index: {name: "index_virgo_subscribers_on_email"}
|
168
|
+
t.boolean "subscribed", default: true
|
169
|
+
t.datetime "created_at"
|
170
|
+
t.datetime "updated_at"
|
171
|
+
end
|
172
|
+
|
173
|
+
create_table "virgo_tags", force: :cascade do |t|
|
174
|
+
t.string "name", index: {name: "index_virgo_tags_on_name"}
|
175
|
+
t.datetime "created_at"
|
176
|
+
t.datetime "updated_at"
|
177
|
+
t.string "slug", index: {name: "index_virgo_tags_on_slug"}
|
178
|
+
t.integer "created_by_id", index: {name: "index_virgo_tags_on_created_by_id"}
|
179
|
+
end
|
180
|
+
|
181
|
+
create_table "virgo_users", force: :cascade do |t|
|
182
|
+
t.string "email", default: "", null: false, index: {name: "index_virgo_users_on_email"}
|
183
|
+
t.string "encrypted_password", default: "", null: false
|
184
|
+
t.string "reset_password_token"
|
185
|
+
t.datetime "reset_password_sent_at"
|
186
|
+
t.datetime "remember_created_at"
|
187
|
+
t.integer "sign_in_count", default: 0
|
188
|
+
t.datetime "current_sign_in_at"
|
189
|
+
t.datetime "last_sign_in_at"
|
190
|
+
t.string "current_sign_in_ip"
|
191
|
+
t.string "last_sign_in_ip"
|
192
|
+
t.string "confirmation_token"
|
193
|
+
t.datetime "confirmed_at"
|
194
|
+
t.datetime "confirmation_sent_at"
|
195
|
+
t.string "unconfirmed_email"
|
196
|
+
t.integer "failed_attempts", default: 0
|
197
|
+
t.string "unlock_token"
|
198
|
+
t.datetime "locked_at"
|
199
|
+
t.string "authentication_token"
|
200
|
+
t.string "first_name"
|
201
|
+
t.string "last_name"
|
202
|
+
t.string "role", index: {name: "index_virgo_users_on_role"}
|
203
|
+
t.boolean "canceled"
|
204
|
+
t.string "avatar"
|
205
|
+
t.boolean "active"
|
206
|
+
t.boolean "account_on_hold"
|
207
|
+
t.string "time_zone"
|
208
|
+
t.datetime "created_at"
|
209
|
+
t.datetime "updated_at"
|
210
|
+
t.string "username", index: {name: "index_virgo_users_on_username"}
|
211
|
+
t.string "byline"
|
212
|
+
t.text "about"
|
213
|
+
t.string "slug", index: {name: "index_virgo_users_on_slug"}
|
214
|
+
t.boolean "show_on_authors_page", default: false, index: {name: "index_virgo_users_on_show_on_authors_page"}
|
215
|
+
t.integer "author_page_weight", default: 0, index: {name: "index_virgo_users_on_author_page_weight"}
|
216
|
+
t.string "twitter_id"
|
217
|
+
t.string "facebook_id"
|
218
|
+
t.string "instagram_id"
|
219
|
+
t.string "pinterest_id"
|
220
|
+
t.string "snapchat_id"
|
221
|
+
t.string "linkedin_id"
|
222
|
+
t.string "public_email"
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Virgo
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
def run_install
|
4
|
+
unless app_has_engine_route?
|
5
|
+
route "mount Virgo::Engine => \"/\""
|
6
|
+
end
|
7
|
+
|
8
|
+
generate "virgo:views"
|
9
|
+
end
|
10
|
+
|
11
|
+
def app_has_engine_route?
|
12
|
+
route_contents = File.read("#{Rails.root}/config/routes.rb")
|
13
|
+
route_contents.include?("Virgo::Engine")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Virgo
|
2
|
+
class ViewsGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path('../../../../..', __FILE__)
|
4
|
+
|
5
|
+
def copy_views
|
6
|
+
Dir["#{engine_root}/app/views/**/*"].reject { |f|
|
7
|
+
f.include?('admin') ||
|
8
|
+
f.include?('shortcode_templates')
|
9
|
+
}.each do |abs_path|
|
10
|
+
relative_path = abs_path.gsub("#{engine_root}/", '')
|
11
|
+
|
12
|
+
unless File.directory?(abs_path)
|
13
|
+
copy_file relative_path, relative_path
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def engine_root
|
19
|
+
File.expand_path('../../../../..', __FILE__)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|