instance_vars_panel 0.1.5 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9e20432fa02a3e2ed4ae01bba18cbd5582b1e01f86ae20d649609f9d2277abc
4
- data.tar.gz: b7eee9393d23295839f7758f1bbb150c4e098f5e4cfe1630edcca38f3219b7d7
3
+ metadata.gz: 2bce7d872e05c3ccf0d0f28c7ad876e499631150b93af6a20174d72fe575e671
4
+ data.tar.gz: a79c5dc463b90a1c6d25eaa9864cd99aaffdf39ddb729af05576a69cabeeaad5
5
5
  SHA512:
6
- metadata.gz: 87fea11a82516a846d28721aea231fea59abe9ea3648c770b38a42df46096e6ecb7b32a7f8b39e6110268867843f2300f79765aea7cc2a6a36ba0d37d07552a9
7
- data.tar.gz: 8e731b11b63b2e3b982f5eb374ba3b23576b67b237d5f508c61b9bc66a56d062f49c52699e0ea9bf38fc62ba1caafcbb74e19fe65a6422ab803454829d75cefa
6
+ metadata.gz: 4dad3e64973be4277c29df0c64425185e7f2698aca43615d26eb7984347bad8bd5cd93758ea0d3e300b83d671861d88013d41b8822abf525dc08212a2c15aaad
7
+ data.tar.gz: 46d3e6d75f415f7a2f736780d1390dd8c9f009ac57e0a9ce9a2b9d8907acd80f03951ab2d2b39f96305b73b62a67f1bf3808cbee465a0c1bf6c7aef68097ea95
@@ -0,0 +1,9 @@
1
+ module InstanceVarsPanel
2
+ module DebugHelper
3
+ def render_instance_vars_panel
4
+ return unless Rails.env.development?
5
+
6
+ render partial: "instance_vars_panel/panel"
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ %details{ style: "position: fixed; top: 10px; right: 10px; background: white; border: 1px solid #ccc; padding: 10px; z-index: 1000; max-width: 300px;" }
2
+ %summary{ style: "cursor: pointer; font-weight: bold;" } ⚙ Debug Info
3
+ %div{ style: "max-height: 300px; overflow: auto; padding: 5px; border-top: 1px solid #ccc;" }
4
+ %ul
5
+ - instance_variables.each do |var|
6
+ %li
7
+ %details
8
+ %summary{ style: "cursor: pointer; font-weight: bold;" }= var
9
+ %pre{ style: "white-space: pre-wrap; word-wrap: break-word; background: #f8f8f8; padding: 5px; border-radius: 5px;" }
10
+ = instance_variable_get(var).inspect
@@ -23,7 +23,8 @@ Gem::Specification.new do |spec|
23
23
  # Specify which files should be added to the gem when it is released.
24
24
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
25
  File.basename(__FILE__)
26
- spec.files = Dir.glob("{lib,exe}/**/*") + ["instance_vars_panel.gemspec"]
26
+ spec.files = Dir.glob("{lib,exe,app}/**/*") + ["instance_vars_panel.gemspec"]
27
+
27
28
  spec.bindir = "exe"
28
29
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
30
  spec.require_paths = ["lib"]
@@ -4,7 +4,6 @@ module InstanceVarsPanel
4
4
 
5
5
  initializer "instance_vars_panel.view_helpers" do
6
6
  ActiveSupport.on_load(:action_controller_base) do
7
- require "instance_vars_panel/debug_helper"
8
7
  helper InstanceVarsPanel::DebugHelper
9
8
  end
10
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InstanceVarsPanel
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instance_vars_panel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Horokhov Aleksandr
@@ -18,6 +18,8 @@ executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
+ - app/helpers/instance_vars_panel/debug_helper.rb
22
+ - app/views/instance_vars_panel/_panel.html.haml
21
23
  - instance_vars_panel.gemspec
22
24
  - lib/instance_vars_panel.rb
23
25
  - lib/instance_vars_panel/engine.rb