active_sort_order 0.9.3 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/active_sort_order/concerns/sort_order_concern.rb +10 -8
- data/lib/active_sort_order/version.rb +1 -1
- data/lib/active_sort_order.rb +10 -6
- metadata +21 -81
- data/test/dummy_app/Rakefile +0 -7
- data/test/dummy_app/app/assets/config/manifest.js +0 -3
- data/test/dummy_app/app/assets/javascripts/application.js +0 -0
- data/test/dummy_app/app/assets/stylesheets/application.css +0 -3
- data/test/dummy_app/app/controllers/application_controller.rb +0 -3
- data/test/dummy_app/app/models/application_record.rb +0 -3
- data/test/dummy_app/app/models/post.rb +0 -3
- data/test/dummy_app/app/models/post_with_base_order_a.rb +0 -7
- data/test/dummy_app/app/models/post_with_base_order_a_and_b.rb +0 -7
- data/test/dummy_app/app/models/post_with_base_order_b.rb +0 -7
- data/test/dummy_app/app/models/post_with_base_order_b_and_a.rb +0 -7
- data/test/dummy_app/app/models/post_with_volatile_base_order.rb +0 -7
- data/test/dummy_app/app/views/layouts/application.html.erb +0 -14
- data/test/dummy_app/config/application.rb +0 -61
- data/test/dummy_app/config/boot.rb +0 -10
- data/test/dummy_app/config/database.yml +0 -20
- data/test/dummy_app/config/environment.rb +0 -5
- data/test/dummy_app/config/environments/development.rb +0 -30
- data/test/dummy_app/config/environments/production.rb +0 -60
- data/test/dummy_app/config/environments/test.rb +0 -41
- data/test/dummy_app/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy_app/config/initializers/inflections.rb +0 -10
- data/test/dummy_app/config/initializers/mime_types.rb +0 -5
- data/test/dummy_app/config/initializers/secret_token.rb +0 -11
- data/test/dummy_app/config/initializers/session_store.rb +0 -8
- data/test/dummy_app/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy_app/config/locales/en.yml +0 -5
- data/test/dummy_app/config/routes.rb +0 -6
- data/test/dummy_app/config/secrets.yml +0 -22
- data/test/dummy_app/config.ru +0 -4
- data/test/dummy_app/db/migrate/20210128155312_set_up_test_tables.rb +0 -15
- data/test/dummy_app/db/schema.rb +0 -19
- data/test/dummy_app/db/test.sqlite3 +0 -0
- data/test/dummy_app/log/test.log +0 -542
- data/test/test_helper.rb +0 -63
- data/test/unit/active_sort_order_test.rb +0 -144
- data/test/unit/errors_test.rb +0 -204
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68b479e45f72781c942d78e9dd674aa20d7ffbe64ada0161130e25cff7457295
|
4
|
+
data.tar.gz: c6d790fdb37f946309f3b4b1e80c4df2f8a23506d2dbd2478d5b3a4e0439013b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d07855e61648d6aa7a60bf08e1a2f07131a3fc3f4af214fe43d9789622a101e5f746294f0565bdc43dba644810afc782fcc536506ece25cc956490874dcfb8c
|
7
|
+
data.tar.gz: facdbf2c5e92d98801af73ea81bca3ff08fdb04d3ea1f358bbeef8e98611f4376563d97731179be94e0beb2d198a3b0c33975111598c3e25987a3f370d5facb5
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
---------
|
3
3
|
|
4
|
-
- **Unreleased - [View Diff](https://github.com/westonganger/active_sort_order/compare/v0.9.
|
4
|
+
- **Unreleased - [View Diff](https://github.com/westonganger/active_sort_order/compare/v0.9.5...master)**
|
5
|
+
* Nothing yet
|
6
|
+
|
7
|
+
- **v0.9.5 - Feb 13, 2023 - [View Diff](https://github.com/westonganger/active_sort_order/compare/v0.9.4...v0.9.5)**
|
8
|
+
* [#1](https://github.com/westonganger/active_sort_order/pull/1) - Utilize active_record lazy loading
|
9
|
+
|
10
|
+
- **v0.9.4 - Dec 20, 2021 - [View Diff](https://github.com/westonganger/active_sort_order/compare/v0.9.3...v0.9.4)**
|
11
|
+
* Improve error handling for sort_col_sql argument
|
12
|
+
|
13
|
+
- **v0.9.3 - Oct 13, 2021 - [View Diff](https://github.com/westonganger/active_sort_order/compare/v0.9.2...v0.9.3)**
|
5
14
|
* Allow ability to sort on multiple fields
|
6
15
|
|
7
16
|
- **v0.9.2 - Apr 28, 2021 - [View Diff](https://github.com/westonganger/active_sort_order/compare/v0.9.1...v0.9.2)**
|
@@ -5,13 +5,19 @@ module ActiveSortOrder
|
|
5
5
|
included do
|
6
6
|
|
7
7
|
scope :sort_order, ->(sort_col_sql = nil, sort_direction_sql = nil, base_sort_order: true){
|
8
|
-
if sort_col_sql.
|
9
|
-
|
10
|
-
|
8
|
+
if !sort_col_sql.is_a?(Array)
|
9
|
+
sort_col_sql = [sort_col_sql].compact
|
10
|
+
end
|
11
|
+
|
12
|
+
sort_col_sql.each_with_index do |x, i|
|
13
|
+
if [String, Symbol].exclude?(x.class)
|
14
|
+
raise ArgumentError.new("Invalid first argument `sort_col_sql`, expecting a String or Symbol or Array")
|
11
15
|
else
|
12
|
-
sort_col_sql =
|
16
|
+
sort_col_sql[i] = x.to_s
|
13
17
|
end
|
18
|
+
end
|
14
19
|
|
20
|
+
if sort_col_sql.present?
|
15
21
|
### SORT DIRECTION HANDLING
|
16
22
|
if sort_direction_sql.is_a?(Symbol)
|
17
23
|
sort_direction_sql = sort_direction_sql.to_s.gsub('_', ' ')
|
@@ -41,10 +47,6 @@ module ActiveSortOrder
|
|
41
47
|
end
|
42
48
|
end
|
43
49
|
|
44
|
-
if !sort_col_sql.is_a?(Array)
|
45
|
-
sort_col_sql = [sort_col_sql]
|
46
|
-
end
|
47
|
-
|
48
50
|
sql_str = sort_col_sql.map{|x| "#{x} #{sort_direction_sql}" }.join(", ")
|
49
51
|
end
|
50
52
|
|
data/lib/active_sort_order.rb
CHANGED
@@ -1,11 +1,15 @@
|
|
1
|
-
require "
|
1
|
+
require "active_sort_order/version"
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "active_support/lazy_load_hooks"
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
ActiveSupport.on_load(:active_record) do
|
6
|
+
require "active_sort_order/concerns/sort_order_concern"
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
module ActiveSortOrder
|
9
|
+
extend ActiveSupport::Concern
|
10
|
+
|
11
|
+
included do
|
12
|
+
include ActiveSortOrder::SortOrderConcern
|
13
|
+
end
|
10
14
|
end
|
11
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_sort_order
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Weston Ganger
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: appraisal
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: The "easy-peasy" dynamic sorting pattern for ActiveRecord that your Rails
|
28
42
|
apps deserve.
|
29
43
|
email:
|
@@ -39,50 +53,13 @@ files:
|
|
39
53
|
- lib/active_sort_order.rb
|
40
54
|
- lib/active_sort_order/concerns/sort_order_concern.rb
|
41
55
|
- lib/active_sort_order/version.rb
|
42
|
-
- test/dummy_app/Rakefile
|
43
|
-
- test/dummy_app/app/assets/config/manifest.js
|
44
|
-
- test/dummy_app/app/assets/javascripts/application.js
|
45
|
-
- test/dummy_app/app/assets/stylesheets/application.css
|
46
|
-
- test/dummy_app/app/controllers/application_controller.rb
|
47
|
-
- test/dummy_app/app/models/application_record.rb
|
48
|
-
- test/dummy_app/app/models/post.rb
|
49
|
-
- test/dummy_app/app/models/post_with_base_order_a.rb
|
50
|
-
- test/dummy_app/app/models/post_with_base_order_a_and_b.rb
|
51
|
-
- test/dummy_app/app/models/post_with_base_order_b.rb
|
52
|
-
- test/dummy_app/app/models/post_with_base_order_b_and_a.rb
|
53
|
-
- test/dummy_app/app/models/post_with_volatile_base_order.rb
|
54
|
-
- test/dummy_app/app/views/layouts/application.html.erb
|
55
|
-
- test/dummy_app/config.ru
|
56
|
-
- test/dummy_app/config/application.rb
|
57
|
-
- test/dummy_app/config/boot.rb
|
58
|
-
- test/dummy_app/config/database.yml
|
59
|
-
- test/dummy_app/config/environment.rb
|
60
|
-
- test/dummy_app/config/environments/development.rb
|
61
|
-
- test/dummy_app/config/environments/production.rb
|
62
|
-
- test/dummy_app/config/environments/test.rb
|
63
|
-
- test/dummy_app/config/initializers/backtrace_silencers.rb
|
64
|
-
- test/dummy_app/config/initializers/inflections.rb
|
65
|
-
- test/dummy_app/config/initializers/mime_types.rb
|
66
|
-
- test/dummy_app/config/initializers/secret_token.rb
|
67
|
-
- test/dummy_app/config/initializers/session_store.rb
|
68
|
-
- test/dummy_app/config/initializers/wrap_parameters.rb
|
69
|
-
- test/dummy_app/config/locales/en.yml
|
70
|
-
- test/dummy_app/config/routes.rb
|
71
|
-
- test/dummy_app/config/secrets.yml
|
72
|
-
- test/dummy_app/db/migrate/20210128155312_set_up_test_tables.rb
|
73
|
-
- test/dummy_app/db/schema.rb
|
74
|
-
- test/dummy_app/db/test.sqlite3
|
75
|
-
- test/dummy_app/log/test.log
|
76
|
-
- test/test_helper.rb
|
77
|
-
- test/unit/active_sort_order_test.rb
|
78
|
-
- test/unit/errors_test.rb
|
79
56
|
homepage: https://github.com/westonganger/active_sort_order
|
80
57
|
licenses:
|
81
58
|
- MIT
|
82
59
|
metadata:
|
83
60
|
source_code_uri: https://github.com/westonganger/active_sort_order
|
84
61
|
changelog_uri: https://github.com/westonganger/active_sort_order/blob/master/CHANGELOG.md
|
85
|
-
post_install_message:
|
62
|
+
post_install_message:
|
86
63
|
rdoc_options: []
|
87
64
|
require_paths:
|
88
65
|
- lib
|
@@ -97,46 +74,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
74
|
- !ruby/object:Gem::Version
|
98
75
|
version: '0'
|
99
76
|
requirements: []
|
100
|
-
rubygems_version: 3.
|
101
|
-
signing_key:
|
77
|
+
rubygems_version: 3.3.7
|
78
|
+
signing_key:
|
102
79
|
specification_version: 4
|
103
80
|
summary: The "easy-peasy" dynamic sorting pattern for ActiveRecord that your Rails
|
104
81
|
apps deserve.
|
105
|
-
test_files:
|
106
|
-
- test/unit/active_sort_order_test.rb
|
107
|
-
- test/unit/errors_test.rb
|
108
|
-
- test/test_helper.rb
|
109
|
-
- test/dummy_app/app/models/post_with_base_order_b_and_a.rb
|
110
|
-
- test/dummy_app/app/models/post_with_base_order_a.rb
|
111
|
-
- test/dummy_app/app/models/post_with_base_order_a_and_b.rb
|
112
|
-
- test/dummy_app/app/models/post_with_volatile_base_order.rb
|
113
|
-
- test/dummy_app/app/models/post_with_base_order_b.rb
|
114
|
-
- test/dummy_app/app/models/application_record.rb
|
115
|
-
- test/dummy_app/app/models/post.rb
|
116
|
-
- test/dummy_app/app/controllers/application_controller.rb
|
117
|
-
- test/dummy_app/app/views/layouts/application.html.erb
|
118
|
-
- test/dummy_app/app/assets/config/manifest.js
|
119
|
-
- test/dummy_app/app/assets/javascripts/application.js
|
120
|
-
- test/dummy_app/app/assets/stylesheets/application.css
|
121
|
-
- test/dummy_app/config/secrets.yml
|
122
|
-
- test/dummy_app/config/routes.rb
|
123
|
-
- test/dummy_app/config/locales/en.yml
|
124
|
-
- test/dummy_app/config/environments/production.rb
|
125
|
-
- test/dummy_app/config/environments/development.rb
|
126
|
-
- test/dummy_app/config/environments/test.rb
|
127
|
-
- test/dummy_app/config/environment.rb
|
128
|
-
- test/dummy_app/config/application.rb
|
129
|
-
- test/dummy_app/config/database.yml
|
130
|
-
- test/dummy_app/config/boot.rb
|
131
|
-
- test/dummy_app/config/initializers/backtrace_silencers.rb
|
132
|
-
- test/dummy_app/config/initializers/mime_types.rb
|
133
|
-
- test/dummy_app/config/initializers/session_store.rb
|
134
|
-
- test/dummy_app/config/initializers/wrap_parameters.rb
|
135
|
-
- test/dummy_app/config/initializers/secret_token.rb
|
136
|
-
- test/dummy_app/config/initializers/inflections.rb
|
137
|
-
- test/dummy_app/config.ru
|
138
|
-
- test/dummy_app/Rakefile
|
139
|
-
- test/dummy_app/db/schema.rb
|
140
|
-
- test/dummy_app/db/test.sqlite3
|
141
|
-
- test/dummy_app/db/migrate/20210128155312_set_up_test_tables.rb
|
142
|
-
- test/dummy_app/log/test.log
|
82
|
+
test_files: []
|
data/test/dummy_app/Rakefile
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
-
|
5
|
-
require File.expand_path('../config/application', __FILE__)
|
6
|
-
|
7
|
-
Dummy::Application.load_tasks
|
File without changes
|
@@ -1,61 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
Bundler.require
|
6
|
-
|
7
|
-
module Dummy
|
8
|
-
class Application < Rails::Application
|
9
|
-
# Settings in config/environments/* take precedence over those specified here.
|
10
|
-
# Application configuration should go into files in config/initializers
|
11
|
-
# -- all .rb files in that directory are automatically loaded.
|
12
|
-
|
13
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
14
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
15
|
-
|
16
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
17
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
18
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
19
|
-
|
20
|
-
# Activate observers that should always be running.
|
21
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
22
|
-
|
23
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
24
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
25
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
26
|
-
|
27
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
28
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
29
|
-
# config.i18n.default_locale = :de
|
30
|
-
|
31
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
32
|
-
config.encoding = "utf-8"
|
33
|
-
|
34
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
35
|
-
config.filter_parameters += [:password]
|
36
|
-
|
37
|
-
# Enable the asset pipeline
|
38
|
-
config.assets.enabled = true
|
39
|
-
|
40
|
-
config.assets.quiet = true
|
41
|
-
|
42
|
-
# Version of your assets, change this if you want to expire all your assets
|
43
|
-
config.assets.version = '1.0'
|
44
|
-
|
45
|
-
config.generators.test_framework = false
|
46
|
-
config.generators.helper = false
|
47
|
-
config.generators.stylesheets = false
|
48
|
-
config.generators.javascripts = false
|
49
|
-
|
50
|
-
config.after_initialize do
|
51
|
-
ActiveRecord::Migration.migrate(Rails.root.join("db/migrate/*").to_s)
|
52
|
-
end
|
53
|
-
|
54
|
-
if ActiveRecord.respond_to?(:gem_version)
|
55
|
-
gem_version = ActiveRecord.gem_version
|
56
|
-
if gem_version.to_s.start_with?("5.2.")
|
57
|
-
config.active_record.sqlite3.represent_boolean_as_integer = true
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
default: &default
|
2
|
-
<% if defined?(SQLite3) %>
|
3
|
-
adapter: sqlite3
|
4
|
-
database: db/test.sqlite3
|
5
|
-
|
6
|
-
<% elsif defined?(Mysql2) %>
|
7
|
-
adapter: mysql2
|
8
|
-
database: active_sort_order_test
|
9
|
-
|
10
|
-
<% elsif defined?(PG) %>
|
11
|
-
adapter: postgresql
|
12
|
-
database: active_sort_order_test
|
13
|
-
|
14
|
-
<% end %>
|
15
|
-
|
16
|
-
development:
|
17
|
-
<<: *default
|
18
|
-
|
19
|
-
test:
|
20
|
-
<<: *default
|
@@ -1,30 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
10
|
-
config.whiny_nils = true
|
11
|
-
|
12
|
-
# Show full error reports and disable caching
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
|
16
|
-
# Don't care if the mailer can't send
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
18
|
-
|
19
|
-
# Print deprecation notices to the Rails logger
|
20
|
-
config.active_support.deprecation = :log
|
21
|
-
|
22
|
-
# Only use best-standards-support built into browsers
|
23
|
-
config.action_dispatch.best_standards_support = :builtin
|
24
|
-
|
25
|
-
# Do not compress assets
|
26
|
-
config.assets.compress = false
|
27
|
-
|
28
|
-
# Expands the lines which load the assets
|
29
|
-
config.assets.debug = true
|
30
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
Dummy::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
|
-
# Full error reports are disabled and caching is turned on
|
8
|
-
config.consider_all_requests_local = false
|
9
|
-
config.action_controller.perform_caching = true
|
10
|
-
|
11
|
-
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
-
config.serve_static_files = false
|
13
|
-
|
14
|
-
# Compress JavaScripts and CSS
|
15
|
-
config.assets.compress = true
|
16
|
-
|
17
|
-
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
-
config.assets.compile = false
|
19
|
-
|
20
|
-
# Generate digests for assets URLs
|
21
|
-
config.assets.digest = true
|
22
|
-
|
23
|
-
# Defaults to Rails.root.join("public/assets")
|
24
|
-
# config.assets.manifest = YOUR_PATH
|
25
|
-
|
26
|
-
# Specifies the header that your server uses for sending files
|
27
|
-
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
-
|
30
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
-
# config.force_ssl = true
|
32
|
-
|
33
|
-
# See everything in the log (default is :info)
|
34
|
-
# config.log_level = :debug
|
35
|
-
|
36
|
-
# Use a different logger for distributed setups
|
37
|
-
# config.logger = SyslogLogger.new
|
38
|
-
|
39
|
-
# Use a different cache store in production
|
40
|
-
# config.cache_store = :mem_cache_store
|
41
|
-
|
42
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
43
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
44
|
-
|
45
|
-
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
46
|
-
# config.assets.precompile += %w( search.js )
|
47
|
-
|
48
|
-
# Disable delivery errors, bad email addresses will be ignored
|
49
|
-
# config.action_mailer.raise_delivery_errors = false
|
50
|
-
|
51
|
-
# Enable threaded mode
|
52
|
-
# config.threadsafe!
|
53
|
-
|
54
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
55
|
-
# the I18n.default_locale when a translation can not be found)
|
56
|
-
config.i18n.fallbacks = true
|
57
|
-
|
58
|
-
# Send deprecation notices to registered listeners
|
59
|
-
config.active_support.deprecation = :notify
|
60
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
Dummy::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
|
-
# Configure static asset server for tests with Cache-Control for performance
|
11
|
-
config.serve_static_files = true
|
12
|
-
config.public_file_server.enabled = true
|
13
|
-
|
14
|
-
# Log error messages when you accidentally call methods on nil
|
15
|
-
config.whiny_nils = true
|
16
|
-
|
17
|
-
# Show full error reports and disable caching
|
18
|
-
config.consider_all_requests_local = true
|
19
|
-
config.action_controller.perform_caching = false
|
20
|
-
|
21
|
-
# Raise exceptions instead of rendering exception templates
|
22
|
-
config.action_dispatch.show_exceptions = false
|
23
|
-
|
24
|
-
# Disable request forgery protection in test environment
|
25
|
-
config.action_controller.allow_forgery_protection = false
|
26
|
-
|
27
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
-
# The :test delivery method accumulates sent emails in the
|
29
|
-
# ActionMailer::Base.deliveries array.
|
30
|
-
config.action_mailer.delivery_method = :test
|
31
|
-
|
32
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
33
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
34
|
-
# like if you have constraints or database-specific column types
|
35
|
-
# config.active_record.schema_format = :sql
|
36
|
-
|
37
|
-
# Print deprecation notices to the stderr
|
38
|
-
config.active_support.deprecation = :stderr
|
39
|
-
|
40
|
-
config.eager_load = false
|
41
|
-
end
|
@@ -1,7 +0,0 @@
|
|
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!
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
# (all these examples are active by default):
|
5
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
8
|
-
# inflect.irregular 'person', 'people'
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
10
|
-
# end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
# Make sure the secret is at least 30 characters and all random,
|
6
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
|
8
|
-
gem_version = ActiveRecord.gem_version
|
9
|
-
if gem_version <= Gem::Version.new("5.1")
|
10
|
-
Dummy::Application.config.secret_token = '4f337f0063fbb4a724dd8da15419679300da990ae4f6c94d36c714a3cd07e9653fc42d902cf33a9b9449a28e7eb2673f928172d65a090fa3c9156d6beea8d16c'
|
11
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
-
|
5
|
-
# Use the database for sessions instead of the cookie-based default,
|
6
|
-
# which shouldn't be used to store highly confidential information
|
7
|
-
# (create the session table with "rails generate session_migration")
|
8
|
-
# Dummy::Application.config.session_store :active_record_store
|
@@ -1,14 +0,0 @@
|
|
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
|
-
# Disable root element in JSON by default.
|
12
|
-
ActiveSupport.on_load(:active_record) do
|
13
|
-
self.include_root_in_json = false
|
14
|
-
end
|