amazing_print 1.2.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/Appraisals +38 -54
  3. data/CHANGELOG.md +36 -2
  4. data/Gemfile.lock +48 -50
  5. data/README.md +20 -11
  6. data/lib/amazing_print/colorize.rb +1 -3
  7. data/lib/amazing_print/core_ext/awesome_method_array.rb +4 -4
  8. data/lib/amazing_print/core_ext/class.rb +1 -1
  9. data/lib/amazing_print/core_ext/logger.rb +10 -5
  10. data/lib/amazing_print/core_ext/object.rb +1 -1
  11. data/lib/amazing_print/custom_defaults.rb +10 -3
  12. data/lib/amazing_print/ext/action_view.rb +1 -1
  13. data/lib/amazing_print/ext/active_record.rb +12 -27
  14. data/lib/amazing_print/ext/active_support.rb +1 -3
  15. data/lib/amazing_print/ext/mongo_mapper.rb +5 -8
  16. data/lib/amazing_print/ext/mongoid.rb +2 -6
  17. data/lib/amazing_print/ext/nobrainer.rb +7 -5
  18. data/lib/amazing_print/ext/nokogiri.rb +1 -3
  19. data/lib/amazing_print/ext/ostruct.rb +1 -3
  20. data/lib/amazing_print/ext/ripple.rb +4 -5
  21. data/lib/amazing_print/formatter.rb +5 -6
  22. data/lib/amazing_print/formatters/array_formatter.rb +6 -5
  23. data/lib/amazing_print/formatters/base_formatter.rb +20 -25
  24. data/lib/amazing_print/formatters/class_formatter.rb +1 -0
  25. data/lib/amazing_print/formatters/dir_formatter.rb +1 -0
  26. data/lib/amazing_print/formatters/file_formatter.rb +1 -0
  27. data/lib/amazing_print/formatters/hash_formatter.rb +5 -4
  28. data/lib/amazing_print/formatters/method_formatter.rb +1 -0
  29. data/lib/amazing_print/formatters/object_formatter.rb +2 -1
  30. data/lib/amazing_print/formatters/simple_formatter.rb +1 -0
  31. data/lib/amazing_print/formatters/struct_formatter.rb +2 -1
  32. data/lib/amazing_print/inspector.rb +29 -5
  33. data/lib/amazing_print/version.rb +1 -1
  34. data/lib/amazing_print.rb +2 -6
  35. data/spec/active_record_helper.rb +11 -0
  36. data/spec/colors_spec.rb +38 -46
  37. data/spec/core_ext/logger_spec.rb +42 -18
  38. data/spec/core_ext/string_spec.rb +2 -2
  39. data/spec/ext/action_controller_spec.rb +4 -4
  40. data/spec/ext/action_view_spec.rb +6 -1
  41. data/spec/ext/active_model_spec.rb +37 -0
  42. data/spec/ext/active_record_spec.rb +44 -23
  43. data/spec/ext/active_support_spec.rb +13 -4
  44. data/spec/ext/mongo_mapper_spec.rb +16 -12
  45. data/spec/ext/mongoid_spec.rb +7 -3
  46. data/spec/ext/nobrainer_spec.rb +6 -2
  47. data/spec/ext/nokogiri_spec.rb +3 -3
  48. data/spec/ext/ripple_spec.rb +6 -2
  49. data/spec/formats_spec.rb +24 -18
  50. data/spec/methods_spec.rb +12 -4
  51. data/spec/misc_spec.rb +15 -10
  52. data/spec/objects_spec.rb +4 -0
  53. data/spec/spec_helper.rb +4 -8
  54. data/spec/support/active_record_data/6_1_diana.txt +109 -0
  55. data/spec/support/active_record_data/6_1_multi.txt +220 -0
  56. data/spec/support/ext_verifier.rb +2 -4
  57. data/spec/support/rails_versions.rb +5 -0
  58. metadata +80 -60
@@ -3,10 +3,8 @@
3
3
  module ExtVerifier
4
4
  def require_dependencies!(dependencies)
5
5
  dependencies.each do |dependency|
6
- begin
7
- require dependency
8
- rescue LoadError
9
- end
6
+ require dependency
7
+ rescue LoadError
10
8
  end
11
9
  end
12
10
  module_function :require_dependencies!
@@ -5,6 +5,11 @@ module RailsVersions
5
5
  Gem::Version.new(Rails::VERSION::STRING)
6
6
  end
7
7
 
8
+ def rails_6_1?
9
+ Gem::Requirement.new('~> 6.1.0').satisfied_by?(rails_version)
10
+ end
11
+ alias activerecord_6_1? rails_6_1?
12
+
8
13
  def rails_6_0?
9
14
  Gem::Requirement.new('~> 6.0.0').satisfied_by?(rails_version)
10
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazing_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dvorkin
@@ -9,50 +9,50 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-06-09 00:00:00.000000000 Z
12
+ date: 2021-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appraisal
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0'
20
+ version: '2.3'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '0'
27
+ version: '2.3'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: fakefs
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.2.1
34
+ version: '1.2'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.2.1
41
+ version: '1.2'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: nokogiri
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ">="
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 1.6.5
48
+ version: '1.10'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 1.6.5
55
+ version: '1.10'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: pry
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -71,30 +71,44 @@ dependencies:
71
71
  name: rspec
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">="
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: 3.0.0
76
+ version: '3.9'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ">="
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: 3.0.0
83
+ version: '3.9'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rubocop
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: 0.81.0
90
+ version: '1.20'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: 0.81.0
97
+ version: '1.20'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rubocop-rspec
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '2.4'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '2.4'
98
112
  description: 'Great Ruby debugging companion: pretty print Ruby objects to visualize
99
113
  their structure. Supports custom object formatting via plugins'
100
114
  email: harlemsquirrel@gmail.com
@@ -152,6 +166,7 @@ files:
152
166
  - spec/core_ext/string_spec.rb
153
167
  - spec/ext/action_controller_spec.rb
154
168
  - spec/ext/action_view_spec.rb
169
+ - spec/ext/active_model_spec.rb
155
170
  - spec/ext/active_record_spec.rb
156
171
  - spec/ext/active_support_spec.rb
157
172
  - spec/ext/mongo_mapper_spec.rb
@@ -188,6 +203,8 @@ files:
188
203
  - spec/support/active_record_data/5_2_multi.txt
189
204
  - spec/support/active_record_data/6_0_diana.txt
190
205
  - spec/support/active_record_data/6_0_multi.txt
206
+ - spec/support/active_record_data/6_1_diana.txt
207
+ - spec/support/active_record_data/6_1_multi.txt
191
208
  - spec/support/ext_verifier.rb
192
209
  - spec/support/mongoid_versions.rb
193
210
  - spec/support/rails_versions.rb
@@ -203,60 +220,63 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
220
  requirements:
204
221
  - - ">="
205
222
  - !ruby/object:Gem::Version
206
- version: 2.3.0
223
+ version: 2.5.0
207
224
  required_rubygems_version: !ruby/object:Gem::Requirement
208
225
  requirements:
209
226
  - - ">="
210
227
  - !ruby/object:Gem::Version
211
228
  version: '0'
212
229
  requirements: []
213
- rubygems_version: 3.1.2
230
+ rubygems_version: 3.2.22
214
231
  signing_key:
215
232
  specification_version: 4
216
233
  summary: Pretty print Ruby objects with proper indentation and colors
217
234
  test_files:
218
- - spec/support/rails_versions.rb
219
- - spec/support/mongoid_versions.rb
220
- - spec/support/ext_verifier.rb
221
- - spec/support/active_record_data/4_2_diana_legacy.txt
222
- - spec/support/active_record_data/4_2_multi_legacy.txt
223
- - spec/support/active_record_data/5_1_diana.txt
224
- - spec/support/active_record_data/4_2_diana.txt
225
- - spec/support/active_record_data/5_2_diana.txt
226
- - spec/support/active_record_data/4_1_diana.txt
227
- - spec/support/active_record_data/6_0_diana.txt
228
- - spec/support/active_record_data/5_0_diana.txt
229
- - spec/support/active_record_data/5_2_multi.txt
230
- - spec/support/active_record_data/4_1_multi.txt
231
- - spec/support/active_record_data/3_2_diana_legacy.txt
232
- - spec/support/active_record_data/6_0_multi.txt
233
- - spec/support/active_record_data/5_0_multi.txt
234
- - spec/support/active_record_data/3_2_diana.txt
235
- - spec/support/active_record_data/3_2_multi_legacy.txt
236
- - spec/support/active_record_data/4_2_multi.txt
237
- - spec/support/active_record_data/5_1_multi.txt
238
- - spec/support/active_record_data/3_2_multi.txt
239
- - spec/support/active_record_data/4_0_diana.txt
240
- - spec/support/active_record_data/4_0_multi.txt
241
- - spec/support/active_record_data.rb
242
- - spec/formats_spec.rb
243
- - spec/objects_spec.rb
244
- - spec/misc_spec.rb
245
- - spec/colors_spec.rb
246
235
  - spec/active_record_helper.rb
236
+ - spec/colors_spec.rb
247
237
  - spec/core_ext/logger_spec.rb
248
238
  - spec/core_ext/string_spec.rb
249
- - spec/sequel_helper.rb
250
- - spec/methods_spec.rb
251
- - spec/ext/nobrainer_spec.rb
252
- - spec/ext/ostruct_spec.rb
253
- - spec/ext/nokogiri_spec.rb
254
- - spec/ext/active_support_spec.rb
255
- - spec/ext/active_record_spec.rb
239
+ - spec/ext/action_controller_spec.rb
256
240
  - spec/ext/action_view_spec.rb
257
- - spec/ext/sequel_spec.rb
258
- - spec/ext/ripple_spec.rb
241
+ - spec/ext/active_model_spec.rb
242
+ - spec/ext/active_record_spec.rb
243
+ - spec/ext/active_support_spec.rb
259
244
  - spec/ext/mongo_mapper_spec.rb
260
245
  - spec/ext/mongoid_spec.rb
261
- - spec/ext/action_controller_spec.rb
246
+ - spec/ext/nobrainer_spec.rb
247
+ - spec/ext/nokogiri_spec.rb
248
+ - spec/ext/ostruct_spec.rb
249
+ - spec/ext/ripple_spec.rb
250
+ - spec/ext/sequel_spec.rb
251
+ - spec/formats_spec.rb
252
+ - spec/methods_spec.rb
253
+ - spec/misc_spec.rb
254
+ - spec/objects_spec.rb
255
+ - spec/sequel_helper.rb
262
256
  - spec/spec_helper.rb
257
+ - spec/support/active_record_data/3_2_diana.txt
258
+ - spec/support/active_record_data/3_2_diana_legacy.txt
259
+ - spec/support/active_record_data/3_2_multi.txt
260
+ - spec/support/active_record_data/3_2_multi_legacy.txt
261
+ - spec/support/active_record_data/4_0_diana.txt
262
+ - spec/support/active_record_data/4_0_multi.txt
263
+ - spec/support/active_record_data/4_1_diana.txt
264
+ - spec/support/active_record_data/4_1_multi.txt
265
+ - spec/support/active_record_data/4_2_diana.txt
266
+ - spec/support/active_record_data/4_2_diana_legacy.txt
267
+ - spec/support/active_record_data/4_2_multi.txt
268
+ - spec/support/active_record_data/4_2_multi_legacy.txt
269
+ - spec/support/active_record_data/5_0_diana.txt
270
+ - spec/support/active_record_data/5_0_multi.txt
271
+ - spec/support/active_record_data/5_1_diana.txt
272
+ - spec/support/active_record_data/5_1_multi.txt
273
+ - spec/support/active_record_data/5_2_diana.txt
274
+ - spec/support/active_record_data/5_2_multi.txt
275
+ - spec/support/active_record_data/6_0_diana.txt
276
+ - spec/support/active_record_data/6_0_multi.txt
277
+ - spec/support/active_record_data/6_1_diana.txt
278
+ - spec/support/active_record_data/6_1_multi.txt
279
+ - spec/support/active_record_data.rb
280
+ - spec/support/ext_verifier.rb
281
+ - spec/support/mongoid_versions.rb
282
+ - spec/support/rails_versions.rb