raygun4ruby 3.1.0 → 3.2.3
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 +5 -5
- data/.gitignore +0 -0
- data/.rspec +0 -0
- data/.travis.yml +11 -3
- data/CHANGELOG.md +23 -2
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +3 -3
- data/Rakefile +0 -0
- data/examples/sinatras_raygun.rb +0 -0
- data/lib/generators/raygun/install_generator.rb +0 -0
- data/lib/raygun.rb +2 -5
- data/lib/raygun/affected_user.rb +0 -0
- data/lib/raygun/breadcrumbs.rb +0 -0
- data/lib/raygun/breadcrumbs/breadcrumb.rb +4 -0
- data/lib/raygun/breadcrumbs/store.rb +10 -0
- data/lib/raygun/client.rb +4 -1
- data/lib/raygun/configuration.rb +0 -0
- data/lib/raygun/error.rb +0 -0
- data/lib/raygun/javascript_tracker.rb +0 -0
- data/lib/raygun/middleware/breadcrumbs_store_initializer.rb +0 -0
- data/lib/raygun/middleware/javascript_exception_tracking.rb +5 -3
- data/lib/raygun/middleware/rack_exception_interceptor.rb +0 -0
- data/lib/raygun/middleware/rails_insert_affected_user.rb +0 -0
- data/lib/raygun/railtie.rb +0 -0
- data/lib/raygun/services/apply_whitelist_filter_to_payload.rb +0 -0
- data/lib/raygun/sidekiq.rb +3 -0
- data/lib/raygun/testable.rb +0 -0
- data/lib/raygun/version.rb +1 -1
- data/lib/raygun4ruby.rb +0 -0
- data/lib/resque/failure/raygun.rb +0 -0
- data/lib/tasks/raygun.tasks +0 -0
- data/raygun4ruby.gemspec +4 -4
- data/spec/dummy/.gitignore +17 -0
- data/spec/dummy/Gemfile +47 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/app/assets/config/manifest.js +1 -1
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +1 -3
- data/spec/dummy/app/assets/stylesheets/application.css +3 -3
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/controllers/home_controller.rb +1 -1
- data/spec/dummy/app/helpers/application_helper.rb +0 -0
- data/spec/dummy/app/{assets/javascripts/channels → mailers}/.keep +0 -0
- data/spec/dummy/{storage → app/models}/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/views/home/index.html.erb +0 -0
- data/spec/dummy/app/views/home/index.json.erb +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +9 -10
- data/spec/dummy/bin/bundle +1 -1
- data/spec/dummy/bin/rails +6 -1
- data/spec/dummy/bin/rake +5 -0
- data/spec/dummy/bin/setup +13 -20
- data/spec/dummy/bin/spring +17 -0
- data/spec/dummy/config.ru +1 -2
- data/spec/dummy/config/application.rb +16 -8
- data/spec/dummy/config/boot.rb +2 -4
- data/spec/dummy/config/database.yml +1 -1
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/environments/development.rb +11 -31
- data/spec/dummy/config/environments/production.rb +16 -31
- data/spec/dummy/config/environments/test.rb +6 -10
- data/spec/dummy/config/initializers/assets.rb +3 -6
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -2
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/spec/dummy/config/initializers/inflections.rb +0 -0
- data/spec/dummy/config/initializers/mime_types.rb +0 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/spec/dummy/config/locales/en.yml +0 -10
- data/spec/dummy/config/routes.rb +56 -1
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/{public/apple-touch-icon-precomposed.png → lib/tasks/.keep} +0 -0
- data/spec/dummy/public/404.html +6 -6
- data/spec/dummy/public/422.html +6 -6
- data/spec/dummy/public/500.html +6 -6
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/robots.txt +5 -0
- data/spec/dummy/{public/apple-touch-icon.png → test/controllers/.keep} +0 -0
- data/spec/dummy/test/fixtures/.keep +0 -0
- data/spec/dummy/test/helpers/.keep +0 -0
- data/spec/dummy/test/integration/.keep +0 -0
- data/spec/dummy/test/mailers/.keep +0 -0
- data/spec/dummy/test/models/.keep +0 -0
- data/spec/dummy/test/test_helper.rb +10 -0
- data/spec/dummy/vendor/assets/javascripts/.keep +0 -0
- data/spec/dummy/vendor/assets/stylesheets/.keep +0 -0
- data/spec/features/javascript_spec.rb +0 -0
- data/spec/rails_helper.rb +0 -0
- data/spec/raygun/breadcrumbs/breadcrumb_spec.rb +37 -0
- data/spec/raygun/breadcrumbs/store_spec.rb +24 -0
- data/spec/raygun/raygun_spec.rb +0 -0
- data/spec/services/apply_whitelist_filter_to_payload_spec.rb +0 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/support/fake_logger.rb +0 -0
- data/test/integration/client_test.rb +0 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/affected_user_test.rb +0 -0
- data/test/unit/client_test.rb +3 -1
- data/test/unit/configuration_test.rb +0 -0
- data/test/unit/raygun_test.rb +0 -0
- data/test/unit/resque_failure_test.rb +0 -0
- data/test/unit/sidekiq_failure_test.rb +0 -0
- metadata +38 -41
- data/spec/dummy/.ruby-version +0 -1
- data/spec/dummy/app/assets/javascripts/cable.js +0 -13
- data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
- data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
- data/spec/dummy/app/jobs/application_job.rb +0 -2
- data/spec/dummy/app/mailers/application_mailer.rb +0 -4
- data/spec/dummy/app/models/application_record.rb +0 -3
- data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
- data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
- data/spec/dummy/bin/update +0 -31
- data/spec/dummy/bin/yarn +0 -11
- data/spec/dummy/config/cable.yml +0 -10
- data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
- data/spec/dummy/config/initializers/content_security_policy.rb +0 -25
- data/spec/dummy/config/puma.rb +0 -34
- data/spec/dummy/config/spring.rb +0 -6
- data/spec/dummy/config/storage.yml +0 -34
- data/spec/dummy/db/schema.rb +0 -15
- data/spec/dummy/package.json +0 -5
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<head>
|
|
4
|
+
<title>Dummy</title>
|
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
|
7
|
+
<%= csrf_meta_tags %>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
<%= javascript_include_tag 'application' %>
|
|
10
|
-
</head>
|
|
11
|
+
<%= yield %>
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
<%= yield %>
|
|
14
|
-
</body>
|
|
13
|
+
</body>
|
|
15
14
|
</html>
|
data/spec/dummy/bin/bundle
CHANGED
data/spec/dummy/bin/rails
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
|
|
2
|
+
begin
|
|
3
|
+
load File.expand_path('../spring', __FILE__)
|
|
4
|
+
rescue LoadError => e
|
|
5
|
+
raise unless e.message.include?('spring')
|
|
6
|
+
end
|
|
7
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
|
3
8
|
require_relative '../config/boot'
|
|
4
9
|
require 'rails/commands'
|
data/spec/dummy/bin/rake
CHANGED
data/spec/dummy/bin/setup
CHANGED
|
@@ -1,36 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
require '
|
|
3
|
-
include FileUtils
|
|
2
|
+
require 'pathname'
|
|
4
3
|
|
|
5
4
|
# path to your application root.
|
|
6
|
-
APP_ROOT = File.expand_path('
|
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
system(*args) || abort("\n== Command #{args} failed ==")
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
chdir APP_ROOT do
|
|
7
|
+
Dir.chdir APP_ROOT do
|
|
13
8
|
# This script is a starting point to setup your application.
|
|
14
|
-
# Add necessary setup steps to this file
|
|
15
|
-
|
|
16
|
-
puts '== Installing dependencies =='
|
|
17
|
-
system! 'gem install bundler --conservative'
|
|
18
|
-
system('bundle check') || system!('bundle install')
|
|
9
|
+
# Add necessary setup steps to this file:
|
|
19
10
|
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
puts "== Installing dependencies =="
|
|
12
|
+
system "gem install bundler --conservative"
|
|
13
|
+
system "bundle check || bundle install"
|
|
22
14
|
|
|
23
15
|
# puts "\n== Copying sample files =="
|
|
24
|
-
# unless File.exist?(
|
|
25
|
-
# cp
|
|
16
|
+
# unless File.exist?("config/database.yml")
|
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
|
26
18
|
# end
|
|
27
19
|
|
|
28
20
|
puts "\n== Preparing database =="
|
|
29
|
-
system
|
|
21
|
+
system "bin/rake db:setup"
|
|
30
22
|
|
|
31
23
|
puts "\n== Removing old logs and tempfiles =="
|
|
32
|
-
system
|
|
24
|
+
system "rm -f log/*"
|
|
25
|
+
system "rm -rf tmp/cache"
|
|
33
26
|
|
|
34
27
|
puts "\n== Restarting application server =="
|
|
35
|
-
system
|
|
28
|
+
system "touch tmp/restart.txt"
|
|
36
29
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# This file loads spring without using Bundler, in order to be fast.
|
|
4
|
+
# It gets overwritten when you run the `spring binstub` command.
|
|
5
|
+
|
|
6
|
+
unless defined?(Spring)
|
|
7
|
+
require 'rubygems'
|
|
8
|
+
require 'bundler'
|
|
9
|
+
|
|
10
|
+
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
|
11
|
+
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
|
12
|
+
if spring
|
|
13
|
+
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
|
14
|
+
gem 'spring', spring.version
|
|
15
|
+
require 'spring/binstub'
|
|
16
|
+
end
|
|
17
|
+
end
|
data/spec/dummy/config.ru
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
2
|
|
|
3
3
|
require 'rails/all'
|
|
4
4
|
|
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
|
6
|
+
# you've limited to :test, :development, or :production.
|
|
5
7
|
Bundler.require(*Rails.groups)
|
|
6
8
|
|
|
7
9
|
module Dummy
|
|
8
10
|
class Application < Rails::Application
|
|
9
|
-
# Initialize configuration defaults for originally generated Rails version.
|
|
10
|
-
config.load_defaults 5.2
|
|
11
|
-
|
|
12
11
|
# Settings in config/environments/* take precedence over those specified here.
|
|
13
|
-
# Application configuration
|
|
14
|
-
# -- all .rb files in that directory are automatically loaded
|
|
15
|
-
|
|
12
|
+
# Application configuration should go into files in config/initializers
|
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
|
14
|
+
|
|
15
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
16
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
17
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
|
18
|
+
|
|
19
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
20
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
21
|
+
# config.i18n.default_locale = :de
|
|
22
|
+
|
|
23
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
|
24
|
+
config.active_record.raise_in_transactional_callbacks = true
|
|
16
25
|
end
|
|
17
26
|
end
|
|
18
|
-
|
data/spec/dummy/config/boot.rb
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
|
|
1
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
|
3
2
|
|
|
4
|
-
require 'bundler/setup'
|
|
5
|
-
$LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
|
|
3
|
+
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
|
@@ -9,53 +9,33 @@ Rails.application.configure do
|
|
|
9
9
|
# Do not eager load code on boot.
|
|
10
10
|
config.eager_load = false
|
|
11
11
|
|
|
12
|
-
# Show full error reports.
|
|
13
|
-
config.consider_all_requests_local
|
|
14
|
-
|
|
15
|
-
# Enable/disable caching. By default caching is disabled.
|
|
16
|
-
# Run rails dev:cache to toggle caching.
|
|
17
|
-
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
|
18
|
-
config.action_controller.perform_caching = true
|
|
19
|
-
|
|
20
|
-
config.cache_store = :memory_store
|
|
21
|
-
config.public_file_server.headers = {
|
|
22
|
-
'Cache-Control' => "public, max-age=#{2.days.to_i}"
|
|
23
|
-
}
|
|
24
|
-
else
|
|
25
|
-
config.action_controller.perform_caching = false
|
|
26
|
-
|
|
27
|
-
config.cache_store = :null_store
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Store uploaded files on the local file system (see config/storage.yml for options)
|
|
31
|
-
config.active_storage.service = :local
|
|
12
|
+
# Show full error reports and disable caching.
|
|
13
|
+
config.consider_all_requests_local = true
|
|
14
|
+
config.action_controller.perform_caching = false
|
|
32
15
|
|
|
33
16
|
# Don't care if the mailer can't send.
|
|
34
17
|
config.action_mailer.raise_delivery_errors = false
|
|
35
18
|
|
|
36
|
-
config.action_mailer.perform_caching = false
|
|
37
|
-
|
|
38
19
|
# Print deprecation notices to the Rails logger.
|
|
39
20
|
config.active_support.deprecation = :log
|
|
40
21
|
|
|
41
22
|
# Raise an error on page load if there are pending migrations.
|
|
42
23
|
config.active_record.migration_error = :page_load
|
|
43
24
|
|
|
44
|
-
# Highlight code that triggered database queries in logs.
|
|
45
|
-
config.active_record.verbose_query_logs = true
|
|
46
|
-
|
|
47
25
|
# Debug mode disables concatenation and preprocessing of assets.
|
|
48
26
|
# This option may cause significant delays in view rendering with a large
|
|
49
27
|
# number of complex assets.
|
|
50
28
|
config.assets.debug = true
|
|
51
29
|
|
|
52
|
-
#
|
|
53
|
-
|
|
30
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
|
31
|
+
# yet still be able to expire them through the digest params.
|
|
32
|
+
config.assets.digest = true
|
|
33
|
+
|
|
34
|
+
# Adds additional error checking when serving assets at runtime.
|
|
35
|
+
# Checks for improperly declared sprockets dependencies.
|
|
36
|
+
# Raises helpful error messages.
|
|
37
|
+
config.assets.raise_runtime_errors = true
|
|
54
38
|
|
|
55
39
|
# Raises error for missing translations
|
|
56
40
|
# config.action_view.raise_on_missing_translations = true
|
|
57
|
-
|
|
58
|
-
# Use an evented file watcher to asynchronously detect changes in source code,
|
|
59
|
-
# routes, locales, etc. This feature depends on the listen gem.
|
|
60
|
-
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
|
61
41
|
end
|
|
@@ -14,13 +14,15 @@ Rails.application.configure do
|
|
|
14
14
|
config.consider_all_requests_local = false
|
|
15
15
|
config.action_controller.perform_caching = true
|
|
16
16
|
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
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
|
|
20
|
+
# NGINX, varnish or squid.
|
|
21
|
+
# config.action_dispatch.rack_cache = true
|
|
20
22
|
|
|
21
23
|
# Disable serving static files from the `/public` folder by default since
|
|
22
24
|
# Apache or NGINX already handles this.
|
|
23
|
-
config.
|
|
25
|
+
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
|
24
26
|
|
|
25
27
|
# Compress JavaScripts and CSS.
|
|
26
28
|
config.assets.js_compressor = :uglifier
|
|
@@ -29,23 +31,16 @@ Rails.application.configure do
|
|
|
29
31
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
|
30
32
|
config.assets.compile = false
|
|
31
33
|
|
|
32
|
-
#
|
|
34
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
|
35
|
+
# yet still be able to expire them through the digest params.
|
|
36
|
+
config.assets.digest = true
|
|
33
37
|
|
|
34
|
-
#
|
|
35
|
-
# config.action_controller.asset_host = 'http://assets.example.com'
|
|
38
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
|
36
39
|
|
|
37
40
|
# Specifies the header that your server uses for sending files.
|
|
38
41
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
|
39
42
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
|
40
43
|
|
|
41
|
-
# Store uploaded files on the local file system (see config/storage.yml for options)
|
|
42
|
-
config.active_storage.service = :local
|
|
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
44
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
50
45
|
# config.force_ssl = true
|
|
51
46
|
|
|
@@ -54,16 +49,16 @@ Rails.application.configure do
|
|
|
54
49
|
config.log_level = :debug
|
|
55
50
|
|
|
56
51
|
# Prepend all log lines with the following tags.
|
|
57
|
-
config.log_tags = [ :
|
|
52
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
|
53
|
+
|
|
54
|
+
# Use a different logger for distributed setups.
|
|
55
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
|
58
56
|
|
|
59
57
|
# Use a different cache store in production.
|
|
60
58
|
# config.cache_store = :mem_cache_store
|
|
61
59
|
|
|
62
|
-
#
|
|
63
|
-
# config.
|
|
64
|
-
# config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
|
|
65
|
-
|
|
66
|
-
config.action_mailer.perform_caching = false
|
|
60
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
61
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
|
67
62
|
|
|
68
63
|
# Ignore bad email addresses and do not raise email delivery errors.
|
|
69
64
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
|
@@ -79,16 +74,6 @@ Rails.application.configure do
|
|
|
79
74
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
80
75
|
config.log_formatter = ::Logger::Formatter.new
|
|
81
76
|
|
|
82
|
-
# Use a different logger for distributed setups.
|
|
83
|
-
# require 'syslog/logger'
|
|
84
|
-
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
|
85
|
-
|
|
86
|
-
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
|
87
|
-
logger = ActiveSupport::Logger.new(STDOUT)
|
|
88
|
-
logger.formatter = config.log_formatter
|
|
89
|
-
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
|
90
|
-
end
|
|
91
|
-
|
|
92
77
|
# Do not dump schema after migrations.
|
|
93
78
|
config.active_record.dump_schema_after_migration = false
|
|
94
79
|
end
|
|
@@ -12,11 +12,9 @@ Rails.application.configure do
|
|
|
12
12
|
# preloads Rails for running tests, you may have to set it to true.
|
|
13
13
|
config.eager_load = false
|
|
14
14
|
|
|
15
|
-
# Configure
|
|
16
|
-
config.
|
|
17
|
-
config.
|
|
18
|
-
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
|
|
19
|
-
}
|
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
|
16
|
+
config.serve_static_files = true
|
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
|
20
18
|
|
|
21
19
|
# Show full error reports and disable caching.
|
|
22
20
|
config.consider_all_requests_local = true
|
|
@@ -28,16 +26,14 @@ Rails.application.configure do
|
|
|
28
26
|
# Disable request forgery protection in test environment.
|
|
29
27
|
config.action_controller.allow_forgery_protection = false
|
|
30
28
|
|
|
31
|
-
# Store uploaded files on the local file system in a temporary directory
|
|
32
|
-
config.active_storage.service = :test
|
|
33
|
-
|
|
34
|
-
config.action_mailer.perform_caching = false
|
|
35
|
-
|
|
36
29
|
# Tell Action Mailer not to deliver emails to the real world.
|
|
37
30
|
# The :test delivery method accumulates sent emails in the
|
|
38
31
|
# ActionMailer::Base.deliveries array.
|
|
39
32
|
config.action_mailer.delivery_method = :test
|
|
40
33
|
|
|
34
|
+
# Randomize the order test cases are executed.
|
|
35
|
+
config.active_support.test_order = :random
|
|
36
|
+
|
|
41
37
|
# Print deprecation notices to the stderr.
|
|
42
38
|
config.active_support.deprecation = :stderr
|
|
43
39
|
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
# Version of your assets, change this if you want to expire all your assets.
|
|
4
4
|
Rails.application.config.assets.version = '1.0'
|
|
5
5
|
|
|
6
|
-
# Add additional assets to the asset load path
|
|
6
|
+
# Add additional assets to the asset load path
|
|
7
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
8
|
|
|
11
9
|
# Precompile additional assets.
|
|
12
|
-
# application.js, application.css, and all non-JS/CSS in
|
|
13
|
-
#
|
|
14
|
-
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
|
10
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
|
11
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Preserve the timezone of the receiver when calling to `to_time`.
|
|
4
|
+
# Ruby 2.4 will change the behavior of `to_time` to preserve the timezone
|
|
5
|
+
# when converting to an instance of `Time` instead of the previous behavior
|
|
6
|
+
# of converting to the local system timezone.
|
|
7
|
+
#
|
|
8
|
+
# Rails 5.0 introduced this config option so that apps made with earlier
|
|
9
|
+
# versions of Rails are not affected when upgrading.
|
|
10
|
+
ActiveSupport.to_time_preserves_timezone = true
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
|
7
7
|
ActiveSupport.on_load(:action_controller) do
|
|
8
|
-
wrap_parameters format: [:json]
|
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# To enable root element in JSON for ActiveRecord objects.
|
|
12
12
|
# ActiveSupport.on_load(:active_record) do
|
|
13
|
-
#
|
|
13
|
+
# self.include_root_in_json = true
|
|
14
14
|
# end
|