exception_handler 0.7.5.15 → 0.7.6.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d28c52523ca9addb4bcd97c3d1176addb96f0a5d
|
4
|
+
data.tar.gz: 526c789221dbdb9a5a411f52339967e34a00c1d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d807d1da0d8d10b9b930004b5cd0cf0a91d32c3f3fe64da5366dae425f4154c1cdb3a2bd825ec8c1ff64c464542e5761d0ef3154507769d8024b2e6bd3b9cf5f
|
7
|
+
data.tar.gz: 2fbb8224f4bf5eac7de20c6071c80d7b9c011b85cb68b9f790c1932ba037f8f2e657272909e79f281ad2401bf8bfda30f6c90500b6cafe14deb5d7cba5ee297e
|
@@ -96,7 +96,7 @@ module ExceptionHandler
|
|
96
96
|
attr_accessor *ATTRS unless ExceptionHandler.config.try(:db)
|
97
97
|
|
98
98
|
# => Validations
|
99
|
-
validates :klass, exclusion: { in: [ActionController::RoutingError, AbstractController::ActionNotFound, ActiveRecord::RecordNotFound], message: "%{value}" }, if:
|
99
|
+
validates :klass, exclusion: { in: [ActionController::RoutingError, AbstractController::ActionNotFound, ActiveRecord::RecordNotFound], message: "%{value}" }, if: -> { referer.blank? } # => might need full Proc syntax
|
100
100
|
validates :user_agent, format: { without: Regexp.new( BOTS.join("|"), Regexp::IGNORECASE ) }
|
101
101
|
|
102
102
|
##################################
|
data/exception_handler.gemspec
CHANGED
@@ -82,7 +82,8 @@ module ExceptionHandler
|
|
82
82
|
|
83
83
|
# => Validation
|
84
84
|
raise ExceptionHandler::Error, "Email Not Valid" if @email && !@email.nil? && !@email.is_a?(String)
|
85
|
-
raise ExceptionHandler::Error, "Migration Required → \"#{db}\" doesn't exist" if @db && !ActiveRecord::Base.connection.table_exists?(db)
|
85
|
+
raise ExceptionHandler::Error, "Migration Required → \"#{db}\" doesn't exist" if @db && !ActiveRecord::Base.connection.table_exists?(db) && (File.basename($0) != "rake" && !ARGV.include?("db:migrate"))
|
86
|
+
|
86
87
|
end
|
87
88
|
|
88
89
|
###########################################
|
@@ -28,7 +28,8 @@ module ExceptionHandler
|
|
28
28
|
|
29
29
|
# => Config
|
30
30
|
# => Builds lib/exception_handler/config.rb
|
31
|
-
config.before_initialize do |app|
|
31
|
+
# config.before_initialize do |app| => Needs to be fixed for ActiveRecord::Base
|
32
|
+
initializer :exception_handler_config, before: "better_errors.configure_rails_initialization" do |app|
|
32
33
|
ExceptionHandler.config ||= ExceptionHandler::Config.new config.try(:exception_handler)
|
33
34
|
end
|
34
35
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Peck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|