s3_relay 0.5.1 → 0.6.0
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/README.md +2 -2
- data/app/controllers/s3_relay/uploads_controller.rb +8 -2
- data/app/models/s3_relay/upload.rb +1 -1
- data/lib/s3_relay/private_url.rb +1 -1
- data/lib/s3_relay/version.rb +1 -1
- data/test/controllers/s3_relay/uploads_controller_test.rb +17 -11
- data/test/dummy/{README.rdoc → README.md} +1 -5
- data/test/dummy/Rakefile +1 -1
- data/test/dummy/app/assets/config/manifest.js +3 -0
- data/test/dummy/app/assets/javascripts/application.js +6 -4
- data/test/dummy/app/assets/javascripts/cable.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +5 -5
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -2
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/application_record.rb +3 -0
- data/test/dummy/app/models/product.rb +1 -1
- data/test/dummy/app/views/layouts/application.html.erb +9 -9
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/rails +6 -1
- data/test/dummy/bin/rake +5 -0
- data/test/dummy/bin/setup +38 -0
- data/test/dummy/bin/spring +17 -0
- data/test/dummy/bin/update +29 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config/application.rb +7 -11
- data/test/dummy/config/boot.rb +2 -4
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +24 -7
- data/test/dummy/config/environments/production.rb +35 -22
- data/test/dummy/config/environments/test.rb +6 -3
- data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/test/dummy/config/initializers/assets.rb +8 -2
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -1
- data/test/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/test/dummy/config/locales/en.yml +10 -0
- data/test/dummy/config/puma.rb +56 -0
- data/test/dummy/config/secrets.yml +15 -5
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config.ru +2 -1
- data/test/dummy/db/seeds.rb +7 -0
- data/test/dummy/package.json +5 -0
- data/test/dummy/public/404.html +6 -6
- data/test/dummy/public/422.html +6 -6
- data/test/dummy/public/500.html +6 -6
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/robots.txt +1 -0
- data/test/dummy/test/application_system_test_case.rb +5 -0
- data/test/dummy/test/test_helper.rb +9 -0
- data/test/factories/uploads.rb +10 -3
- data/test/helpers/s3_relay/uploads_helper_test.rb +3 -3
- data/test/models/s3_relay/upload_test.rb +6 -5
- data/test/test_helper.rb +1 -0
- metadata +89 -33
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/log/development.log +0 -26
- data/test/dummy/log/test.log +0 -988
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3e10d8c93c2b0dfb2c30d18dc6f4bd8843951d7
|
4
|
+
data.tar.gz: 3306281d165ad4cad71aaffddad4ae7f10593b30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b4db0505eb9f8b6b47530634ffc7d7dd8a497c49f86c4a1025b91de9a06ef35e504a70e62e5686800cc6a297b97ce0a9b0956fdee42ed9256e567c6cacc6bb7
|
7
|
+
data.tar.gz: e36d26eb9e0d782bded5badef70b270f4127f26a6171b81f8345d217fd774722cb6492fa3ccd24bdc5df8e57c0e83f7cf360b5ac91bbf9fd988dacb2200d0e76
|
data/README.md
CHANGED
@@ -52,8 +52,8 @@ adhering to for a couple of major versions now. Even IE, wuh?
|
|
52
52
|
The latest versions of all of the following are ideal, but here are the gem's
|
53
53
|
minimum requirements:
|
54
54
|
|
55
|
-
*
|
56
|
-
*
|
55
|
+
* For rails 5.1+, use version 0.6.x+ and ruby 2.3+
|
56
|
+
* For rails 3.1 to 5.0, use version 0.5.x and ruby 1.9.3+
|
57
57
|
* Modern versions of Chrome, Safari, FireFox or IE 10+
|
58
58
|
* Note: Progress bars are currently disabled in IE
|
59
59
|
* Note: IE <= 9 users will be instructed to upgrade their browser upon
|
@@ -11,7 +11,13 @@ class S3Relay::UploadsController < ApplicationController
|
|
11
11
|
@upload = S3Relay::Upload.new(upload_attrs)
|
12
12
|
|
13
13
|
if @upload.save
|
14
|
-
|
14
|
+
data = {
|
15
|
+
private_url: @upload.private_url,
|
16
|
+
parent_type: @upload.parent_type,
|
17
|
+
parent_id: @upload.parent_id,
|
18
|
+
user_id: user_attrs[:user_id]
|
19
|
+
}
|
20
|
+
render json: data, status: 201
|
15
21
|
else
|
16
22
|
render json: { errors: @upload.errors }, status: 422
|
17
23
|
end
|
@@ -55,7 +61,7 @@ class S3Relay::UploadsController < ApplicationController
|
|
55
61
|
end
|
56
62
|
|
57
63
|
def user_attrs
|
58
|
-
if respond_to?(:current_user) && (id = current_user
|
64
|
+
if respond_to?(:current_user) && (id = current_user&.id)
|
59
65
|
{ user_id: id }
|
60
66
|
else
|
61
67
|
{}
|
data/lib/s3_relay/private_url.rb
CHANGED
@@ -4,7 +4,7 @@ module S3Relay
|
|
4
4
|
attr_reader :expires, :path
|
5
5
|
|
6
6
|
def initialize(uuid, file, options={})
|
7
|
-
filename = URI.
|
7
|
+
filename = Addressable::URI.escape(file).gsub("+", "%2B")
|
8
8
|
@path = [uuid, filename].join("/")
|
9
9
|
@expires = (options[:expires] || 10.minutes.from_now).to_i
|
10
10
|
end
|
data/lib/s3_relay/version.rb
CHANGED
@@ -22,7 +22,7 @@ module S3Relay
|
|
22
22
|
S3Relay::UploadPresigner.any_instance.stubs(:uuid).returns(uuid)
|
23
23
|
S3Relay::UploadPresigner.any_instance.stubs(:expires).returns(time)
|
24
24
|
|
25
|
-
get
|
25
|
+
get new_s3_relay_upload_url
|
26
26
|
assert_response 200
|
27
27
|
|
28
28
|
data = JSON.parse(response.body)
|
@@ -44,11 +44,12 @@ module S3Relay
|
|
44
44
|
describe "success" do
|
45
45
|
it do
|
46
46
|
assert_difference "S3Relay::Upload.count", 1 do
|
47
|
-
post :
|
47
|
+
post s3_relay_uploads_url, params: {
|
48
48
|
association: "photo_uploads",
|
49
49
|
uuid: SecureRandom.uuid,
|
50
50
|
filename: "cat.png",
|
51
51
|
content_type: "image/png"
|
52
|
+
}
|
52
53
|
end
|
53
54
|
|
54
55
|
assert_response 201
|
@@ -60,13 +61,14 @@ module S3Relay
|
|
60
61
|
|
61
62
|
it do
|
62
63
|
assert_difference "@product.photo_uploads.count", 1 do
|
63
|
-
post :
|
64
|
+
post s3_relay_uploads_url, params: {
|
64
65
|
association: "photo_uploads",
|
65
66
|
uuid: SecureRandom.uuid,
|
66
67
|
filename: "cat.png",
|
67
68
|
content_type: "image/png",
|
68
69
|
parent_type: @product.class.to_s,
|
69
70
|
parent_id: @product.id.to_s
|
71
|
+
}
|
70
72
|
end
|
71
73
|
|
72
74
|
assert_response 201
|
@@ -76,40 +78,43 @@ module S3Relay
|
|
76
78
|
describe "not matching an object" do
|
77
79
|
it do
|
78
80
|
assert_difference "S3Relay::Upload.count" do
|
79
|
-
post :
|
81
|
+
post s3_relay_uploads_url, params: {
|
80
82
|
association: "photo_uploads",
|
81
83
|
uuid: SecureRandom.uuid,
|
82
84
|
filename: "cat.png",
|
83
85
|
content_type: "image/png",
|
84
86
|
parent_type: "Product",
|
85
87
|
parent_id: "10000000"
|
88
|
+
}
|
86
89
|
end
|
87
90
|
|
88
91
|
assert_response 201
|
92
|
+
body = JSON.parse(response.body)
|
89
93
|
|
90
|
-
|
91
|
-
|
94
|
+
assert body["parent_type"] == nil
|
95
|
+
assert body["parent_id"] == nil
|
92
96
|
end
|
93
97
|
end
|
94
98
|
|
95
99
|
describe "with a current_user" do
|
96
100
|
before do
|
97
101
|
@user = OpenStruct.new(id: 123)
|
98
|
-
|
102
|
+
UploadsController.any_instance.stubs(:current_user).returns(@user)
|
99
103
|
end
|
100
104
|
|
101
105
|
it "associates the upload with the user" do
|
102
106
|
assert_difference "S3Relay::Upload.count", 1 do
|
103
|
-
post :
|
107
|
+
post s3_relay_uploads_url, params: {
|
104
108
|
association: "photo_uploads",
|
105
109
|
uuid: SecureRandom.uuid,
|
106
110
|
filename: "cat.png",
|
107
111
|
content_type: "image/png"
|
112
|
+
}
|
108
113
|
end
|
109
114
|
|
110
115
|
assert_response 201
|
111
|
-
|
112
|
-
|
116
|
+
body = JSON.parse(response.body)
|
117
|
+
body["user_id"].must_equal @user.id
|
113
118
|
end
|
114
119
|
end
|
115
120
|
|
@@ -119,10 +124,11 @@ module S3Relay
|
|
119
124
|
describe "error" do
|
120
125
|
it do
|
121
126
|
assert_no_difference "S3Relay::Upload.count" do
|
122
|
-
post :
|
127
|
+
post s3_relay_uploads_url, params: {
|
123
128
|
uuid: SecureRandom.uuid,
|
124
129
|
filename: "cat.png",
|
125
130
|
content_type: "image/png"
|
131
|
+
}
|
126
132
|
end
|
127
133
|
|
128
134
|
assert_response 422
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# README
|
2
2
|
|
3
3
|
This README would normally document whatever steps are necessary to get the
|
4
4
|
application up and running.
|
@@ -22,7 +22,3 @@ Things you may want to cover:
|
|
22
22
|
* Deployment instructions
|
23
23
|
|
24
24
|
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
3
|
|
4
|
-
|
4
|
+
require_relative 'config/application'
|
5
5
|
|
6
6
|
Rails.application.load_tasks
|
@@ -1,13 +1,15 @@
|
|
1
1
|
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
2
|
// listed below.
|
3
3
|
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts,
|
5
|
-
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
|
5
|
+
// vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
6
|
//
|
7
7
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
9
|
//
|
10
|
-
// Read Sprockets README (https://github.com/
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
11
|
// about supported directives.
|
12
12
|
//
|
13
|
+
//= require rails-ujs
|
14
|
+
//= require turbolinks
|
13
15
|
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
+
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
3
|
+
//
|
4
|
+
//= require action_cable
|
5
|
+
//= require_self
|
6
|
+
//= require_tree ./channels
|
7
|
+
|
8
|
+
(function() {
|
9
|
+
this.App || (this.App = {});
|
10
|
+
|
11
|
+
App.cable = ActionCable.createConsumer();
|
12
|
+
|
13
|
+
}).call(this);
|
@@ -2,13 +2,13 @@
|
|
2
2
|
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
3
|
* listed below.
|
4
4
|
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets,
|
6
|
-
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
|
6
|
+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
7
|
*
|
8
8
|
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any
|
10
|
-
*
|
11
|
-
* file per style scope.
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
13
|
*= require_tree .
|
14
14
|
*= require_self
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= csrf_meta_tags %>
|
10
6
|
|
11
|
-
<%=
|
7
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
8
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
9
|
+
</head>
|
12
10
|
|
13
|
-
|
11
|
+
<body>
|
12
|
+
<%= yield %>
|
13
|
+
</body>
|
14
14
|
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
data/test/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', __dir__)
|
3
8
|
require_relative '../config/boot'
|
4
9
|
require 'rails/commands'
|
data/test/dummy/bin/rake
CHANGED
@@ -0,0 +1,38 @@
|
|
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 starting point to setup your application.
|
15
|
+
# Add necessary setup steps to this file.
|
16
|
+
|
17
|
+
puts '== Installing dependencies =='
|
18
|
+
system! 'gem install bundler --conservative'
|
19
|
+
system('bundle check') || system!('bundle install')
|
20
|
+
|
21
|
+
# Install JavaScript dependencies if using Yarn
|
22
|
+
# system('bin/yarn')
|
23
|
+
|
24
|
+
|
25
|
+
# puts "\n== Copying sample files =="
|
26
|
+
# unless File.exist?('config/database.yml')
|
27
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
28
|
+
# end
|
29
|
+
|
30
|
+
puts "\n== Preparing database =="
|
31
|
+
system! 'bin/rails db:setup'
|
32
|
+
|
33
|
+
puts "\n== Removing old logs and tempfiles =="
|
34
|
+
system! 'bin/rails log:clear tmp:clear'
|
35
|
+
|
36
|
+
puts "\n== Restarting application server =="
|
37
|
+
system! 'bin/rails restart'
|
38
|
+
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
|
@@ -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
|
data/test/dummy/bin/yarn
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
VENDOR_PATH = File.expand_path('..', __dir__)
|
3
|
+
Dir.chdir(VENDOR_PATH) do
|
4
|
+
begin
|
5
|
+
exec "yarnpkg #{ARGV.join(" ")}"
|
6
|
+
rescue Errno::ENOENT
|
7
|
+
$stderr.puts "Yarn executable was not detected in the system."
|
8
|
+
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
end
|
@@ -1,23 +1,19 @@
|
|
1
|
-
|
1
|
+
require_relative 'boot'
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
|
+
require 's3_relay'
|
4
5
|
|
6
|
+
# Require the gems listed in Gemfile, including any gems
|
7
|
+
# you've limited to :test, :development, or :production.
|
5
8
|
Bundler.require(*Rails.groups)
|
6
|
-
require "s3_relay"
|
7
9
|
|
8
10
|
module Dummy
|
9
11
|
class Application < Rails::Application
|
12
|
+
# Initialize configuration defaults for originally generated Rails version.
|
13
|
+
config.load_defaults 5.1
|
14
|
+
|
10
15
|
# Settings in config/environments/* take precedence over those specified here.
|
11
16
|
# Application configuration should go into files in config/initializers
|
12
17
|
# -- all .rb files in that directory are automatically loaded.
|
13
|
-
|
14
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
-
|
18
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
-
# config.i18n.default_locale = :de
|
21
18
|
end
|
22
19
|
end
|
23
|
-
|
data/test/dummy/config/boot.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
|
1
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
3
2
|
|
4
|
-
require 'bundler/setup'
|
5
|
-
$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
|
3
|
+
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
@@ -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=#{2.days.seconds.to_i}"
|
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,11 +42,13 @@ Rails.application.configure do
|
|
27
42
|
# number of complex assets.
|
28
43
|
config.assets.debug = true
|
29
44
|
|
30
|
-
#
|
31
|
-
|
32
|
-
# Raises helpful error messages.
|
33
|
-
config.assets.raise_runtime_errors = true
|
45
|
+
# Suppress logger output for asset requests.
|
46
|
+
config.assets.quiet = true
|
34
47
|
|
35
48
|
# Raises error for missing translations
|
36
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
|
37
54
|
end
|