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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b78e2becdd2b08753b1e78e1c2c46e531f6750a2
4
- data.tar.gz: 9e79ebd10b6b47e9026d0e412f83615466e67c89
3
+ metadata.gz: 9037098689659d820bf5d1997ce7dae9eec03b9c
4
+ data.tar.gz: e2d3749c0224fc777e3910b665e10cef94fd81bb
5
5
  SHA512:
6
- metadata.gz: 2b6b91f195831126213e10ffba034c1ed5f6be030b5bc89870aeead7c6edb95a39a3968d24c60f06c4d2c88e16b4c7f7974ee0b81e3b33c66de5e36ce916e4e9
7
- data.tar.gz: 4bb762cc93185b014c5f56b8a4b1cccaa2a52277b88efe68c8cc4c85728db7fd9a7e6fd5c1f63677e865a34aa671c03a2239df5a6d91eb4fffb4dc83cb54703e
6
+ metadata.gz: 2c005fb615f7da94ec7f3fc046961479483237b94b89865ed363f2697d22fe0207d11e0c56e0f10b9548588a704fc51f291be7f8b04a39081c68ae530590b21e
7
+ data.tar.gz: edfeb8651233fb9f7c3cf924c00440b56d50c690d0804a2ab8a4730333159563b4b3a4c68f379a848fb20bfbcc9c131d5c09d54859b3dacb7a529f2fe2fdb8bc
@@ -1,19 +1,26 @@
1
- # AwesomePrint might be loaded implicitly through ~/.irbrc or ~/.pryrc
2
- # so do nothing for subsequent requires.
3
- #
4
- unless defined?(AwesomePrint::Inspector)
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
- %w(active_support awesome_method_array string object class kernel).each do |file|
9
- require "awesome_print/core_ext/#{file}"
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
- require 'awesome_print/inspector'
13
- require 'awesome_print/formatter'
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
- Dir["./lib/awesome_print/formatters/**/*.rb"].each { |f| require f }
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
@@ -11,5 +11,5 @@ module AwesomePrint
11
11
  end
12
12
  end
13
13
 
14
- Logger.send(:include, AwesomePrint::Logger)
14
+ Logger.send(:include, AwesomePrint::Logger) if defined?(Logger)
15
15
  ActiveSupport::BufferedLogger.send(:include, AwesomePrint::Logger) if defined?(ActiveSupport::BufferedLogger)
@@ -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
- require 'awesome_print/formatters/object_formatter'
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
 
@@ -1,3 +1,5 @@
1
+ require_relative 'formatter'
2
+
1
3
  module AwesomePrint
2
4
  module Registrar
3
5
 
@@ -5,6 +5,6 @@ module AwesomePrint
5
5
  end
6
6
 
7
7
  def self.version
8
- '2.0.0.pre'
8
+ '2.0.0.pre2'
9
9
  end
10
10
  end
@@ -1,9 +1,5 @@
1
1
  require 'spec_helper'
2
2
 
3
-
4
- require 'logger'
5
- require 'awesome_print/core_ext/logger'
6
-
7
3
  RSpec.describe 'AwesomePrint logging extensions' do
8
4
  before(:all) do
9
5
  @logger = Logger.new('/dev/null') rescue Logger.new('nul')
@@ -30,6 +30,8 @@ ExtVerifier.require_dependencies!(
30
30
  mongoid
31
31
  )
32
32
  )
33
+
34
+ require 'logger'
33
35
  require 'nokogiri'
34
36
  require 'awesome_print'
35
37
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre
4
+ version: 2.0.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dvorkin, James Cox & contributors