debug-extras 0.3.6 → 0.4.0
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/.travis.yml +15 -1
- data/README.md +47 -19
- data/debug-extras.gemspec +6 -6
- data/lib/debug-extras.rb +14 -7
- data/lib/debug_extras/core_ext/kernel.rb +10 -4
- data/lib/debug_extras/debug_page.rb +4 -2
- data/lib/debug_extras/dumper.rb +7 -35
- data/lib/debug_extras/ext/action_controller.rb +9 -0
- data/lib/debug_extras/ext/action_view.rb +9 -0
- data/lib/debug_extras/injector.rb +50 -0
- data/lib/debug_extras/middleware/debug.rb +6 -0
- data/lib/debug_extras/railtie.rb +2 -11
- data/lib/debug_extras/settings.rb +8 -30
- data/lib/debug_extras/templates/debug.html.erb +3 -6
- data/lib/debug_extras/templates/styles.html +31 -0
- data/lib/debug_extras/version.rb +1 -1
- metadata +51 -55
- data/lib/debug_extras/helpers/view_helpers.rb +0 -13
- data/lib/debug_extras/middleware/fast_better_errors.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47c7d5857ff588d85e3ba344e2aee47b70215c4f5a72b95e48126b64e5195640
|
4
|
+
data.tar.gz: 454499099c76781bd703496790f64281de68ba5244660520012ff7f126f1d21c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c96945e47ae1372d61d8b5a6185bdba50bb09ff28d0b5cfe9b113e2b0aed558ed4fc3dc612a3acc74c88fc9d67717db66085eb6c14e8e814f8eeff552da090c3
|
7
|
+
data.tar.gz: f828a05a023fbb690515e186e89d97fcbfc6822245ddba53185dc6ddb39184e48d3217549bd4e5bc3fcc7809336d46238dd5a7ade85a79137b07731e469bf265
|
data/.travis.yml
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
sudo: false
|
2
|
+
env:
|
3
|
+
global:
|
4
|
+
- CC_TEST_REPORTER_ID=61fe9088e439d6574c5637416244043c983795d2e70f2e01e5435a144ada5aee
|
2
5
|
language: ruby
|
3
6
|
rvm:
|
4
7
|
- 2.1.10
|
@@ -6,4 +9,15 @@ rvm:
|
|
6
9
|
- 2.3.6
|
7
10
|
- 2.4.3
|
8
11
|
- 2.5.0
|
9
|
-
before_install:
|
12
|
+
before_install:
|
13
|
+
- gem install bundler -v 1.16.1
|
14
|
+
before_script:
|
15
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
16
|
+
- chmod +x ./cc-test-reporter
|
17
|
+
- ./cc-test-reporter before-build
|
18
|
+
script:
|
19
|
+
- bundle exec rspec
|
20
|
+
after_script:
|
21
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
22
|
+
notifications:
|
23
|
+
email: false
|
data/README.md
CHANGED
@@ -1,19 +1,29 @@
|
|
1
|
-
# DebugExtras
|
1
|
+
# DebugExtras
|
2
|
+
[](https://rubygems.org/gems/debug-extras) [](https://travis-ci.org/vavgustov/debug-extras) [](https://codeclimate.com/github/vavgustov/debug-extras/maintainability) [](https://codeclimate.com/github/vavgustov/debug-extras/test_coverage)
|
2
3
|
|
3
|
-
Extras for Ruby on Rails debugging. [Screenshots](https://github.com/vavgustov/debug-extras#
|
4
|
+
Extras for Ruby on Rails debugging. [Screenshots](https://github.com/vavgustov/debug-extras#usage).
|
4
5
|
|
5
|
-
|
6
|
+
> Note: README actual for master branch.
|
7
|
+
|
8
|
+
## Table of Contents
|
9
|
+
- [Features](#features)
|
10
|
+
- [Installation](#installation)
|
11
|
+
- [Usage](#usage)
|
12
|
+
- [#dd](#dd)
|
13
|
+
- [#wp](#wp)
|
14
|
+
- [#dump](#dump)
|
15
|
+
- [Styling](#styling)
|
16
|
+
- [License](#license)
|
6
17
|
|
7
|
-
|
8
|
-
|
9
|
-
(
|
10
|
-
variable without any other stuff at your web browser.
|
11
|
-
It's something like simple alternative to `dd` function from
|
12
|
-
[Laravel](https://laravel.com/) for [Ruby on Rails](http://rubyonrails.org/).
|
18
|
+
## Features
|
19
|
+
* `dd <variable>` at any `app/` place. Inspired by `dd` function from
|
20
|
+
[Laravel](https://laravel.com/).
|
13
21
|
|
14
|
-
|
22
|
+
* `wp <variable>` at any `app/` place. Inspired by classic PHP 'print' debugging.
|
23
|
+
It works for HTML pages and bypass other content types like `application/json`.
|
15
24
|
|
16
|
-
|
25
|
+
* `dump <variable>` at your views. It's alternative for `debug` method from
|
26
|
+
`ActionView::Helpers::DebugHelper` and `ap` from `AwesomePrint`.
|
17
27
|
|
18
28
|
## Installation
|
19
29
|
|
@@ -27,25 +37,43 @@ And then execute:
|
|
27
37
|
|
28
38
|
$ bundle
|
29
39
|
|
30
|
-
|
40
|
+
## Usage
|
31
41
|
|
32
|
-
|
42
|
+
### #dd
|
33
43
|
|
34
|
-
`dd` from
|
44
|
+
Call `dd` from any `app/` place:
|
35
45
|
|
36
46
|
```ruby
|
37
|
-
dd
|
47
|
+
dd @books
|
38
48
|
```
|
39
49
|
|
40
|
-

|
41
51
|
|
42
|
-
|
52
|
+
### #wp
|
53
|
+
|
54
|
+
Call `wp` from any `app/` place:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
wp 'Authors through #wp method (called from controller):'
|
58
|
+
wp @authors
|
59
|
+
```
|
60
|
+
|
61
|
+

|
62
|
+
|
63
|
+
### #dump
|
64
|
+
|
65
|
+
Call `dump` from views:
|
43
66
|
|
44
67
|
```erb
|
45
|
-
<%= dump
|
68
|
+
<%= dump 'Books through #dump method (called from view):' %>
|
69
|
+
<%= dump @books %>
|
46
70
|
```
|
47
71
|
|
48
|
-

|
73
|
+
|
74
|
+
## Styling
|
75
|
+
DebugExtras inject CSS to the page on methods call. You can override styles and set your fonts,
|
76
|
+
margins, etc using `.debug-extras` wrapper. Just look to page sources to get an idea.
|
49
77
|
|
50
78
|
## License
|
51
79
|
|
data/debug-extras.gemspec
CHANGED
@@ -22,11 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.
|
26
|
-
spec.
|
27
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
25
|
+
spec.add_dependency "awesome_print", ">= 1.6", "< 1.9"
|
26
|
+
spec.add_dependency "railties", "> 4.0", "< 6"
|
28
27
|
|
29
|
-
spec.
|
30
|
-
spec.
|
31
|
-
spec.
|
28
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
29
|
+
spec.add_development_dependency "rake", "~> 12.3"
|
30
|
+
spec.add_development_dependency "rspec", "~> 3.7"
|
31
|
+
spec.add_development_dependency "simplecov", "~> 0.15"
|
32
32
|
end
|
data/lib/debug-extras.rb
CHANGED
@@ -1,20 +1,27 @@
|
|
1
1
|
require "active_support/dependencies/autoload"
|
2
2
|
require "active_support/lazy_load_hooks"
|
3
|
-
require "debug_extras/core_ext/kernel"
|
4
|
-
require "debug_extras/version"
|
5
3
|
|
6
4
|
module DebugExtras
|
7
5
|
extend ActiveSupport::Autoload
|
8
6
|
|
9
7
|
autoload :DebugPage
|
10
8
|
autoload :Dumper
|
11
|
-
autoload :
|
9
|
+
autoload :Injector
|
12
10
|
autoload :Settings
|
11
|
+
end
|
12
|
+
|
13
|
+
ActiveSupport.on_load :action_view do
|
14
|
+
require "debug_extras/ext/action_view"
|
15
|
+
::ActionView::Base.send :include, DebugExtras::ActionView
|
16
|
+
end
|
13
17
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
18
|
+
ActiveSupport.on_load :action_controller do
|
19
|
+
require "debug_extras/ext/action_controller"
|
20
|
+
::ActionController::Base.send :include, DebugExtras::ActionController
|
18
21
|
end
|
19
22
|
|
23
|
+
require "debug_extras/core_ext/kernel"
|
24
|
+
require "debug_extras/exceptions"
|
25
|
+
require "debug_extras/version"
|
26
|
+
|
20
27
|
require "debug_extras/railtie" if defined? Rails::Railtie
|
@@ -1,10 +1,16 @@
|
|
1
|
-
require "debug_extras/exceptions"
|
2
|
-
|
3
1
|
module Kernel
|
4
2
|
# dump object through exception message
|
5
|
-
def dd(dump
|
6
|
-
DebugExtras::Dumper.new(dump,
|
3
|
+
def dd(dump)
|
4
|
+
DebugExtras::Dumper.new(dump, 'debug-dd').render do |message|
|
7
5
|
raise DebugExtras::DebugData, message
|
8
6
|
end
|
9
7
|
end
|
8
|
+
|
9
|
+
# print on the html page like php
|
10
|
+
def wp(message)
|
11
|
+
$debug_extras_messages ||= []
|
12
|
+
unless message.blank?
|
13
|
+
$debug_extras_messages << message
|
14
|
+
end
|
15
|
+
end
|
10
16
|
end
|
@@ -5,11 +5,13 @@ module DebugExtras
|
|
5
5
|
def initialize(exception, request_path)
|
6
6
|
@exception = exception
|
7
7
|
@request_path = request_path
|
8
|
-
@template = File.read(File.expand_path("../templates/debug.html.erb", __FILE__))
|
9
8
|
end
|
10
9
|
|
11
10
|
def render
|
12
|
-
|
11
|
+
template = File.read(File.expand_path("../templates/debug.html.erb", __FILE__))
|
12
|
+
styles = File.read(File.expand_path("../templates/styles.html", __FILE__))
|
13
|
+
@inject_styles = ERB.new(styles).result(binding)
|
14
|
+
ERB.new(template).result(binding)
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
data/lib/debug_extras/dumper.rb
CHANGED
@@ -3,52 +3,25 @@ require "awesome_print"
|
|
3
3
|
|
4
4
|
module DebugExtras
|
5
5
|
class Dumper
|
6
|
-
include ActionView::Context
|
7
|
-
include ActionView::Helpers::TagHelper
|
6
|
+
include ::ActionView::Context
|
7
|
+
include ::ActionView::Helpers::TagHelper
|
8
8
|
|
9
|
-
def initialize(dump,
|
9
|
+
def initialize(dump, css_class)
|
10
10
|
@dump = dump
|
11
|
-
@
|
11
|
+
@css_class = "debug-extras #{css_class}"
|
12
|
+
$debug_extras_add_styles = true
|
12
13
|
end
|
13
14
|
|
14
15
|
def render
|
15
|
-
message = content_tag(:div, class:
|
16
|
-
@
|
17
|
-
|
18
|
-
output = @dump.ai Settings.ap_options
|
19
|
-
output = render_object_names output
|
20
|
-
output = add_styles_to_tag(:pre, output)
|
21
|
-
output = add_styles_to_tag(:kbd, output)
|
22
|
-
|
23
|
-
output.html_safe
|
16
|
+
message = content_tag(:div, class: @css_class) do
|
17
|
+
render_object_names(@dump.ai(Settings.options)).html_safe
|
24
18
|
end
|
25
|
-
|
26
19
|
yield message if block_given?
|
27
|
-
|
28
20
|
message
|
29
21
|
end
|
30
22
|
|
31
|
-
private
|
32
|
-
|
33
|
-
def convert_hash_to_style(styles)
|
34
|
-
styles.map { |k, v| "#{k}: #{v}" }.join('; ')
|
35
|
-
end
|
36
|
-
|
37
|
-
def add_styles_to_tag(tag, output)
|
38
|
-
case tag
|
39
|
-
when :pre
|
40
|
-
output.sub!("<pre>", "<pre style=\"#{convert_hash_to_style(Settings.ap_styles(:pre))}\">")
|
41
|
-
when :kbd
|
42
|
-
output.gsub!("<kbd style=\"", "<kbd style=\"#{convert_hash_to_style(Settings.ap_styles(:kbd))}; ")
|
43
|
-
else
|
44
|
-
output
|
45
|
-
end
|
46
|
-
output
|
47
|
-
end
|
48
|
-
|
49
23
|
def render_object_names(dump)
|
50
24
|
output = ""
|
51
|
-
|
52
25
|
dump.split("<").map.with_index do |v, k|
|
53
26
|
if v.include? ":0x" and not (v.include? "kbd" or v.include? "pre")
|
54
27
|
v.sub!(">", "")
|
@@ -57,7 +30,6 @@ module DebugExtras
|
|
57
30
|
end
|
58
31
|
output << v
|
59
32
|
end
|
60
|
-
|
61
33
|
output
|
62
34
|
end
|
63
35
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module DebugExtras
|
2
|
+
class Injector
|
3
|
+
def initialize(response)
|
4
|
+
@response = response
|
5
|
+
@result = @response.body
|
6
|
+
end
|
7
|
+
|
8
|
+
def process_response
|
9
|
+
if response_is_html?
|
10
|
+
inject_messages
|
11
|
+
inject_styles
|
12
|
+
end
|
13
|
+
@result
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def response_is_html?
|
19
|
+
return false unless @response.headers['Content-Type'].include?('html')
|
20
|
+
tags = %w[<html <head </head> <body </body> </html>]
|
21
|
+
tags.each do |tag|
|
22
|
+
return false unless @response.body.include? tag
|
23
|
+
end
|
24
|
+
true
|
25
|
+
end
|
26
|
+
|
27
|
+
def inject_messages
|
28
|
+
return if $debug_extras_messages.blank?
|
29
|
+
$debug_extras_messages.map! { |message| DebugExtras::Dumper.new(message, 'debug-wp').render }
|
30
|
+
injection = $debug_extras_messages.join('')
|
31
|
+
@result = inject_content('<body') do |html|
|
32
|
+
body = html.second.split('>')
|
33
|
+
body.second.prepend(injection) if body.size > 1
|
34
|
+
html[1] = body.join('>')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def inject_styles
|
39
|
+
return unless $debug_extras_add_styles
|
40
|
+
injection = File.read(File.expand_path('../templates/styles.html', __FILE__))
|
41
|
+
@result = inject_content('</head>') { |html| html.first << injection }
|
42
|
+
end
|
43
|
+
|
44
|
+
def inject_content(tag)
|
45
|
+
html = @result.split(tag)
|
46
|
+
yield html if block_given?
|
47
|
+
html.join(tag)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -5,6 +5,7 @@ module DebugExtras
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def call(env)
|
8
|
+
reset_stack
|
8
9
|
@app.call env
|
9
10
|
rescue StandardError => ex
|
10
11
|
process_exception(ex, env)
|
@@ -12,6 +13,11 @@ module DebugExtras
|
|
12
13
|
|
13
14
|
private
|
14
15
|
|
16
|
+
def reset_stack
|
17
|
+
$debug_extras_add_styles = false
|
18
|
+
$debug_extras_messages = []
|
19
|
+
end
|
20
|
+
|
15
21
|
def process_exception(ex, env)
|
16
22
|
if [ex.class, ex.cause.class].map(&:to_s).include? "DebugExtras::DebugData"
|
17
23
|
debug_page = DebugPage.new(ex, env["PATH_INFO"])
|
data/lib/debug_extras/railtie.rb
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
require "debug_extras/middleware/debug"
|
2
|
-
require "debug_extras/middleware/fast_better_errors"
|
3
2
|
|
4
3
|
module DebugExtras
|
5
4
|
class Railtie < Rails::Railtie
|
6
|
-
initializer "debug_extras.
|
7
|
-
if Rails.env.development?
|
8
|
-
insert_middleware(DebugExtras::Debug)
|
9
|
-
insert_middleware(DebugExtras::FastBetterErrors) if better_errors_slow?
|
10
|
-
end
|
5
|
+
initializer "debug_extras.setup_middleware" do
|
6
|
+
insert_middleware(DebugExtras::Debug) if Rails.env.development?
|
11
7
|
end
|
12
8
|
|
13
9
|
private
|
@@ -22,11 +18,6 @@ module DebugExtras
|
|
22
18
|
end
|
23
19
|
end
|
24
20
|
|
25
|
-
def better_errors_slow?
|
26
|
-
return false unless defined?(BetterErrors) && defined?(Puma::Const::PUMA_VERSION)
|
27
|
-
BetterErrors.binding_of_caller_available && Puma::Const::PUMA_VERSION.split(".").first.to_i == 3
|
28
|
-
end
|
29
|
-
|
30
21
|
def app
|
31
22
|
Rails.application
|
32
23
|
end
|
@@ -1,35 +1,13 @@
|
|
1
1
|
module DebugExtras
|
2
2
|
module Settings
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
"background" => "#f5f8fa",
|
12
|
-
"border" => "1px solid #ccc",
|
13
|
-
"border-radius" => "0",
|
14
|
-
"color" => "#111",
|
15
|
-
"font-family" => "Menlo, Consolas, Ubuntu, monospace",
|
16
|
-
"font-weight" => "bold",
|
17
|
-
"font-size" => "12px",
|
18
|
-
"line-height" => "1.43",
|
19
|
-
"margin" => "0 0 10px",
|
20
|
-
"padding" => "10px",
|
21
|
-
"white-space" => "pre-wrap",
|
22
|
-
},
|
23
|
-
kbd: {
|
24
|
-
"background" => "none",
|
25
|
-
"box-shadow" => "none",
|
26
|
-
"font-family" => "Menlo, Consolas, Ubuntu, monospace",
|
27
|
-
"font-weight" => "bold",
|
28
|
-
"font-size" => "12px",
|
29
|
-
"padding" => "2px 4px"
|
30
|
-
}
|
31
|
-
}[tag]
|
32
|
-
end
|
3
|
+
def self.options
|
4
|
+
{
|
5
|
+
html: true,
|
6
|
+
color: {
|
7
|
+
array: :yellowish,
|
8
|
+
class: :cyanish
|
9
|
+
}
|
10
|
+
}
|
33
11
|
end
|
34
12
|
end
|
35
13
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
<!-- page generated by debug-extras #dd method call -->
|
1
2
|
<!doctype html>
|
2
3
|
<html lang="en">
|
3
4
|
<head>
|
@@ -10,18 +11,14 @@
|
|
10
11
|
body {
|
11
12
|
margin: 0;
|
12
13
|
padding: 15px;
|
13
|
-
color: #c52f24;
|
14
|
-
background: #f5f8fa;
|
15
|
-
}
|
16
|
-
|
17
|
-
pre {
|
18
|
-
border: 0 !important;
|
19
14
|
}
|
20
15
|
|
21
16
|
.container {
|
22
17
|
width: 100%;
|
23
18
|
}
|
24
19
|
</style>
|
20
|
+
|
21
|
+
<%= @inject_styles %>
|
25
22
|
</head>
|
26
23
|
<body>
|
27
24
|
<div class="container">
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<!-- styles injected by debug-extras gem -->
|
2
|
+
<style>
|
3
|
+
.debug-extras pre {
|
4
|
+
padding: 10px;
|
5
|
+
text-align: left;
|
6
|
+
}
|
7
|
+
|
8
|
+
.debug-extras kbd {
|
9
|
+
padding: 2px 4px;
|
10
|
+
}
|
11
|
+
|
12
|
+
.debug-extras pre,
|
13
|
+
.debug-extras kbd {
|
14
|
+
background: none;
|
15
|
+
border: none;
|
16
|
+
box-shadow: none;
|
17
|
+
font-family: SFMono-Regular, Menlo, Monaco, Consolas, Ubuntu, monospace;
|
18
|
+
font-weight: normal;
|
19
|
+
font-size: 12px;
|
20
|
+
line-height: 16px;
|
21
|
+
margin: 0;
|
22
|
+
}
|
23
|
+
|
24
|
+
.debug-extras.debug-dump {
|
25
|
+
background: #f5f8fa;
|
26
|
+
border: 1px solid #ccc;
|
27
|
+
border-radius: 0;
|
28
|
+
margin-bottom: 1.5rem;
|
29
|
+
}
|
30
|
+
</style>
|
31
|
+
<!-- end of debug-extras -->
|
data/lib/debug_extras/version.rb
CHANGED
metadata
CHANGED
@@ -1,117 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debug-extras
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Avgustov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: awesome_print
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
20
|
-
|
19
|
+
version: '1.6'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1.9'
|
23
|
+
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
29
|
+
version: '1.6'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.9'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
34
|
+
name: railties
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
|
39
|
+
version: '4.0'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '6'
|
43
|
+
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - ">"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '4.0'
|
50
|
+
- - "<"
|
39
51
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
52
|
+
version: '6'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
54
|
+
name: bundler
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
44
56
|
requirements:
|
45
57
|
- - "~>"
|
46
58
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
59
|
+
version: '1.16'
|
48
60
|
type: :development
|
49
61
|
prerelease: false
|
50
62
|
version_requirements: !ruby/object:Gem::Requirement
|
51
63
|
requirements:
|
52
64
|
- - "~>"
|
53
65
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
66
|
+
version: '1.16'
|
55
67
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
68
|
+
name: rake
|
57
69
|
requirement: !ruby/object:Gem::Requirement
|
58
70
|
requirements:
|
59
|
-
- - "
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.6'
|
62
|
-
- - "<"
|
71
|
+
- - "~>"
|
63
72
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
65
|
-
type: :
|
73
|
+
version: '12.3'
|
74
|
+
type: :development
|
66
75
|
prerelease: false
|
67
76
|
version_requirements: !ruby/object:Gem::Requirement
|
68
77
|
requirements:
|
69
|
-
- - "
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: '1.6'
|
72
|
-
- - "<"
|
78
|
+
- - "~>"
|
73
79
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
80
|
+
version: '12.3'
|
75
81
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
82
|
+
name: rspec
|
77
83
|
requirement: !ruby/object:Gem::Requirement
|
78
84
|
requirements:
|
79
|
-
- - "
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '4.0'
|
82
|
-
- - "<"
|
85
|
+
- - "~>"
|
83
86
|
- !ruby/object:Gem::Version
|
84
|
-
version: '
|
85
|
-
type: :
|
87
|
+
version: '3.7'
|
88
|
+
type: :development
|
86
89
|
prerelease: false
|
87
90
|
version_requirements: !ruby/object:Gem::Requirement
|
88
91
|
requirements:
|
89
|
-
- - "
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: '4.0'
|
92
|
-
- - "<"
|
92
|
+
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
94
|
+
version: '3.7'
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
|
-
name:
|
96
|
+
name: simplecov
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- - "
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '4.0'
|
102
|
-
- - "<"
|
99
|
+
- - "~>"
|
103
100
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
105
|
-
type: :
|
101
|
+
version: '0.15'
|
102
|
+
type: :development
|
106
103
|
prerelease: false
|
107
104
|
version_requirements: !ruby/object:Gem::Requirement
|
108
105
|
requirements:
|
109
|
-
- - "
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '4.0'
|
112
|
-
- - "<"
|
106
|
+
- - "~>"
|
113
107
|
- !ruby/object:Gem::Version
|
114
|
-
version: '
|
108
|
+
version: '0.15'
|
115
109
|
description: Provide debug helper methods for ActionController::Base and ActionView::Base.
|
116
110
|
email:
|
117
111
|
- vavgustov@gmail.com
|
@@ -132,12 +126,14 @@ files:
|
|
132
126
|
- lib/debug_extras/debug_page.rb
|
133
127
|
- lib/debug_extras/dumper.rb
|
134
128
|
- lib/debug_extras/exceptions.rb
|
135
|
-
- lib/debug_extras/
|
129
|
+
- lib/debug_extras/ext/action_controller.rb
|
130
|
+
- lib/debug_extras/ext/action_view.rb
|
131
|
+
- lib/debug_extras/injector.rb
|
136
132
|
- lib/debug_extras/middleware/debug.rb
|
137
|
-
- lib/debug_extras/middleware/fast_better_errors.rb
|
138
133
|
- lib/debug_extras/railtie.rb
|
139
134
|
- lib/debug_extras/settings.rb
|
140
135
|
- lib/debug_extras/templates/debug.html.erb
|
136
|
+
- lib/debug_extras/templates/styles.html
|
141
137
|
- lib/debug_extras/version.rb
|
142
138
|
homepage: https://github.com/vavgustov/debug-extras
|
143
139
|
licenses:
|
@@ -1,13 +0,0 @@
|
|
1
|
-
module DebugExtras
|
2
|
-
# based on https://github.com/charliesome/better_errors/issues/341 proposals
|
3
|
-
class FastBetterErrors
|
4
|
-
def initialize(app)
|
5
|
-
@app = app
|
6
|
-
end
|
7
|
-
|
8
|
-
def call(env)
|
9
|
-
env["puma.config"].options.user_options.delete(:app) if env.has_key?("puma.config")
|
10
|
-
@app.call env
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|