dm_cms 4.2.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +22 -0
- data/README.md +31 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/dm_cms/admin.js +58 -0
- data/app/assets/javascripts/dm_cms/application.js +16 -0
- data/app/assets/stylesheets/dm_cms/admin.css +3 -0
- data/app/assets/stylesheets/dm_cms/application.css +13 -0
- data/app/controllers/dm_cms/admin/admin_controller.rb +14 -0
- data/app/controllers/dm_cms/admin/cms_blogs_controller.rb +89 -0
- data/app/controllers/dm_cms/admin/cms_contentitems_controller.rb +96 -0
- data/app/controllers/dm_cms/admin/cms_pages_controller.rb +100 -0
- data/app/controllers/dm_cms/admin/cms_posts_controller.rb +67 -0
- data/app/controllers/dm_cms/admin/cms_snippets_controller.rb +73 -0
- data/app/controllers/dm_cms/admin/dashboard_controller.rb +12 -0
- data/app/controllers/dm_cms/admin/media_files_controller.rb +80 -0
- data/app/controllers/dm_cms/application_controller.rb +9 -0
- data/app/controllers/dm_cms/blogs_controller.rb +50 -0
- data/app/controllers/dm_cms/comments_controller.rb +3 -0
- data/app/controllers/dm_cms/contact_form_controller.rb +27 -0
- data/app/controllers/dm_cms/pages_controller.rb +67 -0
- data/app/controllers/dm_cms/posts_controller.rb +69 -0
- data/app/datatables/blog_user_datatable.rb +79 -0
- data/app/helpers/dm_cms/analytics_helper.rb +27 -0
- data/app/helpers/dm_cms/application_helper.rb +4 -0
- data/app/helpers/dm_cms/cms_contentitems_helper.rb +8 -0
- data/app/helpers/dm_cms/cms_pages_helper.rb +30 -0
- data/app/helpers/dm_cms/pages_helper.rb +204 -0
- data/app/helpers/dm_cms/posts_helper.rb +26 -0
- data/app/helpers/dm_cms/render_helper.rb +50 -0
- data/app/inputs/media_input.rb +17 -0
- data/app/liquid/tags/markdown.rb +30 -0
- data/app/mailers/post_notify_mailer.rb +36 -0
- data/app/models/cms_blog.rb +89 -0
- data/app/models/cms_contentitem.rb +76 -0
- data/app/models/cms_page.rb +227 -0
- data/app/models/cms_post.rb +76 -0
- data/app/models/cms_snippet.rb +42 -0
- data/app/models/contact_form.rb +28 -0
- data/app/models/dm_cms/concerns/ability.rb +54 -0
- data/app/models/dm_cms/permitted_params.rb +34 -0
- data/app/models/media_file.rb +102 -0
- data/app/presenters/cms_blog_presenter.rb +15 -0
- data/app/presenters/cms_page_presenter.rb +23 -0
- data/app/presenters/cms_post_presenter.rb +11 -0
- data/app/presenters/cms_snippet_presenter.rb +10 -0
- data/app/uploaders/media_uploader.rb +169 -0
- data/app/views/customized/analytics/_google_analytics.html.erb +11 -0
- data/app/views/dm_cms/admin/cms_blogs/_form.html.erb +34 -0
- data/app/views/dm_cms/admin/cms_blogs/edit.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_blogs/index.html.erb +44 -0
- data/app/views/dm_cms/admin/cms_blogs/new.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_blogs/show.html.erb +167 -0
- data/app/views/dm_cms/admin/cms_contentitems/_form.html.erb +43 -0
- data/app/views/dm_cms/admin/cms_contentitems/_form_dialog.html.erb +17 -0
- data/app/views/dm_cms/admin/cms_contentitems/edit.html.erb +1 -0
- data/app/views/dm_cms/admin/cms_contentitems/markdown.html.erb +21 -0
- data/app/views/dm_cms/admin/cms_contentitems/new_content.html.erb +1 -0
- data/app/views/dm_cms/admin/cms_pages/_content_toolbar.html.erb +11 -0
- data/app/views/dm_cms/admin/cms_pages/_form.html.erb +50 -0
- data/app/views/dm_cms/admin/cms_pages/_tree.html.erb +20 -0
- data/app/views/dm_cms/admin/cms_pages/_tree_sidebar.html.erb +8 -0
- data/app/views/dm_cms/admin/cms_pages/edit.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_pages/index.html.erb +32 -0
- data/app/views/dm_cms/admin/cms_pages/new_page.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_pages/show.html.erb +54 -0
- data/app/views/dm_cms/admin/cms_posts/_form.html.erb +59 -0
- data/app/views/dm_cms/admin/cms_posts/edit.html.erb +2 -0
- data/app/views/dm_cms/admin/cms_posts/new.html.erb +1 -0
- data/app/views/dm_cms/admin/cms_snippets/_form.html.erb +28 -0
- data/app/views/dm_cms/admin/cms_snippets/edit.html.erb +1 -0
- data/app/views/dm_cms/admin/cms_snippets/index.html.erb +29 -0
- data/app/views/dm_cms/admin/cms_snippets/new.html.erb +1 -0
- data/app/views/dm_cms/admin/dashboard/_widget_blog_comments.html.erb +37 -0
- data/app/views/dm_cms/admin/dashboard/widget_blog_comments.js.erb +1 -0
- data/app/views/dm_cms/admin/media_files/_form.html.erb +102 -0
- data/app/views/dm_cms/admin/media_files/edit.html.erb +3 -0
- data/app/views/dm_cms/admin/media_files/index.html.erb +98 -0
- data/app/views/dm_cms/admin/media_files/new.html.erb +3 -0
- data/app/views/dm_cms/admin/shared/_liquid_tags_ref.html.erb +35 -0
- data/app/views/dm_cms/blogs/show.html.erb +0 -0
- data/app/views/dm_cms/blogs/toggle_follow.js.coffee +5 -0
- data/app/views/dm_cms/contact_form/create.html.erb +2 -0
- data/app/views/dm_cms/contact_form/create.js.erb +2 -0
- data/app/views/dm_cms/pages/_content_fragment.html.erb +13 -0
- data/app/views/dm_cms/pages/_snippet_fragment.html.erb +12 -0
- data/app/views/dm_cms/pages/coming_soon.html.erb +2 -0
- data/app/views/dm_cms/pages/show.html.erb +0 -0
- data/app/views/dm_cms/posts/show.html.erb +0 -0
- data/app/views/dm_cms/shared/_comment.html.erb +22 -0
- data/app/views/dm_cms/shared/_comment_form.html.erb +16 -0
- data/app/views/dm_cms/shared/_comment_list.html.erb +11 -0
- data/app/views/dm_cms/shared/_social_buttons.html.erb +6 -0
- data/app/views/layouts/email_templates/dm_cms_email_layout.html.erb +320 -0
- data/app/views/layouts/email_templates/dm_cms_email_layout.text.erb +1 -0
- data/app/views/layouts/email_templates/dm_cms_post_notify.html.erb +13 -0
- data/app/views/layouts/email_templates/dm_cms_post_notify.text.erb +9 -0
- data/app/views/liquid_tags/_contact_form.html.erb +17 -0
- data/config/initializers/liquid_init.rb +2 -0
- data/config/locales/cms.cs.yml +42 -0
- data/config/locales/cms.de.yml +42 -0
- data/config/locales/cms.en.yml +42 -0
- data/config/locales/cms.fi.yml +42 -0
- data/config/locales/cms.ja.yml +42 -0
- data/config/routes.rb +70 -0
- data/db/migrate/20121103181909_create_cms.rb +91 -0
- data/db/migrate/20130206213720_add_account_to_cms.rb +10 -0
- data/db/migrate/20130507123255_create_blog.rb +61 -0
- data/db/migrate/20130531212537_add_notification_sent.rb +5 -0
- data/db/migrate/20130605184116_add_blog_comment.rb +7 -0
- data/db/migrate/20131128201053_add_blog_image.rb +5 -0
- data/db/migrate/20140217135228_rename_snippet_slug.rb +13 -0
- data/db/migrate/20140303121217_add_requires_subscription_blog.rb +7 -0
- data/db/migrate/20140328205246_add_pages_ranked_model.rb +22 -0
- data/db/migrate/20140423113417_add_blog_owner.rb +6 -0
- data/db/migrate/20140428122156_create_media_files.rb +29 -0
- data/db/migrate/20140523134543_add_cmspage_summary.rb +6 -0
- data/db/migrate/20140601151631_add_blog_image_email_header.rb +5 -0
- data/db/migrate/20141004154725_add_header_image.rb +9 -0
- data/db/migrate/20160821150108_index_foreign_keys_in_cms_blogs.rb +6 -0
- data/db/migrate/20160821150109_index_foreign_keys_in_cms_media_files.rb +6 -0
- data/db/migrate/20160821150110_index_foreign_keys_in_cms_posts.rb +6 -0
- data/lib/dm_cms.rb +4 -0
- data/lib/dm_cms/engine.rb +16 -0
- data/lib/dm_cms/liquid/filters/liquid_filters.rb +11 -0
- data/lib/dm_cms/liquid/tags/contact_form.rb +35 -0
- data/lib/dm_cms/liquid/tags/div.rb +42 -0
- data/lib/dm_cms/liquid/tags/image.rb +76 -0
- data/lib/dm_cms/liquid/tags/quote.rb +38 -0
- data/lib/dm_cms/liquid/tags/snippet.rb +37 -0
- data/lib/dm_cms/liquid/tags/url_asset.rb +41 -0
- data/lib/dm_cms/liquid/tags/url_media.rb +42 -0
- data/lib/dm_cms/liquid/tags/url_protected.rb +31 -0
- data/lib/tasks/dm_cms_tasks.rake +4 -0
- data/spec/controllers/admin/cms_blogs_controller_spec.rb +173 -0
- data/spec/controllers/admin/cms_pages_controller_spec.rb +182 -0
- data/spec/controllers/admin/cms_posts_controller_spec.rb +166 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/ability.rb +12 -0
- data/spec/dummy/app/models/user.rb +6 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +82 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/_themes_for_rails.rb +39 -0
- data/spec/dummy/config/initializers/account_initialization.rb +28 -0
- data/spec/dummy/config/initializers/assets.rb +8 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/dm_core.rb +6 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +19 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141114170927_add_globalize_countries.dm_core.rb +50 -0
- data/spec/dummy/db/migrate/20141114170928_devise_create_users.dm_core.rb +46 -0
- data/spec/dummy/db/migrate/20141114170929_add_user_fields.dm_core.rb +14 -0
- data/spec/dummy/db/migrate/20141114170930_rolify_create_roles.dm_core.rb +20 -0
- data/spec/dummy/db/migrate/20141114170931_add_last_access.dm_core.rb +10 -0
- data/spec/dummy/db/migrate/20141114170932_create_versions.dm_core.rb +19 -0
- data/spec/dummy/db/migrate/20141114170933_add_object_changes_column_to_versions.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170934_create_dm_core_accounts.dm_core.rb +13 -0
- data/spec/dummy/db/migrate/20141114170935_add_account_to_users.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170936_create_preferences.dm_core.rb +13 -0
- data/spec/dummy/db/migrate/20141114170937_create_comments.dm_core.rb +22 -0
- data/spec/dummy/db/migrate/20141114170938_add_activity.dm_core.rb +21 -0
- data/spec/dummy/db/migrate/20141114170939_add_type_to_comments.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170940_add_category.dm_core.rb +28 -0
- data/spec/dummy/db/migrate/20141114170941_create_email_table.dm_core.rb +26 -0
- data/spec/dummy/db/migrate/20141114170942_add_user_profile.dm_core.rb +46 -0
- data/spec/dummy/db/migrate/20141114170943_add_profile_email.dm_core.rb +14 -0
- data/spec/dummy/db/migrate/20141114170944_create_payment_history.dm_core.rb +37 -0
- data/spec/dummy/db/migrate/20141114170945_change_anchor_field.dm_core.rb +10 -0
- data/spec/dummy/db/migrate/20141114170946_create_user_site_profile.dm_core.rb +27 -0
- data/spec/dummy/db/migrate/20141114170947_add_avatar.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170948_add_notify_to_payment_history.dm_core.rb +8 -0
- data/spec/dummy/db/migrate/20141114170949_acts_as_votable_migration.dm_core.rb +28 -0
- data/spec/dummy/db/migrate/20141114170950_add_user_site_profile_uuid.dm_core.rb +19 -0
- data/spec/dummy/db/migrate/20141114170951_add_invoice_id.dm_core.rb +7 -0
- data/spec/dummy/db/migrate/20141114170952_acts_as_follower_migration.dm_core.rb +18 -0
- data/spec/dummy/db/migrate/20141114170953_rename_invoice_id.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170954_add_core_addresses.dm_core.rb +18 -0
- data/spec/dummy/db/migrate/20141114170955_papertrail_increase_column.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170956_acts_as_taggable_on_migration.dm_core.rb +32 -0
- data/spec/dummy/db/migrate/20141114170957_add_missing_unique_indices.dm_core.rb +23 -0
- data/spec/dummy/db/migrate/20141114170958_add_taggings_counter_cache_to_tags.dm_core.rb +16 -0
- data/spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb +40 -0
- data/spec/dummy/db/migrate/20141114170960_add_missing_taggable_index.dm_core.rb +11 -0
- data/spec/dummy/db/migrate/20141114170961_create_documents.dm_knowledge.rb +19 -0
- data/spec/dummy/db/migrate/20141114170962_add_document_notes.dm_knowledge.rb +7 -0
- data/spec/dummy/db/migrate/20160128134522_add_favored_locale.dm_core.rb +17 -0
- data/spec/dummy/db/migrate/20160128134523_update_papertrail_v4.dm_core.rb +41 -0
- data/spec/dummy/db/schema.rb +590 -0
- data/spec/dummy/db/seeds.rb +18 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/themes/_mbus/_readme.md +6 -0
- data/spec/dummy/themes/_mbus/_theme.yml +21 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/application.js +9 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/bootstrap.js +2114 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/bootstrap.min.js +6 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/contact_me.js +75 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/jqBootstrapValidation.js +912 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/javascripts/jquery-1.11.0.js +4 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/application.css +14 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/bootstrap.css +6203 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/bootstrap.min.css +5 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/css/font-awesome.css +1566 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/css/font-awesome.min.css +4 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/FontAwesome.otf +0 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/fontawesome-webfont.eot +0 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/fontawesome-webfont.svg +504 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf +0 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/fonts/fontawesome-webfont.woff +0 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/bordered-pulled.less +16 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/core.less +12 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/fixed-width.less +6 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/font-awesome.less +17 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/icons.less +506 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/larger.less +13 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/list.less +19 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/mixins.less +20 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/path.less +14 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/rotated-flipped.less +9 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/spinning.less +32 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/stacked.less +20 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/less/variables.less +515 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_bordered-pulled.scss +16 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_core.scss +12 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_fixed-width.scss +6 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_icons.scss +506 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_larger.scss +13 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_list.scss +19 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_mixins.scss +20 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_path.scss +14 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_rotated-flipped.scss +9 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_spinning.scss +32 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_stacked.scss +20 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/_variables.scss +515 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/font-awesome-4.1.0/scss/font-awesome.scss +17 -0
- data/spec/dummy/themes/_mbus/theme_assets/_mbus/stylesheets/modern-business.css +93 -0
- data/spec/dummy/themes/_mbus/theme_support/config/load_theme.rb +0 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.cs.yml +57 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.de.yml +57 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.en.yml +57 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.fi.yml +58 -0
- data/spec/dummy/themes/_mbus/theme_support/locales/site.ja.yml +57 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_blog_right_sidebar.html.erb +91 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_comment.html.erb +21 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_comment_form.html.erb +16 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_comment_list.html.erb +7 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_comment_section.html.erb +17 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_page_footer.html.erb +11 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_page_header.html.erb +39 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_page_top.html.erb +24 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_post_summary_item.html.erb +11 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/_social_buttons_initialization.html.erb +10 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/blog.html.erb +47 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/blog_post.html.erb +55 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/content_full_width.html.erb +28 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/content_with_left_nav.html.erb +44 -0
- data/spec/dummy/themes/_mbus/theme_support/views/layouts/cms_templates/index.html.erb +19 -0
- data/spec/dummy/themes/local/_theme.yml +8 -0
- data/spec/factories/accounts.rb +17 -0
- data/spec/factories/blogs.rb +19 -0
- data/spec/factories/posts.rb +23 -0
- data/spec/factories/user_profiles.rb +10 -0
- data/spec/factories/users.rb +19 -0
- data/spec/features/admin/blog_admin_spec.rb +16 -0
- data/spec/models/cms_blog_spec.rb +37 -0
- data/spec/models/cms_page_spec.rb +9 -0
- data/spec/models/cms_post_spec.rb +44 -0
- data/spec/rails_helper.rb +70 -0
- data/spec/spec_helper.rb +85 -0
- data/spec/support/accounts.rb +17 -0
- data/spec/support/devise.rb +44 -0
- data/spec/support/fix_locale.rb +57 -0
- metadata +545 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Print deprecation notices to the stderr.
|
35
|
+
config.active_support.deprecation = :stderr
|
36
|
+
|
37
|
+
# Raises error for missing translations
|
38
|
+
# config.action_view.raise_on_missing_translations = true
|
39
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Make sure this loads before the account initialization
|
2
|
+
#------------------------------------------------------------------------------
|
3
|
+
ThemesForRails.config do |config|
|
4
|
+
# themes_dir is used to allow ThemesForRails to list available themes. It is not used to resolve any paths or routes.
|
5
|
+
# config.themes_dir = ":root/app/assets/themes"
|
6
|
+
config.themes_dir = ":root/themes"
|
7
|
+
|
8
|
+
# themes_config_file is the yaml configuration file for a theme
|
9
|
+
config.themes_config_file = ':root/themes/:name/_theme.yml'
|
10
|
+
|
11
|
+
# assets_dir is the path to your theme assets.
|
12
|
+
config.assets_dir = ':root/themes/:name/theme_assets'
|
13
|
+
|
14
|
+
# views_dir is the path to your theme views
|
15
|
+
config.views_dir = ':root/themes/:name/theme_support/views'
|
16
|
+
|
17
|
+
# locales_dir is the path to your theme locales
|
18
|
+
config.locales_dir = ':root/themes/:name/theme_support/locales'
|
19
|
+
|
20
|
+
# themes_routes_dir is the asset pipeline route base.
|
21
|
+
# Because of the way the asset pipeline resolves paths, you do
|
22
|
+
# not need to include the 'themes' folder in your route dir.
|
23
|
+
#
|
24
|
+
# for example, to get application.css for the default theme,
|
25
|
+
# your URL route should be : /assets/default/stylesheets/application.css
|
26
|
+
config.themes_routes_dir = "assets"
|
27
|
+
|
28
|
+
config.asset_digests_enabled = true
|
29
|
+
end
|
30
|
+
|
31
|
+
#--- Load the theme config data
|
32
|
+
ThemesForRails.load_all_theme_data
|
33
|
+
|
34
|
+
#--- usually called in the ThemesForRails config.to_prepare method,
|
35
|
+
# for the precompile to work, these need to get called earlier than usual
|
36
|
+
if ENV['RAILS_GROUPS'] == 'assets'
|
37
|
+
ThemesForRails.check_asset_pipeline
|
38
|
+
ThemesForRails.add_themes_assets_to_asset_pipeline
|
39
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Perform any specific account initialization such as loading Liquid tags, locales,
|
2
|
+
# etc
|
3
|
+
#------------------------------------------------------------------------------
|
4
|
+
# Register the Liquid tags for each theme. Since tags are in the global
|
5
|
+
# Liquid namespace, we need to namespace them per theme, based on the
|
6
|
+
# account identifier
|
7
|
+
#------------------------------------------------------------------------------
|
8
|
+
ThemesForRails.available_theme_names.each do |theme_name|
|
9
|
+
theme_data = ThemesForRails.config.theme_data[theme_name]
|
10
|
+
theme_root = Rails.root.join('themes', theme_name)
|
11
|
+
|
12
|
+
unless ENV['RAILS_GROUPS'] == 'assets'
|
13
|
+
#--- Register tags from theme
|
14
|
+
Dir.glob(File.join(theme_root, "/theme_support/tags/*.rb")).each do |path|
|
15
|
+
require path
|
16
|
+
file = path.split('/').last.split('.').first
|
17
|
+
Liquid::Template.register_tag_namespace(file, "Liquid::Theme#{theme_name.camelize}::#{file.camelize}".constantize, theme_name)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
#--- add items listed in theme.yml to be pre-compiled in asset pipeline
|
22
|
+
if Rails.env.production? || Rails.env.staging?
|
23
|
+
if theme_data and theme_data['precompile']
|
24
|
+
Rails.application.config.assets.precompile += theme_data['precompile']
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Precompile additional assets.
|
7
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
8
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -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,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
|
3
|
+
scope ":locale" do
|
4
|
+
devise_for :users, controllers: { registrations: "registrations", confirmations: 'confirmations' }
|
5
|
+
end
|
6
|
+
|
7
|
+
themes_for_rails
|
8
|
+
|
9
|
+
mount DmCore::Engine, :at => '/'
|
10
|
+
mount DmCms::Engine => "/dm_cms"
|
11
|
+
|
12
|
+
scope ":locale" do
|
13
|
+
get '/index', controller: 'dm_cms/pages', action: :show, slug: 'index', as: :index
|
14
|
+
end
|
15
|
+
|
16
|
+
#--- use match instead of root to fix issue where sometimes '?locale=de' is appeneded
|
17
|
+
get '/(:locale)', :controller => 'dm_cms/pages', :action => :show, :slug => 'index', :as => :root
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: 3e8fdc05d6cae67029b3df06fd3b9038e07fb17203a03023e294b47b574fa691f8fac2c1e8c52bf8325b9405f66eb163f020131be5585547f220325c23aadb7c
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 58b6eb8bf1c6cd06cdd764335937a48adc702897462d2077ef19d0f7d2e19e246962a248220c920c7b8370faf060879422436fe441c89b16f58162288f03caf4
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
Binary file
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This migration comes from dm_core (originally 20121023202117)
|
3
|
+
#------------------------------------------------------------------------------
|
4
|
+
class AddGlobalizeCountries < ActiveRecord::Migration
|
5
|
+
def up
|
6
|
+
create_table "globalize_countries", :force => true do |t|
|
7
|
+
t.string "code", :limit => 2
|
8
|
+
t.string "english_name"
|
9
|
+
t.string "date_format"
|
10
|
+
t.string "currency_format"
|
11
|
+
t.string "currency_code", :limit => 3
|
12
|
+
t.string "thousands_sep", :limit => 2
|
13
|
+
t.string "decimal_sep", :limit => 2
|
14
|
+
t.string "currency_decimal_sep", :limit => 2
|
15
|
+
t.string "number_grouping_scheme"
|
16
|
+
t.string "continent"
|
17
|
+
t.string "locale"
|
18
|
+
end
|
19
|
+
|
20
|
+
add_index "globalize_countries", ["code"], :name => "index_globalize_countries_on_code"
|
21
|
+
add_index "globalize_countries", ["locale"], :name => "index_globalize_countries_on_locale"
|
22
|
+
|
23
|
+
create_table "globalize_languages", :force => true do |t|
|
24
|
+
t.string "iso_639_1", :limit => 2
|
25
|
+
t.string "iso_639_2", :limit => 3
|
26
|
+
t.string "iso_639_3", :limit => 3
|
27
|
+
t.string "rfc_3066"
|
28
|
+
t.string "english_name"
|
29
|
+
t.string "english_name_locale"
|
30
|
+
t.string "english_name_modifier"
|
31
|
+
t.string "native_name"
|
32
|
+
t.string "native_name_locale"
|
33
|
+
t.string "native_name_modifier"
|
34
|
+
t.boolean "macro_language"
|
35
|
+
t.string "direction"
|
36
|
+
t.string "pluralization"
|
37
|
+
t.string "scope", :limit => 1
|
38
|
+
end
|
39
|
+
|
40
|
+
add_index "globalize_languages", ["iso_639_1"], :name => "index_globalize_languages_on_iso_639_1"
|
41
|
+
add_index "globalize_languages", ["iso_639_2"], :name => "index_globalize_languages_on_iso_639_2"
|
42
|
+
add_index "globalize_languages", ["iso_639_3"], :name => "index_globalize_languages_on_iso_639_3"
|
43
|
+
add_index "globalize_languages", ["rfc_3066"], :name => "index_globalize_languages_on_rfc_3066"
|
44
|
+
end
|
45
|
+
|
46
|
+
def down
|
47
|
+
drop_table :globalize_countries
|
48
|
+
drop_table :globalize_languages
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20121028125329)
|
2
|
+
class DeviseCreateUsers < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table(:users) do |t|
|
5
|
+
## Database authenticatable
|
6
|
+
t.string :email, :null => false, :default => ""
|
7
|
+
t.string :encrypted_password, :null => false, :default => ""
|
8
|
+
|
9
|
+
## Recoverable
|
10
|
+
t.string :reset_password_token
|
11
|
+
t.datetime :reset_password_sent_at
|
12
|
+
|
13
|
+
## Rememberable
|
14
|
+
t.datetime :remember_created_at
|
15
|
+
|
16
|
+
## Trackable
|
17
|
+
t.integer :sign_in_count, :default => 0
|
18
|
+
t.datetime :current_sign_in_at
|
19
|
+
t.datetime :last_sign_in_at
|
20
|
+
t.string :current_sign_in_ip
|
21
|
+
t.string :last_sign_in_ip
|
22
|
+
|
23
|
+
## Confirmable
|
24
|
+
t.string :confirmation_token
|
25
|
+
t.datetime :confirmed_at
|
26
|
+
t.datetime :confirmation_sent_at
|
27
|
+
t.string :unconfirmed_email # Only if using reconfirmable
|
28
|
+
|
29
|
+
## Lockable
|
30
|
+
# t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
31
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
32
|
+
# t.datetime :locked_at
|
33
|
+
|
34
|
+
## Token authenticatable
|
35
|
+
# t.string :authentication_token
|
36
|
+
|
37
|
+
t.timestamps null: true
|
38
|
+
end
|
39
|
+
|
40
|
+
add_index :users, :email, :unique => true
|
41
|
+
add_index :users, :reset_password_token, :unique => true
|
42
|
+
add_index :users, :confirmation_token, :unique => true
|
43
|
+
# add_index :users, :unlock_token, :unique => true
|
44
|
+
# add_index :users, :authentication_token, :unique => true
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20121028125831)
|
2
|
+
class AddUserFields < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
add_column :users, :first_name, :string
|
5
|
+
add_column :users, :last_name, :string
|
6
|
+
add_column :users, :country_id, :integer
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_column :users, :first_name
|
11
|
+
remove_column :users, :last_name
|
12
|
+
remove_column :users, :country_id
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20121028153317)
|
2
|
+
class RolifyCreateRoles < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table(:roles) do |t|
|
5
|
+
t.string :name
|
6
|
+
t.references :resource, :polymorphic => true
|
7
|
+
|
8
|
+
t.timestamps null: true
|
9
|
+
end
|
10
|
+
|
11
|
+
create_table(:users_roles, :id => false) do |t|
|
12
|
+
t.references :user
|
13
|
+
t.references :role
|
14
|
+
end
|
15
|
+
|
16
|
+
add_index(:roles, :name)
|
17
|
+
add_index(:roles, [ :name, :resource_type, :resource_id ])
|
18
|
+
add_index(:users_roles, [ :user_id, :role_id ])
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20121110213512)
|
2
|
+
class CreateVersions < ActiveRecord::Migration
|
3
|
+
def self.up
|
4
|
+
create_table :versions do |t|
|
5
|
+
t.string :item_type, :null => false
|
6
|
+
t.integer :item_id, :null => false
|
7
|
+
t.string :event, :null => false
|
8
|
+
t.string :whodunnit
|
9
|
+
t.text :object
|
10
|
+
t.datetime :created_at
|
11
|
+
end
|
12
|
+
add_index :versions, [:item_type, :item_id]
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
remove_index :versions, [:item_type, :item_id]
|
17
|
+
drop_table :versions
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20121110213513)
|
2
|
+
class AddObjectChangesColumnToVersions < ActiveRecord::Migration
|
3
|
+
def self.up
|
4
|
+
add_column :versions, :object_changes, :text
|
5
|
+
add_column :versions, :locale, :string
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :versions, :object_changes
|
10
|
+
remove_column :versions, :locale
|
11
|
+
end
|
12
|
+
end
|