awesome_print 2.0.0.pre → 2.0.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awesome_print.rb +21 -14
- data/lib/awesome_print/core_ext/logger.rb +1 -1
- data/lib/awesome_print/custom_defaults.rb +0 -8
- data/lib/awesome_print/formatters.rb +1 -10
- data/lib/awesome_print/registrar.rb +2 -0
- data/lib/awesome_print/version.rb +1 -1
- data/spec/core_ext/logger_spec.rb +0 -4
- data/spec/spec_helper.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9037098689659d820bf5d1997ce7dae9eec03b9c
|
4
|
+
data.tar.gz: e2d3749c0224fc777e3910b665e10cef94fd81bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c005fb615f7da94ec7f3fc046961479483237b94b89865ed363f2697d22fe0207d11e0c56e0f10b9548588a704fc51f291be7f8b04a39081c68ae530590b21e
|
7
|
+
data.tar.gz: edfeb8651233fb9f7c3cf924c00440b56d50c690d0804a2ab8a4730333159563b4b3a4c68f379a848fb20bfbcc9c131d5c09d54859b3dacb7a529f2fe2fdb8bc
|
data/lib/awesome_print.rb
CHANGED
@@ -1,19 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
# FIXME: not sure we need these, but..
|
6
|
-
require 'awesome_print/custom_defaults'
|
1
|
+
require 'awesome_print/formatters'
|
2
|
+
require 'awesome_print/inspector'
|
3
|
+
require 'awesome_print/formatter'
|
4
|
+
require 'awesome_print/version'
|
7
5
|
|
8
|
-
|
9
|
-
|
6
|
+
module AwesomePrint
|
7
|
+
class << self
|
8
|
+
attr_accessor :defaults, :force_colors
|
9
|
+
|
10
|
+
# Class accessor to force colorized output (ex. forked subprocess where TERM
|
11
|
+
# might be dumb).
|
12
|
+
#---------------------------------------------------------------------------
|
13
|
+
def force_colors!(value = true)
|
14
|
+
@force_colors = value
|
15
|
+
end
|
10
16
|
end
|
17
|
+
end
|
11
18
|
|
12
|
-
|
13
|
-
|
19
|
+
# CORE EXTENSIONS... now that ap is loaded, inject awesome behavior into ruby
|
20
|
+
%w(awesome_method_array string object class kernel logger active_support).each do |file|
|
21
|
+
require "awesome_print/core_ext/#{file}"
|
22
|
+
end
|
14
23
|
|
15
|
-
|
24
|
+
# FIXME: not sure we need these, but..
|
25
|
+
require 'awesome_print/custom_defaults'
|
16
26
|
|
17
|
-
require 'awesome_print/version'
|
18
|
-
require 'awesome_print/core_ext/logger' if defined?(Logger)
|
19
|
-
end
|
@@ -1,13 +1,5 @@
|
|
1
1
|
module AwesomePrint
|
2
2
|
class << self
|
3
|
-
attr_accessor :defaults, :force_colors
|
4
|
-
|
5
|
-
# Class accessor to force colorized output (ex. forked subprocess where TERM
|
6
|
-
# might be dumb).
|
7
|
-
#---------------------------------------------------------------------------
|
8
|
-
def force_colors!(value = true)
|
9
|
-
@force_colors = value
|
10
|
-
end
|
11
3
|
|
12
4
|
def console?
|
13
5
|
boolean(defined?(IRB) || defined?(Pry))
|
@@ -1,15 +1,6 @@
|
|
1
1
|
module AwesomePrint
|
2
2
|
module Formatters
|
3
|
-
|
4
|
-
require 'awesome_print/formatters/struct_formatter'
|
5
|
-
require 'awesome_print/formatters/hash_formatter'
|
6
|
-
require 'awesome_print/formatters/array_formatter'
|
7
|
-
require 'awesome_print/formatters/simple_formatter'
|
8
|
-
require 'awesome_print/formatters/method_formatter'
|
9
|
-
require 'awesome_print/formatters/class_formatter'
|
10
|
-
require 'awesome_print/formatters/dir_formatter'
|
11
|
-
require 'awesome_print/formatters/file_formatter'
|
12
|
-
require 'awesome_print/colorize'
|
3
|
+
Dir[File.join(__dir__, 'formatters', '**', '*.rb')].each { |f| require f }
|
13
4
|
end
|
14
5
|
end
|
15
6
|
|
data/spec/spec_helper.rb
CHANGED