geokit-rails 2.5.0 → 2.5.2

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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +125 -0
  3. data/.gitignore +44 -37
  4. data/CHANGELOG.md +112 -101
  5. data/CONFIG.markdown +67 -67
  6. data/Gemfile +3 -3
  7. data/MIT-LICENSE +19 -19
  8. data/README.markdown +726 -726
  9. data/Rakefile +17 -17
  10. data/gemfiles/rails7.1.gemfile +11 -0
  11. data/gemfiles/{rails5.gemfile → rails7.2.gemfile} +7 -7
  12. data/gemfiles/{rails6.0.gemfile → rails8.0.gemfile} +7 -8
  13. data/gemfiles/{rails6.1.gemfile → rails8.1.gemfile} +7 -8
  14. data/geokit-rails.gemspec +35 -34
  15. data/lib/generators/geokit_rails/install_generator.rb +13 -13
  16. data/lib/generators/templates/geokit_config.rb +100 -100
  17. data/lib/geokit-rails/acts_as_mappable/class_methods.rb +301 -297
  18. data/lib/geokit-rails/acts_as_mappable/glue.rb +54 -54
  19. data/lib/geokit-rails/acts_as_mappable.rb +78 -78
  20. data/lib/geokit-rails/adapters/abstract.rb +30 -30
  21. data/lib/geokit-rails/adapters/mysql.rb +21 -21
  22. data/lib/geokit-rails/adapters/mysql2.rb +8 -8
  23. data/lib/geokit-rails/adapters/mysql2spatial.rb +8 -8
  24. data/lib/geokit-rails/adapters/oracleenhanced.rb +32 -32
  25. data/lib/geokit-rails/adapters/postgresql.rb +21 -21
  26. data/lib/geokit-rails/adapters/sqlite.rb +53 -53
  27. data/lib/geokit-rails/adapters/sqlserver.rb +45 -45
  28. data/lib/geokit-rails/adapters/trilogy.rb +10 -0
  29. data/lib/geokit-rails/distance_collection.rb +8 -8
  30. data/lib/geokit-rails/geocoder_control.rb +19 -19
  31. data/lib/geokit-rails/ip_geocode_lookup.rb +44 -45
  32. data/lib/geokit-rails/railtie.rb +37 -37
  33. data/lib/geokit-rails/version.rb +3 -3
  34. data/lib/geokit-rails.rb +11 -11
  35. data/test/acts_as_mappable_test.rb +491 -478
  36. data/test/adapter_resolution_test.rb +59 -0
  37. data/test/boot.rb +40 -32
  38. data/test/database.yml +36 -28
  39. data/test/distance_collection_test.rb +41 -41
  40. data/test/dummy/Rakefile +6 -6
  41. data/test/dummy/app/assets/stylesheets/application.css +1 -1
  42. data/test/dummy/app/channels/application_cable/channel.rb +4 -4
  43. data/test/dummy/app/channels/application_cable/connection.rb +4 -4
  44. data/test/dummy/app/controllers/application_controller.rb +3 -3
  45. data/test/dummy/app/controllers/location_aware_controller.rb +42 -42
  46. data/test/dummy/app/helpers/application_helper.rb +2 -2
  47. data/test/dummy/app/jobs/application_job.rb +7 -7
  48. data/test/dummy/app/mailers/application_mailer.rb +4 -4
  49. data/test/dummy/app/models/application_record.rb +3 -3
  50. data/test/dummy/app/views/layouts/application.html.erb +15 -15
  51. data/test/dummy/app/views/layouts/mailer.html.erb +13 -13
  52. data/test/dummy/app/views/layouts/mailer.text.erb +1 -1
  53. data/test/dummy/bin/rails +4 -4
  54. data/test/dummy/bin/rake +4 -4
  55. data/test/dummy/bin/setup +33 -33
  56. data/test/dummy/config/application.rb +22 -22
  57. data/test/dummy/config/boot.rb +5 -5
  58. data/test/dummy/config/cable.yml +10 -10
  59. data/test/dummy/config/database.yml +25 -25
  60. data/test/dummy/config/environment.rb +5 -5
  61. data/test/dummy/config/environments/development.rb +68 -68
  62. data/test/dummy/config/environments/production.rb +87 -87
  63. data/test/dummy/config/environments/test.rb +60 -60
  64. data/test/dummy/config/initializers/content_security_policy.rb +25 -25
  65. data/test/dummy/config/initializers/filter_parameter_logging.rb +8 -8
  66. data/test/dummy/config/initializers/inflections.rb +16 -16
  67. data/test/dummy/config/initializers/permissions_policy.rb +11 -11
  68. data/test/dummy/config/locales/en.yml +33 -33
  69. data/test/dummy/config/puma.rb +43 -43
  70. data/test/dummy/config/routes.rb +6 -6
  71. data/test/dummy/config/storage.yml +34 -34
  72. data/test/dummy/config.ru +6 -6
  73. data/test/dummy/public/404.html +67 -67
  74. data/test/dummy/public/422.html +67 -67
  75. data/test/dummy/public/500.html +66 -66
  76. data/test/fixtures/companies.yml +9 -9
  77. data/test/fixtures/custom_locations.yml +61 -61
  78. data/test/fixtures/locations.yml +61 -61
  79. data/test/fixtures/mock_addresses.yml +16 -16
  80. data/test/fixtures/mock_families.yml +2 -2
  81. data/test/fixtures/mock_houses.yml +8 -8
  82. data/test/fixtures/mock_organizations.yml +4 -4
  83. data/test/fixtures/mock_people.yml +4 -4
  84. data/test/ip_geocode_lookup_test.rb +52 -48
  85. data/test/models/company.rb +2 -2
  86. data/test/models/custom_location.rb +11 -11
  87. data/test/models/location.rb +3 -3
  88. data/test/models/mock_address.rb +3 -3
  89. data/test/models/mock_family.rb +4 -4
  90. data/test/models/mock_house.rb +2 -2
  91. data/test/models/mock_organization.rb +5 -5
  92. data/test/models/mock_person.rb +6 -6
  93. data/test/models/store.rb +2 -2
  94. data/test/schema.rb +61 -61
  95. data/test/tasks.rake +39 -37
  96. data/test/test_helper.rb +83 -73
  97. metadata +28 -15
  98. data/.travis.yml +0 -55
  99. data/gemfiles/rails3.gemfile +0 -8
  100. data/gemfiles/rails4.gemfile +0 -8
