cortex 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.babelrc +18 -0
- data/.codeclimate.yml +43 -0
- data/.csslintrc +2 -0
- data/.editorconfig +9 -0
- data/.eslintignore +1 -0
- data/.eslintrc.yml +277 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +47 -0
- data/.gitignore +82 -0
- data/.npmignore +34 -0
- data/.postcssrc.yml +3 -0
- data/.rspec +3 -0
- data/.rubocop.yml +1156 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/CONTRIBUTING.md +58 -0
- data/Gemfile +101 -0
- data/Gemfile.lock +604 -0
- data/Guardfile +23 -0
- data/LICENSE.md +201 -0
- data/README.md +239 -0
- data/Rakefile +22 -0
- data/app/assets/config/cortex_manifest.js +4 -0
- data/app/assets/fonts/cortex/Montserrat-Light.otf +0 -0
- data/app/assets/fonts/cortex/Montserrat-Medium.otf +0 -0
- data/app/assets/fonts/cortex/Montserrat-Regular.otf +0 -0
- data/app/assets/fonts/cortex/Montserrat-SemiBold.otf +0 -0
- data/app/assets/images/cortex/favicon.ico +0 -0
- data/app/assets/images/cortex/icons/add.svg +59 -0
- data/app/assets/images/cortex/icons/blog.png +0 -0
- data/app/assets/images/cortex/icons/media.png +0 -0
- data/app/assets/images/cortex/logo.svg +43 -0
- data/app/assets/javascripts/cortex/application.js +17 -0
- data/app/assets/javascripts/cortex/authentication.js +6 -0
- data/app/assets/javascripts/cortex/base.js +6 -0
- data/app/assets/javascripts/cortex/datepicker_init.js +29 -0
- data/app/assets/javascripts/cortex/flash.js +7 -0
- data/app/assets/javascripts/cortex/form.js +6 -0
- data/app/assets/javascripts/cortex/media_dialogs.js +40 -0
- data/app/assets/javascripts/cortex/quick_links.js +13 -0
- data/app/assets/stylesheets/cortex/application.scss +34 -0
- data/app/assets/stylesheets/cortex/authentication.scss +34 -0
- data/app/assets/stylesheets/cortex/base.scss +4 -0
- data/app/assets/stylesheets/cortex/bootstrap-namespaced.scss +57 -0
- data/app/assets/stylesheets/cortex/components/card.scss +9 -0
- data/app/assets/stylesheets/cortex/components/dialog.scss +67 -0
- data/app/assets/stylesheets/cortex/components/flash.scss +60 -0
- data/app/assets/stylesheets/cortex/components/form.scss +45 -0
- data/app/assets/stylesheets/cortex/components/header.scss +53 -0
- data/app/assets/stylesheets/cortex/components/index.scss +28 -0
- data/app/assets/stylesheets/cortex/components/jumbo-button.scss +41 -0
- data/app/assets/stylesheets/cortex/components/loaders.scss +76 -0
- data/app/assets/stylesheets/cortex/components/notes.scss +26 -0
- data/app/assets/stylesheets/cortex/components/sidebar.scss +120 -0
- data/app/assets/stylesheets/cortex/components/table.scss +7 -0
- data/app/assets/stylesheets/cortex/components/tenant-switcher.scss +209 -0
- data/app/assets/stylesheets/cortex/components/ui.scss +119 -0
- data/app/assets/stylesheets/cortex/demo.scss +140 -0
- data/app/assets/stylesheets/cortex/directives/aspect-ratio.scss +9 -0
- data/app/assets/stylesheets/cortex/helpers.scss +1701 -0
- data/app/assets/stylesheets/cortex/layout.scss +21 -0
- data/app/assets/stylesheets/cortex/material-icons.scss +13 -0
- data/app/assets/stylesheets/cortex/variables/_colors.scss +46 -0
- data/app/assets/stylesheets/cortex/variables/_material-overrides.scss +1 -0
- data/app/assets/stylesheets/cortex/variables/_typography.scss +114 -0
- data/app/cells/cortex/application_cell.rb +8 -0
- data/app/cells/cortex/content_type/nav.haml +5 -0
- data/app/cells/cortex/content_type_cell.rb +10 -0
- data/app/cells/cortex/field_cell.rb +35 -0
- data/app/cells/cortex/index/content_item/column.haml +4 -0
- data/app/cells/cortex/index/content_item_cell.rb +37 -0
- data/app/cells/cortex/index/index.haml +5 -0
- data/app/cells/cortex/index/table_body.haml +11 -0
- data/app/cells/cortex/index/table_headers.haml +5 -0
- data/app/cells/cortex/index_cell.rb +53 -0
- data/app/cells/cortex/wizard/column/show.haml +10 -0
- data/app/cells/cortex/wizard/column_cell.rb +21 -0
- data/app/cells/cortex/wizard/field/show.haml +30 -0
- data/app/cells/cortex/wizard/field_cell.rb +29 -0
- data/app/cells/cortex/wizard/plugin/show.haml +1 -0
- data/app/cells/cortex/wizard/plugin_cell.rb +28 -0
- data/app/cells/cortex/wizard/show.haml +1 -0
- data/app/cells/cortex/wizard/step/show.haml +2 -0
- data/app/cells/cortex/wizard/step_cell.rb +17 -0
- data/app/cells/cortex/wizard_cell.rb +15 -0
- data/app/containers/cortex/transaction_container.rb +23 -0
- data/app/controllers/concerns/cortex/decoratable.rb +16 -0
- data/app/controllers/cortex/admin_controller.rb +7 -0
- data/app/controllers/cortex/application_controller.rb +19 -0
- data/app/controllers/cortex/authentication/passwords_controller.rb +3 -0
- data/app/controllers/cortex/authentication/sessions_controller.rb +3 -0
- data/app/controllers/cortex/content_items_controller.rb +75 -0
- data/app/controllers/cortex/content_types_controller.rb +19 -0
- data/app/controllers/cortex/dashboards_controller.rb +7 -0
- data/app/controllers/cortex/graphql_controller.rb +40 -0
- data/app/controllers/cortex/tenants_controller.rb +12 -0
- data/app/devise/cortex/authentication_failure.rb +12 -0
- data/app/graphql/cortex/cortex_schema.rb +8 -0
- data/app/graphql/cortex/interfaces/.keep +0 -0
- data/app/graphql/cortex/mutations/.keep +0 -0
- data/app/graphql/cortex/types/content_item_type.rb +31 -0
- data/app/graphql/cortex/types/content_type_type.rb +23 -0
- data/app/graphql/cortex/types/contract_type.rb +10 -0
- data/app/graphql/cortex/types/date_time_type.rb +8 -0
- data/app/graphql/cortex/types/field_item_type.rb +15 -0
- data/app/graphql/cortex/types/field_type.rb +18 -0
- data/app/graphql/cortex/types/mutation_type.rb +5 -0
- data/app/graphql/cortex/types/query_type.rb +45 -0
- data/app/graphql/cortex/types/tenant_type.rb +19 -0
- data/app/graphql/cortex/types/user_type.rb +20 -0
- data/app/helpers/cortex/application_helper.rb +75 -0
- data/app/helpers/cortex/cells/association_helper.rb +25 -0
- data/app/helpers/cortex/content_item_helper.rb +106 -0
- data/app/helpers/cortex/dashboard_helper.rb +19 -0
- data/app/helpers/cortex/popup_helper.rb +27 -0
- data/app/jobs/cortex/application_job.rb +4 -0
- data/app/mailers/cortex/application_mailer.rb +6 -0
- data/app/mailers/cortex/password_reset_mailer.rb +13 -0
- data/app/models/concerns/cortex/belongs_to_tenant.rb +13 -0
- data/app/models/concerns/cortex/has_firstname_lastname.rb +11 -0
- data/app/models/concerns/cortex/has_gravatar.rb +18 -0
- data/app/models/concerns/cortex/searchable.rb +11 -0
- data/app/models/concerns/cortex/searchable_content_item.rb +31 -0
- data/app/models/concerns/cortex/searchable_content_item_for_content_type.rb +52 -0
- data/app/models/concerns/cortex/searchable_content_type.rb +11 -0
- data/app/models/cortex/application_record.rb +17 -0
- data/app/models/cortex/content_item.rb +71 -0
- data/app/models/cortex/content_type.rb +27 -0
- data/app/models/cortex/contentable_decorator.rb +8 -0
- data/app/models/cortex/contract.rb +12 -0
- data/app/models/cortex/decorator.rb +13 -0
- data/app/models/cortex/field.rb +36 -0
- data/app/models/cortex/field_item.rb +54 -0
- data/app/models/cortex/field_type.rb +44 -0
- data/app/models/cortex/permission.rb +11 -0
- data/app/models/cortex/role.rb +12 -0
- data/app/models/cortex/tenant.rb +41 -0
- data/app/models/cortex/user.rb +77 -0
- data/app/operations/cortex/database_transact_operation.rb +17 -0
- data/app/operations/cortex/execute_content_item_state_change_operation.rb +16 -0
- data/app/operations/cortex/parse_content_item_field_items_operation.rb +18 -0
- data/app/operations/cortex/persist_content_item_operation.rb +12 -0
- data/app/policies/cortex/application_policy.rb +55 -0
- data/app/policies/cortex/content_item_policy.rb +49 -0
- data/app/policies/cortex/content_type_policy.rb +38 -0
- data/app/transactions/concerns/cortex/content_itemable.rb +15 -0
- data/app/transactions/concerns/cortex/field_item_transactor.rb +28 -0
- data/app/transactions/concerns/cortex/widget_parsable.rb +19 -0
- data/app/transactions/cortex/application_transaction.rb +5 -0
- data/app/transactions/cortex/create_content_item_transaction.rb +35 -0
- data/app/transactions/cortex/get_content_item_transaction.rb +4 -0
- data/app/transactions/cortex/get_content_items_for_content_type_transaction.rb +34 -0
- data/app/transactions/cortex/get_publish_state_transaction.rb +28 -0
- data/app/transactions/cortex/new_field_item_transaction.rb +16 -0
- data/app/transactions/cortex/update_content_item_transaction.rb +45 -0
- data/app/transactions/cortex/update_field_item_transaction.rb +23 -0
- data/app/types/cortex/application_types.rb +21 -0
- data/app/types/cortex/content_item_transaction_type.rb +10 -0
- data/app/types/cortex/core_types.rb +5 -0
- data/app/types/cortex/transaction_type.rb +5 -0
- data/app/views/cortex/authentication/passwords/new.html.haml +13 -0
- data/app/views/cortex/authentication/sessions/new.html.haml +20 -0
- data/app/views/cortex/authentication/shared/_links.html.haml +19 -0
- data/app/views/cortex/content_items/_form.html.haml +13 -0
- data/app/views/cortex/content_items/_grid.html.haml +1 -0
- data/app/views/cortex/content_items/edit.html.haml +2 -0
- data/app/views/cortex/content_items/index.html.haml +4 -0
- data/app/views/cortex/content_items/new.html.haml +2 -0
- data/app/views/cortex/content_types/index.html.haml +2 -0
- data/app/views/cortex/content_types/new.html.haml +0 -0
- data/app/views/cortex/dashboards/index.html.haml +6 -0
- data/app/views/cortex/graphql/ide.haml +1 -0
- data/app/views/cortex/partials/_breadcrumb.html.haml +2 -0
- data/app/views/cortex/partials/_cortex_redux_state.html.haml +1 -0
- data/app/views/cortex/partials/_flash.html.haml +25 -0
- data/app/views/cortex/partials/_media_dialogs.html.haml +13 -0
- data/app/views/cortex/partials/_navigation.html.haml +15 -0
- data/app/views/cortex/partials/_notes.html.haml +17 -0
- data/app/views/cortex/partials/_quick_links.html.haml +22 -0
- data/app/views/cortex/partials/_sidebar.html.haml +7 -0
- data/app/views/cortex/partials/_topbar.html.haml +5 -0
- data/app/views/cortex/partials/_user_control.html.haml +7 -0
- data/app/views/cortex/partials/authentication/_header.html.haml +4 -0
- data/app/views/cortex/partials/trackers/_google_analytics.html.haml +10 -0
- data/app/views/cortex/partials/trackers/_qualtrics.html.haml +10 -0
- data/app/views/cortex/password_reset_mailer/send_password_reset.html.erb +5 -0
- data/app/views/cortex/password_reset_mailer/send_password_reset.text.erb +5 -0
- data/app/views/layouts/cortex/application.html.haml +30 -0
- data/app/views/layouts/cortex/devise.html.haml +19 -0
- data/app/views/layouts/cortex/mailer.html.erb +13 -0
- data/app/views/layouts/cortex/mailer.text.erb +1 -0
- data/bin/rails +25 -0
- data/config/config.yml +22 -0
- data/config/initializers/devise.rb +35 -0
- data/config/initializers/elasticsearch.rb +3 -0
- data/config/initializers/filter_parameter_logging.rb +4 -0
- data/config/initializers/flipper.rb +16 -0
- data/config/initializers/graphiql.rb +51 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/load_config.rb +16 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/plugins.rb +17 -0
- data/config/initializers/react_on_rails.rb +15 -0
- data/config/initializers/rolify.rb +9 -0
- data/config/initializers/tag_parsers.rb +5 -0
- data/config/locales/devise.en.yml +64 -0
- data/config/routes.rb +41 -0
- data/cortex.gemspec +84 -0
- data/db/migrate/0_enable_pgcrypto_extension.rb +5 -0
- data/db/migrate/10_create_fields.rb +15 -0
- data/db/migrate/11_create_content_items.rb +14 -0
- data/db/migrate/12_create_field_items.rb +12 -0
- data/db/migrate/13_create_field_types.rb +5 -0
- data/db/migrate/1_create_users.rb +14 -0
- data/db/migrate/2_create_tenants.rb +26 -0
- data/db/migrate/3_add_devise_to_users.rb +49 -0
- data/db/migrate/4_create_roles.rb +15 -0
- data/db/migrate/5_create_permissions.rb +16 -0
- data/db/migrate/6_create_flipper_tables.rb +20 -0
- data/db/migrate/7_create_contracts.rb +11 -0
- data/db/migrate/8_create_decorators.rb +21 -0
- data/db/migrate/9_create_content_types.rb +17 -0
- data/db/seeds.rb +40 -0
- data/db/seeds.yml +33 -0
- data/lib/assets/.keep +0 -0
- data/lib/breadcrumbs/title_builder.rb +12 -0
- data/lib/cortex.rb +4 -0
- data/lib/cortex/engine.rb +41 -0
- data/lib/cortex/version.rb +3 -0
- data/lib/helpers/utility_helper.rb +7 -0
- data/lib/tasks/cortex_tasks.rake +13 -0
- data/lib/tasks/elasticsearch_tasks.rake +1 -0
- data/node_package/.babelrc +26 -0
- data/node_package/src/components/side_bar/environment_flag.jsx +21 -0
- data/node_package/src/components/side_bar/tenant_list.jsx +65 -0
- data/node_package/src/components/wizard/column.jsx +29 -0
- data/node_package/src/components/wizard/field.jsx +22 -0
- data/node_package/src/components/wizard/step.jsx +20 -0
- data/node_package/src/constants/tenant_switcher.jsx +17 -0
- data/node_package/src/constants/type_constants.jsx +12 -0
- data/node_package/src/constants/wizard.jsx +9 -0
- data/node_package/src/containers/layout.jsx +33 -0
- data/node_package/src/containers/tenant_switcher_container.jsx +115 -0
- data/node_package/src/containers/wizard_container.jsx +28 -0
- data/node_package/src/elements/loaders.jsx +7 -0
- data/node_package/src/helpers/formatting.jsx +5 -0
- data/node_package/src/helpers/tenant_ancestry.jsx +14 -0
- data/node_package/src/helpers/tenant_lookup.jsx +23 -0
- data/node_package/src/index.jsx +21 -0
- data/node_package/src/reducers/index.jsx +13 -0
- data/node_package/src/reducers/rails_context_reducer.jsx +5 -0
- data/node_package/src/reducers/tenant_switcher_reducer.jsx +74 -0
- data/node_package/src/reducers/wizard_reducer.jsx +32 -0
- data/node_package/src/services/rails_api_service.jsx +13 -0
- data/node_package/src/store/store.jsx +15 -0
- data/package.json +66 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/config/manifest.js +4 -0
- data/spec/dummy/app/assets/javascripts/application.js +2 -0
- data/spec/dummy/app/assets/stylesheets/application.scss +2 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/javascript/packs/application.js +8 -0
- data/spec/dummy/app/javascript/packs/cortex.jsx +1 -0
- data/spec/dummy/app/jobs/application_job.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/views/layouts/application.html.haml +11 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/bundle +105 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/rspec +17 -0
- data/spec/dummy/bin/setup +38 -0
- data/spec/dummy/bin/update +29 -0
- data/spec/dummy/bin/webpack +29 -0
- data/spec/dummy/bin/webpack-dev-server +29 -0
- data/spec/dummy/bin/yarn +11 -0
- data/spec/dummy/config.ru +7 -0
- data/spec/dummy/config/apollo_engine_proxy.yml +23 -0
- data/spec/dummy/config/application.rb +21 -0
- data/spec/dummy/config/boot.rb +11 -0
- data/spec/dummy/config/cable.yml +9 -0
- data/spec/dummy/config/config.yml +22 -0
- data/spec/dummy/config/database.yml +22 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +74 -0
- data/spec/dummy/config/environments/production.rb +103 -0
- data/spec/dummy/config/environments/staging.rb +103 -0
- data/spec/dummy/config/environments/test.rb +65 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/spec/dummy/config/initializers/assets.rb +14 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -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/load_config.rb +9 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/react_on_rails.rb +41 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/sentry.rb +6 -0
- data/spec/dummy/config/initializers/session_store.rb +7 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +8 -0
- data/spec/dummy/config/newrelic.yml +224 -0
- data/spec/dummy/config/puma.rb +47 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/config/secrets.yml +32 -0
- data/spec/dummy/config/sidekiq.yml +9 -0
- data/spec/dummy/config/webpack/development.js +3 -0
- data/spec/dummy/config/webpack/environment.js +3 -0
- data/spec/dummy/config/webpack/production.js +3 -0
- data/spec/dummy/config/webpack/test.js +3 -0
- data/spec/dummy/config/webpacker.yml +66 -0
- data/spec/dummy/db/migrate/20180118233001_enable_pgcrypto_extension.cortex.rb +6 -0
- data/spec/dummy/db/migrate/20180118233002_create_users.cortex.rb +15 -0
- data/spec/dummy/db/migrate/20180118233003_create_tenants.cortex.rb +27 -0
- data/spec/dummy/db/migrate/20180118233004_add_devise_to_users.cortex.rb +50 -0
- data/spec/dummy/db/migrate/20180118233005_create_roles.cortex.rb +16 -0
- data/spec/dummy/db/migrate/20180118233006_create_permissions.cortex.rb +17 -0
- data/spec/dummy/db/migrate/20180118233007_create_flipper_tables.cortex.rb +21 -0
- data/spec/dummy/db/migrate/20180118233008_create_contracts.cortex.rb +12 -0
- data/spec/dummy/db/migrate/20180118233009_create_decorators.cortex.rb +22 -0
- data/spec/dummy/db/migrate/20180118233010_create_content_types.cortex.rb +18 -0
- data/spec/dummy/db/migrate/20180118233011_create_fields.cortex.rb +16 -0
- data/spec/dummy/db/migrate/20180118233012_create_content_items.cortex.rb +15 -0
- data/spec/dummy/db/migrate/20180118233013_create_field_items.cortex.rb +13 -0
- data/spec/dummy/db/migrate/20180118233014_create_field_types.cortex.rb +6 -0
- data/spec/dummy/db/schema.rb +258 -0
- data/spec/dummy/db/seeds.rb +1 -0
- data/spec/dummy/lib/tasks/content_types_tasks.rake +31 -0
- data/spec/dummy/lib/tasks/employer/blog_tasks.rake +345 -0
- data/spec/dummy/package.json +28 -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/robots.txt +5 -0
- data/spec/dummy/spec/javascripts/support/jasmine.yml +50 -0
- data/spec/dummy/yarn.lock +6615 -0
- data/spec/rails_helper.rb +57 -0
- data/spec/spec_helper.rb +96 -0
- data/yarn.lock +6032 -0
- metadata +1061 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
CortexStarter::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
|
+
# Attempt to read encrypted secrets from `config/secrets.yml.enc`.
|
|
18
|
+
# Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
|
|
19
|
+
# `config/secrets.yml.key`.
|
|
20
|
+
config.read_encrypted_secrets = true
|
|
21
|
+
|
|
22
|
+
# Disable serving static files from the `/public` folder by default since
|
|
23
|
+
# Apache or NGINX already handles this.
|
|
24
|
+
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
|
25
|
+
|
|
26
|
+
# Compress JavaScripts and CSS.
|
|
27
|
+
config.assets.js_compressor = :uglifier
|
|
28
|
+
# config.assets.css_compressor = :sass
|
|
29
|
+
|
|
30
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
|
31
|
+
config.assets.compile = false
|
|
32
|
+
|
|
33
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
|
34
|
+
|
|
35
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
36
|
+
if ENV['ASSET_HOST_URL']
|
|
37
|
+
config.action_controller.asset_host = ENV['ASSET_HOST_URL']
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Specifies the header that your server uses for sending files.
|
|
41
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
|
42
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
|
43
|
+
|
|
44
|
+
# Mount Action Cable outside main process or domain
|
|
45
|
+
# config.action_cable.mount_path = nil
|
|
46
|
+
# config.action_cable.url = 'wss://example.com/cable'
|
|
47
|
+
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
|
48
|
+
|
|
49
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
50
|
+
# config.force_ssl = true
|
|
51
|
+
|
|
52
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
|
53
|
+
# when problems arise.
|
|
54
|
+
config.log_level = :debug
|
|
55
|
+
|
|
56
|
+
# Prepend all log lines with the following tags.
|
|
57
|
+
config.log_tags = [ :request_id ]
|
|
58
|
+
|
|
59
|
+
# Use a different cache store in production.
|
|
60
|
+
config.cache_store = :redis_store, ENV['CACHE_URL']
|
|
61
|
+
|
|
62
|
+
# Use a real queuing backend for Active Job (and separate queues per environment)
|
|
63
|
+
# config.active_job.queue_adapter = :resque
|
|
64
|
+
# config.active_job.queue_name_prefix = "cool_#{Rails.env}"
|
|
65
|
+
config.action_mailer.perform_caching = 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
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
75
|
+
config.log_formatter = ::Logger::Formatter.new
|
|
76
|
+
|
|
77
|
+
# Use a different logger for distributed setups.
|
|
78
|
+
# require 'syslog/logger'
|
|
79
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
|
80
|
+
|
|
81
|
+
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
|
82
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
|
83
|
+
logger.formatter = config.log_formatter
|
|
84
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Do not dump schema after migrations.
|
|
88
|
+
config.active_record.dump_schema_after_migration = false
|
|
89
|
+
|
|
90
|
+
config.action_mailer.raise_delivery_errors = true
|
|
91
|
+
config.action_mailer.default_url_options = {:host => ENV['HOST']}
|
|
92
|
+
config.action_mailer.delivery_method = :smtp
|
|
93
|
+
config.action_mailer.smtp_settings = {
|
|
94
|
+
:authentication => :login,
|
|
95
|
+
:address => ENV['SMTP_ADDRESS'],
|
|
96
|
+
:port => ENV['SMTP_PORT'],
|
|
97
|
+
:domain => ENV['SMTP_SENDER_DOMAIN'],
|
|
98
|
+
:user_name => ENV['SMTP_USERNAME'],
|
|
99
|
+
:password => ENV['SMTP_PASSWORD'],
|
|
100
|
+
:enable_starttls_auto => ENV['SMTP_STARTTLS']
|
|
101
|
+
}
|
|
102
|
+
ActionMailer::Base.default from: ENV['SMTP_SENDER_ADDRESS']
|
|
103
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
CortexStarter::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 public file server for tests with Cache-Control for performance.
|
|
16
|
+
config.public_file_server.enabled = true
|
|
17
|
+
config.public_file_server.headers = {
|
|
18
|
+
'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# Show full error reports and disable caching.
|
|
22
|
+
config.consider_all_requests_local = true
|
|
23
|
+
config.action_controller.perform_caching = false
|
|
24
|
+
|
|
25
|
+
# Raise exceptions instead of rendering exception templates.
|
|
26
|
+
config.action_dispatch.show_exceptions = false
|
|
27
|
+
|
|
28
|
+
# Disable request forgery protection in test environment.
|
|
29
|
+
config.action_controller.allow_forgery_protection = false
|
|
30
|
+
config.action_mailer.perform_caching = false
|
|
31
|
+
|
|
32
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
|
33
|
+
# The :test delivery method accumulates sent emails in the
|
|
34
|
+
# ActionMailer::Base.deliveries array.
|
|
35
|
+
config.action_mailer.delivery_method = :test
|
|
36
|
+
|
|
37
|
+
# Print deprecation notices to the stderr.
|
|
38
|
+
config.active_support.deprecation = :stderr
|
|
39
|
+
|
|
40
|
+
# Raises error for missing translations
|
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
|
42
|
+
|
|
43
|
+
config.cache_store = :redis_store, ENV['CACHE_URL'], { :namespace => 'cortex_test' }
|
|
44
|
+
|
|
45
|
+
Sidekiq.configure_server do |config|
|
|
46
|
+
config.redis = { :namespace => 'cortex_test' }
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
Sidekiq.configure_client do |config|
|
|
50
|
+
config.redis = { :namespace => 'cortex_test' }
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
config.action_mailer.default_url_options = {:host => ENV['HOST']}
|
|
54
|
+
config.action_mailer.delivery_method = :test
|
|
55
|
+
config.action_mailer.smtp_settings = {
|
|
56
|
+
:authentication => :login,
|
|
57
|
+
:address => ENV['SMTP_ADDRESS'],
|
|
58
|
+
:port => ENV['SMTP_PORT'],
|
|
59
|
+
:domain => ENV['SMTP_SENDER_DOMAIN'],
|
|
60
|
+
:user_name => ENV['SMTP_USERNAME'],
|
|
61
|
+
:password => ENV['SMTP_PASSWORD'],
|
|
62
|
+
:enable_starttls_auto => ENV['SMTP_STARTTLS']
|
|
63
|
+
}
|
|
64
|
+
ActionMailer::Base.default from: ENV['SMTP_SENDER_ADDRESS']
|
|
65
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
# Add additional assets to the asset load path.
|
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
|
8
|
+
# Add Yarn node_modules folder to the asset load path.
|
|
9
|
+
Rails.application.config.assets.paths << Rails.root.join('node_modules')
|
|
10
|
+
|
|
11
|
+
# Precompile additional assets.
|
|
12
|
+
# application.js, application.css, and all non-JS/CSS in the app/assets
|
|
13
|
+
# folder are already added.
|
|
14
|
+
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
|
@@ -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,41 @@
|
|
|
1
|
+
# See docs/basics/configuration.md for many more options
|
|
2
|
+
|
|
3
|
+
ReactOnRails.configure do |config|
|
|
4
|
+
# This configures the script to run to build the production assets by webpack. Set this to nil
|
|
5
|
+
# if you don't want react_on_rails building this file for you.
|
|
6
|
+
config.build_production_command = "RAILS_ENV=production bin/webpack"
|
|
7
|
+
|
|
8
|
+
################################################################################
|
|
9
|
+
################################################################################
|
|
10
|
+
# TEST CONFIGURATION OPTIONS
|
|
11
|
+
# Below options are used with the use of this test helper:
|
|
12
|
+
# ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
|
|
13
|
+
################################################################################
|
|
14
|
+
|
|
15
|
+
# If you are using this in your spec_helper.rb (or rails_helper.rb):
|
|
16
|
+
#
|
|
17
|
+
# ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
|
|
18
|
+
#
|
|
19
|
+
# with rspec then this controls what yarn command is run
|
|
20
|
+
# to automatically refresh your webpack assets on every test run.
|
|
21
|
+
#
|
|
22
|
+
config.build_test_command = "RAILS_ENV=test bin/webpack"
|
|
23
|
+
|
|
24
|
+
################################################################################
|
|
25
|
+
################################################################################
|
|
26
|
+
# SERVER RENDERING OPTIONS
|
|
27
|
+
################################################################################
|
|
28
|
+
# This is the file used for server rendering of React when using `(prerender: true)`
|
|
29
|
+
# If you are never using server rendering, you should set this to "".
|
|
30
|
+
# Note, there is only one server bundle, unlike JavaScript where you want to minimize the size
|
|
31
|
+
# of the JS sent to the client. For the server rendering, React on Rails creates a pool of
|
|
32
|
+
# JavaScript execution instances which should handle any component requested.
|
|
33
|
+
#
|
|
34
|
+
# While you may configure this to be the same as your client bundle file, this file is typically
|
|
35
|
+
# different. You should have ONE server bundle which can create all of your server rendered
|
|
36
|
+
# React components.
|
|
37
|
+
#
|
|
38
|
+
config.server_bundle_js_file = "bundle.js"
|
|
39
|
+
|
|
40
|
+
config.prerender = !Rails.env.development?
|
|
41
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
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 your secret_key_base is kept private
|
|
11
|
+
# if you're sharing your code publicly.
|
|
12
|
+
CortexStarter::Application.config.secret_key_base = ENV['APP_SECRET']
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
if ENV['DEPLOYED'] || Rails.env.production?
|
|
4
|
+
Rails.application.config.session_store :redis_store, servers: ENV['SESSION_STORE_URL']
|
|
5
|
+
else
|
|
6
|
+
Rails.application.config.session_store :redis_store, servers: ENV['SESSION_STORE_URL'], namespace: ENV['REDIS_NAMESPACE'] || 'cortex_starter_dev'
|
|
7
|
+
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]
|
|
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,8 @@
|
|
|
1
|
+
en:
|
|
2
|
+
doorkeeper:
|
|
3
|
+
scopes:
|
|
4
|
+
public: View your public information
|
|
5
|
+
view:tenants: View tenants you control
|
|
6
|
+
modify:tenants: Make changes to, create and delete, tenants you control
|
|
7
|
+
view:users: View users you control
|
|
8
|
+
modify:users: Make changes to, create and delete, users you control
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file configures the New Relic Agent. New Relic monitors Ruby, Java,
|
|
3
|
+
# .NET, PHP, Python and Node applications with deep visibility and low
|
|
4
|
+
# overhead. For more information, visit www.newrelic.com.
|
|
5
|
+
#
|
|
6
|
+
# Generated October 14, 2014
|
|
7
|
+
#
|
|
8
|
+
# This configuration file is custom generated for Content Enablement
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Here are the settings that are common to all environments
|
|
12
|
+
common: &default_settings
|
|
13
|
+
# ============================== LICENSE KEY ===============================
|
|
14
|
+
|
|
15
|
+
# You must specify the license key associated with your New Relic
|
|
16
|
+
# account. This key binds your Agent's data to your account in the
|
|
17
|
+
# New Relic service.
|
|
18
|
+
license_key: <%= ENV['NEW_RELIC_LICENSE_KEY'] %>
|
|
19
|
+
|
|
20
|
+
# Agent Enabled (Ruby/Rails Only)
|
|
21
|
+
# Use this setting to force the agent to run or not run.
|
|
22
|
+
# Default is 'auto' which means the agent will install and run only
|
|
23
|
+
# if a valid dispatcher such as Mongrel is running. This prevents
|
|
24
|
+
# it from running with Rake or the console. Set to false to
|
|
25
|
+
# completely turn the agent off regardless of the other settings.
|
|
26
|
+
# Valid values are true, false and auto.
|
|
27
|
+
#
|
|
28
|
+
# agent_enabled: auto
|
|
29
|
+
|
|
30
|
+
# Application Name Set this to be the name of your application as
|
|
31
|
+
# you'd like it show up in New Relic. The service will then auto-map
|
|
32
|
+
# instances of your application into an "application" on your
|
|
33
|
+
# dashboard page. If you want to map this instance into multiple
|
|
34
|
+
# apps, like "AJAX Requests" and "All UI" then specify a semicolon
|
|
35
|
+
# separated list of up to three distinct names, or a yaml list.
|
|
36
|
+
# Defaults to the capitalized RAILS_ENV or RACK_ENV (i.e.,
|
|
37
|
+
# Production, Staging, etc)
|
|
38
|
+
#
|
|
39
|
+
# Example:
|
|
40
|
+
#
|
|
41
|
+
# app_name:
|
|
42
|
+
# - Ajax Service
|
|
43
|
+
# - All Services
|
|
44
|
+
#
|
|
45
|
+
# Caution: If you change this name, a new application will appear in the New
|
|
46
|
+
# Relic user interface with the new name, and data will stop reporting to the
|
|
47
|
+
# app with the old name.
|
|
48
|
+
#
|
|
49
|
+
# See https://newrelic.com/docs/site/renaming-applications for more details
|
|
50
|
+
# on renaming your New Relic applications.
|
|
51
|
+
#
|
|
52
|
+
app_name: Cortex
|
|
53
|
+
|
|
54
|
+
# When "true", the agent collects performance data about your
|
|
55
|
+
# application and reports this data to the New Relic service at
|
|
56
|
+
# newrelic.com. This global switch is normally overridden for each
|
|
57
|
+
# environment below. (formerly called 'enabled')
|
|
58
|
+
monitor_mode: true
|
|
59
|
+
|
|
60
|
+
# Developer mode should be off in every environment but
|
|
61
|
+
# development as it has very high overhead in memory.
|
|
62
|
+
developer_mode: false
|
|
63
|
+
|
|
64
|
+
# The newrelic agent generates its own log file to keep its logging
|
|
65
|
+
# information separate from that of your application. Specify its
|
|
66
|
+
# log level here.
|
|
67
|
+
log_level: info
|
|
68
|
+
|
|
69
|
+
# Optionally set the path to the log file This is expanded from the
|
|
70
|
+
# root directory (may be relative or absolute, e.g. 'log/' or
|
|
71
|
+
# '/var/log/') The agent will attempt to create this directory if it
|
|
72
|
+
# does not exist.
|
|
73
|
+
# log_file_path: 'log'
|
|
74
|
+
|
|
75
|
+
# Optionally set the name of the log file, defaults to 'newrelic_agent.log'
|
|
76
|
+
# log_file_name: 'newrelic_agent.log'
|
|
77
|
+
|
|
78
|
+
# The newrelic agent communicates with the service via https by default. This
|
|
79
|
+
# prevents eavesdropping on the performance metrics transmitted by the agent.
|
|
80
|
+
# The encryption required by SSL introduces a nominal amount of CPU overhead,
|
|
81
|
+
# which is performed asynchronously in a background thread. If you'd prefer
|
|
82
|
+
# to send your metrics over http uncomment the following line.
|
|
83
|
+
# ssl: false
|
|
84
|
+
|
|
85
|
+
#============================== Browser Monitoring ===============================
|
|
86
|
+
# New Relic Real User Monitoring gives you insight into the performance real users are
|
|
87
|
+
# experiencing with your website. This is accomplished by measuring the time it takes for
|
|
88
|
+
# your users' browsers to download and render your web pages by injecting a small amount
|
|
89
|
+
# of JavaScript code into the header and footer of each page.
|
|
90
|
+
browser_monitoring:
|
|
91
|
+
# By default the agent automatically injects the monitoring JavaScript
|
|
92
|
+
# into web pages. Set this attribute to false to turn off this behavior.
|
|
93
|
+
auto_instrument: true
|
|
94
|
+
|
|
95
|
+
# Proxy settings for connecting to the New Relic server.
|
|
96
|
+
#
|
|
97
|
+
# If a proxy is used, the host setting is required. Other settings
|
|
98
|
+
# are optional. Default port is 8080.
|
|
99
|
+
#
|
|
100
|
+
# proxy_host: hostname
|
|
101
|
+
# proxy_port: 8080
|
|
102
|
+
# proxy_user:
|
|
103
|
+
# proxy_pass:
|
|
104
|
+
|
|
105
|
+
# The agent can optionally log all data it sends to New Relic servers to a
|
|
106
|
+
# separate log file for human inspection and auditing purposes. To enable this
|
|
107
|
+
# feature, change 'enabled' below to true.
|
|
108
|
+
# See: https://newrelic.com/docs/ruby/audit-log
|
|
109
|
+
audit_log:
|
|
110
|
+
enabled: false
|
|
111
|
+
|
|
112
|
+
# Tells transaction tracer and error collector (when enabled)
|
|
113
|
+
# whether or not to capture HTTP params. When true, frameworks can
|
|
114
|
+
# exclude HTTP parameters from being captured.
|
|
115
|
+
# Rails: the RoR filter_parameter_logging excludes parameters
|
|
116
|
+
# Java: create a config setting called "ignored_params" and set it to
|
|
117
|
+
# a comma separated list of HTTP parameter names.
|
|
118
|
+
# ex: ignored_params: credit_card, ssn, password
|
|
119
|
+
capture_params: true
|
|
120
|
+
|
|
121
|
+
# Transaction tracer captures deep information about slow
|
|
122
|
+
# transactions and sends this to the New Relic service once a
|
|
123
|
+
# minute. Included in the transaction is the exact call sequence of
|
|
124
|
+
# the transactions including any SQL statements issued.
|
|
125
|
+
transaction_tracer:
|
|
126
|
+
|
|
127
|
+
# Transaction tracer is enabled by default. Set this to false to
|
|
128
|
+
# turn it off. This feature is only available at the Professional
|
|
129
|
+
# and above product levels.
|
|
130
|
+
enabled: true
|
|
131
|
+
|
|
132
|
+
# Threshold in seconds for when to collect a transaction
|
|
133
|
+
# trace. When the response time of a controller action exceeds
|
|
134
|
+
# this threshold, a transaction trace will be recorded and sent to
|
|
135
|
+
# New Relic. Valid values are any float value, or (default) "apdex_f",
|
|
136
|
+
# which will use the threshold for an dissatisfying Apdex
|
|
137
|
+
# controller action - four times the Apdex T value.
|
|
138
|
+
transaction_threshold: apdex_f
|
|
139
|
+
|
|
140
|
+
# When transaction tracer is on, SQL statements can optionally be
|
|
141
|
+
# recorded. The recorder has three modes, "off" which sends no
|
|
142
|
+
# SQL, "raw" which sends the SQL statement in its original form,
|
|
143
|
+
# and "obfuscated", which strips out numeric and string literals.
|
|
144
|
+
record_sql: obfuscated
|
|
145
|
+
|
|
146
|
+
# Threshold in seconds for when to collect stack trace for a SQL
|
|
147
|
+
# call. In other words, when SQL statements exceed this threshold,
|
|
148
|
+
# then capture and send to New Relic the current stack trace. This is
|
|
149
|
+
# helpful for pinpointing where long SQL calls originate from.
|
|
150
|
+
stack_trace_threshold: 0.500
|
|
151
|
+
|
|
152
|
+
# Determines whether the agent will capture query plans for slow
|
|
153
|
+
# SQL queries. Only supported in mysql and postgres. Should be
|
|
154
|
+
# set to false when using other adapters.
|
|
155
|
+
# explain_enabled: true
|
|
156
|
+
|
|
157
|
+
# Threshold for query execution time below which query plans will
|
|
158
|
+
# not be captured. Relevant only when `explain_enabled` is true.
|
|
159
|
+
# explain_threshold: 0.5
|
|
160
|
+
|
|
161
|
+
# Error collector captures information about uncaught exceptions and
|
|
162
|
+
# sends them to New Relic for viewing
|
|
163
|
+
error_collector:
|
|
164
|
+
|
|
165
|
+
# Error collector is enabled by default. Set this to false to turn
|
|
166
|
+
# it off. This feature is only available at the Professional and above
|
|
167
|
+
# product levels.
|
|
168
|
+
enabled: true
|
|
169
|
+
|
|
170
|
+
# To stop specific errors from reporting to New Relic, set this property
|
|
171
|
+
# to comma-separated values. Default is to ignore routing errors,
|
|
172
|
+
# which are how 404's get triggered.
|
|
173
|
+
ignore_errors: "ActionController::RoutingError,Sinatra::NotFound"
|
|
174
|
+
|
|
175
|
+
# If you're interested in capturing memcache keys as though they
|
|
176
|
+
# were SQL uncomment this flag. Note that this does increase
|
|
177
|
+
# overhead slightly on every memcached call, and can have security
|
|
178
|
+
# implications if your memcached keys are sensitive
|
|
179
|
+
# capture_memcache_keys: true
|
|
180
|
+
|
|
181
|
+
# Application Environments
|
|
182
|
+
# ------------------------------------------
|
|
183
|
+
# Environment-specific settings are in this section.
|
|
184
|
+
# For Rails applications, RAILS_ENV is used to determine the environment.
|
|
185
|
+
# For Java applications, pass -Dnewrelic.environment <environment> to set
|
|
186
|
+
# the environment.
|
|
187
|
+
|
|
188
|
+
# NOTE if your application has other named environments, you should
|
|
189
|
+
# provide newrelic configuration settings for these environments here.
|
|
190
|
+
|
|
191
|
+
development:
|
|
192
|
+
<<: *default_settings
|
|
193
|
+
# Turn on communication to New Relic service in development mode
|
|
194
|
+
monitor_mode: true
|
|
195
|
+
app_name: Cortex Admin (Development)
|
|
196
|
+
|
|
197
|
+
# Rails Only - when running in Developer Mode, the New Relic Agent will
|
|
198
|
+
# present performance information on the last 100 transactions you have
|
|
199
|
+
# executed since starting the mongrel.
|
|
200
|
+
# NOTE: There is substantial overhead when running in developer mode.
|
|
201
|
+
# Do not use for production or load testing.
|
|
202
|
+
developer_mode: true
|
|
203
|
+
|
|
204
|
+
test:
|
|
205
|
+
<<: *default_settings
|
|
206
|
+
# It almost never makes sense to turn on the agent when running
|
|
207
|
+
# unit, functional or integration tests or the like.
|
|
208
|
+
monitor_mode: false
|
|
209
|
+
|
|
210
|
+
# Turn on the agent in production for 24x7 monitoring. NewRelic
|
|
211
|
+
# testing shows an average performance impact of < 5 ms per
|
|
212
|
+
# transaction, you can leave this on all the time without
|
|
213
|
+
# incurring any user-visible performance degradation.
|
|
214
|
+
production:
|
|
215
|
+
<<: *default_settings
|
|
216
|
+
monitor_mode: true
|
|
217
|
+
|
|
218
|
+
# Many applications have a staging environment which behaves
|
|
219
|
+
# identically to production. Support for that environment is provided
|
|
220
|
+
# here. By default, the staging environment has the agent turned on.
|
|
221
|
+
staging:
|
|
222
|
+
<<: *default_settings
|
|
223
|
+
monitor_mode: true
|
|
224
|
+
app_name: Cortex Admin (Staging)
|