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,13 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130206121535)
|
2
|
+
class CreateDmCoreAccounts < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :core_accounts do |t|
|
5
|
+
t.string :company_name
|
6
|
+
t.string :contact_email
|
7
|
+
t.string :domain
|
8
|
+
t.string :account_prefix
|
9
|
+
t.integer :default_site_id
|
10
|
+
t.timestamps null: true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130206223323)
|
2
|
+
class AddAccountToUsers < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :users, :account_id, :integer
|
5
|
+
add_index :users, :account_id
|
6
|
+
add_column :roles, :account_id, :integer
|
7
|
+
add_index :roles, :account_id
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130207170247)
|
2
|
+
class CreatePreferences < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :preferences do |t|
|
5
|
+
t.string :name, :null => false
|
6
|
+
t.references :owner, :polymorphic => true, :null => false
|
7
|
+
t.references :group, :polymorphic => true
|
8
|
+
t.string :value
|
9
|
+
t.timestamps null: true
|
10
|
+
end
|
11
|
+
add_index :preferences, [:owner_id, :owner_type, :name, :group_id, :group_type], :unique => true, :name => 'index_preferences_on_owner_and_name_and_preference'
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130321144726)
|
2
|
+
class CreateComments < ActiveRecord::Migration
|
3
|
+
def self.up
|
4
|
+
create_table :core_comments do |t|
|
5
|
+
t.string :title, :limit => 50, :default => ""
|
6
|
+
t.text :comment
|
7
|
+
t.references :commentable, :polymorphic => true
|
8
|
+
t.references :user
|
9
|
+
t.string :role, :default => "comments"
|
10
|
+
t.integer :account_id
|
11
|
+
t.timestamps null: true
|
12
|
+
end
|
13
|
+
|
14
|
+
add_index :core_comments, :commentable_type
|
15
|
+
add_index :core_comments, :commentable_id
|
16
|
+
add_index :core_comments, :user_id
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.down
|
20
|
+
drop_table :core_comments
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130402203739)
|
2
|
+
class AddActivity < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :core_activities do |t|
|
5
|
+
t.integer :account_id
|
6
|
+
t.references :user
|
7
|
+
t.string :browser
|
8
|
+
t.string :session_id
|
9
|
+
t.string :ip_address
|
10
|
+
t.string :controller
|
11
|
+
t.string :action
|
12
|
+
t.string :params
|
13
|
+
t.string :slug
|
14
|
+
t.string :lesson
|
15
|
+
t.datetime :created_at
|
16
|
+
end
|
17
|
+
|
18
|
+
add_index :core_activities, :account_id
|
19
|
+
add_index :core_activities, :user_id
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130415095617)
|
2
|
+
class AddTypeToComments < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :core_comments, :type, :string
|
5
|
+
add_column :core_comments, :ancestry, :string
|
6
|
+
add_column :core_comments, :ancestry_depth, :integer, :default => 0
|
7
|
+
rename_column :core_comments, :comment, :body
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130429191051)
|
2
|
+
class AddCategory < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
create_table "core_category_translations", :force => true do |t|
|
5
|
+
t.integer :core_category_id
|
6
|
+
t.string :locale
|
7
|
+
t.string :name
|
8
|
+
t.string :description
|
9
|
+
t.datetime :created_at
|
10
|
+
t.datetime :updated_at
|
11
|
+
end
|
12
|
+
|
13
|
+
add_index "core_category_translations", ["core_category_id"], :name => "index_category_translation"
|
14
|
+
|
15
|
+
create_table "core_categories", :force => true do |t|
|
16
|
+
t.string :type
|
17
|
+
t.integer :row_order
|
18
|
+
t.integer :account_id
|
19
|
+
t.datetime :created_on
|
20
|
+
t.datetime :updated_on
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def down
|
25
|
+
drop_table :core_categories
|
26
|
+
drop_table :core_category_translations
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130513112751)
|
2
|
+
class CreateEmailTable < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
create_table :core_system_email_translations, :force => true do |t|
|
5
|
+
t.integer :core_system_email_id
|
6
|
+
t.string :locale
|
7
|
+
t.string :subject
|
8
|
+
t.text :body
|
9
|
+
t.datetime :created_at
|
10
|
+
t.datetime :updated_at
|
11
|
+
end
|
12
|
+
|
13
|
+
create_table :core_system_emails, :force => true do |t|
|
14
|
+
t.string :email_type
|
15
|
+
t.references :emailable, :polymorphic => true
|
16
|
+
t.datetime :created_at
|
17
|
+
t.datetime :updated_at
|
18
|
+
t.integer :account_id
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def down
|
23
|
+
drop_table :core_system_emails
|
24
|
+
drop_table :core_system_email_translations
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130516143539)
|
2
|
+
class AddUserProfile < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
create_table :user_profiles, :force => true do |t|
|
5
|
+
t.integer :user_id
|
6
|
+
t.string :public_name, :limit => 50, :default => ""
|
7
|
+
t.string :first_name, :limit => 50, :default => ""
|
8
|
+
t.string :last_name, :limit => 50, :default => ""
|
9
|
+
t.string :address, :limit => 70, :default => ""
|
10
|
+
t.string :address2, :limit => 70, :default => ""
|
11
|
+
t.string :city, :limit => 30, :default => ""
|
12
|
+
t.string :state, :limit => 30, :default => ""
|
13
|
+
t.string :zipcode, :limit => 10, :default => ""
|
14
|
+
t.integer :country_id, :default => 0
|
15
|
+
t.string :phone, :limit => 20, :default => ""
|
16
|
+
t.string :cell, :limit => 20, :default => ""
|
17
|
+
t.string :fax, :limit => 20, :default => ""
|
18
|
+
t.string :workphone, :limit => 20, :default => ""
|
19
|
+
t.string :website, :limit => 50, :default => ""
|
20
|
+
t.string :gender, :limit => 1, :default => ""
|
21
|
+
t.integer :status, :default => 0
|
22
|
+
t.integer :lock_version, :default => 0
|
23
|
+
t.datetime :last_access_at
|
24
|
+
t.datetime :created_at
|
25
|
+
t.datetime :updated_at
|
26
|
+
t.integer :account_id
|
27
|
+
end
|
28
|
+
|
29
|
+
User.all.find_each do |user|
|
30
|
+
Account.current = Account.find(user.account_id)
|
31
|
+
p = user.create_user_profile
|
32
|
+
p.update_attributes(first_name: user.attributes['first_name'], last_name: user.attributes['last_name'],
|
33
|
+
country_id: user.attributes['country_id'],
|
34
|
+
public_name: "#{user.attributes['first_name']}")
|
35
|
+
p.update_attribute(:last_access_at, user.attributes['last_access_at'])
|
36
|
+
end
|
37
|
+
remove_column :users, :first_name
|
38
|
+
remove_column :users, :last_name
|
39
|
+
remove_column :users, :country_id
|
40
|
+
remove_column :users, :last_access_at
|
41
|
+
end
|
42
|
+
|
43
|
+
def down
|
44
|
+
drop_table :user_profiles
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130518155712)
|
2
|
+
class AddProfileEmail < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
add_column :user_profiles, :email, :string
|
5
|
+
User.all.find_each do |user|
|
6
|
+
Account.current = Account.find(user.account_id)
|
7
|
+
user.user_profile.update_attribute(:email, user.attributes['email'])
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def down
|
12
|
+
remove_column :user_profiles, :email
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130620145610)
|
2
|
+
class CreatePaymentHistory < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
create_table :core_payment_histories, :force => true do |t|
|
5
|
+
t.integer :owner_id
|
6
|
+
t.string :owner_type, :limit => 30
|
7
|
+
t.integer :anchor_id # unique number tying paid item to our item
|
8
|
+
t.string :order_ref # order number
|
9
|
+
t.string :item_ref # specfic item number
|
10
|
+
t.string :item_name # item's name
|
11
|
+
t.integer :quantity # number of items
|
12
|
+
t.string :cost # cost of item, as a string
|
13
|
+
t.string :discount # any coupon/dicsount
|
14
|
+
t.integer :total_cents # total amount in cents
|
15
|
+
t.string :total_currency, :limit => 3 # currency 3 char code
|
16
|
+
t.string :payment_method # how payment was made: cash, credit card, etc
|
17
|
+
t.datetime :payment_date # date of payment
|
18
|
+
t.string :bill_to_name # who actually paid / was billed to
|
19
|
+
t.text :item_details # any specific item details sent by payment processor
|
20
|
+
t.text :order_details # any specific order details sent by payment processor
|
21
|
+
t.string :current_stage # current stage of payment
|
22
|
+
t.integer :user_profile_id # user_profile if payment was enetered manually
|
23
|
+
t.datetime :created_on
|
24
|
+
t.integer :account_id
|
25
|
+
end
|
26
|
+
|
27
|
+
add_index "core_payment_histories", ["anchor_id"], :name => "index_payment_histories_on_anchor_id"
|
28
|
+
add_index "core_payment_histories", ["item_ref"], :name => "index_payment_histories_on_item_ref"
|
29
|
+
add_index "core_payment_histories", ["order_ref"], :name => "index_payment_histories_on_order_ref"
|
30
|
+
add_index "core_payment_histories", ["owner_id"], :name => "index_payment_histories_on_owner_id"
|
31
|
+
add_index "core_payment_histories", ["owner_type"], :name => "index_payment_histories_on_owner_type"
|
32
|
+
end
|
33
|
+
|
34
|
+
def down
|
35
|
+
drop_table :core_payment_histories
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130625091108)
|
2
|
+
class ChangeAnchorField < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
change_column :core_payment_histories, :anchor_id, :string, :limit => 20
|
5
|
+
end
|
6
|
+
|
7
|
+
def down
|
8
|
+
change_column :core_payment_histories, :anchor_id, :integer
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130628112848)
|
2
|
+
class CreateUserSiteProfile < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
create_table :user_site_profiles, :force => true do |t|
|
5
|
+
t.integer :user_id
|
6
|
+
t.datetime :last_access_at
|
7
|
+
t.datetime :created_at
|
8
|
+
t.datetime :updated_at
|
9
|
+
t.integer :account_id
|
10
|
+
end
|
11
|
+
|
12
|
+
User.all.find_each do |user|
|
13
|
+
Account.current = Account.find(user.account_id)
|
14
|
+
p = user.user_site_profiles.create
|
15
|
+
p.update_attribute(:account_id, user.attributes['account_id'])
|
16
|
+
p.update_attribute(:last_access_at, user.user_profile.attributes['last_access_at'])
|
17
|
+
p.update_attribute(:created_at, user.attributes['created_at'])
|
18
|
+
p.update_attribute(:updated_at, user.attributes['updated_at'])
|
19
|
+
end
|
20
|
+
remove_column :user_profiles, :last_access_at
|
21
|
+
end
|
22
|
+
|
23
|
+
def down
|
24
|
+
drop_table :user_site_profiles
|
25
|
+
add_column :user_profiles, :last_access_at, :datetime
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130708150236)
|
2
|
+
class AddAvatar < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :user_profiles, :public_avatar, :string
|
5
|
+
add_column :user_profiles, :public_avatar_file_size, :integer
|
6
|
+
add_column :user_profiles, :public_avatar_content_type, :string
|
7
|
+
add_column :user_profiles, :private_avatar, :string
|
8
|
+
add_column :user_profiles, :private_avatar_file_size, :integer
|
9
|
+
add_column :user_profiles, :private_avatar_content_type, :string
|
10
|
+
add_column :user_profiles, :use_private_avatar_for_public, :boolean, :default => false
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20130914132041)
|
2
|
+
class AddNotifyToPaymentHistory < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :core_payment_histories, :notify_data, :text
|
5
|
+
add_column :core_payment_histories, :transaction_id, :string
|
6
|
+
rename_column :core_payment_histories, :current_stage, :status
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140105133446)
|
2
|
+
class ActsAsVotableMigration < ActiveRecord::Migration
|
3
|
+
def self.up
|
4
|
+
create_table :votes do |t|
|
5
|
+
|
6
|
+
t.references :votable, :polymorphic => true
|
7
|
+
t.references :voter, :polymorphic => true
|
8
|
+
|
9
|
+
t.boolean :vote_flag
|
10
|
+
t.string :vote_scope
|
11
|
+
t.integer :vote_weight
|
12
|
+
|
13
|
+
t.timestamps null: true
|
14
|
+
end
|
15
|
+
|
16
|
+
if ActiveRecord::VERSION::MAJOR < 4
|
17
|
+
add_index :votes, [:votable_id, :votable_type]
|
18
|
+
add_index :votes, [:voter_id, :voter_type]
|
19
|
+
end
|
20
|
+
|
21
|
+
add_index :votes, [:voter_id, :voter_type, :vote_scope]
|
22
|
+
add_index :votes, [:votable_id, :votable_type, :vote_scope]
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.down
|
26
|
+
drop_table :votes
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140107112418)
|
2
|
+
class UserSiteProfile < ActiveRecord::Base
|
3
|
+
end
|
4
|
+
|
5
|
+
class AddUserSiteProfileUuid < ActiveRecord::Migration
|
6
|
+
def up
|
7
|
+
add_column :user_site_profiles, :uuid, :string, :limit => 40
|
8
|
+
add_index :user_site_profiles, :uuid
|
9
|
+
|
10
|
+
#--- Create uuid for existing records
|
11
|
+
UserSiteProfile.all.each do |profile|
|
12
|
+
profile.update_attribute(:uuid, SecureRandom.uuid)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def down
|
17
|
+
remove_column :user_site_profiles, :uuid
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140129110547)
|
2
|
+
class AddInvoiceId < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
# used to track an atomically increasing invoice id for an account (used in payments)
|
5
|
+
add_column :core_accounts, :invoice_id_counter, :integer
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140201092656)
|
2
|
+
class ActsAsFollowerMigration < ActiveRecord::Migration
|
3
|
+
def self.up
|
4
|
+
create_table :follows, :force => true do |t|
|
5
|
+
t.references :followable, :polymorphic => true, :null => false
|
6
|
+
t.references :follower, :polymorphic => true, :null => false
|
7
|
+
t.boolean :blocked, :default => false, :null => false
|
8
|
+
t.timestamps null: true
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :follows, ["follower_id", "follower_type"], :name => "fk_follows"
|
12
|
+
add_index :follows, ["followable_id", "followable_type"], :name => "fk_followables"
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
drop_table :follows
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140203131320)
|
2
|
+
class RenameInvoiceId < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
remove_column :core_accounts, :invoice_id_counter
|
5
|
+
add_column :core_accounts, :next_invoice_num, :integer, :default => 1000
|
6
|
+
end
|
7
|
+
|
8
|
+
def down
|
9
|
+
remove_column :core_accounts, :next_invoice_num
|
10
|
+
add_column :core_accounts, :invoice_id_counter, :integer
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140210195143)
|
2
|
+
class AddCoreAddresses < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :core_addresses do |t|
|
5
|
+
t.string :line1
|
6
|
+
t.string :line2
|
7
|
+
t.string :city
|
8
|
+
t.string :state
|
9
|
+
t.string :zip
|
10
|
+
t.string :country_code, limit: 2
|
11
|
+
t.integer :addressable_id
|
12
|
+
t.string :addressable_type
|
13
|
+
t.timestamps null: true
|
14
|
+
end
|
15
|
+
|
16
|
+
add_index :core_addresses, [:addressable_type, :addressable_id], :unique => true
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# This migration comes from dm_core (originally 20140411190454)
|
2
|
+
class PapertrailIncreaseColumn < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
change_column :versions, :object_changes, :mediumtext
|
5
|
+
end
|
6
|
+
def down
|
7
|
+
change_column :versions, :object_changes, :text
|
8
|
+
end
|
9
|
+
end
|