boa_vista_stubs 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/boa_vista_stubs/requests_controller.rb +3 -21
- data/app/models/boa_vista_stubs/document/cnpj.rb +4 -7
- data/app/models/boa_vista_stubs/document/cpf.rb +6 -7
- data/app/models/boa_vista_stubs/document/extension.rb +14 -0
- data/app/models/boa_vista_stubs/document/response/base.rb +14 -0
- data/app/models/boa_vista_stubs/document/response/cnpj.rb +18 -0
- data/app/models/boa_vista_stubs/document/response/cpf.rb +18 -0
- data/app/models/boa_vista_stubs/document/response.rb +8 -29
- data/app/models/boa_vista_stubs/document/validate_expression.rb +26 -0
- data/app/models/boa_vista_stubs/document.rb +12 -18
- data/app/services/boa_vista_stubs/document_service/timeout.rb +7 -0
- data/app/services/boa_vista_stubs/document_service.rb +11 -17
- data/lib/boa_vista_stubs/configuration.rb +1 -1
- data/lib/boa_vista_stubs/version.rb +1 -1
- data/spec/boa_vista_stubs_spec.rb +5 -0
- data/spec/controllers/requests_controller_spec.rb +16 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +28 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/boa_vista.rb +6 -0
- data/spec/dummy/config/initializers/boa_vista_stubs.rb +5 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +1621 -0
- data/spec/dummy/log/test.log +112 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/fixtures/layout.txt +1 -0
- data/spec/integration/navigation_test.rb +8 -0
- data/spec/lib/boa_vista_stubs/configuration_spec.rb +9 -0
- data/spec/models/boa_vista_stubs/document/cnpj_spec.rb +31 -0
- data/spec/models/boa_vista_stubs/document/cpf_spec.rb +33 -0
- data/spec/models/boa_vista_stubs/document/response/base_spec.rb +21 -0
- data/spec/models/boa_vista_stubs/document/response/cnpj_spec.rb +19 -0
- data/spec/models/boa_vista_stubs/document/response/cpf_spec.rb +19 -0
- data/spec/models/boa_vista_stubs/document/response_spec.rb +17 -0
- data/spec/models/boa_vista_stubs/document/validate_expression_spec.rb +46 -0
- data/spec/models/boa_vista_stubs/document_spec.rb +22 -0
- data/spec/rails_helper.rb +11 -0
- data/spec/services/document_service/timeout_spec.rb +7 -0
- data/spec/services/document_service_spec.rb +51 -0
- data/spec/spec_helper.rb +20 -0
- metadata +123 -6
- data/app/models/boa_vista_stubs/document/identifier.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0285aad01b8149445d2509b9c8c2b1e772515db5
|
4
|
+
data.tar.gz: a8351f090e2728fb2a9f3f270f6d95445eb929e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ee9eb48ca639b6edbfb1392b60012d5658f032c042f5d89501123f6fd6a451a621ab8eb86e7f7cd35d7d286b45835360d862314e260ee519e3e50aa62a8cb2c
|
7
|
+
data.tar.gz: e06f1760029b1012cd03471839c25780e80fce19b83cebbd0103c445adcd775a617a88ddcd52d9374b123af0176a60d3feeb0a1a9be8b78cf5f0b98397f4e099
|
@@ -1,28 +1,10 @@
|
|
1
1
|
module BoaVistaStubs
|
2
2
|
class RequestsController < BoaVistaStubs::ApplicationController
|
3
|
-
def index
|
4
|
-
# Returns a Document::CPF or Document::CNPJ instance
|
5
|
-
document = Document.identify(params[:consulta])
|
6
|
-
|
7
|
-
log("Start validating document type: #{document.document_type}")
|
8
|
-
|
9
|
-
if document.valid?
|
10
|
-
log("document number: #{document.document_number} is valid.")
|
11
|
-
render text: document_response(document.document_type).valid
|
12
|
-
else
|
13
|
-
log("document number: #{document.document_number} is invalid.")
|
14
|
-
render text: document_response(document.document_type).invalid
|
15
|
-
end
|
16
|
-
end
|
17
3
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
Document::Response.new(document_type)
|
4
|
+
def index
|
5
|
+
document = BoaVistaStubs::DocumentService.call(params[:consulta])
|
6
|
+
render text: document
|
22
7
|
end
|
23
8
|
|
24
|
-
def log(message)
|
25
|
-
Rails.logger.info("[BoaVistaStubs] - #{message}")
|
26
|
-
end
|
27
9
|
end
|
28
10
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module BoaVistaStubs
|
2
|
-
class Document::
|
2
|
+
class Document::Cnpj
|
3
|
+
include BoaVistaStubs::Document::Extension
|
4
|
+
|
3
5
|
attr_reader :document_number
|
4
6
|
|
5
7
|
def initialize(document_number)
|
@@ -7,7 +9,7 @@ module BoaVistaStubs
|
|
7
9
|
end
|
8
10
|
|
9
11
|
def valid?
|
10
|
-
|
12
|
+
validator(document_number).valid_cnpj?
|
11
13
|
end
|
12
14
|
|
13
15
|
def invalid?
|
@@ -18,10 +20,5 @@ module BoaVistaStubs
|
|
18
20
|
:CNPJ
|
19
21
|
end
|
20
22
|
|
21
|
-
protected
|
22
|
-
|
23
|
-
def allowed
|
24
|
-
BoaVistaStubs.configuration.valid_cnpj
|
25
|
-
end
|
26
23
|
end
|
27
24
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module BoaVistaStubs
|
2
|
-
class Document::
|
2
|
+
class Document::Cpf
|
3
|
+
include BoaVistaStubs::Document::Extension
|
4
|
+
|
3
5
|
attr_reader :document_number
|
4
6
|
|
5
7
|
def initialize(document_number)
|
@@ -7,7 +9,7 @@ module BoaVistaStubs
|
|
7
9
|
end
|
8
10
|
|
9
11
|
def valid?
|
10
|
-
|
12
|
+
validator(cleared_document_number).valid_cpf?
|
11
13
|
end
|
12
14
|
|
13
15
|
def invalid?
|
@@ -20,12 +22,9 @@ module BoaVistaStubs
|
|
20
22
|
|
21
23
|
protected
|
22
24
|
|
23
|
-
def
|
24
|
-
document_number.strip
|
25
|
+
def cleared_document_number
|
26
|
+
@document_number.strip
|
25
27
|
end
|
26
28
|
|
27
|
-
def allowed
|
28
|
-
BoaVistaStubs.configuration.valid_cpf
|
29
|
-
end
|
30
29
|
end
|
31
30
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module BoaVistaStubs
|
2
|
+
module Document::Extension
|
3
|
+
|
4
|
+
def timeout_document?
|
5
|
+
validator(document_number).timeout?
|
6
|
+
end
|
7
|
+
|
8
|
+
protected
|
9
|
+
|
10
|
+
def validator(document_number)
|
11
|
+
BoaVistaStubs::Document::ValidateExpression.new(document_number)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module BoaVistaStubs
|
2
|
+
class Document
|
3
|
+
class Response::Cnpj < Response::Base
|
4
|
+
LAYOUTS = {
|
5
|
+
valid: 138,
|
6
|
+
invalid: 901
|
7
|
+
}
|
8
|
+
|
9
|
+
def valid_document
|
10
|
+
read_layout(LAYOUTS[:valid])
|
11
|
+
end
|
12
|
+
|
13
|
+
def invalid_document
|
14
|
+
read_layout(LAYOUTS[:invalid])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module BoaVistaStubs
|
2
|
+
class Document
|
3
|
+
class Response::Cpf < Response::Base
|
4
|
+
LAYOUTS = {
|
5
|
+
valid: 221,
|
6
|
+
invalid: 999
|
7
|
+
}
|
8
|
+
|
9
|
+
def valid_document
|
10
|
+
read_layout(LAYOUTS[:valid])
|
11
|
+
end
|
12
|
+
|
13
|
+
def invalid_document
|
14
|
+
read_layout(LAYOUTS[:invalid])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,35 +1,14 @@
|
|
1
1
|
module BoaVistaStubs
|
2
|
-
class Document
|
3
|
-
|
4
|
-
:CPF => {
|
5
|
-
valid: 221,
|
6
|
-
invalid: 999
|
7
|
-
},
|
8
|
-
:CNPJ => {
|
9
|
-
valid: 138,
|
10
|
-
invalid: 901
|
11
|
-
}
|
12
|
-
}
|
2
|
+
class Document
|
3
|
+
class Response
|
13
4
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
def valid
|
20
|
-
log("Layout: #{@layout[:valid]}")
|
21
|
-
BoaVista::Fixtures.read("layout_#{@layout[:valid]}.txt")[0]
|
22
|
-
end
|
23
|
-
|
24
|
-
def invalid
|
25
|
-
log("Layout: #{@layout[:invalid]}")
|
26
|
-
BoaVista::Fixtures.read("layout_#{@layout[:invalid]}.txt")[0]
|
27
|
-
end
|
28
|
-
|
29
|
-
protected
|
5
|
+
def self.identify(document_type)
|
6
|
+
"BoaVistaStubs::Document::Response::#{formatted_document_type(document_type)}".constantize
|
7
|
+
end
|
30
8
|
|
31
|
-
|
32
|
-
|
9
|
+
def self.formatted_document_type(document_type)
|
10
|
+
document_type.capitalize.to_s
|
11
|
+
end
|
33
12
|
end
|
34
13
|
end
|
35
14
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module BoaVistaStubs
|
2
|
+
class Document::ValidateExpression
|
3
|
+
|
4
|
+
def initialize(document_number)
|
5
|
+
@document_number = document_number
|
6
|
+
end
|
7
|
+
|
8
|
+
def valid_cpf?
|
9
|
+
validate_with_regex(BoaVistaStubs.configuration.valid_cpf)
|
10
|
+
end
|
11
|
+
|
12
|
+
def valid_cnpj?
|
13
|
+
validate_with_regex(BoaVistaStubs.configuration.valid_cnpj)
|
14
|
+
end
|
15
|
+
|
16
|
+
def timeout_document?
|
17
|
+
validate_with_regex(BoaVistaStubs.configuration.timeout_document)
|
18
|
+
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
def validate_with_regex(regex)
|
23
|
+
@document_number.match(regex)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -1,36 +1,30 @@
|
|
1
1
|
module BoaVistaStubs
|
2
2
|
class Document
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
'2' => :CNPJ
|
7
|
-
}.freeze
|
8
|
-
|
9
|
-
def self.identify(consulta_params)
|
10
|
-
new(consulta_params).identify
|
4
|
+
def self.identify(search_params)
|
5
|
+
new(search_params).identify
|
11
6
|
end
|
12
7
|
|
13
|
-
|
14
|
-
|
15
|
-
def initialize(consulta_params)
|
16
|
-
@consulta_params = consulta_params
|
8
|
+
def initialize(search_params)
|
9
|
+
@search_params = search_params
|
17
10
|
end
|
18
11
|
|
19
12
|
def identify
|
20
|
-
|
13
|
+
document = build_document
|
21
14
|
|
22
|
-
klass
|
15
|
+
klass = "BoaVistaStubs::Document::#{document_type_by_document(document)}".constantize
|
16
|
+
|
17
|
+
klass.new(document.document_number)
|
23
18
|
end
|
24
19
|
|
25
20
|
protected
|
26
21
|
|
27
|
-
def
|
28
|
-
|
22
|
+
def build_document
|
23
|
+
BoaVista::Request.read(@search_params)
|
29
24
|
end
|
30
25
|
|
31
|
-
def
|
32
|
-
|
26
|
+
def document_type_by_document(document)
|
27
|
+
BoaVista::Request.document_name(document.document_type).to_s.camelize # :cpf or :cnpj
|
33
28
|
end
|
34
|
-
|
35
29
|
end
|
36
30
|
end
|
@@ -1,28 +1,22 @@
|
|
1
1
|
module BoaVistaStubs
|
2
2
|
class DocumentService
|
3
|
-
attr_accessor :search_params, :document_identifier, :document_response
|
4
3
|
|
5
|
-
def
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
def self.call(search_params)
|
5
|
+
# Returns a Document::CPF or Document::CNPJ instance
|
6
|
+
document = BoaVistaStubs::Document.identify(search_params)
|
7
|
+
|
8
|
+
Timeout.invoke if document.timeout_document?
|
10
9
|
|
11
|
-
|
12
|
-
|
10
|
+
# Returns a Document::Response::CPF or Document::Response::CNPJ
|
11
|
+
response = BoaVistaStubs::Document::Response.identify(document.document_type)
|
13
12
|
|
14
13
|
if document.valid?
|
15
|
-
response
|
14
|
+
# renders valid response for specific type of document
|
15
|
+
response.valid_document
|
16
16
|
else
|
17
|
-
response
|
17
|
+
# renders invalid response for specific type of document
|
18
|
+
response.invalid_document
|
18
19
|
end
|
19
20
|
end
|
20
|
-
|
21
|
-
protected
|
22
|
-
|
23
|
-
def response(document_type)
|
24
|
-
document_response.new(document_type)
|
25
|
-
end
|
26
|
-
|
27
21
|
end
|
28
22
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
RSpec.describe BoaVistaStubs::RequestsController, type: :controller do
|
4
|
+
routes { BoaVistaStubs::Engine.routes }
|
5
|
+
|
6
|
+
before do
|
7
|
+
allow(BoaVistaStubs::DocumentService).to receive(:call).with(anything) { 'document response' }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe 'GET :index' do
|
11
|
+
it 'renders document response with success' do
|
12
|
+
get :index, consulta: 'my search string'
|
13
|
+
expect(response.body).to eq('document response')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
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/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
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.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
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 styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/spec/dummy/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
+
|
7
|
+
Dir.chdir APP_ROOT do
|
8
|
+
# This script is a starting point to setup your application.
|
9
|
+
# Add necessary setup steps to this file:
|
10
|
+
|
11
|
+
puts "== Installing dependencies =="
|
12
|
+
system "gem install bundler --conservative"
|
13
|
+
system "bundle check || bundle install"
|
14
|
+
|
15
|
+
# puts "\n== Copying sample files =="
|
16
|
+
# unless File.exist?("config/database.yml")
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
18
|
+
# end
|
19
|
+
|
20
|
+
puts "\n== Preparing database =="
|
21
|
+
system "bin/rake db:setup"
|
22
|
+
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
24
|
+
system "rm -f log/*"
|
25
|
+
system "rm -rf tmp/cache"
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system "touch tmp/restart.txt"
|
29
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require "action_controller/railtie"
|
4
|
+
require "action_mailer/railtie"
|
5
|
+
require "sprockets/railtie"
|
6
|
+
|
7
|
+
Bundler.require(*Rails.groups)
|
8
|
+
require "boa_vista_stubs"
|
9
|
+
|
10
|
+
module Dummy
|
11
|
+
class Application < Rails::Application
|
12
|
+
# Settings in config/environments/* take precedence over those specified here.
|
13
|
+
# Application configuration should go into files in config/initializers
|
14
|
+
# -- all .rb files in that directory are automatically loaded.
|
15
|
+
|
16
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
17
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
18
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
19
|
+
|
20
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
21
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
22
|
+
# config.i18n.default_locale = :de
|
23
|
+
|
24
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
25
|
+
# config.active_record.raise_in_transactional_callbacks = true
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
@@ -0,0 +1,41 @@
|
|
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
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
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
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
# config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
|
30
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
31
|
+
# yet still be able to expire them through the digest params.
|
32
|
+
config.assets.digest = true
|
33
|
+
|
34
|
+
# Adds additional error checking when serving assets at runtime.
|
35
|
+
# Checks for improperly declared sprockets dependencies.
|
36
|
+
# Raises helpful error messages.
|
37
|
+
config.assets.raise_runtime_errors = true
|
38
|
+
|
39
|
+
# Raises error for missing translations
|
40
|
+
# config.action_view.raise_on_missing_translations = true
|
41
|
+
end
|