amazing_print 1.0.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/Appraisals +47 -51
- data/CHANGELOG.md +32 -0
- data/Gemfile +2 -0
- data/LICENSE +1 -0
- data/README.md +20 -13
- data/Rakefile +2 -0
- data/lib/amazing_print.rb +19 -17
- data/lib/amazing_print/colorize.rb +2 -0
- data/lib/amazing_print/core_ext/awesome_method_array.rb +3 -1
- data/lib/amazing_print/core_ext/class.rb +2 -0
- data/lib/amazing_print/core_ext/kernel.rb +2 -0
- data/lib/amazing_print/core_ext/logger.rb +11 -2
- data/lib/amazing_print/core_ext/object.rb +2 -0
- data/lib/amazing_print/core_ext/string.rb +5 -2
- data/lib/amazing_print/custom_defaults.rb +3 -1
- data/lib/amazing_print/ext/action_view.rb +3 -1
- data/lib/amazing_print/ext/active_record.rb +9 -18
- data/lib/amazing_print/ext/active_support.rb +2 -0
- data/lib/amazing_print/ext/mongo_mapper.rb +4 -2
- data/lib/amazing_print/ext/mongoid.rb +2 -0
- data/lib/amazing_print/ext/nobrainer.rb +6 -0
- data/lib/amazing_print/ext/nokogiri.rb +2 -0
- data/lib/amazing_print/ext/ostruct.rb +2 -0
- data/lib/amazing_print/ext/ripple.rb +2 -0
- data/lib/amazing_print/ext/sequel.rb +4 -2
- data/lib/amazing_print/formatter.rb +9 -2
- data/lib/amazing_print/formatters.rb +12 -10
- data/lib/amazing_print/formatters/array_formatter.rb +3 -1
- data/lib/amazing_print/formatters/base_formatter.rb +5 -2
- data/lib/amazing_print/formatters/class_formatter.rb +2 -0
- data/lib/amazing_print/formatters/dir_formatter.rb +4 -1
- data/lib/amazing_print/formatters/file_formatter.rb +4 -1
- data/lib/amazing_print/formatters/hash_formatter.rb +4 -2
- data/lib/amazing_print/formatters/method_formatter.rb +2 -0
- data/lib/amazing_print/formatters/object_formatter.rb +14 -13
- data/lib/amazing_print/formatters/simple_formatter.rb +2 -0
- data/lib/amazing_print/formatters/struct_formatter.rb +9 -7
- data/lib/amazing_print/indentator.rb +2 -0
- data/lib/amazing_print/inspector.rb +9 -9
- data/lib/amazing_print/version.rb +3 -1
- data/lib/ap.rb +3 -1
- data/spec/active_record_helper.rb +10 -0
- data/spec/colors_spec.rb +43 -46
- data/spec/core_ext/logger_spec.rb +40 -14
- data/spec/core_ext/string_spec.rb +2 -7
- data/spec/ext/action_controller_spec.rb +40 -0
- data/spec/ext/action_view_spec.rb +8 -1
- data/spec/ext/active_model_spec.rb +37 -0
- data/spec/ext/active_record_spec.rb +42 -7
- data/spec/ext/active_support_spec.rb +12 -1
- data/spec/ext/mongo_mapper_spec.rb +8 -6
- data/spec/ext/mongoid_spec.rb +2 -0
- data/spec/ext/nobrainer_spec.rb +2 -0
- data/spec/ext/nokogiri_spec.rb +2 -0
- data/spec/ext/ostruct_spec.rb +2 -0
- data/spec/ext/ripple_spec.rb +2 -0
- data/spec/ext/sequel_spec.rb +45 -0
- data/spec/formats_spec.rb +10 -8
- data/spec/methods_spec.rb +37 -3
- data/spec/misc_spec.rb +3 -1
- data/spec/objects_spec.rb +2 -0
- data/spec/sequel_helper.rb +18 -0
- data/spec/spec_helper.rb +5 -1
- data/spec/support/active_record_data.rb +2 -0
- data/spec/support/active_record_data/6_1_diana.txt +109 -0
- data/spec/support/active_record_data/6_1_multi.txt +220 -0
- data/spec/support/ext_verifier.rb +9 -4
- data/spec/support/mongoid_versions.rb +2 -0
- data/spec/support/rails_versions.rb +7 -0
- metadata +79 -54
- data/lib/amazing_print/core_ext/method.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63ce7e50d17b53a5270709def03c7f3075a7068ada7d11ca7f124bda5cddc735
|
4
|
+
data.tar.gz: de6d68e51a4e70fdad3fff7fc5050ab6984280afaa3851a9958bf24731bb022d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb0a4eb248f06fd34e28d5161ab984653af5661347e4d32e76ec3b2be995ff31f9fec4b5c8355a19908bd16f7219ed2148556d383bbb36af740925e5a4ec9004
|
7
|
+
data.tar.gz: c48fe1109d33a49653f8f506233c5bf674137008fed98d083022b46a72b26aa0cd469f13bca4ef1b6b2bdee1657bcf8d66481e505cca045de47dd00a40a6475f
|
data/.gitignore
CHANGED
data/Appraisals
CHANGED
@@ -1,60 +1,56 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
if RUBY_VERSION < '3'
|
4
|
+
appraise 'rails-5.1' do
|
5
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 51.0', platform: :jruby
|
6
|
+
gem 'rails', '~> 5.1.0'
|
7
|
+
gem 'sqlite3', platform: :mri
|
8
|
+
end
|
9
|
+
|
10
|
+
appraise 'rails-5.2' do
|
11
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 52.0', platform: :jruby
|
12
|
+
gem 'rails', '~> 5.2.0'
|
13
|
+
gem 'sqlite3', platform: :mri
|
14
|
+
end
|
15
|
+
|
16
|
+
appraise 'rails-6.0' do
|
17
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 60.0', platform: :jruby
|
18
|
+
gem 'rails', '~> 6.0.0'
|
19
|
+
gem 'sqlite3', platform: :mri
|
20
|
+
end
|
21
|
+
|
22
|
+
appraise 'mongoid-4.0' do
|
23
|
+
# https://github.com/rails/rails/issues/34822#issuecomment-570670516
|
24
|
+
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
25
|
+
gem 'mongoid', '~> 4.0.0'
|
26
|
+
end
|
27
|
+
|
28
|
+
appraise 'mongoid-5.0' do
|
29
|
+
# https://github.com/rails/rails/issues/34822#issuecomment-570670516
|
30
|
+
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
31
|
+
gem 'mongoid', '~> 5.0.0'
|
32
|
+
end
|
33
|
+
|
34
|
+
appraise 'mongoid-6.0' do
|
35
|
+
gem 'mongoid', '~> 6.0.0'
|
36
|
+
end
|
37
|
+
|
38
|
+
appraise 'mongo_mapper' do
|
39
|
+
gem 'activemodel', '~> 4.2.0'
|
40
|
+
gem 'activesupport', '~> 4.2.0'
|
41
|
+
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
42
|
+
gem 'mongo_mapper', '~> 0.14'
|
43
|
+
end
|
15
44
|
end
|
16
45
|
|
17
|
-
appraise 'rails-
|
18
|
-
gem 'activerecord-jdbcsqlite3-adapter', '~>
|
19
|
-
gem 'rails', '~>
|
46
|
+
appraise 'rails-6.1' do
|
47
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 61.0', platform: :jruby
|
48
|
+
gem 'rails', '~> 6.1.0'
|
20
49
|
gem 'sqlite3', platform: :mri
|
21
50
|
end
|
22
51
|
|
23
|
-
appraise '
|
24
|
-
gem '
|
25
|
-
gem '
|
52
|
+
appraise 'sequel-5.0' do
|
53
|
+
gem 'jdbc-sqlite3', platform: :jruby
|
54
|
+
gem 'sequel', '~> 5.0'
|
26
55
|
gem 'sqlite3', platform: :mri
|
27
56
|
end
|
28
|
-
|
29
|
-
appraise 'mongoid-4.0' do
|
30
|
-
# https://github.com/rails/rails/issues/34822#issuecomment-570670516
|
31
|
-
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
32
|
-
gem 'mongoid', '~> 4.0.0'
|
33
|
-
end
|
34
|
-
|
35
|
-
appraise 'mongoid-5.0' do
|
36
|
-
# https://github.com/rails/rails/issues/34822#issuecomment-570670516
|
37
|
-
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
38
|
-
gem 'mongoid', '~> 5.0.0'
|
39
|
-
end
|
40
|
-
|
41
|
-
appraise 'mongoid-6.0' do
|
42
|
-
gem 'mongoid', '~> 6.0.0'
|
43
|
-
end
|
44
|
-
|
45
|
-
# appraise 'mongo_mapper' do
|
46
|
-
# gem 'mongo_mapper'
|
47
|
-
# end
|
48
|
-
#
|
49
|
-
# appraise 'ripple' do
|
50
|
-
# gem 'tzinfo'
|
51
|
-
# gem 'ripple'
|
52
|
-
# end
|
53
|
-
#
|
54
|
-
# appraise 'nobrainer' do
|
55
|
-
# gem 'nobrainer'
|
56
|
-
#
|
57
|
-
# # When activesupport 5 was released, it required ruby 2.2.2 as a minimum.
|
58
|
-
# # Locking this down to 4.2.6 allows our Ruby 1.9 tests to keep working.
|
59
|
-
# gem 'activesupport', '4.2.6', :platforms => :ruby_19
|
60
|
-
# end
|
data/CHANGELOG.md
CHANGED
@@ -1,2 +1,34 @@
|
|
1
|
+
## v1.2.2
|
2
|
+
- Support Ruby 3.0 / IRB 1.2.6 - #57
|
3
|
+
- Fix FrozenError - #51
|
4
|
+
- Drop support for Ruby 2.3 and 2.4 as well as JRuby 9.1 - #46
|
5
|
+
- Add passing of `options` to `Logger#ap` - #55
|
6
|
+
|
7
|
+
## v1.2.1
|
8
|
+
- Correctly print active_model_errors for models that don't have tables - #42 by sahglie
|
9
|
+
- Update AmazingPrint::MongoMapper for frozen strings - #44
|
10
|
+
|
11
|
+
## v1.2.0
|
12
|
+
|
13
|
+
- Fix frozen string literal issue with ActiveRecord
|
14
|
+
- Add uncolor String method to remove ANSI color codes - #30 by duffyjp
|
15
|
+
- Restore original copyright - #33 by amarshall
|
16
|
+
- Remove method core extension since it is not needed since ruby 1.9 - #37 by grosser
|
17
|
+
- Remove pale and black string color aliases - #38
|
18
|
+
- Fix formatting ActionController::Parameters - #29
|
19
|
+
|
20
|
+
|
21
|
+
## v1.1.0
|
22
|
+
- Print out method keyword arguments
|
23
|
+
- Fix NoMethodError with Sequel
|
24
|
+
- Code cleanups
|
25
|
+
|
26
|
+
Thanks for the great contributions from:
|
27
|
+
|
28
|
+
- andydna
|
29
|
+
- beanieboi
|
30
|
+
|
31
|
+
|
32
|
+
|
1
33
|
## v1.0.0
|
2
34
|
- Initial Release.
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,17 @@
|
|
1
1
|
## Amazing Print ##
|
2
2
|
|
3
3
|
[![RubyGems][gem_version_badge]][ruby_gems]
|
4
|
-
[![Travis CI][travis_ci_badge]][travis_ci]
|
5
|
-
[![Code Climate][code_climate_badge]][code_climate]
|
6
|
-
[![Code Climate Coverage][code_climate_coverage_badge]][code_climate]
|
7
4
|
[![RubyGems][gem_downloads_badge]][ruby_gems]
|
5
|
+
|
|
6
|
+
[![Travis CI][travis_ci_badge]][travis_ci]
|
7
|
+
![Specs](https://github.com/amazing-print/amazing_print/workflows/Specs/badge.svg)
|
8
|
+
![Lint](https://github.com/amazing-print/amazing_print/workflows/Lint/badge.svg)
|
9
|
+
|
|
8
10
|
[![Gitter](https://badges.gitter.im/amazing-print/community.svg)](https://gitter.im/amazing-print/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
9
11
|
|
10
|
-
|
12
|
+
AmazingPrint is a fork of [AwesomePrint](https://github.com/awesome-print/awesome_print) which became stale and should be used in its place to avoid conflicts. It is a Ruby library that pretty prints Ruby objects in full color exposing their internal structure with proper indentation. Rails ActiveRecord objects and usage within Rails templates are supported via included mixins.
|
13
|
+
|
14
|
+
![GitHub API demo](github-api-demo.gif)
|
11
15
|
|
12
16
|
### Supported Versions ###
|
13
17
|
|
@@ -44,7 +48,7 @@ ruby19_syntax: false, # Use Ruby 1.9 hash syntax in output.
|
|
44
48
|
class_name: :class, # Method called to report the instance class name. (e.g. :to_s)
|
45
49
|
object_id: true, # Show object id.
|
46
50
|
color: {
|
47
|
-
args: :
|
51
|
+
args: :whiteish,
|
48
52
|
array: :white,
|
49
53
|
bigdecimal: :blue,
|
50
54
|
class: :yellow,
|
@@ -52,13 +56,13 @@ color: {
|
|
52
56
|
falseclass: :red,
|
53
57
|
integer: :blue,
|
54
58
|
float: :blue,
|
55
|
-
hash: :
|
59
|
+
hash: :whiteish,
|
56
60
|
keyword: :cyan,
|
57
61
|
method: :purpleish,
|
58
62
|
nilclass: :red,
|
59
63
|
rational: :blue,
|
60
64
|
string: :yellowish,
|
61
|
-
struct: :
|
65
|
+
struct: :whiteish,
|
62
66
|
symbol: :cyanish,
|
63
67
|
time: :greenish,
|
64
68
|
trueclass: :green,
|
@@ -70,7 +74,7 @@ Supported color names:
|
|
70
74
|
|
71
75
|
```ruby
|
72
76
|
:gray, :red, :green, :yellow, :blue, :purple, :cyan, :white
|
73
|
-
:
|
77
|
+
:grayish, :redish, :greenish, :yellowish, :blueish, :purpleish, :cyanish, :whiteish
|
74
78
|
```
|
75
79
|
|
76
80
|
Use `Object#ai` to return an ASCII encoded string:
|
@@ -293,6 +297,12 @@ By default, this logs at the :debug level. You can override that globally with:
|
|
293
297
|
in the custom defaults (see below). You can also override on a per call basis with:
|
294
298
|
|
295
299
|
logger.ap object, :warn
|
300
|
+
# or
|
301
|
+
logger.ap object, level: :warn
|
302
|
+
|
303
|
+
You can also pass additional options (providing `nil` or leaving off `level` will log at the default level):
|
304
|
+
|
305
|
+
logger.ap object, { level: :info, sort_keys: true }
|
296
306
|
|
297
307
|
### ActionView Convenience Method ###
|
298
308
|
amazing_print adds the 'ap' method to the ActionView::Base class making it available
|
@@ -305,7 +315,7 @@ With other web frameworks (ex: in Sinatra templates) you can explicitly request
|
|
305
315
|
formatting:
|
306
316
|
|
307
317
|
<%= ap @accounts.first, :html => true %>
|
308
|
-
|
318
|
+
|
309
319
|
### String Convenience Methods ###
|
310
320
|
Use methods such as `.red` to set string color:
|
311
321
|
|
@@ -324,7 +334,7 @@ For example:
|
|
324
334
|
AmazingPrint.defaults = {
|
325
335
|
:indent => -2,
|
326
336
|
:color => {
|
327
|
-
:hash => :
|
337
|
+
:hash => :whiteish,
|
328
338
|
:class => :white
|
329
339
|
}
|
330
340
|
}
|
@@ -351,6 +361,3 @@ Released under the MIT license. See LICENSE file for details.
|
|
351
361
|
[ruby_gems]: http://rubygems.org/gems/amazing_print
|
352
362
|
[travis_ci]: http://travis-ci.org/amazing-print/amazing_print
|
353
363
|
[travis_ci_badge]: https://img.shields.io/travis/amazing-print/amazing_print/master.svg?style=flat
|
354
|
-
[code_climate]: https://codeclimate.com/github/amazing-print/amazing_print
|
355
|
-
[code_climate_badge]: http://img.shields.io/codeclimate/github/amazing-print/amazing_print.svg?style=flat
|
356
|
-
[code_climate_coverage_badge]: https://codeclimate.com/github/amazing-print/amazing_print/badges/coverage.svg
|
data/Rakefile
CHANGED
data/lib/amazing_print.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright (c) 2010-2016 Michael Dvorkin and contributors
|
2
4
|
#
|
3
5
|
# AmazingPrint is freely distributable under the terms of MIT license.
|
@@ -8,39 +10,39 @@
|
|
8
10
|
# so do nothing for subsequent requires.
|
9
11
|
#
|
10
12
|
unless defined?(AmazingPrint::Inspector)
|
11
|
-
%w[awesome_method_array string
|
12
|
-
|
13
|
+
%w[awesome_method_array string object class kernel].each do |file|
|
14
|
+
require_relative "amazing_print/core_ext/#{file}"
|
13
15
|
end
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
require_relative 'amazing_print/custom_defaults'
|
18
|
+
require_relative 'amazing_print/inspector'
|
19
|
+
require_relative 'amazing_print/formatter'
|
20
|
+
require_relative 'amazing_print/version'
|
21
|
+
require_relative 'amazing_print/core_ext/logger' if defined?(Logger)
|
20
22
|
#
|
21
23
|
# Load the following under normal circumstances as well as in Rails
|
22
24
|
# console when required from ~/.irbrc or ~/.pryrc.
|
23
25
|
#
|
24
26
|
if defined?(ActiveRecord) || AmazingPrint.rails_console?
|
25
|
-
|
27
|
+
require_relative 'amazing_print/ext/active_record'
|
26
28
|
end
|
27
29
|
if defined?(ActiveSupport) || AmazingPrint.rails_console?
|
28
|
-
|
30
|
+
require_relative 'amazing_print/ext/active_support'
|
29
31
|
end
|
30
32
|
#
|
31
33
|
# Load remaining extensions.
|
32
34
|
#
|
33
35
|
if defined?(ActiveSupport.on_load)
|
34
36
|
ActiveSupport.on_load(:action_view) do
|
35
|
-
|
37
|
+
require_relative 'amazing_print/ext/action_view'
|
36
38
|
end
|
37
39
|
end
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
require_relative 'amazing_print/ext/mongo_mapper' if defined?(MongoMapper)
|
41
|
+
require_relative 'amazing_print/ext/mongoid' if defined?(Mongoid)
|
42
|
+
require_relative 'amazing_print/ext/nokogiri' if defined?(Nokogiri)
|
43
|
+
require_relative 'amazing_print/ext/nobrainer' if defined?(NoBrainer)
|
44
|
+
require_relative 'amazing_print/ext/ripple' if defined?(Ripple)
|
45
|
+
require_relative 'amazing_print/ext/sequel' if defined?(Sequel)
|
46
|
+
require_relative 'amazing_print/ext/ostruct' if defined?(OpenStruct)
|
45
47
|
end
|
46
48
|
# test
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright (c) 2010-2016 Michael Dvorkin and contributors
|
2
4
|
#
|
3
5
|
# AmazingPrint is freely distributable under the terms of MIT license.
|
@@ -76,7 +78,7 @@ module AwesomeMethodArray #:nodoc:
|
|
76
78
|
super(pattern)
|
77
79
|
end
|
78
80
|
arr.instance_variable_set(:@__awesome_methods__, instance_variable_get(:@__awesome_methods__))
|
79
|
-
arr.
|
81
|
+
arr.select! { |item| (item.is_a?(Symbol) || item.is_a?(String)) } # grep block might return crap.
|
80
82
|
arr
|
81
83
|
end
|
82
84
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright (c) 2010-2016 Michael Dvorkin and contributors
|
2
4
|
#
|
3
5
|
# AmazingPrint is freely distributable under the terms of MIT license.
|
@@ -7,10 +9,17 @@ module AmazingPrint
|
|
7
9
|
module Logger
|
8
10
|
# Add ap method to logger
|
9
11
|
#------------------------------------------------------------------------------
|
10
|
-
def ap(object,
|
12
|
+
def ap(object, options = {})
|
13
|
+
if options.is_a?(Hash)
|
14
|
+
level = options.delete(:level)
|
15
|
+
else
|
16
|
+
level = options
|
17
|
+
options = {}
|
18
|
+
end
|
19
|
+
|
11
20
|
level ||= AmazingPrint.defaults[:log_level] if AmazingPrint.defaults
|
12
21
|
level ||= :debug
|
13
|
-
send level, object.ai
|
22
|
+
send level, object.ai(options)
|
14
23
|
end
|
15
24
|
end
|
16
25
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Copyright (c) 2010-2016 Michael Dvorkin and contributors
|
2
3
|
#
|
3
4
|
# AmazingPrint is freely distributable under the terms of MIT license.
|
@@ -37,6 +38,8 @@ class String
|
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
40
|
-
|
41
|
-
|
41
|
+
# Remove ANSI color codes.
|
42
|
+
def uncolor
|
43
|
+
gsub(/\e\[[0-9;]*m/, '')
|
44
|
+
end
|
42
45
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module AmazingPrint
|
2
4
|
class << self
|
3
5
|
attr_accessor :defaults, :force_colors
|
@@ -27,7 +29,7 @@ module AmazingPrint
|
|
27
29
|
|
28
30
|
def usual_rb
|
29
31
|
IRB::Irb.class_eval do
|
30
|
-
def output_value
|
32
|
+
def output_value(_omit = false)
|
31
33
|
ap @context.last_value
|
32
34
|
rescue NoMethodError
|
33
35
|
puts "(Object doesn't support #ai)"
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright (c) 2010-2016 Michael Dvorkin and contributors
|
2
4
|
#
|
3
5
|
# AmazingPrint is freely distributable under the terms of MIT license.
|
@@ -12,7 +14,7 @@ module AmazingPrint
|
|
12
14
|
).sub(
|
13
15
|
/^<pre([\s>])/,
|
14
16
|
'<pre class="debug_dump"\\1'
|
15
|
-
)
|
17
|
+
).html_safe
|
16
18
|
end
|
17
19
|
|
18
20
|
alias ap ap_debug
|