errdo 0.11.5 → 0.11.6
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/app/controllers/errdo/exceptions_controller.rb +1 -1
- data/lib/errdo/notifications/slack/notification_adapter.rb +1 -1
- data/lib/errdo/version.rb +1 -1
- data/lib/errdo.rb +3 -0
- data/lib/generators/templates/errdo.rb +4 -2
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +81 -0
- data/test/dummy/log/test.log +15771 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Y1/Y14HJD18tXVTGdi_82TYh9vOKSsxKgZvquba5dLQKWo.cache +1 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/integrations/errors_integration_test.rb +14 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ad577c40b152ed04f66c8754561ee289996448f
|
4
|
+
data.tar.gz: c8d7ef2a6ebbd091caeb8906e6f445131a52d139
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c53103b6019c69f643e30b78e144d048583f82aa65ff8cb2a8c8b8393ae418897359c255631b00738c3f20da83f56fa881557126e7bee4e10d20797d509cf4d1
|
7
|
+
data.tar.gz: f701bc90c15d87628baa6492330d2061d4e71dff66341105697952d49394222711ea19290617cafa89f6da2ec99dda84aae9274fe37803045dd5db9e9c3c0e73
|
@@ -14,7 +14,7 @@ module Errdo
|
|
14
14
|
body = { status: status,
|
15
15
|
error: Rack::Utils::HTTP_STATUS_CODES.fetch(status.to_i, Rack::Utils::HTTP_STATUS_CODES[500]) }
|
16
16
|
|
17
|
-
Errdo::Exception.new(env)
|
17
|
+
Errdo::Exception.new(env) if Errdo.log404 || status.to_i != 404
|
18
18
|
render(status, content_type, body)
|
19
19
|
end
|
20
20
|
|
data/lib/errdo/version.rb
CHANGED
data/lib/errdo.rb
CHANGED
@@ -41,6 +41,9 @@ module Errdo
|
|
41
41
|
# This determines whether a task that fails will log an exception
|
42
42
|
mattr_accessor :log_task_exceptions
|
43
43
|
@@log_task_exceptions = true
|
44
|
+
|
45
|
+
mattr_accessor :log404
|
46
|
+
@@log404 = false
|
44
47
|
# rubocop:enable Style/ClassVars
|
45
48
|
|
46
49
|
# == Authentication ==
|
@@ -2,7 +2,10 @@ Errdo.setup do |config|
|
|
2
2
|
# Add words to be scrubbed from the params here. By default, this is
|
3
3
|
# %w(password passwd password_confirmation secret confirm_password secret_token)
|
4
4
|
# So make sure you add on, not replace!
|
5
|
-
#
|
5
|
+
# config.dirty_words += ["custom_param"]
|
6
|
+
|
7
|
+
# By default, 404 errors are ignored. To un-ignore them, set this to true
|
8
|
+
# config.log404 = true
|
6
9
|
|
7
10
|
## == Authorization and Devise integration =========
|
8
11
|
# If you have the ability to track who's logged in, setting the current_user_method
|
@@ -50,5 +53,4 @@ Errdo.setup do |config|
|
|
50
53
|
## == Non Web Requests ============================
|
51
54
|
# Error logging for rake tasks is on by default. To turn it off, set
|
52
55
|
# Errdo.log_task_exceptions = false
|
53
|
-
|
54
56
|
end
|
Binary file
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -30908,3 +30908,84 @@ Processing by Errdo::ErrorsController#show as HTML
|
|
30908
30908
|
Rendered /home/eric/Projects/errdo/app/views/errdo/errors/show.html.slim within layouts/errdo/application (18.3ms)
|
30909
30909
|
Rendered /home/eric/Projects/errdo/app/views/layouts/errdo/_navbar.html.slim (0.4ms)
|
30910
30910
|
Completed 200 OK in 40ms (Views: 34.3ms | ActiveRecord: 1.4ms)
|
30911
|
+
|
30912
|
+
|
30913
|
+
Started GET "/static/generic_error" for 127.0.0.1 at 2016-11-14 20:27:38 -0500
|
30914
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
30915
|
+
Processing by StaticController#generic_error as HTML
|
30916
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms)
|
30917
|
+
|
30918
|
+
RuntimeError (standard-error):
|
30919
|
+
app/controllers/static_controller.rb:7:in `generic_error'
|
30920
|
+
|
30921
|
+
|
30922
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
|
30923
|
+
[1m[36mErrdo::Error Load (0.3ms)[0m [1mSELECT "errors".* FROM "errors" WHERE "errors"."backtrace_hash" = ? LIMIT 1[0m [["backtrace_hash", "trollers/static_controller.rb:7:in `generic_error'standard-errorRuntimeError"]]
|
30924
|
+
[1m[35m (0.1ms)[0m begin transaction
|
30925
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "error_occurrences" ("ip", "user_agent", "query_string", "experiencer_id", "experiencer_type", "param_values", "cookie_values", "header_values", "error_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["ip", "127.0.0.1"], ["user_agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36"], ["query_string", ""], ["experiencer_id", 1], ["experiencer_type", "User"], ["param_values", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ncontroller: static\naction: generic_error\n"], ["cookie_values", "---\n_ga: GA1.1.2096945490.1464561447\n_dummy_session: YUhZT0k5RkZwcHVWSnFjRUxUcFZhM2QvZ0thbzJiUmQwRUl1c2ljUVR4YU1KQlJzZU96MWVlcW5YcTRZR0hEQ3V2WFN3N1gwdjd0UmZrY1pqUW04VG9rTGpSbm9rb1JMMFpQM0lkTHVDYUovTlFPZDNMcmNtODVYSmN5RmFlNTluS3F5MTdSdTROSTk4aHRSS1Q0RnA0S0g4c0xVaHp0UDlOcXNKOHZEQVI3bEdweEl3NkM2OXFSdTR6YzFYT1RmbUxvWTUzWUhINmdqNVFjWGlCRGpjMVBKbEtwbmk5MHZNcks3Y2NyYmwxazIybS9mYmRuaDdaenlxTDlScGxCeEFhZis5SWdaaUxNV1d5NjVVUzBpNlhqcThiMXJTakRXWm9XZ1pBWjhwRmNaSi9DTy9EYlB3eWx4WDRhTkJ6b21sLytTSGRTK1ZkY3FlRVQ1UzMxVlJ3PT0tLUE1ckIvak5TcmNtaEZGd3lHNHlxb1E9PQ==--3f2090014ec6993bdc565351992c7a1ccf490664\n"], ["header_values", "---\nX-Frame-Options: SAMEORIGIN\nX-XSS-Protection: 1; mode=block\nX-Content-Type-Options: nosniff\n"], ["error_id", 5], ["created_at", "2016-11-15 01:28:31.144885"], ["updated_at", "2016-11-15 01:28:31.144885"]]
|
30926
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "errors" SET "occurrence_count" = COALESCE("occurrence_count", 0) + 1 WHERE "errors"."id" = ? [["id", 5]]
|
30927
|
+
[1m[36mErrdo::Error Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "errors" WHERE ("errors"."backtrace_hash" = 'trollers/static_controller.rb:7:in `generic_error''standard-errorRuntimeError' AND "errors"."id" != 5) LIMIT 1[0m
|
30928
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "errors" SET "occurrence_count" = ?, "last_occurred_at" = ?, "updated_at" = ? WHERE "errors"."id" = ? [["occurrence_count", 67], ["last_occurred_at", "2016-11-15 01:28:31.144885"], ["updated_at", "2016-11-15 01:28:31.156859"], ["id", 5]]
|
30929
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
30930
|
+
[1m[35mErrdo::Error Exists (0.1ms)[0m SELECT 1 AS one FROM "errors" WHERE ("errors"."backtrace_hash" = 'trollers/static_controller.rb:7:in `generic_error''standard-errorRuntimeError' AND "errors"."id" != 5) LIMIT 1
|
30931
|
+
[1m[36m (9.1ms)[0m [1mcommit transaction[0m
|
30932
|
+
|
30933
|
+
|
30934
|
+
Started GET "/static/generic_error" for 127.0.0.1 at 2016-11-14 20:28:31 -0500
|
30935
|
+
Processing by StaticController#generic_error as HTML
|
30936
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms)
|
30937
|
+
|
30938
|
+
RuntimeError (standard-error):
|
30939
|
+
app/controllers/static_controller.rb:7:in `generic_error'
|
30940
|
+
|
30941
|
+
|
30942
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
|
30943
|
+
[1m[36mErrdo::Error Load (0.2ms)[0m [1mSELECT "errors".* FROM "errors" WHERE "errors"."backtrace_hash" = ? LIMIT 1[0m [["backtrace_hash", "trollers/static_controller.rb:7:in `generic_error'standard-errorRuntimeError"]]
|
30944
|
+
[1m[35m (0.0ms)[0m begin transaction
|
30945
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "error_occurrences" ("ip", "user_agent", "query_string", "experiencer_id", "experiencer_type", "param_values", "cookie_values", "header_values", "error_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["ip", "127.0.0.1"], ["user_agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36"], ["query_string", ""], ["experiencer_id", 1], ["experiencer_type", "User"], ["param_values", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\ncontroller: static\naction: generic_error\n"], ["cookie_values", "---\n_ga: GA1.1.2096945490.1464561447\n_dummy_session: YUhZT0k5RkZwcHVWSnFjRUxUcFZhM2QvZ0thbzJiUmQwRUl1c2ljUVR4YU1KQlJzZU96MWVlcW5YcTRZR0hEQ3V2WFN3N1gwdjd0UmZrY1pqUW04VG9rTGpSbm9rb1JMMFpQM0lkTHVDYUovTlFPZDNMcmNtODVYSmN5RmFlNTluS3F5MTdSdTROSTk4aHRSS1Q0RnA0S0g4c0xVaHp0UDlOcXNKOHZEQVI3bEdweEl3NkM2OXFSdTR6YzFYT1RmbUxvWTUzWUhINmdqNVFjWGlCRGpjMVBKbEtwbmk5MHZNcks3Y2NyYmwxazIybS9mYmRuaDdaenlxTDlScGxCeEFhZis5SWdaaUxNV1d5NjVVUzBpNlhqcThiMXJTakRXWm9XZ1pBWjhwRmNaSi9DTy9EYlB3eWx4WDRhTkJ6b21sLytTSGRTK1ZkY3FlRVQ1UzMxVlJ3PT0tLUE1ckIvak5TcmNtaEZGd3lHNHlxb1E9PQ==--3f2090014ec6993bdc565351992c7a1ccf490664\n"], ["header_values", "---\nX-Frame-Options: SAMEORIGIN\nX-XSS-Protection: 1; mode=block\nX-Content-Type-Options: nosniff\n"], ["error_id", 5], ["created_at", "2016-11-15 01:28:32.501556"], ["updated_at", "2016-11-15 01:28:32.501556"]]
|
30946
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "errors" SET "occurrence_count" = COALESCE("occurrence_count", 0) + 1 WHERE "errors"."id" = ? [["id", 5]]
|
30947
|
+
[1m[36mErrdo::Error Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "errors" WHERE ("errors"."backtrace_hash" = 'trollers/static_controller.rb:7:in `generic_error''standard-errorRuntimeError' AND "errors"."id" != 5) LIMIT 1[0m
|
30948
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "errors" SET "occurrence_count" = ?, "last_occurred_at" = ?, "updated_at" = ? WHERE "errors"."id" = ? [["occurrence_count", 68], ["last_occurred_at", "2016-11-15 01:28:32.501556"], ["updated_at", "2016-11-15 01:28:32.508508"], ["id", 5]]
|
30949
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
30950
|
+
[1m[35mErrdo::Error Exists (0.1ms)[0m SELECT 1 AS one FROM "errors" WHERE ("errors"."backtrace_hash" = 'trollers/static_controller.rb:7:in `generic_error''standard-errorRuntimeError' AND "errors"."id" != 5) LIMIT 1
|
30951
|
+
[1m[36m (9.4ms)[0m [1mcommit transaction[0m
|
30952
|
+
|
30953
|
+
|
30954
|
+
Started GET "/static/generic_error" for 127.0.0.1 at 2016-11-14 21:18:07 -0500
|
30955
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
30956
|
+
Processing by StaticController#generic_error as HTML
|
30957
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms)
|
30958
|
+
|
30959
|
+
RuntimeError (standard-error):
|
30960
|
+
app/controllers/static_controller.rb:7:in `generic_error'
|
30961
|
+
|
30962
|
+
|
30963
|
+
|
30964
|
+
|
30965
|
+
Started GET "/static/generic_error" for 127.0.0.1 at 2016-11-14 21:22:31 -0500
|
30966
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
30967
|
+
Processing by StaticController#generic_error as HTML
|
30968
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms)
|
30969
|
+
|
30970
|
+
RuntimeError (standard-error):
|
30971
|
+
app/controllers/static_controller.rb:7:in `generic_error'
|
30972
|
+
|
30973
|
+
|
30974
|
+
Rendered /home/eric/.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (4.2ms)
|
30975
|
+
Rendered /home/eric/.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.8ms)
|
30976
|
+
Rendered /home/eric/.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (9.0ms)
|
30977
|
+
Rendered /home/eric/.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (25.5ms)
|
30978
|
+
|
30979
|
+
|
30980
|
+
Started GET "/static/generic_error" for 127.0.0.1 at 2016-11-14 21:22:53 -0500
|
30981
|
+
Processing by StaticController#generic_error as HTML
|
30982
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms)
|
30983
|
+
|
30984
|
+
RuntimeError (standard-error):
|
30985
|
+
app/controllers/static_controller.rb:7:in `generic_error'
|
30986
|
+
|
30987
|
+
|
30988
|
+
Rendered /home/eric/.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (3.4ms)
|
30989
|
+
Rendered /home/eric/.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.5ms)
|
30990
|
+
Rendered /home/eric/.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms)
|
30991
|
+
Rendered /home/eric/.rvm/gems/ruby-2.3.1/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (14.6ms)
|