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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e34769bc216f226f3de5f2902f86bf32a0281a2e88ca9f570ce2e3a3917843f
4
- data.tar.gz: 84f665b83921c3ade1705737bce363b018c4b716b08e038f421a6cf923bc77b5
3
+ metadata.gz: 47c7d5857ff588d85e3ba344e2aee47b70215c4f5a72b95e48126b64e5195640
4
+ data.tar.gz: 454499099c76781bd703496790f64281de68ba5244660520012ff7f126f1d21c
5
5
  SHA512:
6
- metadata.gz: 2d4b6203f3dfecb61035156af58f33abb8a491a7a49eff9ffd6f3f98d6143c801bbe62ca13d94be3885d9aa83b1d21022ed43fb1bcb5b8106f2756c8c2dbd3dc
7
- data.tar.gz: a8e8f0a3dc847eee18b07f1b495dd681011b1205f80f16c12a66d6f8c942146558ab885759a1d1074674f50bb1f5f9b5c7cbb0a4eb362d89a3de1776726fe9e4
6
+ metadata.gz: c96945e47ae1372d61d8b5a6185bdba50bb09ff28d0b5cfe9b113e2b0aed558ed4fc3dc612a3acc74c88fc9d67717db66085eb6c14e8e814f8eeff552da090c3
7
+ data.tar.gz: f828a05a023fbb690515e186e89d97fcbfc6822245ddba53185dc6ddb39184e48d3217549bd4e5bc3fcc7809336d46238dd5a7ade85a79137b07731e469bf265
@@ -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: gem install bundler -v 1.16.1
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 [![Gem](https://img.shields.io/gem/v/debug-extras.svg)](https://rubygems.org/gems/debug-extras) [![Build Status](https://img.shields.io/travis/vavgustov/debug-extras/master.svg)](https://travis-ci.org/vavgustov/debug-extras)
1
+ # DebugExtras
2
+ [![Gem](https://img.shields.io/gem/v/debug-extras.svg)](https://rubygems.org/gems/debug-extras) [![Build Status](https://img.shields.io/travis/vavgustov/debug-extras/master.svg)](https://travis-ci.org/vavgustov/debug-extras) [![Maintainability](https://api.codeclimate.com/v1/badges/63067512ae858df2a5b3/maintainability)](https://codeclimate.com/github/vavgustov/debug-extras/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/63067512ae858df2a5b3/test_coverage)](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#screenshots).
4
+ Extras for Ruby on Rails debugging. [Screenshots](https://github.com/vavgustov/debug-extras#usage).
4
5
 
5
- ## Features
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
- At this moment provide next things:
8
- 1. `dd <variable>` at any place of your application
9
- (controllers/models/views/services/etc). After that you can see dump of this
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
- 2. `dump <variable>` at your views. It's alternative for `debug` method from `ActionView::Helpers::DebugHelper`.
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
- 3. temporary fix for `better_errors` and `binding_or_caller` with `puma 3.x` performance [issue](https://github.com/charliesome/better_errors/issues/341).
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
- Or you can install it using [rgversion](https://github.com/vavgustov/rgversion) like any other gems.
40
+ ## Usage
31
41
 
32
- ## Screenshots
42
+ ### #dd
33
43
 
34
- `dd` from controller/model/service/etc:
44
+ Call `dd` from any `app/` place:
35
45
 
36
46
  ```ruby
37
- dd Book.all
47
+ dd @books
38
48
  ```
39
49
 
40
- ![image](https://user-images.githubusercontent.com/312873/29333319-0480bb34-820c-11e7-82b0-3d2e648a4af8.png)
50
+ ![image](https://user-images.githubusercontent.com/312873/35333798-26e3f95e-0121-11e8-86e1-4e0d5bd1b068.png)
41
51
 
42
- `dump` from views:
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
+ ![image](https://user-images.githubusercontent.com/312873/35333801-271a9c0c-0121-11e8-91d5-740706150c32.png)
62
+
63
+ ### #dump
64
+
65
+ Call `dump` from views:
43
66
 
44
67
  ```erb
45
- <%= dump Book.all %>
68
+ <%= dump 'Books through #dump method (called from view):' %>
69
+ <%= dump @books %>
46
70
  ```
47
71
 
48
- ![image](https://user-images.githubusercontent.com/312873/29333320-0482b484-820c-11e7-87ce-800e5319ce98.png)
72
+ ![image](https://user-images.githubusercontent.com/312873/35333799-26ffefba-0121-11e8-8021-a5faa62e6953.png)
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
 
@@ -22,11 +22,11 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_development_dependency "bundler", "~> 1.16"
26
- spec.add_development_dependency "rake", "~> 10.0"
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.add_runtime_dependency "awesome_print", ">= 1.6", "< 1.9"
30
- spec.add_runtime_dependency "actionview", "> 4.0", "< 6"
31
- spec.add_runtime_dependency "activesupport", "> 4.0", "< 6"
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
@@ -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 :Middleware
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
- ActiveSupport.on_load :action_view do
15
- require "debug_extras/helpers/view_helpers"
16
- ::ActionView::Base.send :include, DebugExtras::Helpers::ViewHelpers
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, settings = {})
6
- DebugExtras::Dumper.new(dump, settings).render do |message|
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
- ERB.new(@template).result(binding)
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
@@ -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, settings)
9
+ def initialize(dump, css_class)
10
10
  @dump = dump
11
- @settings = settings
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: 'debug-extras') do
16
- @settings.merge! Settings.ap_options
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,9 @@
1
+ module DebugExtras
2
+ module ActionController
3
+ def render(*args)
4
+ super
5
+ injector = Injector.new(response)
6
+ response.body = injector.process_response
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require "active_support/concern"
2
+
3
+ module DebugExtras
4
+ module ActionView
5
+ def dump(object)
6
+ Dumper.new(object, 'debug-dump').render
7
+ end
8
+ end
9
+ 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"])
@@ -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.configure_rails_initialization" do
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
- class << self
4
- def ap_options
5
- { html: true, color: { array: :yellowish } }
6
- end
7
-
8
- def ap_styles(tag)
9
- {
10
- pre: {
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 -->
@@ -1,3 +1,3 @@
1
1
  module DebugExtras
2
- VERSION = "0.3.6"
2
+ VERSION = "0.4.0"
3
3
  end
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.3.6
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-07 00:00:00.000000000 Z
11
+ date: 2018-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
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.16'
20
- type: :development
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.16'
29
+ version: '1.6'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '1.9'
27
33
  - !ruby/object:Gem::Dependency
28
- name: rake
34
+ name: railties
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">"
32
38
  - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
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: '10.0'
52
+ version: '6'
41
53
  - !ruby/object:Gem::Dependency
42
- name: rspec
54
+ name: bundler
43
55
  requirement: !ruby/object:Gem::Requirement
44
56
  requirements:
45
57
  - - "~>"
46
58
  - !ruby/object:Gem::Version
47
- version: '3.0'
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: '3.0'
66
+ version: '1.16'
55
67
  - !ruby/object:Gem::Dependency
56
- name: awesome_print
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: '1.9'
65
- type: :runtime
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: '1.9'
80
+ version: '12.3'
75
81
  - !ruby/object:Gem::Dependency
76
- name: actionview
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: '6'
85
- type: :runtime
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: '6'
94
+ version: '3.7'
95
95
  - !ruby/object:Gem::Dependency
96
- name: activesupport
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: '6'
105
- type: :runtime
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: '6'
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/helpers/view_helpers.rb
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
- require "active_support/concern"
2
-
3
- module DebugExtras
4
- module Helpers
5
- module ViewHelpers
6
- extend ActiveSupport::Concern
7
-
8
- def dump(object, settings = {})
9
- Dumper.new(object, settings).render
10
- end
11
- end
12
- end
13
- end
@@ -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