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: 7d0159ca0e6b4084616339284170c8a10e91ed30
4
- data.tar.gz: 5857d0d29b10e4e6056d4cf6f67d57b1c5daaf11
3
+ metadata.gz: d28c52523ca9addb4bcd97c3d1176addb96f0a5d
4
+ data.tar.gz: 526c789221dbdb9a5a411f52339967e34a00c1d3
5
5
  SHA512:
6
- metadata.gz: 3de77586327b0612743fe04a39e853fca5f45f091587cdb24920036ebaced4ddf0227dadd0fa8cb4fe581d0b8a71cceb3d15e56c6c9e61c547d3cc93cbef4446
7
- data.tar.gz: 5e9332a919cd968576a95c6ab4a15c0cb784510f4a6087431fb3568a2b10c46e046e96c8368f3b11c126f5c0f305e54005127de2edf8f9a262d352e55e93e3cf
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: "referer.blank?"
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
  ##################################
@@ -11,8 +11,8 @@ module ExceptionHandler
11
11
  module VERSION
12
12
  MAJOR = 0
13
13
  MINOR = 7
14
- TINY = 5
15
- PRE = 15 # "alpha"
14
+ TINY = 6
15
+ PRE = 0 # "alpha"
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
18
18
  end
@@ -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.5.15
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-02-11 00:00:00.000000000 Z
11
+ date: 2017-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler