awesome_print 1.9.2 → 2.0.0.pre

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.
Files changed (116) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -1
  3. data/Appraisals +2 -33
  4. data/CHANGELOG.md +6 -15
  5. data/CONTRIBUTING.md +0 -1
  6. data/README.md +7 -49
  7. data/lib/ap.rb +1 -5
  8. data/lib/awesome_print.rb +7 -29
  9. data/lib/awesome_print/colorize.rb +2 -0
  10. data/lib/awesome_print/core_ext/active_support.rb +7 -0
  11. data/lib/awesome_print/core_ext/awesome_method_array.rb +0 -6
  12. data/lib/awesome_print/core_ext/class.rb +0 -5
  13. data/lib/awesome_print/core_ext/kernel.rb +0 -5
  14. data/lib/awesome_print/core_ext/logger.rb +0 -5
  15. data/lib/awesome_print/core_ext/object.rb +0 -5
  16. data/lib/awesome_print/core_ext/string.rb +0 -5
  17. data/lib/awesome_print/custom_defaults.rb +1 -1
  18. data/lib/awesome_print/formatter.rb +38 -106
  19. data/lib/awesome_print/formatters/array_formatter.rb +11 -8
  20. data/lib/awesome_print/formatters/base_formatter.rb +20 -53
  21. data/lib/awesome_print/formatters/bigdecimal_formatter.rb +20 -0
  22. data/lib/awesome_print/formatters/class_formatter.rb +5 -6
  23. data/lib/awesome_print/formatters/dir_formatter.rb +4 -6
  24. data/lib/awesome_print/formatters/ext/active_model_error_formatter.rb +44 -0
  25. data/lib/awesome_print/formatters/ext/active_record_attributeset_formatter.rb +27 -0
  26. data/lib/awesome_print/formatters/ext/active_record_class_formatter.rb +43 -0
  27. data/lib/awesome_print/formatters/ext/active_record_instance_formatter.rb +48 -0
  28. data/lib/awesome_print/formatters/ext/active_record_relation_formatter.rb +19 -0
  29. data/lib/awesome_print/formatters/ext/bson_objectid_formatter.rb +20 -0
  30. data/lib/awesome_print/formatters/ext/hash_with_indifferent_access_formatter.rb +20 -0
  31. data/lib/awesome_print/formatters/ext/mongoid_document_formatter.rb +59 -0
  32. data/lib/awesome_print/formatters/ext/nokogiri_document_formatter.rb +30 -0
  33. data/lib/awesome_print/formatters/ext/nokogiri_node_formatter.rb +29 -0
  34. data/lib/awesome_print/formatters/ext/nokogiri_nodeset_formatter.rb +32 -0
  35. data/lib/awesome_print/formatters/ext/sequel_dataset_formatter.rb +20 -0
  36. data/lib/awesome_print/formatters/ext/sequel_model_class_formatter.rb +25 -0
  37. data/lib/awesome_print/formatters/ext/sequel_model_formatter.rb +26 -0
  38. data/lib/awesome_print/formatters/ext/time_with_zone_formatter.rb +24 -0
  39. data/lib/awesome_print/formatters/fallback_formatter.rb +55 -0
  40. data/lib/awesome_print/formatters/false_class_formatter.rb +15 -0
  41. data/lib/awesome_print/formatters/file_formatter.rb +4 -6
  42. data/lib/awesome_print/formatters/hash_formatter.rb +12 -7
  43. data/lib/awesome_print/formatters/integer_formatter.rb +11 -0
  44. data/lib/awesome_print/formatters/method_formatter.rb +8 -6
  45. data/lib/awesome_print/formatters/module_formatter.rb +18 -0
  46. data/lib/awesome_print/formatters/nil_class_formatter.rb +19 -0
  47. data/lib/awesome_print/formatters/object_formatter.rb +19 -9
  48. data/lib/awesome_print/formatters/open_struct.rb +19 -0
  49. data/lib/awesome_print/formatters/range_formatter.rb +11 -0
  50. data/lib/awesome_print/formatters/rational_formatter.rb +15 -0
  51. data/lib/awesome_print/formatters/set_formatter.rb +19 -0
  52. data/lib/awesome_print/formatters/simple_formatter.rb +10 -8
  53. data/lib/awesome_print/formatters/string_formatter.rb +14 -0
  54. data/lib/awesome_print/formatters/struct_formatter.rb +8 -6
  55. data/lib/awesome_print/formatters/symbol_formatter.rb +18 -0
  56. data/lib/awesome_print/formatters/true_class_formatter.rb +15 -0
  57. data/lib/awesome_print/formatters/unbound_method_formatter.rb +15 -0
  58. data/lib/awesome_print/inspector.rb +18 -17
  59. data/lib/awesome_print/limiter.rb +63 -0
  60. data/lib/awesome_print/registrar.rb +20 -0
  61. data/lib/awesome_print/version.rb +6 -6
  62. data/spec/formatters/array_spec.rb +251 -0
  63. data/spec/formatters/big_decimal_spec.rb +28 -0
  64. data/spec/formatters/class_spec.rb +91 -0
  65. data/spec/formatters/dir_file_spec.rb +43 -0
  66. data/spec/{ext → formatters/ext}/active_record_spec.rb +14 -58
  67. data/spec/{ext → formatters/ext}/active_support_spec.rb +7 -11
  68. data/spec/{ext → formatters/ext}/mongoid_spec.rb +2 -2
  69. data/spec/{ext → formatters/ext}/nokogiri_spec.rb +0 -0
  70. data/spec/formatters/hash_spec.rb +284 -0
  71. data/spec/{methods_spec.rb → formatters/methods_spec.rb} +3 -5
  72. data/spec/{objects_spec.rb → formatters/objects_spec.rb} +0 -0
  73. data/spec/{ext → formatters}/ostruct_spec.rb +1 -0
  74. data/spec/formatters/set_spec.rb +49 -0
  75. data/spec/formatters/struct_spec.rb +61 -0
  76. data/spec/merge_options_spec.rb +13 -0
  77. data/spec/misc_spec.rb +3 -10
  78. data/spec/spec_helper.rb +2 -9
  79. data/spec/support/ext_verifier.rb +0 -15
  80. data/spec/support/mongoid_versions.rb +4 -8
  81. data/spec/support/rails_versions.rb +2 -32
  82. metadata +100 -78
  83. data/awesome_print.gemspec +0 -33
  84. data/init.rb +0 -1
  85. data/lib/awesome_print/core_ext/method.rb +0 -21
  86. data/lib/awesome_print/ext/action_view.rb +0 -22
  87. data/lib/awesome_print/ext/active_record.rb +0 -103
  88. data/lib/awesome_print/ext/active_support.rb +0 -47
  89. data/lib/awesome_print/ext/mongo_mapper.rb +0 -124
  90. data/lib/awesome_print/ext/mongoid.rb +0 -67
  91. data/lib/awesome_print/ext/nobrainer.rb +0 -52
  92. data/lib/awesome_print/ext/nokogiri.rb +0 -45
  93. data/lib/awesome_print/ext/ostruct.rb +0 -27
  94. data/lib/awesome_print/ext/ripple.rb +0 -71
  95. data/lib/awesome_print/ext/sequel.rb +0 -58
  96. data/spec/ext/action_view_spec.rb +0 -21
  97. data/spec/ext/mongo_mapper_spec.rb +0 -261
  98. data/spec/ext/nobrainer_spec.rb +0 -59
  99. data/spec/ext/ripple_spec.rb +0 -48
  100. data/spec/formats_spec.rb +0 -779
  101. data/spec/support/active_record_data/3_2_diana.txt +0 -24
  102. data/spec/support/active_record_data/3_2_diana_legacy.txt +0 -24
  103. data/spec/support/active_record_data/3_2_multi.txt +0 -50
  104. data/spec/support/active_record_data/3_2_multi_legacy.txt +0 -50
  105. data/spec/support/active_record_data/4_0_diana.txt +0 -98
  106. data/spec/support/active_record_data/4_0_multi.txt +0 -198
  107. data/spec/support/active_record_data/4_1_diana.txt +0 -97
  108. data/spec/support/active_record_data/4_1_multi.txt +0 -196
  109. data/spec/support/active_record_data/4_2_diana.txt +0 -109
  110. data/spec/support/active_record_data/4_2_diana_legacy.txt +0 -109
  111. data/spec/support/active_record_data/4_2_multi.txt +0 -220
  112. data/spec/support/active_record_data/4_2_multi_legacy.txt +0 -220
  113. data/spec/support/active_record_data/6_0_diana.txt +0 -104
  114. data/spec/support/active_record_data/6_0_multi.txt +0 -210
  115. data/spec/support/active_record_data/6_1_diana.txt +0 -109
  116. data/spec/support/active_record_data/6_1_multi.txt +0 -220
@@ -62,7 +62,9 @@ RSpec.describe 'Single method' do
62
62
  method = ''.method(:is_a?)
63
63
  expect(method.ai).to eq("\e[1;33mString (Kernel)\e[0m#\e[0;35mis_a?\e[0m\e[0;37m(arg1)\e[0m")
64
64
  end
65
+ end
65
66
 
67
+ RSpec.describe 'unbound methods' do
66
68
  it 'plain: should handle an unbound method' do
67
69
  class Hello
68
70
  def world; end
@@ -76,11 +78,7 @@ RSpec.describe 'Single method' do
76
78
  def world(a, b); end
77
79
  end
78
80
  method = Hello.instance_method(:world)
79
- if RUBY_VERSION < '1.9.2'
80
- expect(method.ai).to eq("\e[1;33mHello (unbound)\e[0m#\e[0;35mworld\e[0m\e[0;37m(arg1, arg2)\e[0m")
81
- else
82
- expect(method.ai).to eq("\e[1;33mHello (unbound)\e[0m#\e[0;35mworld\e[0m\e[0;37m(a, b)\e[0m")
83
- end
81
+ expect(method.ai).to eq("\e[1;33mHello (unbound)\e[0m#\e[0;35mworld\e[0m\e[0;37m(a, b)\e[0m")
84
82
  end
85
83
  end
86
84
 
@@ -1,4 +1,5 @@
1
1
  require 'spec_helper'
2
+ require 'ostruct'
2
3
 
3
4
  RSpec.describe 'AwesomePrint Ostruct extension' do
4
5
  before do
@@ -0,0 +1,49 @@
1
+ require_relative '../spec_helper'
2
+ require 'set'
3
+
4
+ RSpec.describe 'AwesomePrint' do
5
+ describe 'Set' do
6
+ before do
7
+ @arr = [1, :two, 'three']
8
+ @set = Set.new(@arr)
9
+ end
10
+
11
+ it 'empty set' do
12
+ expect(Set.new.ai).to eq([].ai)
13
+ end
14
+
15
+ if RUBY_VERSION > '1.9'
16
+ it 'plain multiline' do
17
+ expect(@set.ai(plain: true)).to eq(@arr.ai(plain: true))
18
+ end
19
+
20
+ it 'plain multiline indented' do
21
+ expect(@set.ai(plain: true, indent: 1)).to eq(@arr.ai(plain: true, indent: 1))
22
+ end
23
+
24
+ it 'plain single line' do
25
+ expect(@set.ai(plain: true, multiline: false)).to eq(@arr.ai(plain: true, multiline: false))
26
+ end
27
+
28
+ it 'colored multiline (default)' do
29
+ expect(@set.ai).to eq(@arr.ai)
30
+ end
31
+ else # Prior to Ruby 1.9 the order of set values is unpredicatble.
32
+ it 'plain multiline' do
33
+ expect(@set.sort_by { |x| x.to_s }.ai(plain: true)).to eq(@arr.sort_by { |x| x.to_s }.ai(plain: true))
34
+ end
35
+
36
+ it 'plain multiline indented' do
37
+ expect(@set.sort_by { |x| x.to_s }.ai(plain: true, indent: 1)).to eq(@arr.sort_by { |x| x.to_s }.ai(plain: true, indent: 1))
38
+ end
39
+
40
+ it 'plain single line' do
41
+ expect(@set.sort_by { |x| x.to_s }.ai(plain: true, multiline: false)).to eq(@arr.sort_by { |x| x.to_s }.ai(plain: true, multiline: false))
42
+ end
43
+
44
+ it 'colored multiline (default)' do
45
+ expect(@set.sort_by { |x| x.to_s }.ai).to eq(@arr.sort_by { |x| x.to_s }.ai)
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,61 @@
1
+ require_relative '../spec_helper'
2
+
3
+ RSpec.describe 'AwesomePrint' do
4
+ describe 'Struct' do
5
+ before do
6
+ @struct = unless defined?(Struct::SimpleStruct)
7
+ Struct.new('SimpleStruct', :name, :address).new
8
+ else
9
+ Struct::SimpleStruct.new
10
+ end
11
+ @struct.name = 'Herman Munster'
12
+ @struct.address = '1313 Mockingbird Lane'
13
+ end
14
+
15
+ it 'empty struct' do
16
+ expect(Struct.new('EmptyStruct').ai).to eq("\e[1;33mStruct::EmptyStruct < Struct\e[0m")
17
+ end
18
+
19
+ it 'plain multiline' do
20
+ s1 = <<-EOS.strip
21
+ address = \"1313 Mockingbird Lane\",
22
+ name = \"Herman Munster\"
23
+ EOS
24
+ s2 = <<-EOS.strip
25
+ name = \"Herman Munster\",
26
+ address = \"1313 Mockingbird Lane\"
27
+ EOS
28
+ expect(@struct.ai(plain: true)).to satisfy { |out| out.match(s1) || out.match(s2) }
29
+ end
30
+
31
+ it 'plain multiline indented' do
32
+ s1 = <<-EOS.strip
33
+ address = "1313 Mockingbird Lane",
34
+ name = "Herman Munster"
35
+ EOS
36
+ s2 = <<-EOS.strip
37
+ name = "Herman Munster",
38
+ address = "1313 Mockingbird Lane"
39
+ EOS
40
+ expect(@struct.ai(plain: true, indent: 1)).to satisfy { |out| out.match(s1) || out.match(s2) }
41
+ end
42
+
43
+ it 'plain single line' do
44
+ s1 = 'address = "1313 Mockingbird Lane", name = "Herman Munster"'
45
+ s2 = 'name = "Herman Munster", address = "1313 Mockingbird Lane"'
46
+ expect(@struct.ai(plain: true, multiline: false)).to satisfy { |out| out.match(s1) || out.match(s2) }
47
+ end
48
+
49
+ it 'colored multiline (default)' do
50
+ s1 = <<-EOS.strip
51
+ address\e[0;37m = \e[0m\e[0;33m\"1313 Mockingbird Lane\"\e[0m,
52
+ name\e[0;37m = \e[0m\e[0;33m\"Herman Munster\"\e[0m
53
+ EOS
54
+ s2 = <<-EOS.strip
55
+ name\e[0;37m = \e[0m\e[0;33m\"Herman Munster\"\e[0m,
56
+ address\e[0;37m = \e[0m\e[0;33m\"1313 Mockingbird Lane\"\e[0m
57
+ EOS
58
+ expect(@struct.ai).to satisfy { |out| out.include?(s1) || out.include?(s2) }
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,13 @@
1
+ require_relative 'spec_helper'
2
+
3
+ RSpec.describe 'AwesomePrint' do
4
+ describe 'Utility methods' do
5
+ it 'should merge options' do
6
+ ap = AwesomePrint::Inspector.new
7
+ ap.send(:merge_options!, { color: { array: :black }, indent: 0 })
8
+ options = ap.instance_variable_get('@options')
9
+ expect(options[:color][:array]).to eq(:black)
10
+ expect(options[:indent]).to eq(0)
11
+ end
12
+ end
13
+ end
data/spec/misc_spec.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'net/http'
2
1
  require 'spec_helper'
3
2
 
4
3
  RSpec.describe 'AwesomePrint' do
@@ -19,7 +18,7 @@ RSpec.describe 'AwesomePrint' do
19
18
  'ice'.freeze
20
19
  end
21
20
  end
22
- expect(weird.new.ai(plain: false)).to eq('ice')
21
+ expect(weird.new.ai(plain: true)).to eq('ice')
23
22
  end
24
23
 
25
24
  # See https://github.com/awesome-print/awesome_print/issues/35
@@ -46,7 +45,7 @@ RSpec.describe 'AwesomePrint' do
46
45
 
47
46
  # Require different file name this time (lib/ap.rb vs. lib/awesome_print).
48
47
  it "several require 'awesome_print' should do no harm" do
49
- require File.expand_path(File.dirname(__FILE__) + '/../lib/ap')
48
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/awesome_print')
50
49
  expect { rand.ai }.not_to raise_error
51
50
  end
52
51
 
@@ -59,7 +58,7 @@ RSpec.describe 'AwesomePrint' do
59
58
  it 'IPAddr workaround' do
60
59
  require 'ipaddr'
61
60
  ipaddr = IPAddr.new('3ffe:505:2::1')
62
- expect(ipaddr.ai).to eq('#<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0001/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff>')
61
+ expect(ipaddr.ai(plain: true)).to eq('#<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0001/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff>')
63
62
  end
64
63
 
65
64
  # See https://github.com/awesome-print/awesome_print/issues/139
@@ -73,12 +72,6 @@ RSpec.describe 'AwesomePrint' do
73
72
  end
74
73
  expect { weird.new.ai }.not_to raise_error
75
74
  end
76
-
77
- it 'handles attr_reader :method' do
78
- uri = URI.parse('https://hello.nx/world')
79
- req = Net::HTTP::Get.new(uri)
80
- expect(req.ai(plain: true)).to eq('#<Net::HTTP::Get GET>')
81
- end
82
75
  end
83
76
 
84
77
  #------------------------------------------------------------------------------
data/spec/spec_helper.rb CHANGED
@@ -1,9 +1,3 @@
1
- # Copyright (c) 2010-2016 Michael Dvorkin and contributors
2
- #
3
- # Awesome Print is freely distributable under the terms of MIT license.
4
- # See LICENSE file or http://www.opensource.org/licenses/mit-license.php
5
- #------------------------------------------------------------------------------
6
- #
7
1
  # Running specs from the command line:
8
2
  # $ rake spec # Entire spec suite.
9
3
  # $ rspec spec/objects_spec.rb # Individual spec file.
@@ -25,6 +19,8 @@ Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each do |file|
25
19
  require file
26
20
  end
27
21
 
22
+ require 'byebug'
23
+
28
24
  ExtVerifier.require_dependencies!(
29
25
  %w(
30
26
  rails
@@ -32,12 +28,9 @@ ExtVerifier.require_dependencies!(
32
28
  action_view
33
29
  active_support/all
34
30
  mongoid
35
- mongo_mapper
36
- ripple nobrainer
37
31
  )
38
32
  )
39
33
  require 'nokogiri'
40
- require 'ostruct'
41
34
  require 'awesome_print'
42
35
 
43
36
  RSpec.configure do |config|
@@ -19,21 +19,6 @@ module ExtVerifier
19
19
  defined?(Mongoid)
20
20
  end
21
21
  module_function :has_mongoid?
22
-
23
- def has_mongo_mapper?
24
- defined?(MongoMapper)
25
- end
26
- module_function :has_mongo_mapper?
27
-
28
- def has_ripple?
29
- defined?(Ripple)
30
- end
31
- module_function :has_ripple?
32
-
33
- def has_nobrainer?
34
- defined?(NoBrainer)
35
- end
36
- module_function :has_nobrainer?
37
22
  end
38
23
 
39
24
  RSpec.configure do |config|
@@ -3,6 +3,10 @@ module MongoidVersions
3
3
  Gem::Version.new(Mongoid::VERSION)
4
4
  end
5
5
 
6
+ def mongoid_4_0?
7
+ Gem::Requirement.new('~> 4.0.0').satisfied_by?(mongoid_version)
8
+ end
9
+
6
10
  def mongoid_5_0?
7
11
  Gem::Requirement.new('~> 5.0.0').satisfied_by?(mongoid_version)
8
12
  end
@@ -10,14 +14,6 @@ module MongoidVersions
10
14
  def mongoid_6_0?
11
15
  Gem::Requirement.new('~> 6.0.0').satisfied_by?(mongoid_version)
12
16
  end
13
-
14
- def mongoid_7_0?
15
- Gem::Requirement.new('~> 7.0.0').satisfied_by?(mongoid_version)
16
- end
17
-
18
- def mongoid_7_1?
19
- Gem::Requirement.new('~> 7.1.0').satisfied_by?(mongoid_version)
20
- end
21
17
  end
22
18
 
23
19
  RSpec.configure do |config|
@@ -1,18 +1,8 @@
1
1
  module RailsVersions
2
2
  def rails_version
3
- Gem::Version.new(Rails::VERSION::STRING)
3
+ Gem::Version.new(::Rails::VERSION::STRING)
4
4
  end
5
5
 
6
- def rails_6_1?
7
- Gem::Requirement.new('~> 6.1.0').satisfied_by?(rails_version)
8
- end
9
- alias_method :activerecord_6_1?, :rails_6_1?
10
-
11
- def rails_6_0?
12
- Gem::Requirement.new('~> 6.0.0').satisfied_by?(rails_version)
13
- end
14
- alias_method :activerecord_6_0?, :rails_6_0?
15
-
16
6
  def rails_5_2?
17
7
  Gem::Requirement.new('~> 5.2.0').satisfied_by?(rails_version)
18
8
  end
@@ -24,29 +14,9 @@ module RailsVersions
24
14
  alias_method :activerecord_5_1?, :rails_5_1?
25
15
 
26
16
  def rails_5_0?
27
- Gem::Requirement.new('~> 5.0.0.racecar1').satisfied_by?(rails_version)
17
+ Gem::Requirement.new('~> 5.0.0').satisfied_by?(rails_version)
28
18
  end
29
19
  alias_method :activerecord_5_0?, :rails_5_0?
30
-
31
- def rails_4_2?
32
- Gem::Requirement.new('~> 4.2.0').satisfied_by?(rails_version)
33
- end
34
- alias_method :activerecord_4_2?, :rails_4_2?
35
-
36
- def rails_4_1?
37
- Gem::Requirement.new('~> 4.1.0').satisfied_by?(rails_version)
38
- end
39
- alias_method :activerecord_4_1?, :rails_4_1?
40
-
41
- def rails_4_0?
42
- Gem::Requirement.new('~> 4.0.0').satisfied_by?(rails_version)
43
- end
44
- alias_method :activerecord_4_0?, :rails_4_0?
45
-
46
- def rails_3_2?
47
- Gem::Requirement.new('~> 3.2.0').satisfied_by?(rails_version)
48
- end
49
- alias_method :activerecord_3_2?, :rails_3_2?
50
20
  end
51
21
 
52
22
  RSpec.configure do |config|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
4
+ version: 2.0.0.pre
5
5
  platform: ruby
6
6
  authors:
7
- - Michael Dvorkin
7
+ - Michael Dvorkin, James Cox & contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-07 00:00:00.000000000 Z
11
+ date: 2019-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: fuubar
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: appraisal
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +52,20 @@ dependencies:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: byebug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: fakefs
43
71
  requirement: !ruby/object:Gem::Requirement
@@ -72,17 +100,17 @@ dependencies:
72
100
  requirements:
73
101
  - - ">="
74
102
  - !ruby/object:Gem::Version
75
- version: 1.11.0
103
+ version: 1.6.5
76
104
  type: :development
77
105
  prerelease: false
78
106
  version_requirements: !ruby/object:Gem::Requirement
79
107
  requirements:
80
108
  - - ">="
81
109
  - !ruby/object:Gem::Version
82
- version: 1.11.0
110
+ version: 1.6.5
83
111
  description: 'Great Ruby debugging companion: pretty print Ruby objects to visualize
84
112
  their structure. Supports custom object formatting via plugins'
85
- email: mike@dvorkin.net
113
+ email:
86
114
  executables: []
87
115
  extensions: []
88
116
  extra_rdoc_files: []
@@ -96,85 +124,91 @@ files:
96
124
  - LICENSE
97
125
  - README.md
98
126
  - Rakefile
99
- - awesome_print.gemspec
100
- - init.rb
101
127
  - lib/ap.rb
102
128
  - lib/awesome_print.rb
103
129
  - lib/awesome_print/colorize.rb
130
+ - lib/awesome_print/core_ext/active_support.rb
104
131
  - lib/awesome_print/core_ext/awesome_method_array.rb
105
132
  - lib/awesome_print/core_ext/class.rb
106
133
  - lib/awesome_print/core_ext/kernel.rb
107
134
  - lib/awesome_print/core_ext/logger.rb
108
- - lib/awesome_print/core_ext/method.rb
109
135
  - lib/awesome_print/core_ext/object.rb
110
136
  - lib/awesome_print/core_ext/string.rb
111
137
  - lib/awesome_print/custom_defaults.rb
112
- - lib/awesome_print/ext/action_view.rb
113
- - lib/awesome_print/ext/active_record.rb
114
- - lib/awesome_print/ext/active_support.rb
115
- - lib/awesome_print/ext/mongo_mapper.rb
116
- - lib/awesome_print/ext/mongoid.rb
117
- - lib/awesome_print/ext/nobrainer.rb
118
- - lib/awesome_print/ext/nokogiri.rb
119
- - lib/awesome_print/ext/ostruct.rb
120
- - lib/awesome_print/ext/ripple.rb
121
- - lib/awesome_print/ext/sequel.rb
122
138
  - lib/awesome_print/formatter.rb
123
139
  - lib/awesome_print/formatters.rb
124
140
  - lib/awesome_print/formatters/array_formatter.rb
125
141
  - lib/awesome_print/formatters/base_formatter.rb
142
+ - lib/awesome_print/formatters/bigdecimal_formatter.rb
126
143
  - lib/awesome_print/formatters/class_formatter.rb
127
144
  - lib/awesome_print/formatters/dir_formatter.rb
145
+ - lib/awesome_print/formatters/ext/active_model_error_formatter.rb
146
+ - lib/awesome_print/formatters/ext/active_record_attributeset_formatter.rb
147
+ - lib/awesome_print/formatters/ext/active_record_class_formatter.rb
148
+ - lib/awesome_print/formatters/ext/active_record_instance_formatter.rb
149
+ - lib/awesome_print/formatters/ext/active_record_relation_formatter.rb
150
+ - lib/awesome_print/formatters/ext/bson_objectid_formatter.rb
151
+ - lib/awesome_print/formatters/ext/hash_with_indifferent_access_formatter.rb
152
+ - lib/awesome_print/formatters/ext/mongoid_document_formatter.rb
153
+ - lib/awesome_print/formatters/ext/nokogiri_document_formatter.rb
154
+ - lib/awesome_print/formatters/ext/nokogiri_node_formatter.rb
155
+ - lib/awesome_print/formatters/ext/nokogiri_nodeset_formatter.rb
156
+ - lib/awesome_print/formatters/ext/sequel_dataset_formatter.rb
157
+ - lib/awesome_print/formatters/ext/sequel_model_class_formatter.rb
158
+ - lib/awesome_print/formatters/ext/sequel_model_formatter.rb
159
+ - lib/awesome_print/formatters/ext/time_with_zone_formatter.rb
160
+ - lib/awesome_print/formatters/fallback_formatter.rb
161
+ - lib/awesome_print/formatters/false_class_formatter.rb
128
162
  - lib/awesome_print/formatters/file_formatter.rb
129
163
  - lib/awesome_print/formatters/hash_formatter.rb
164
+ - lib/awesome_print/formatters/integer_formatter.rb
130
165
  - lib/awesome_print/formatters/method_formatter.rb
166
+ - lib/awesome_print/formatters/module_formatter.rb
167
+ - lib/awesome_print/formatters/nil_class_formatter.rb
131
168
  - lib/awesome_print/formatters/object_formatter.rb
169
+ - lib/awesome_print/formatters/open_struct.rb
170
+ - lib/awesome_print/formatters/range_formatter.rb
171
+ - lib/awesome_print/formatters/rational_formatter.rb
172
+ - lib/awesome_print/formatters/set_formatter.rb
132
173
  - lib/awesome_print/formatters/simple_formatter.rb
174
+ - lib/awesome_print/formatters/string_formatter.rb
133
175
  - lib/awesome_print/formatters/struct_formatter.rb
176
+ - lib/awesome_print/formatters/symbol_formatter.rb
177
+ - lib/awesome_print/formatters/true_class_formatter.rb
178
+ - lib/awesome_print/formatters/unbound_method_formatter.rb
134
179
  - lib/awesome_print/indentator.rb
135
180
  - lib/awesome_print/inspector.rb
181
+ - lib/awesome_print/limiter.rb
182
+ - lib/awesome_print/registrar.rb
136
183
  - lib/awesome_print/version.rb
137
184
  - spec/active_record_helper.rb
138
185
  - spec/colors_spec.rb
139
186
  - spec/core_ext/logger_spec.rb
140
187
  - spec/core_ext/string_spec.rb
141
- - spec/ext/action_view_spec.rb
142
- - spec/ext/active_record_spec.rb
143
- - spec/ext/active_support_spec.rb
144
- - spec/ext/mongo_mapper_spec.rb
145
- - spec/ext/mongoid_spec.rb
146
- - spec/ext/nobrainer_spec.rb
147
- - spec/ext/nokogiri_spec.rb
148
- - spec/ext/ostruct_spec.rb
149
- - spec/ext/ripple_spec.rb
150
- - spec/formats_spec.rb
151
- - spec/methods_spec.rb
188
+ - spec/formatters/array_spec.rb
189
+ - spec/formatters/big_decimal_spec.rb
190
+ - spec/formatters/class_spec.rb
191
+ - spec/formatters/dir_file_spec.rb
192
+ - spec/formatters/ext/active_record_spec.rb
193
+ - spec/formatters/ext/active_support_spec.rb
194
+ - spec/formatters/ext/mongoid_spec.rb
195
+ - spec/formatters/ext/nokogiri_spec.rb
196
+ - spec/formatters/hash_spec.rb
197
+ - spec/formatters/methods_spec.rb
198
+ - spec/formatters/objects_spec.rb
199
+ - spec/formatters/ostruct_spec.rb
200
+ - spec/formatters/set_spec.rb
201
+ - spec/formatters/struct_spec.rb
202
+ - spec/merge_options_spec.rb
152
203
  - spec/misc_spec.rb
153
- - spec/objects_spec.rb
154
204
  - spec/spec_helper.rb
155
205
  - spec/support/active_record_data.rb
156
- - spec/support/active_record_data/3_2_diana.txt
157
- - spec/support/active_record_data/3_2_diana_legacy.txt
158
- - spec/support/active_record_data/3_2_multi.txt
159
- - spec/support/active_record_data/3_2_multi_legacy.txt
160
- - spec/support/active_record_data/4_0_diana.txt
161
- - spec/support/active_record_data/4_0_multi.txt
162
- - spec/support/active_record_data/4_1_diana.txt
163
- - spec/support/active_record_data/4_1_multi.txt
164
- - spec/support/active_record_data/4_2_diana.txt
165
- - spec/support/active_record_data/4_2_diana_legacy.txt
166
- - spec/support/active_record_data/4_2_multi.txt
167
- - spec/support/active_record_data/4_2_multi_legacy.txt
168
206
  - spec/support/active_record_data/5_0_diana.txt
169
207
  - spec/support/active_record_data/5_0_multi.txt
170
208
  - spec/support/active_record_data/5_1_diana.txt
171
209
  - spec/support/active_record_data/5_1_multi.txt
172
210
  - spec/support/active_record_data/5_2_diana.txt
173
211
  - spec/support/active_record_data/5_2_multi.txt
174
- - spec/support/active_record_data/6_0_diana.txt
175
- - spec/support/active_record_data/6_0_multi.txt
176
- - spec/support/active_record_data/6_1_diana.txt
177
- - spec/support/active_record_data/6_1_multi.txt
178
212
  - spec/support/ext_verifier.rb
179
213
  - spec/support/mongoid_versions.rb
180
214
  - spec/support/rails_versions.rb
@@ -193,56 +227,44 @@ required_ruby_version: !ruby/object:Gem::Requirement
193
227
  version: '0'
194
228
  required_rubygems_version: !ruby/object:Gem::Requirement
195
229
  requirements:
196
- - - ">="
230
+ - - ">"
197
231
  - !ruby/object:Gem::Version
198
- version: '0'
232
+ version: 1.3.1
199
233
  requirements: []
200
- rubygems_version: 3.1.4
234
+ rubyforge_project:
235
+ rubygems_version: 2.6.14.1
201
236
  signing_key:
202
237
  specification_version: 4
203
238
  summary: Pretty print Ruby objects with proper indentation and colors
204
239
  test_files:
205
240
  - spec/spec_helper.rb
241
+ - spec/merge_options_spec.rb
206
242
  - spec/core_ext/logger_spec.rb
207
243
  - spec/core_ext/string_spec.rb
208
244
  - spec/colors_spec.rb
209
- - spec/ext/active_support_spec.rb
210
- - spec/ext/mongoid_spec.rb
211
- - spec/ext/active_record_spec.rb
212
- - spec/ext/ripple_spec.rb
213
- - spec/ext/nokogiri_spec.rb
214
- - spec/ext/nobrainer_spec.rb
215
- - spec/ext/mongo_mapper_spec.rb
216
- - spec/ext/ostruct_spec.rb
217
- - spec/ext/action_view_spec.rb
218
- - spec/methods_spec.rb
245
+ - spec/formatters/big_decimal_spec.rb
246
+ - spec/formatters/array_spec.rb
247
+ - spec/formatters/set_spec.rb
248
+ - spec/formatters/hash_spec.rb
249
+ - spec/formatters/ext/active_support_spec.rb
250
+ - spec/formatters/ext/mongoid_spec.rb
251
+ - spec/formatters/ext/active_record_spec.rb
252
+ - spec/formatters/ext/nokogiri_spec.rb
253
+ - spec/formatters/methods_spec.rb
254
+ - spec/formatters/dir_file_spec.rb
255
+ - spec/formatters/objects_spec.rb
256
+ - spec/formatters/struct_spec.rb
257
+ - spec/formatters/ostruct_spec.rb
258
+ - spec/formatters/class_spec.rb
219
259
  - spec/active_record_helper.rb
220
- - spec/objects_spec.rb
221
260
  - spec/support/mongoid_versions.rb
222
- - spec/support/active_record_data/4_2_multi.txt
223
- - spec/support/active_record_data/6_1_multi.txt
224
- - spec/support/active_record_data/3_2_diana.txt
225
- - spec/support/active_record_data/4_1_diana.txt
226
261
  - spec/support/active_record_data/5_0_multi.txt
227
262
  - spec/support/active_record_data/5_2_diana.txt
228
- - spec/support/active_record_data/4_2_diana_legacy.txt
229
- - spec/support/active_record_data/4_2_multi_legacy.txt
230
- - spec/support/active_record_data/6_0_multi.txt
231
- - spec/support/active_record_data/4_0_diana.txt
232
263
  - spec/support/active_record_data/5_1_multi.txt
233
- - spec/support/active_record_data/4_0_multi.txt
234
264
  - spec/support/active_record_data/5_1_diana.txt
235
- - spec/support/active_record_data/6_0_diana.txt
236
265
  - spec/support/active_record_data/5_2_multi.txt
237
- - spec/support/active_record_data/4_1_multi.txt
238
266
  - spec/support/active_record_data/5_0_diana.txt
239
- - spec/support/active_record_data/3_2_diana_legacy.txt
240
- - spec/support/active_record_data/3_2_multi_legacy.txt
241
- - spec/support/active_record_data/3_2_multi.txt
242
- - spec/support/active_record_data/6_1_diana.txt
243
- - spec/support/active_record_data/4_2_diana.txt
244
267
  - spec/support/ext_verifier.rb
245
268
  - spec/support/rails_versions.rb
246
269
  - spec/support/active_record_data.rb
247
- - spec/formats_spec.rb
248
270
  - spec/misc_spec.rb