@@ -1,5 +1,5 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__)
3
-
4
- require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
5
- $LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
1
+ # Set up gems listed in the Gemfile.
2
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__)
3
+
4
+ require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
5
+ $LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
@@ -1,10 +1,10 @@
1
- development:
2
- adapter: async
3
-
4
- test:
5
- adapter: test
6
-
7
- production:
8
- adapter: redis
9
- url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
- channel_prefix: dummy_production
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: test
6
+
7
+ production:
8
+ adapter: redis
9
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
+ channel_prefix: dummy_production
@@ -1,25 +1,25 @@
1
- # SQLite. Versions 3.8.0 and up are supported.
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: <%= ENV.fetch("RAILS_MAX_THREADS") { 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
1
+ # SQLite. Versions 3.8.0 and up are supported.
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: <%= ENV.fetch("RAILS_MAX_THREADS") { 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
@@ -1,5 +1,5 @@
1
- # Load the Rails application.
2
- require_relative "application"
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
1
+ # Load the Rails application.
2
+ require_relative "application"
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -1,68 +1,68 @@
1
- require "active_support/core_ext/integer/time"
2
-
3
- Rails.application.configure do
4
- # Settings specified here will take precedence over those in config/application.rb.
5
-
6
- # In the development environment your application's code is reloaded any time
7
- # it changes. This slows down response time but is perfect for development
8
- # since you don't have to restart the web server when you make code changes.
9
- config.cache_classes = false
10
-
11
- # Do not eager load code on boot.
12
- config.eager_load = false
13
-
14
- # Show full error reports.
15
- config.consider_all_requests_local = true
16
-
17
- # Enable server timing
18
- config.server_timing = true
19
-
20
- # Enable/disable caching. By default caching is disabled.
21
- # Run rails dev:cache to toggle caching.
22
- if Rails.root.join("tmp/caching-dev.txt").exist?
23
- config.action_controller.perform_caching = true
24
- config.action_controller.enable_fragment_cache_logging = true
25
-
26
- config.cache_store = :memory_store
27
- config.public_file_server.headers = {
28
- "Cache-Control" => "public, max-age=#{2.days.to_i}"
29
- }
30
- else
31
- config.action_controller.perform_caching = false
32
-
33
- config.cache_store = :null_store
34
- end
35
-
36
- # Store uploaded files on the local file system (see config/storage.yml for options).
37
- config.active_storage.service = :local
38
-
39
- # Don't care if the mailer can't send.
40
- config.action_mailer.raise_delivery_errors = false
41
-
42
- config.action_mailer.perform_caching = false
43
-
44
- # Print deprecation notices to the Rails logger.
45
- config.active_support.deprecation = :log
46
-
47
- # Raise exceptions for disallowed deprecations.
48
- config.active_support.disallowed_deprecation = :raise
49
-
50
- # Tell Active Support which deprecation messages to disallow.
51
- config.active_support.disallowed_deprecation_warnings = []
52
-
53
- # Raise an error on page load if there are pending migrations.
54
- config.active_record.migration_error = :page_load
55
-
56
- # Highlight code that triggered database queries in logs.
57
- config.active_record.verbose_query_logs = true
58
-
59
-
60
- # Raises error for missing translations.
61
- # config.i18n.raise_on_missing_translations = true
62
-
63
- # Annotate rendered view with file names.
64
- # config.action_view.annotate_rendered_view_with_filenames = true
65
-
66
- # Uncomment if you wish to allow Action Cable access from any origin.
67
- # config.action_cable.disable_request_forgery_protection = true
68
- end
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ Rails.application.configure do
4
+ # Settings specified here will take precedence over those in config/application.rb.
5
+
6
+ # In the development environment your application's code is reloaded any time
7
+ # it changes. This slows down response time but is perfect for development
8
+ # since you don't have to restart the web server when you make code changes.
9
+ config.cache_classes = false
10
+
11
+ # Do not eager load code on boot.
12
+ config.eager_load = false
13
+
14
+ # Show full error reports.
15
+ config.consider_all_requests_local = true
16
+
17
+ # Enable server timing
18
+ config.server_timing = true
19
+
20
+ # Enable/disable caching. By default caching is disabled.
21
+ # Run rails dev:cache to toggle caching.
22
+ if Rails.root.join("tmp/caching-dev.txt").exist?
23
+ config.action_controller.perform_caching = true
24
+ config.action_controller.enable_fragment_cache_logging = true
25
+
26
+ config.cache_store = :memory_store
27
+ config.public_file_server.headers = {
28
+ "Cache-Control" => "public, max-age=#{2.days.to_i}"
29
+ }
30
+ else
31
+ config.action_controller.perform_caching = false
32
+
33
+ config.cache_store = :null_store
34
+ end
35
+
36
+ # Store uploaded files on the local file system (see config/storage.yml for options).
37
+ config.active_storage.service = :local
38
+
39
+ # Don't care if the mailer can't send.
40
+ config.action_mailer.raise_delivery_errors = false
41
+
42
+ config.action_mailer.perform_caching = false
43
+
44
+ # Print deprecation notices to the Rails logger.
45
+ config.active_support.deprecation = :log
46
+
47
+ # Raise exceptions for disallowed deprecations.
48
+ config.active_support.disallowed_deprecation = :raise
49
+
50
+ # Tell Active Support which deprecation messages to disallow.
51
+ config.active_support.disallowed_deprecation_warnings = []
52
+
53
+ # Raise an error on page load if there are pending migrations.
54
+ config.active_record.migration_error = :page_load
55
+
56
+ # Highlight code that triggered database queries in logs.
57
+ config.active_record.verbose_query_logs = true
58
+
59
+
60
+ # Raises error for missing translations.
61
+ # config.i18n.raise_on_missing_translations = true
62
+
63
+ # Annotate rendered view with file names.
64
+ # config.action_view.annotate_rendered_view_with_filenames = true
65
+
66
+ # Uncomment if you wish to allow Action Cable access from any origin.
67
+ # config.action_cable.disable_request_forgery_protection = true
68
+ end
@@ -1,87 +1,87 @@
1
- require "active_support/core_ext/integer/time"
2
-
3
- Rails.application.configure do
4
- # Settings specified here will take precedence over those in config/application.rb.
5
-
6
- # Code is not reloaded between requests.
7
- config.cache_classes = true
8
-
9
- # Eager load code on boot. This eager loads most of Rails and
10
- # your application in memory, allowing both threaded web servers
11
- # and those relying on copy on write to perform better.
12
- # Rake tasks automatically ignore this option for performance.
13
- config.eager_load = true
14
-
15
- # Full error reports are disabled and caching is turned on.
16
- config.consider_all_requests_local = false
17
- config.action_controller.perform_caching = true
18
-
19
- # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
20
- # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
21
- # config.require_master_key = true
22
-
23
- # Disable serving static files from the `/public` folder by default since
24
- # Apache or NGINX already handles this.
25
- config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
26
-
27
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
28
- # config.asset_host = "http://assets.example.com"
29
-
30
- # Specifies the header that your server uses for sending files.
31
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
32
- # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
33
-
34
- # Store uploaded files on the local file system (see config/storage.yml for options).
35
- config.active_storage.service = :local
36
-
37
- # Mount Action Cable outside main process or domain.
38
- # config.action_cable.mount_path = nil
39
- # config.action_cable.url = "wss://example.com/cable"
40
- # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
41
-
42
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
- # config.force_ssl = true
44
-
45
- # Include generic and useful information about system operation, but avoid logging too much
46
- # information to avoid inadvertent exposure of personally identifiable information (PII).
47
- config.log_level = :info
48
-
49
- # Prepend all log lines with the following tags.
50
- config.log_tags = [ :request_id ]
51
-
52
- # Use a different cache store in production.
53
- # config.cache_store = :mem_cache_store
54
-
55
- # Use a real queuing backend for Active Job (and separate queues per environment).
56
- # config.active_job.queue_adapter = :resque
57
- # config.active_job.queue_name_prefix = "dummy_production"
58
-
59
- config.action_mailer.perform_caching = false
60
-
61
- # Ignore bad email addresses and do not raise email delivery errors.
62
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
63
- # config.action_mailer.raise_delivery_errors = false
64
-
65
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
66
- # the I18n.default_locale when a translation cannot be found).
67
- config.i18n.fallbacks = true
68
-
69
- # Don't log any deprecations.
70
- config.active_support.report_deprecations = false
71
-
72
- # Use default logging formatter so that PID and timestamp are not suppressed.
73
- config.log_formatter = ::Logger::Formatter.new
74
-
75
- # Use a different logger for distributed setups.
76
- # require "syslog/logger"
77
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
78
-
79
- if ENV["RAILS_LOG_TO_STDOUT"].present?
80
- logger = ActiveSupport::Logger.new(STDOUT)
81
- logger.formatter = config.log_formatter
82
- config.logger = ActiveSupport::TaggedLogging.new(logger)
83
- end
84
-
85
- # Do not dump schema after migrations.
86
- config.active_record.dump_schema_after_migration = false
87
- end
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ Rails.application.configure do
4
+ # Settings specified here will take precedence over those in config/application.rb.
5
+
6
+ # Code is not reloaded between requests.
7
+ config.cache_classes = true
8
+
9
+ # Eager load code on boot. This eager loads most of Rails and
10
+ # your application in memory, allowing both threaded web servers
11
+ # and those relying on copy on write to perform better.
12
+ # Rake tasks automatically ignore this option for performance.
13
+ config.eager_load = true
14
+
15
+ # Full error reports are disabled and caching is turned on.
16
+ config.consider_all_requests_local = false
17
+ config.action_controller.perform_caching = true
18
+
19
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
20
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
21
+ # config.require_master_key = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
26
+
27
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
28
+ # config.asset_host = "http://assets.example.com"
29
+
30
+ # Specifies the header that your server uses for sending files.
31
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
32
+ # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
33
+
34
+ # Store uploaded files on the local file system (see config/storage.yml for options).
35
+ config.active_storage.service = :local
36
+
37
+ # Mount Action Cable outside main process or domain.
38
+ # config.action_cable.mount_path = nil
39
+ # config.action_cable.url = "wss://example.com/cable"
40
+ # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
41
+
42
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
+ # config.force_ssl = true
44
+
45
+ # Include generic and useful information about system operation, but avoid logging too much
46
+ # information to avoid inadvertent exposure of personally identifiable information (PII).
47
+ config.log_level = :info
48
+
49
+ # Prepend all log lines with the following tags.
50
+ config.log_tags = [ :request_id ]
51
+
52
+ # Use a different cache store in production.
53
+ # config.cache_store = :mem_cache_store
54
+
55
+ # Use a real queuing backend for Active Job (and separate queues per environment).
56
+ # config.active_job.queue_adapter = :resque
57
+ # config.active_job.queue_name_prefix = "dummy_production"
58
+
59
+ config.action_mailer.perform_caching = false
60
+
61
+ # Ignore bad email addresses and do not raise email delivery errors.
62
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
63
+ # config.action_mailer.raise_delivery_errors = false
64
+
65
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
66
+ # the I18n.default_locale when a translation cannot be found).
67
+ config.i18n.fallbacks = true
68
+
69
+ # Don't log any deprecations.
70
+ config.active_support.report_deprecations = false
71
+
72
+ # Use default logging formatter so that PID and timestamp are not suppressed.
73
+ config.log_formatter = ::Logger::Formatter.new
74
+
75
+ # Use a different logger for distributed setups.
76
+ # require "syslog/logger"
77
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
78
+
79
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
80
+ logger = ActiveSupport::Logger.new(STDOUT)
81
+ logger.formatter = config.log_formatter
82
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
83
+ end
84
+
85
+ # Do not dump schema after migrations.
86
+ config.active_record.dump_schema_after_migration = false
87
+ end
@@ -1,60 +1,60 @@
1
- require "active_support/core_ext/integer/time"
2
-
3
- # The test environment is used exclusively to run your application's
4
- # test suite. You never need to work with it otherwise. Remember that
5
- # your test database is "scratch space" for the test suite and is wiped
6
- # and recreated between test runs. Don't rely on the data there!
7
-
8
- Rails.application.configure do
9
- # Settings specified here will take precedence over those in config/application.rb.
10
-
11
- # Turn false under Spring and add config.action_view.cache_template_loading = true.
12
- config.cache_classes = true
13
-
14
- # Eager loading loads your whole application. When running a single test locally,
15
- # this probably isn't necessary. It's a good idea to do in a continuous integration
16
- # system, or in some way before deploying your code.
17
- config.eager_load = ENV["CI"].present?
18
-
19
- # Configure public file server for tests with Cache-Control for performance.
20
- config.public_file_server.enabled = true
21
- config.public_file_server.headers = {
22
- "Cache-Control" => "public, max-age=#{1.hour.to_i}"
23
- }
24
-
25
- # Show full error reports and disable caching.
26
- config.consider_all_requests_local = true
27
- config.action_controller.perform_caching = false
28
- config.cache_store = :null_store
29
-
30
- # Raise exceptions instead of rendering exception templates.
31
- config.action_dispatch.show_exceptions = false
32
-
33
- # Disable request forgery protection in test environment.
34
- config.action_controller.allow_forgery_protection = false
35
-
36
- # Store uploaded files on the local file system in a temporary directory.
37
- config.active_storage.service = :test
38
-
39
- config.action_mailer.perform_caching = false
40
-
41
- # Tell Action Mailer not to deliver emails to the real world.
42
- # The :test delivery method accumulates sent emails in the
43
- # ActionMailer::Base.deliveries array.
44
- config.action_mailer.delivery_method = :test
45
-
46
- # Print deprecation notices to the stderr.
47
- config.active_support.deprecation = :stderr
48
-
49
- # Raise exceptions for disallowed deprecations.
50
- config.active_support.disallowed_deprecation = :raise
51
-
52
- # Tell Active Support which deprecation messages to disallow.
53
- config.active_support.disallowed_deprecation_warnings = []
54
-
55
- # Raises error for missing translations.
56
- # config.i18n.raise_on_missing_translations = true
57
-
58
- # Annotate rendered view with file names.
59
- # config.action_view.annotate_rendered_view_with_filenames = true
60
- end
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ # The test environment is used exclusively to run your application's
4
+ # test suite. You never need to work with it otherwise. Remember that
5
+ # your test database is "scratch space" for the test suite and is wiped
6
+ # and recreated between test runs. Don't rely on the data there!
7
+
8
+ Rails.application.configure do
9
+ # Settings specified here will take precedence over those in config/application.rb.
10
+
11
+ # Turn false under Spring and add config.action_view.cache_template_loading = true.
12
+ config.cache_classes = true
13
+
14
+ # Eager loading loads your whole application. When running a single test locally,
15
+ # this probably isn't necessary. It's a good idea to do in a continuous integration
16
+ # system, or in some way before deploying your code.
17
+ config.eager_load = ENV["CI"].present?
18
+
19
+ # Configure public file server for tests with Cache-Control for performance.
20
+ config.public_file_server.enabled = true
21
+ config.public_file_server.headers = {
22
+ "Cache-Control" => "public, max-age=#{1.hour.to_i}"
23
+ }
24
+
25
+ # Show full error reports and disable caching.
26
+ config.consider_all_requests_local = true
27
+ config.action_controller.perform_caching = false
28
+ config.cache_store = :null_store
29
+
30
+ # Raise exceptions instead of rendering exception templates.
31
+ config.action_dispatch.show_exceptions = false
32
+
33
+ # Disable request forgery protection in test environment.
34
+ config.action_controller.allow_forgery_protection = false
35
+
36
+ # Store uploaded files on the local file system in a temporary directory.
37
+ config.active_storage.service = :test
38
+
39
+ config.action_mailer.perform_caching = false
40
+
41
+ # Tell Action Mailer not to deliver emails to the real world.
42
+ # The :test delivery method accumulates sent emails in the
43
+ # ActionMailer::Base.deliveries array.
44
+ config.action_mailer.delivery_method = :test
45
+
46
+ # Print deprecation notices to the stderr.
47
+ config.active_support.deprecation = :stderr
48
+
49
+ # Raise exceptions for disallowed deprecations.
50
+ config.active_support.disallowed_deprecation = :raise
51
+
52
+ # Tell Active Support which deprecation messages to disallow.
53
+ config.active_support.disallowed_deprecation_warnings = []
54
+
55
+ # Raises error for missing translations.
56
+ # config.i18n.raise_on_missing_translations = true
57
+
58
+ # Annotate rendered view with file names.
59
+ # config.action_view.annotate_rendered_view_with_filenames = true
60
+ end
@@ -1,25 +1,25 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Define an application-wide content security policy.
4
- # See the Securing Rails Applications Guide for more information:
5
- # https://guides.rubyonrails.org/security.html#content-security-policy-header
6
-
7
- # Rails.application.configure do
8
- # config.content_security_policy do |policy|
9
- # policy.default_src :self, :https
10
- # policy.font_src :self, :https, :data
11
- # policy.img_src :self, :https, :data
12
- # policy.object_src :none
13
- # policy.script_src :self, :https
14
- # policy.style_src :self, :https
15
- # # Specify URI for violation reports
16
- # # policy.report_uri "/csp-violation-report-endpoint"
17
- # end
18
- #
19
- # # Generate session nonces for permitted importmap and inline scripts
20
- # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
- # config.content_security_policy_nonce_directives = %w(script-src)
22
- #
23
- # # Report violations without enforcing the policy.
24
- # # config.content_security_policy_report_only = true
25
- # end
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Define an application-wide content security policy.
4
+ # See the Securing Rails Applications Guide for more information:
5
+ # https://guides.rubyonrails.org/security.html#content-security-policy-header
6
+
7
+ # Rails.application.configure do
8
+ # config.content_security_policy do |policy|
9
+ # policy.default_src :self, :https
10
+ # policy.font_src :self, :https, :data
11
+ # policy.img_src :self, :https, :data
12
+ # policy.object_src :none
13
+ # policy.script_src :self, :https
14
+ # policy.style_src :self, :https
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+ #
19
+ # # Generate session nonces for permitted importmap and inline scripts
20
+ # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
+ # config.content_security_policy_nonce_directives = %w(script-src)
22
+ #
23
+ # # Report violations without enforcing the policy.
24
+ # # config.content_security_policy_report_only = true
25
+ # end
@@ -1,8 +1,8 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Configure parameters to be filtered from the log file. Use this to limit dissemination of
4
- # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5
- # notations and behaviors.
6
- Rails.application.config.filter_parameters += [
7
- :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8
- ]
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure parameters to be filtered from the log file. Use this to limit dissemination of
4
+ # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5
+ # notations and behaviors.
6
+ Rails.application.config.filter_parameters += [
7
+ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8
+ ]
@@ -1,16 +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
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
@@ -1,11 +1,11 @@
1
- # Define an application-wide HTTP permissions policy. For further
2
- # information see https://developers.google.com/web/updates/2018/06/feature-policy
3
- #
4
- # Rails.application.config.permissions_policy do |f|
5
- # f.camera :none
6
- # f.gyroscope :none
7
- # f.microphone :none
8
- # f.usb :none
9
- # f.fullscreen :self
10
- # f.payment :self, "https://secure.example.com"
11
- # end
1
+ # Define an application-wide HTTP permissions policy. For further
2
+ # information see https://developers.google.com/web/updates/2018/06/feature-policy
3
+ #
4
+ # Rails.application.config.permissions_policy do |f|
5
+ # f.camera :none
6
+ # f.gyroscope :none
7
+ # f.microphone :none
8
+ # f.usb :none
9
+ # f.fullscreen :self
10
+ # f.payment :self, "https://secure.example.com"
11
+ # end