exception_handler 0.4 → 0.4.1
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/.gitignore +22 -22
- data/Gemfile +14 -14
- data/LICENSE.txt +22 -22
- data/lib/exception_handler.rb +42 -42
- data/lib/exception_handler/version.rb +3 -3
- data/lib/generators/exception_handler/migration_generator.rb +1 -1
- data/lib/generators/templates/migration.rb.erb +8 -9
- data/readme/source/screen.psd +0 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6de01c4f183c029883d8ba33b9836f37c32b4208
|
4
|
+
data.tar.gz: fa8727b10d22e0542b4835e0a9cdf2d9b41a99f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82d20e9ef8b760482b6ef2fcf72ccba0a2bfa3cf22344bd7af8e7292d6cb0bf6f4ce6a209a4f661f3613f10b10a98b31469ad60fec60dba05f993100f850d72b
|
7
|
+
data.tar.gz: aee498de71ee53630baa33afe8eb6601eab520d47afa029d68384e4978a120176deecc9332ea764235d182189da1ff1c53074b14d42737f8b0c892d25605ba9c
|
data/.gitignore
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.bundle
|
4
|
-
.config
|
5
|
-
.yardoc
|
6
|
-
Gemfile.lock
|
7
|
-
InstalledFiles
|
8
|
-
_yardoc
|
9
|
-
coverage
|
10
|
-
doc/
|
11
|
-
lib/bundler/man
|
12
|
-
pkg
|
13
|
-
rdoc
|
14
|
-
spec/reports
|
15
|
-
test/tmp
|
16
|
-
test/version_tmp
|
17
|
-
tmp
|
18
|
-
*.bundle
|
19
|
-
*.so
|
20
|
-
*.o
|
21
|
-
*.a
|
22
|
-
mkmf.log
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
data/Gemfile
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in custom_error_pages.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
###########################################
|
7
|
-
|
8
|
-
#For Testing
|
9
|
-
group :test do
|
10
|
-
gem 'rspec-rails'
|
11
|
-
gem 'rails', '~> 4.1.1'
|
12
|
-
gem 'coveralls', require: false
|
13
|
-
end
|
14
|
-
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in custom_error_pages.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
###########################################
|
7
|
+
|
8
|
+
#For Testing
|
9
|
+
group :test do
|
10
|
+
gem 'rspec-rails'
|
11
|
+
gem 'rails', '~> 4.1.1'
|
12
|
+
gem 'coveralls', require: false
|
13
|
+
end
|
14
|
+
|
15
15
|
###########################################
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
Copyright (c) 2014 richpeck
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
Copyright (c) 2014 richpeck
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/exception_handler.rb
CHANGED
@@ -1,43 +1,43 @@
|
|
1
|
-
###########################################
|
2
|
-
|
3
|
-
#Core Dependencies
|
4
|
-
require "action_dispatch"
|
5
|
-
|
6
|
-
#Gem Files
|
7
|
-
libs = %w(version parser config)
|
8
|
-
for lib in libs do
|
9
|
-
require "exception_handler/#{lib}"
|
10
|
-
end
|
11
|
-
|
12
|
-
###########################################
|
13
|
-
|
14
|
-
module ExceptionHandler
|
15
|
-
|
16
|
-
#Exception Handler
|
17
|
-
class Exceptions < Rails::Engine
|
18
|
-
|
19
|
-
#Stylesheet
|
20
|
-
config.assets.precompile += %w(exception_handler/error.css)
|
21
|
-
|
22
|
-
#Parser
|
23
|
-
initializer "exception_handler.configure_rails_initialization" do |app|
|
24
|
-
app.config.middleware.use "ExceptionHandler::Message" unless ExceptionHandler.config.db == false #Parser
|
25
|
-
app.config.exceptions_app = ->(env) { ExceptionHandler::ExceptionController.action(:show).call(env) } #Pages
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
####################
|
31
|
-
# Config #
|
32
|
-
####################
|
33
|
-
|
34
|
-
mattr_accessor :config, :table
|
35
|
-
|
36
|
-
#Vars
|
37
|
-
@@config ||= Config.new
|
38
|
-
|
39
|
-
#Block (for initializer)
|
40
|
-
def self.setup
|
41
|
-
yield(config) if block_given?
|
42
|
-
end
|
1
|
+
###########################################
|
2
|
+
|
3
|
+
#Core Dependencies
|
4
|
+
require "action_dispatch"
|
5
|
+
|
6
|
+
#Gem Files
|
7
|
+
libs = %w(version parser config)
|
8
|
+
for lib in libs do
|
9
|
+
require "exception_handler/#{lib}"
|
10
|
+
end
|
11
|
+
|
12
|
+
###########################################
|
13
|
+
|
14
|
+
module ExceptionHandler
|
15
|
+
|
16
|
+
#Exception Handler
|
17
|
+
class Exceptions < Rails::Engine
|
18
|
+
|
19
|
+
#Stylesheet
|
20
|
+
config.assets.precompile += %w(exception_handler/error.css)
|
21
|
+
|
22
|
+
#Parser
|
23
|
+
initializer "exception_handler.configure_rails_initialization" do |app|
|
24
|
+
app.config.middleware.use "ExceptionHandler::Message" unless ExceptionHandler.config.db == false #Parser
|
25
|
+
app.config.exceptions_app = ->(env) { ExceptionHandler::ExceptionController.action(:show).call(env) } #Pages
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
####################
|
31
|
+
# Config #
|
32
|
+
####################
|
33
|
+
|
34
|
+
mattr_accessor :config, :table
|
35
|
+
|
36
|
+
#Vars
|
37
|
+
@@config ||= Config.new
|
38
|
+
|
39
|
+
#Block (for initializer)
|
40
|
+
def self.setup
|
41
|
+
yield(config) if block_given?
|
42
|
+
end
|
43
43
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
module ExceptionHandler
|
2
|
-
VERSION = "0.4"
|
3
|
-
end
|
1
|
+
module ExceptionHandler
|
2
|
+
VERSION = "0.4.1"
|
3
|
+
end
|
@@ -28,7 +28,7 @@ module ExceptionHandler
|
|
28
28
|
|
29
29
|
#Create
|
30
30
|
def create_errors_migration
|
31
|
-
migration_template "migration.rb.erb", "db/migrate/
|
31
|
+
migration_template "migration.rb.erb", "db/migrate/create_errors.rb"
|
32
32
|
end
|
33
33
|
|
34
34
|
###########################################
|
@@ -1,15 +1,14 @@
|
|
1
1
|
class Create<%= table_name.to_s.gsub("_","").titleize %> < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :<%= table_name %> do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.text
|
7
|
-
t.text
|
8
|
-
t.text
|
9
|
-
t.text
|
10
|
-
t.text
|
11
|
-
t.text
|
12
|
-
t.text :user_agent
|
4
|
+
t.references :usable, polymorphic: true
|
5
|
+
t.text :class_name
|
6
|
+
t.text :message
|
7
|
+
t.text :trace
|
8
|
+
t.text :target_url
|
9
|
+
t.text :referer_url
|
10
|
+
t.text :params
|
11
|
+
t.text :user_agent
|
13
12
|
t.timestamps
|
14
13
|
end
|
15
14
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Peck
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- readme/exceptions_app.png
|
151
151
|
- readme/layout.jpg
|
152
152
|
- readme/parser.jpg
|
153
|
+
- readme/source/screen.psd
|
153
154
|
- readme/source/title.psd
|
154
155
|
- readme/subtitle.jpg
|
155
156
|
- readme/title.png
|
@@ -176,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
177
|
version: '0'
|
177
178
|
requirements: []
|
178
179
|
rubyforge_project:
|
179
|
-
rubygems_version: 2.
|
180
|
+
rubygems_version: 2.5.0
|
180
181
|
signing_key:
|
181
182
|
specification_version: 4
|
182
183
|
summary: Rails gem to show custom error pages in production. Also logs errors in "errors"
|