debug-extras 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +8 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +21 -0
- data/Rakefile +6 -0
- data/debug-extras.gemspec +32 -0
- data/lib/debug-extras.rb +17 -0
- data/lib/debug_extras/gem_version.rb +13 -0
- data/lib/debug_extras/helpers/controller_helpers.rb +9 -0
- data/lib/debug_extras/helpers/view_helpers.rb +39 -0
- data/lib/debug_extras/version.rb +7 -0
- metadata +153 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d5899dc72d9c14ae233b7da45c04dae4002fe930
|
4
|
+
data.tar.gz: c0eb7739ba7a07fc17e771e85e3ad072fdac4716
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 02303745351f7b91ca7e621742635b9231621a19bbefca3ee0a7dd38ed7cb864a39993bdbf28ed7db645fa1b6db55b810a4a343ad9ad2f088555183feca88c02
|
7
|
+
data.tar.gz: 11f887333e85f59468aa7dbec5cbb7dfe91e4d10c43b5bfa6227b9957504ecac9f9aadd752a13db5ae3212b47895dd84376697264726e9d6372774bca7be9d11
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Vladimir Avgustov
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# DebugExtras
|
2
|
+
|
3
|
+
Extras for rails debugging.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
gem 'debug-extras'
|
9
|
+
```
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install debug-extras
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Coming soon...
|
data/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'debug_extras/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "debug-extras"
|
8
|
+
spec.version = DebugExtras.version
|
9
|
+
spec.authors = ["Vladimir Avgustov"]
|
10
|
+
spec.email = ["vavgustov@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = 'Summary coming soon'
|
13
|
+
spec.description = 'Description coming soon'
|
14
|
+
spec.homepage = 'https://github.com/vavgustov/debug-extras'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.required_ruby_version = '>= 2.1.0'
|
18
|
+
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
|
+
f.match(%r{^(test|spec|features)/})
|
21
|
+
end
|
22
|
+
|
23
|
+
spec.require_paths = ['lib']
|
24
|
+
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
26
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
28
|
+
|
29
|
+
spec.add_runtime_dependency 'awesome_print', '~> 1.8'
|
30
|
+
spec.add_runtime_dependency 'actionview', '> 4.0', '< 6'
|
31
|
+
spec.add_runtime_dependency 'activesupport', '> 4.0', '< 6'
|
32
|
+
end
|
data/lib/debug-extras.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'debug_extras/version'
|
2
|
+
require 'active_support/concern'
|
3
|
+
require 'active_support/core_ext/string/output_safety'
|
4
|
+
require 'active_support/lazy_load_hooks'
|
5
|
+
require 'awesome_print'
|
6
|
+
|
7
|
+
module DebugExtras
|
8
|
+
ActiveSupport.on_load :action_view do
|
9
|
+
require 'debug_extras/helpers/view_helpers'
|
10
|
+
ActionView::Base.send :include, DebugExtras::Helpers::ViewHelpers
|
11
|
+
end
|
12
|
+
|
13
|
+
ActiveSupport.on_load :action_controller_base do
|
14
|
+
require 'debug_extras/helpers/controller_helpers'
|
15
|
+
ActionController::Base.send :include, DebugExtras::Helpers::ControllerHelpers
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module DebugExtras::Helpers
|
2
|
+
module ViewHelpers
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
def rap(object)
|
6
|
+
raw ap(object)
|
7
|
+
end
|
8
|
+
|
9
|
+
def object_dump(object, full = false)
|
10
|
+
output = ''
|
11
|
+
vars = object.instance_variables
|
12
|
+
|
13
|
+
output << pretty('object class')
|
14
|
+
output << pretty(object.class)
|
15
|
+
|
16
|
+
output << pretty('instance variables list')
|
17
|
+
output << pretty(vars)
|
18
|
+
|
19
|
+
output << pretty('instance variables details')
|
20
|
+
vars.each do |v|
|
21
|
+
output << pretty(v)
|
22
|
+
output << pretty(object.instance_variable_get(v))
|
23
|
+
end
|
24
|
+
|
25
|
+
if full
|
26
|
+
output << pretty('methods list')
|
27
|
+
output << pretty(object.methods)
|
28
|
+
end
|
29
|
+
|
30
|
+
raw output
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def pretty(string)
|
36
|
+
string.ai
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: debug-extras
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vladimir Avgustov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: awesome_print
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.8'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: actionview
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.0'
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '6'
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '4.0'
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '6'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: activesupport
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '4.0'
|
96
|
+
- - "<"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '6'
|
99
|
+
type: :runtime
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '4.0'
|
106
|
+
- - "<"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '6'
|
109
|
+
description: Description coming soon
|
110
|
+
email:
|
111
|
+
- vavgustov@gmail.com
|
112
|
+
executables: []
|
113
|
+
extensions: []
|
114
|
+
extra_rdoc_files: []
|
115
|
+
files:
|
116
|
+
- ".gitignore"
|
117
|
+
- ".rspec"
|
118
|
+
- ".travis.yml"
|
119
|
+
- Gemfile
|
120
|
+
- LICENSE.txt
|
121
|
+
- README.md
|
122
|
+
- Rakefile
|
123
|
+
- debug-extras.gemspec
|
124
|
+
- lib/debug-extras.rb
|
125
|
+
- lib/debug_extras/gem_version.rb
|
126
|
+
- lib/debug_extras/helpers/controller_helpers.rb
|
127
|
+
- lib/debug_extras/helpers/view_helpers.rb
|
128
|
+
- lib/debug_extras/version.rb
|
129
|
+
homepage: https://github.com/vavgustov/debug-extras
|
130
|
+
licenses:
|
131
|
+
- MIT
|
132
|
+
metadata: {}
|
133
|
+
post_install_message:
|
134
|
+
rdoc_options: []
|
135
|
+
require_paths:
|
136
|
+
- lib
|
137
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 2.1.0
|
142
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
requirements: []
|
148
|
+
rubyforge_project:
|
149
|
+
rubygems_version: 2.6.11
|
150
|
+
signing_key:
|
151
|
+
specification_version: 4
|
152
|
+
summary: Summary coming soon
|
153
|
+
test_files: []
|