friendly_id-method_scopes 0.1.7 → 0.1.8
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 +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +4 -1
- data/Gemfile +5 -4
- data/VERSION +1 -1
- data/coverage/.resultset.json +84 -157
- data/friendly_id-method_scopes.gemspec +61 -53
- data/spec/controllers/authors_controller_spec.rb +1 -1
- data/spec/controllers/books_controller_spec.rb +4 -2
- data/spec/dummy/bin/setup +17 -12
- data/spec/dummy/bin/update +29 -0
- data/spec/dummy/config/application.rb +3 -5
- data/spec/dummy/config/cable.yml +9 -0
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/environments/development.rb +24 -11
- data/spec/dummy/config/environments/test.rb +6 -6
- data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +2 -0
- data/spec/dummy/config/initializers/new_framework_defaults.rb +23 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/spec/dummy/config/puma.rb +47 -0
- data/spec/dummy/config/secrets.yml +3 -3
- data/spec/dummy/db/schema.rb +4 -7
- data/spec/dummy/db/test.sqlite3 +0 -0
- metadata +37 -12
- data/spec/dummy/config/environments/production.rb +0 -79
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: friendly_id-method_scopes 0.1.
|
|
5
|
+
# stub: friendly_id-method_scopes 0.1.8 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
|
-
s.name = "friendly_id-method_scopes"
|
|
9
|
-
s.version = "0.1.
|
|
8
|
+
s.name = "friendly_id-method_scopes".freeze
|
|
9
|
+
s.version = "0.1.8"
|
|
10
10
|
|
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
|
-
s.require_paths = ["lib"]
|
|
13
|
-
s.authors = ["Karen Lundgren"]
|
|
14
|
-
s.date = "
|
|
15
|
-
s.description = "FriendlyId Extension to allow method scopes, in addition to column and relationship scopes."
|
|
16
|
-
s.email = "karen.e.lundgren@gmail.com"
|
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
12
|
+
s.require_paths = ["lib".freeze]
|
|
13
|
+
s.authors = ["Karen Lundgren".freeze]
|
|
14
|
+
s.date = "2017-04-16"
|
|
15
|
+
s.description = "FriendlyId Extension to allow method scopes, in addition to column and relationship scopes.".freeze
|
|
16
|
+
s.email = "karen.e.lundgren@gmail.com".freeze
|
|
17
17
|
s.extra_rdoc_files = [
|
|
18
18
|
"README.rdoc"
|
|
19
19
|
]
|
|
@@ -55,24 +55,28 @@ Gem::Specification.new do |s|
|
|
|
55
55
|
"spec/dummy/bin/rails",
|
|
56
56
|
"spec/dummy/bin/rake",
|
|
57
57
|
"spec/dummy/bin/setup",
|
|
58
|
+
"spec/dummy/bin/update",
|
|
58
59
|
"spec/dummy/config.ru",
|
|
59
60
|
"spec/dummy/config/application.rb",
|
|
60
61
|
"spec/dummy/config/boot.rb",
|
|
62
|
+
"spec/dummy/config/cable.yml",
|
|
61
63
|
"spec/dummy/config/database.yml",
|
|
62
64
|
"spec/dummy/config/environment.rb",
|
|
63
65
|
"spec/dummy/config/environments/development.rb",
|
|
64
|
-
"spec/dummy/config/environments/production.rb",
|
|
65
66
|
"spec/dummy/config/environments/test.rb",
|
|
67
|
+
"spec/dummy/config/initializers/application_controller_renderer.rb",
|
|
66
68
|
"spec/dummy/config/initializers/assets.rb",
|
|
67
69
|
"spec/dummy/config/initializers/backtrace_silencers.rb",
|
|
68
70
|
"spec/dummy/config/initializers/cookies_serializer.rb",
|
|
69
71
|
"spec/dummy/config/initializers/filter_parameter_logging.rb",
|
|
70
72
|
"spec/dummy/config/initializers/inflections.rb",
|
|
71
73
|
"spec/dummy/config/initializers/mime_types.rb",
|
|
74
|
+
"spec/dummy/config/initializers/new_framework_defaults.rb",
|
|
72
75
|
"spec/dummy/config/initializers/rolify.rb",
|
|
73
76
|
"spec/dummy/config/initializers/session_store.rb",
|
|
74
77
|
"spec/dummy/config/initializers/wrap_parameters.rb",
|
|
75
78
|
"spec/dummy/config/locales/en.yml",
|
|
79
|
+
"spec/dummy/config/puma.rb",
|
|
76
80
|
"spec/dummy/config/routes.rb",
|
|
77
81
|
"spec/dummy/config/secrets.yml",
|
|
78
82
|
"spec/dummy/db/migrate/20150621221655_create_books.rb",
|
|
@@ -82,6 +86,7 @@ Gem::Specification.new do |s|
|
|
|
82
86
|
"spec/dummy/db/seeds.rb",
|
|
83
87
|
"spec/dummy/db/seeds/authors.seeds.rb",
|
|
84
88
|
"spec/dummy/db/seeds/books.seeds.rb",
|
|
89
|
+
"spec/dummy/db/test.sqlite3",
|
|
85
90
|
"spec/dummy/lib/assets/.keep",
|
|
86
91
|
"spec/dummy/log/.keep",
|
|
87
92
|
"spec/dummy/public/404.html",
|
|
@@ -99,57 +104,60 @@ Gem::Specification.new do |s|
|
|
|
99
104
|
"spec/support/authors.rb",
|
|
100
105
|
"spec/support/books_with_authors.rb"
|
|
101
106
|
]
|
|
102
|
-
s.homepage = "http://www.gemvein.com/museum/cases/friendly_id-method_scopes"
|
|
103
|
-
s.licenses = ["MIT"]
|
|
104
|
-
s.rubygems_version = "2.
|
|
105
|
-
s.summary = "FriendlyId Extension to allow method scopes."
|
|
107
|
+
s.homepage = "http://www.gemvein.com/museum/cases/friendly_id-method_scopes".freeze
|
|
108
|
+
s.licenses = ["MIT".freeze]
|
|
109
|
+
s.rubygems_version = "2.6.11".freeze
|
|
110
|
+
s.summary = "FriendlyId Extension to allow method scopes.".freeze
|
|
106
111
|
|
|
107
112
|
if s.respond_to? :specification_version then
|
|
108
113
|
s.specification_version = 4
|
|
109
114
|
|
|
110
115
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
111
|
-
s.add_runtime_dependency(%q<rails
|
|
112
|
-
s.add_runtime_dependency(%q<friendly_id
|
|
113
|
-
s.add_runtime_dependency(%q<jeweler
|
|
114
|
-
s.add_runtime_dependency(%q<coveralls
|
|
115
|
-
s.add_development_dependency(%q<sqlite3
|
|
116
|
-
s.add_development_dependency(%q<rspec-rails
|
|
117
|
-
s.add_development_dependency(%q<shoulda-matchers
|
|
118
|
-
s.add_development_dependency(%q<rolify
|
|
119
|
-
s.add_development_dependency(%q<seedbank
|
|
120
|
-
s.add_development_dependency(%q<factory_girl_rails
|
|
121
|
-
s.add_development_dependency(%q<faker
|
|
122
|
-
s.add_development_dependency(%q<haml
|
|
123
|
-
s.add_development_dependency(%q<database_cleaner
|
|
116
|
+
s.add_runtime_dependency(%q<rails>.freeze, ["< 6", ">= 4"])
|
|
117
|
+
s.add_runtime_dependency(%q<friendly_id>.freeze, [">= 5"])
|
|
118
|
+
s.add_runtime_dependency(%q<jeweler>.freeze, ["~> 2"])
|
|
119
|
+
s.add_runtime_dependency(%q<coveralls>.freeze, ["~> 0.8"])
|
|
120
|
+
s.add_development_dependency(%q<sqlite3>.freeze, ["~> 1"])
|
|
121
|
+
s.add_development_dependency(%q<rspec-rails>.freeze, ["~> 3.3"])
|
|
122
|
+
s.add_development_dependency(%q<shoulda-matchers>.freeze, [">= 2.8"])
|
|
123
|
+
s.add_development_dependency(%q<rolify>.freeze, [">= 4"])
|
|
124
|
+
s.add_development_dependency(%q<seedbank>.freeze, ["~> 0.3"])
|
|
125
|
+
s.add_development_dependency(%q<factory_girl_rails>.freeze, ["~> 4.5"])
|
|
126
|
+
s.add_development_dependency(%q<faker>.freeze, ["~> 1.4"])
|
|
127
|
+
s.add_development_dependency(%q<haml>.freeze, ["~> 4"])
|
|
128
|
+
s.add_development_dependency(%q<database_cleaner>.freeze, ["~> 1.4"])
|
|
129
|
+
s.add_development_dependency(%q<rails-controller-testing>.freeze, [">= 1"])
|
|
124
130
|
else
|
|
125
|
-
s.add_dependency(%q<rails
|
|
126
|
-
s.add_dependency(%q<friendly_id
|
|
127
|
-
s.add_dependency(%q<jeweler
|
|
128
|
-
s.add_dependency(%q<coveralls
|
|
129
|
-
s.add_dependency(%q<sqlite3
|
|
130
|
-
s.add_dependency(%q<rspec-rails
|
|
131
|
-
s.add_dependency(%q<shoulda-matchers
|
|
132
|
-
s.add_dependency(%q<rolify
|
|
133
|
-
s.add_dependency(%q<seedbank
|
|
134
|
-
s.add_dependency(%q<factory_girl_rails
|
|
135
|
-
s.add_dependency(%q<faker
|
|
136
|
-
s.add_dependency(%q<haml
|
|
137
|
-
s.add_dependency(%q<database_cleaner
|
|
131
|
+
s.add_dependency(%q<rails>.freeze, ["< 6", ">= 4"])
|
|
132
|
+
s.add_dependency(%q<friendly_id>.freeze, [">= 5"])
|
|
133
|
+
s.add_dependency(%q<jeweler>.freeze, ["~> 2"])
|
|
134
|
+
s.add_dependency(%q<coveralls>.freeze, ["~> 0.8"])
|
|
135
|
+
s.add_dependency(%q<sqlite3>.freeze, ["~> 1"])
|
|
136
|
+
s.add_dependency(%q<rspec-rails>.freeze, ["~> 3.3"])
|
|
137
|
+
s.add_dependency(%q<shoulda-matchers>.freeze, [">= 2.8"])
|
|
138
|
+
s.add_dependency(%q<rolify>.freeze, [">= 4"])
|
|
139
|
+
s.add_dependency(%q<seedbank>.freeze, ["~> 0.3"])
|
|
140
|
+
s.add_dependency(%q<factory_girl_rails>.freeze, ["~> 4.5"])
|
|
141
|
+
s.add_dependency(%q<faker>.freeze, ["~> 1.4"])
|
|
142
|
+
s.add_dependency(%q<haml>.freeze, ["~> 4"])
|
|
143
|
+
s.add_dependency(%q<database_cleaner>.freeze, ["~> 1.4"])
|
|
144
|
+
s.add_dependency(%q<rails-controller-testing>.freeze, [">= 1"])
|
|
138
145
|
end
|
|
139
146
|
else
|
|
140
|
-
s.add_dependency(%q<rails
|
|
141
|
-
s.add_dependency(%q<friendly_id
|
|
142
|
-
s.add_dependency(%q<jeweler
|
|
143
|
-
s.add_dependency(%q<coveralls
|
|
144
|
-
s.add_dependency(%q<sqlite3
|
|
145
|
-
s.add_dependency(%q<rspec-rails
|
|
146
|
-
s.add_dependency(%q<shoulda-matchers
|
|
147
|
-
s.add_dependency(%q<rolify
|
|
148
|
-
s.add_dependency(%q<seedbank
|
|
149
|
-
s.add_dependency(%q<factory_girl_rails
|
|
150
|
-
s.add_dependency(%q<faker
|
|
151
|
-
s.add_dependency(%q<haml
|
|
152
|
-
s.add_dependency(%q<database_cleaner
|
|
147
|
+
s.add_dependency(%q<rails>.freeze, ["< 6", ">= 4"])
|
|
148
|
+
s.add_dependency(%q<friendly_id>.freeze, [">= 5"])
|
|
149
|
+
s.add_dependency(%q<jeweler>.freeze, ["~> 2"])
|
|
150
|
+
s.add_dependency(%q<coveralls>.freeze, ["~> 0.8"])
|
|
151
|
+
s.add_dependency(%q<sqlite3>.freeze, ["~> 1"])
|
|
152
|
+
s.add_dependency(%q<rspec-rails>.freeze, ["~> 3.3"])
|
|
153
|
+
s.add_dependency(%q<shoulda-matchers>.freeze, [">= 2.8"])
|
|
154
|
+
s.add_dependency(%q<rolify>.freeze, [">= 4"])
|
|
155
|
+
s.add_dependency(%q<seedbank>.freeze, ["~> 0.3"])
|
|
156
|
+
s.add_dependency(%q<factory_girl_rails>.freeze, ["~> 4.5"])
|
|
157
|
+
s.add_dependency(%q<faker>.freeze, ["~> 1.4"])
|
|
158
|
+
s.add_dependency(%q<haml>.freeze, ["~> 4"])
|
|
159
|
+
s.add_dependency(%q<database_cleaner>.freeze, ["~> 1.4"])
|
|
160
|
+
s.add_dependency(%q<rails-controller-testing>.freeze, [">= 1"])
|
|
153
161
|
end
|
|
154
162
|
end
|
|
155
163
|
|
|
@@ -12,7 +12,7 @@ RSpec.describe AuthorsController do
|
|
|
12
12
|
|
|
13
13
|
describe "GET #show" do
|
|
14
14
|
it "assigns the requested author as @author" do
|
|
15
|
-
get :show, {:
|
|
15
|
+
get :show, params: { id: first_author.to_param }
|
|
16
16
|
expect(assigns(:author)).to eq(first_author)
|
|
17
17
|
end
|
|
18
18
|
end
|
|
@@ -5,14 +5,16 @@ RSpec.describe BooksController do
|
|
|
5
5
|
|
|
6
6
|
describe "GET #index" do
|
|
7
7
|
it "assigns author's books as @books" do
|
|
8
|
-
get :index, author_id: first_author.to_param
|
|
8
|
+
get :index, params: { author_id: first_author.to_param }
|
|
9
9
|
expect(assigns(:books)).to eq([book_a, book_b_first])
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
describe "GET #show" do
|
|
14
14
|
it "assigns the requested book as @book" do
|
|
15
|
-
get :show,
|
|
15
|
+
get :show, params: {
|
|
16
|
+
author_id: first_author.to_param, id: book_b_first.to_param
|
|
17
|
+
}
|
|
16
18
|
expect(assigns(:book)).to eq(book_b_first)
|
|
17
19
|
end
|
|
18
20
|
end
|
data/spec/dummy/bin/setup
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
require 'pathname'
|
|
3
|
+
require 'fileutils'
|
|
4
|
+
include FileUtils
|
|
3
5
|
|
|
4
6
|
# path to your application root.
|
|
5
|
-
APP_ROOT = Pathname.new File.expand_path('../../',
|
|
7
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
def system!(*args)
|
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
chdir APP_ROOT do
|
|
8
14
|
# This script is a starting point to setup your application.
|
|
9
|
-
# Add necessary setup steps to this file
|
|
15
|
+
# Add necessary setup steps to this file.
|
|
10
16
|
|
|
11
|
-
puts
|
|
12
|
-
system
|
|
13
|
-
system
|
|
17
|
+
puts '== Installing dependencies =='
|
|
18
|
+
system! 'gem install bundler --conservative'
|
|
19
|
+
system('bundle check') || system!('bundle install')
|
|
14
20
|
|
|
15
21
|
# puts "\n== Copying sample files =="
|
|
16
|
-
# unless File.exist?(
|
|
17
|
-
#
|
|
22
|
+
# unless File.exist?('config/database.yml')
|
|
23
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
|
18
24
|
# end
|
|
19
25
|
|
|
20
26
|
puts "\n== Preparing database =="
|
|
21
|
-
system
|
|
27
|
+
system! 'bin/rails db:setup'
|
|
22
28
|
|
|
23
29
|
puts "\n== Removing old logs and tempfiles =="
|
|
24
|
-
system
|
|
25
|
-
system "rm -rf tmp/cache"
|
|
30
|
+
system! 'bin/rails log:clear tmp:clear'
|
|
26
31
|
|
|
27
32
|
puts "\n== Restarting application server =="
|
|
28
|
-
system
|
|
33
|
+
system! 'bin/rails restart'
|
|
29
34
|
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
require 'pathname'
|
|
3
|
+
require 'fileutils'
|
|
4
|
+
include FileUtils
|
|
5
|
+
|
|
6
|
+
# path to your application root.
|
|
7
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
|
8
|
+
|
|
9
|
+
def system!(*args)
|
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
chdir APP_ROOT do
|
|
14
|
+
# This script is a way to update your development environment automatically.
|
|
15
|
+
# Add necessary update steps to this file.
|
|
16
|
+
|
|
17
|
+
puts '== Installing dependencies =='
|
|
18
|
+
system! 'gem install bundler --conservative'
|
|
19
|
+
system('bundle check') || system!('bundle install')
|
|
20
|
+
|
|
21
|
+
puts "\n== Updating database =="
|
|
22
|
+
system! 'bin/rails db:migrate'
|
|
23
|
+
|
|
24
|
+
puts "\n== Removing old logs and tempfiles =="
|
|
25
|
+
system! 'bin/rails log:clear tmp:clear'
|
|
26
|
+
|
|
27
|
+
puts "\n== Restarting application server =="
|
|
28
|
+
system! 'bin/rails restart'
|
|
29
|
+
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
require_relative 'boot'
|
|
2
2
|
|
|
3
3
|
# Pick the frameworks you want:
|
|
4
4
|
require 'active_record/railtie'
|
|
@@ -8,6 +8,8 @@ require 'action_view/railtie'
|
|
|
8
8
|
require 'sprockets/railtie'
|
|
9
9
|
# require 'rails/test_unit/railtie'
|
|
10
10
|
|
|
11
|
+
# Require the gems listed in Gemfile, including any gems
|
|
12
|
+
# you've limited to :test, :development, or :production.
|
|
11
13
|
Bundler.require(*Rails.groups)
|
|
12
14
|
require 'friendly_id'
|
|
13
15
|
require 'friendly_id/method_scopes'
|
|
@@ -26,9 +28,6 @@ module Dummy
|
|
|
26
28
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
27
29
|
# config.i18n.default_locale = :de
|
|
28
30
|
|
|
29
|
-
# Do not swallow errors in after_commit/after_rollback callbacks.
|
|
30
|
-
config.active_record.raise_in_transactional_callbacks = true
|
|
31
|
-
|
|
32
31
|
config.generators do |g|
|
|
33
32
|
g.orm :active_record
|
|
34
33
|
g.template_engine :haml
|
|
@@ -41,4 +40,3 @@ module Dummy
|
|
|
41
40
|
end
|
|
42
41
|
end
|
|
43
42
|
end
|
|
44
|
-
|
|
@@ -9,13 +9,28 @@ 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
|
-
|
|
12
|
+
# Show full error reports.
|
|
13
|
+
config.consider_all_requests_local = true
|
|
14
|
+
|
|
15
|
+
# Enable/disable caching. By default caching is disabled.
|
|
16
|
+
if Rails.root.join('tmp/caching-dev.txt').exist?
|
|
17
|
+
config.action_controller.perform_caching = true
|
|
18
|
+
|
|
19
|
+
config.cache_store = :memory_store
|
|
20
|
+
config.public_file_server.headers = {
|
|
21
|
+
'Cache-Control' => 'public, max-age=172800'
|
|
22
|
+
}
|
|
23
|
+
else
|
|
24
|
+
config.action_controller.perform_caching = false
|
|
25
|
+
|
|
26
|
+
config.cache_store = :null_store
|
|
27
|
+
end
|
|
15
28
|
|
|
16
29
|
# Don't care if the mailer can't send.
|
|
17
30
|
config.action_mailer.raise_delivery_errors = false
|
|
18
31
|
|
|
32
|
+
config.action_mailer.perform_caching = false
|
|
33
|
+
|
|
19
34
|
# Print deprecation notices to the Rails logger.
|
|
20
35
|
config.active_support.deprecation = :log
|
|
21
36
|
|
|
@@ -27,15 +42,13 @@ Rails.application.configure do
|
|
|
27
42
|
# number of complex assets.
|
|
28
43
|
config.assets.debug = true
|
|
29
44
|
|
|
30
|
-
#
|
|
31
|
-
|
|
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
|
|
45
|
+
# Suppress logger output for asset requests.
|
|
46
|
+
config.assets.quiet = true
|
|
38
47
|
|
|
39
48
|
# Raises error for missing translations
|
|
40
49
|
# config.action_view.raise_on_missing_translations = true
|
|
50
|
+
|
|
51
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
|
52
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
|
53
|
+
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
|
41
54
|
end
|
|
@@ -12,9 +12,11 @@ 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.
|
|
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=3600'
|
|
19
|
+
}
|
|
18
20
|
|
|
19
21
|
# Show full error reports and disable caching.
|
|
20
22
|
config.consider_all_requests_local = true
|
|
@@ -25,15 +27,13 @@ Rails.application.configure do
|
|
|
25
27
|
|
|
26
28
|
# Disable request forgery protection in test environment.
|
|
27
29
|
config.action_controller.allow_forgery_protection = false
|
|
30
|
+
config.action_mailer.perform_caching = false
|
|
28
31
|
|
|
29
32
|
# Tell Action Mailer not to deliver emails to the real world.
|
|
30
33
|
# The :test delivery method accumulates sent emails in the
|
|
31
34
|
# ActionMailer::Base.deliveries array.
|
|
32
35
|
config.action_mailer.delivery_method = :test
|
|
33
36
|
|
|
34
|
-
# Randomize the order test cases are executed.
|
|
35
|
-
config.active_support.test_order = :random
|
|
36
|
-
|
|
37
37
|
# Print deprecation notices to the stderr.
|
|
38
38
|
config.active_support.deprecation = :stderr
|
|
39
39
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
#
|
|
3
|
+
# This file contains migration options to ease your Rails 5.0 upgrade.
|
|
4
|
+
#
|
|
5
|
+
# Once upgraded flip defaults one by one to migrate to the new default.
|
|
6
|
+
#
|
|
7
|
+
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
|
8
|
+
|
|
9
|
+
# Enable per-form CSRF tokens. Previous versions had false.
|
|
10
|
+
Rails.application.config.action_controller.per_form_csrf_tokens = false
|
|
11
|
+
|
|
12
|
+
# Enable origin-checking CSRF mitigation. Previous versions had false.
|
|
13
|
+
Rails.application.config.action_controller.forgery_protection_origin_check = false
|
|
14
|
+
|
|
15
|
+
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
|
|
16
|
+
# Previous versions had false.
|
|
17
|
+
ActiveSupport.to_time_preserves_timezone = false
|
|
18
|
+
|
|
19
|
+
# Require `belongs_to` associations by default. Previous versions had false.
|
|
20
|
+
Rails.application.config.active_record.belongs_to_required_by_default = false
|
|
21
|
+
|
|
22
|
+
# Do not halt callback chains when a callback returns false. Previous versions had true.
|
|
23
|
+
ActiveSupport.halt_callback_chains_on_return_false = true
|