dm_forum 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 +23 -0
- data/README.md +33 -0
- data/Rakefile +30 -0
- data/app/assets/javascripts/dm_forum/admin.js +20 -0
- data/app/assets/javascripts/dm_forum/application.js +16 -0
- data/app/assets/javascripts/dm_forum/dm_forum.js +3 -0
- data/app/assets/stylesheets/dm_forum/admin.css +2 -0
- data/app/assets/stylesheets/dm_forum/application.css +12 -0
- data/app/controllers/dm_forum/admin/admin_controller.rb +13 -0
- data/app/controllers/dm_forum/admin/dashboard_controller.rb +12 -0
- data/app/controllers/dm_forum/admin/forum_categories_controller.rb +80 -0
- data/app/controllers/dm_forum/admin/forum_sites_controller.rb +40 -0
- data/app/controllers/dm_forum/admin/forums_controller.rb +113 -0
- data/app/controllers/dm_forum/application_controller.rb +25 -0
- data/app/controllers/dm_forum/forum_comments_controller.rb +88 -0
- data/app/controllers/dm_forum/forum_topics_controller.rb +93 -0
- data/app/controllers/dm_forum/forums_controller.rb +45 -0
- data/app/datatables/forum_user_datatable.rb +79 -0
- data/app/helpers/dm_forum/application_helper.rb +5 -0
- data/app/helpers/dm_forum/forum_helper.rb +109 -0
- data/app/mailers/forum_notification_mailer.rb +27 -0
- data/app/models/dm_forum/concerns/ability.rb +50 -0
- data/app/models/dm_forum/concerns/user.rb +37 -0
- data/app/models/dm_forum/permitted_params.rb +38 -0
- data/app/models/forum.rb +74 -0
- data/app/models/forum_category.rb +14 -0
- data/app/models/forum_comment.rb +93 -0
- data/app/models/forum_site.rb +27 -0
- data/app/models/forum_topic.rb +146 -0
- data/app/presenters/forum_comment_presenter.rb +8 -0
- data/app/presenters/forum_common_presenter.rb +31 -0
- data/app/presenters/forum_presenter.rb +14 -0
- data/app/views/dm_forum/admin/dashboard/_widget_forum_comments.html.erb +38 -0
- data/app/views/dm_forum/admin/dashboard/widget_forum_comments.js.erb +1 -0
- data/app/views/dm_forum/admin/forum_categories/_content_toolbar.html.erb +5 -0
- data/app/views/dm_forum/admin/forum_categories/_form.html.erb +18 -0
- data/app/views/dm_forum/admin/forum_categories/edit.html.erb +3 -0
- data/app/views/dm_forum/admin/forum_categories/index.html.erb +25 -0
- data/app/views/dm_forum/admin/forum_categories/new.html.erb +3 -0
- data/app/views/dm_forum/admin/forum_categories/show.html.erb +41 -0
- data/app/views/dm_forum/admin/forum_sites/_form.html.erb +18 -0
- data/app/views/dm_forum/admin/forum_sites/edit.html.erb +2 -0
- data/app/views/dm_forum/admin/forum_sites/show.html.erb +12 -0
- data/app/views/dm_forum/admin/forums/_content_toolbar.html.erb +5 -0
- data/app/views/dm_forum/admin/forums/_form.html.erb +24 -0
- data/app/views/dm_forum/admin/forums/edit.html.erb +2 -0
- data/app/views/dm_forum/admin/forums/new.html.erb +2 -0
- data/app/views/dm_forum/admin/forums/show.html.erb +68 -0
- data/app/views/dm_forum/forum_comments/_formatting.html.erb +12 -0
- data/app/views/dm_forum/forum_comments/edit.html.erb +15 -0
- data/app/views/dm_forum/forum_topics/_comment_item.html.erb +26 -0
- data/app/views/dm_forum/forum_topics/_comments_list.html.erb +63 -0
- data/app/views/dm_forum/forum_topics/_follow_button.html.erb +3 -0
- data/app/views/dm_forum/forum_topics/_form.html.erb +24 -0
- data/app/views/dm_forum/forum_topics/edit.html.erb +13 -0
- data/app/views/dm_forum/forum_topics/new.html.erb +13 -0
- data/app/views/dm_forum/forum_topics/show.html.erb +49 -0
- data/app/views/dm_forum/forum_topics/toggle_follow.js.coffee +5 -0
- data/app/views/dm_forum/forums/_category_side_list.html.erb +28 -0
- data/app/views/dm_forum/forums/_forum_header.html.erb +14 -0
- data/app/views/dm_forum/forums/_no_forums.html.erb +1 -0
- data/app/views/dm_forum/forums/_topics_list.html.erb +86 -0
- data/app/views/dm_forum/forums/categories.html.erb +32 -0
- data/app/views/dm_forum/forums/list.html.erb +10 -0
- data/app/views/dm_forum/forums/show.html.erb +39 -0
- data/app/views/layouts/email_templates/forum_notification.html.erb +15 -0
- data/app/views/layouts/email_templates/forum_notification.text.erb +16 -0
- data/config/initializers/dm_forum.rb +0 -0
- data/config/locales/fms.cs.yml +104 -0
- data/config/locales/fms.de.yml +104 -0
- data/config/locales/fms.en.yml +104 -0
- data/config/locales/fms.fi.yml +104 -0
- data/config/locales/fms.ja.yml +104 -0
- data/config/routes.rb +43 -0
- data/db/migrate/20130103151149_create_forums.rb +72 -0
- data/db/migrate/20130424125513_add_public_forum.rb +13 -0
- data/db/migrate/20130430084925_add_forum_category.rb +7 -0
- data/db/migrate/20140201112134_delete_monitorships.rb +17 -0
- data/db/migrate/20140303121325_add_requires_subscription_forum.rb +5 -0
- data/db/migrate/20140423113420_add_forum_owner.rb +6 -0
- data/db/migrate/20160821150125_index_foreign_keys_in_fms_forum_sites.rb +5 -0
- data/db/migrate/20160821150126_index_foreign_keys_in_fms_forum_topics.rb +9 -0
- data/db/migrate/20160821150127_index_foreign_keys_in_fms_forums.rb +7 -0
- data/lib/dm_forum/engine.rb +9 -0
- data/lib/dm_forum/version.rb +3 -0
- data/lib/dm_forum.rb +4 -0
- data/lib/tasks/dm_forum_tasks.rake +4 -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/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/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/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 +17 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -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/20141119112030_create_cms.dm_cms.rb +92 -0
- data/spec/dummy/db/migrate/20141119112031_add_account_to_cms.dm_cms.rb +11 -0
- data/spec/dummy/db/migrate/20141119112032_create_blog.dm_cms.rb +62 -0
- data/spec/dummy/db/migrate/20141119112033_add_notification_sent.dm_cms.rb +6 -0
- data/spec/dummy/db/migrate/20141119112034_add_blog_comment.dm_cms.rb +8 -0
- data/spec/dummy/db/migrate/20141119112035_add_blog_image.dm_cms.rb +6 -0
- data/spec/dummy/db/migrate/20141119112036_rename_snippet_slug.dm_cms.rb +14 -0
- data/spec/dummy/db/migrate/20141119112037_add_requires_subscription_blog.dm_cms.rb +8 -0
- data/spec/dummy/db/migrate/20141119112038_add_pages_ranked_model.dm_cms.rb +23 -0
- data/spec/dummy/db/migrate/20141119112039_add_blog_owner.dm_cms.rb +7 -0
- data/spec/dummy/db/migrate/20141119112040_create_media_files.dm_cms.rb +30 -0
- data/spec/dummy/db/migrate/20141119112041_add_cmspage_summary.dm_cms.rb +7 -0
- data/spec/dummy/db/migrate/20141119112042_add_blog_image_email_header.dm_cms.rb +6 -0
- data/spec/dummy/db/migrate/20141119112043_add_header_image.dm_cms.rb +10 -0
- data/spec/dummy/db/migrate/20160128144312_add_favored_locale.dm_core.rb +17 -0
- data/spec/dummy/db/migrate/20160128144313_update_papertrail_v4.dm_core.rb +41 -0
- data/spec/dummy/db/schema.rb +628 -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/factories/accounts.rb +9 -0
- data/spec/factories/user_profiles.rb +10 -0
- data/spec/factories/users.rb +19 -0
- data/spec/models/forum_spec.rb +9 -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 +337 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
# require "dm_forum"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
+
|
18
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
+
# config.i18n.default_locale = :de
|
21
|
+
|
22
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
+
config.active_record.raise_in_transactional_callbacks = true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports and disable caching.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send.
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
|
30
|
+
# Adds additional error checking when serving assets at runtime.
|
31
|
+
# Checks for improperly declared sprockets dependencies.
|
32
|
+
# Raises helpful error messages.
|
33
|
+
config.assets.raise_runtime_errors = true
|
34
|
+
|
35
|
+
# Raises error for missing translations
|
36
|
+
# config.action_view.raise_on_missing_translations = true
|
37
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
+
config.serve_static_files = false
|
24
|
+
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
28
|
+
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
|
+
config.assets.compile = false
|
31
|
+
|
32
|
+
# Generate digests for assets URLs.
|
33
|
+
config.assets.digest = true
|
34
|
+
|
35
|
+
# `config.assets.precompile` has moved to config/initializers/assets.rb
|
36
|
+
|
37
|
+
# Specifies the header that your server uses for sending files.
|
38
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
39
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
40
|
+
|
41
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
42
|
+
# config.force_ssl = true
|
43
|
+
|
44
|
+
# Set to :debug to see everything in the log.
|
45
|
+
config.log_level = :info
|
46
|
+
|
47
|
+
# Prepend all log lines with the following tags.
|
48
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
49
|
+
|
50
|
+
# Use a different logger for distributed setups.
|
51
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
52
|
+
|
53
|
+
# Use a different cache store in production.
|
54
|
+
# config.cache_store = :mem_cache_store
|
55
|
+
|
56
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
57
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
58
|
+
|
59
|
+
# Precompile additional assets.
|
60
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
61
|
+
# config.assets.precompile += %w( search.js )
|
62
|
+
|
63
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
64
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
65
|
+
# config.action_mailer.raise_delivery_errors = false
|
66
|
+
|
67
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
68
|
+
# the I18n.default_locale when a translation cannot be found).
|
69
|
+
config.i18n.fallbacks = true
|
70
|
+
|
71
|
+
# Send deprecation notices to registered listeners.
|
72
|
+
config.active_support.deprecation = :notify
|
73
|
+
|
74
|
+
# Disable automatic flushing of the log to improve performance.
|
75
|
+
# config.autoflush_log = false
|
76
|
+
|
77
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
78
|
+
config.log_formatter = ::Logger::Formatter.new
|
79
|
+
|
80
|
+
# Do not dump schema after migrations.
|
81
|
+
config.active_record.dump_schema_after_migration = false
|
82
|
+
end
|
@@ -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,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,17 @@
|
|
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 DmForum::Engine, at: '/'
|
11
|
+
mount DmCms::Engine, at: '/'
|
12
|
+
|
13
|
+
scope ":locale" do
|
14
|
+
get '/index', controller: 'dm_cms/pages', action: :show, slug: 'index', as: :index
|
15
|
+
end
|
16
|
+
|
17
|
+
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
|
@@ -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
|