awesome_print 1.7.0 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +4 -0
- data/Appraisals +44 -34
- data/CHANGELOG.md +28 -0
- data/CONTRIBUTING.md +2 -1
- data/Gemfile.lock +25 -33
- data/LICENSE +16 -19
- data/README.md +88 -44
- data/Rakefile +5 -5
- data/awesome_print.gemspec +33 -0
- data/init.rb +1 -0
- data/lib/ap.rb +2 -2
- data/lib/awesome_print/colorize.rb +1 -1
- data/lib/awesome_print/core_ext/{array.rb → awesome_method_array.rb} +16 -18
- data/lib/awesome_print/core_ext/class.rb +3 -2
- data/lib/awesome_print/core_ext/kernel.rb +1 -1
- data/lib/awesome_print/core_ext/logger.rb +1 -1
- data/lib/awesome_print/core_ext/method.rb +2 -2
- data/lib/awesome_print/core_ext/object.rb +3 -2
- data/lib/awesome_print/core_ext/string.rb +3 -3
- data/lib/awesome_print/custom_defaults.rb +57 -0
- data/lib/awesome_print/ext/action_view.rb +8 -4
- data/lib/awesome_print/ext/active_record.rb +45 -12
- data/lib/awesome_print/ext/active_support.rb +1 -1
- data/lib/awesome_print/ext/mongo_mapper.rb +16 -13
- data/lib/awesome_print/ext/mongoid.rb +8 -6
- data/lib/awesome_print/ext/nobrainer.rb +8 -5
- data/lib/awesome_print/ext/nokogiri.rb +4 -4
- data/lib/awesome_print/ext/ostruct.rb +1 -1
- data/lib/awesome_print/ext/ripple.rb +5 -6
- data/lib/awesome_print/ext/sequel.rb +7 -6
- data/lib/awesome_print/formatter.rb +28 -28
- data/lib/awesome_print/formatters/array_formatter.rb +108 -42
- data/lib/awesome_print/formatters/base_formatter.rb +16 -14
- data/lib/awesome_print/formatters/class_formatter.rb +2 -1
- data/lib/awesome_print/formatters/dir_formatter.rb +1 -1
- data/lib/awesome_print/formatters/file_formatter.rb +1 -1
- data/lib/awesome_print/formatters/hash_formatter.rb +74 -22
- data/lib/awesome_print/formatters/object_formatter.rb +13 -15
- data/lib/awesome_print/formatters/struct_formatter.rb +71 -0
- data/lib/awesome_print/formatters.rb +15 -0
- data/lib/awesome_print/inspector.rb +83 -96
- data/lib/awesome_print/version.rb +2 -2
- data/lib/awesome_print.rb +18 -17
- data/spec/active_record_helper.rb +8 -2
- data/spec/colors_spec.rb +30 -30
- data/spec/core_ext/logger_spec.rb +43 -0
- data/spec/core_ext/string_spec.rb +20 -0
- data/spec/ext/action_view_spec.rb +21 -0
- data/spec/ext/active_record_spec.rb +260 -0
- data/spec/ext/active_support_spec.rb +30 -0
- data/spec/ext/mongo_mapper_spec.rb +261 -0
- data/spec/ext/mongoid_spec.rb +67 -0
- data/spec/ext/nobrainer_spec.rb +59 -0
- data/spec/ext/nokogiri_spec.rb +46 -0
- data/spec/ext/ostruct_spec.rb +22 -0
- data/spec/ext/ripple_spec.rb +48 -0
- data/spec/formats_spec.rb +193 -165
- data/spec/methods_spec.rb +125 -129
- data/spec/misc_spec.rb +95 -92
- data/spec/objects_spec.rb +119 -28
- data/spec/spec_helper.rb +29 -10
- data/spec/support/active_record_data/3_2_diana.txt +24 -0
- data/spec/support/active_record_data/3_2_diana_legacy.txt +24 -0
- data/spec/support/active_record_data/3_2_multi.txt +50 -0
- data/spec/support/active_record_data/3_2_multi_legacy.txt +50 -0
- data/spec/support/active_record_data/4_0_diana.txt +98 -0
- data/spec/support/active_record_data/4_0_multi.txt +198 -0
- data/spec/support/active_record_data/4_1_diana.txt +97 -0
- data/spec/support/active_record_data/4_1_multi.txt +196 -0
- data/spec/support/active_record_data/4_2_diana.txt +109 -0
- data/spec/support/active_record_data/4_2_diana_legacy.txt +109 -0
- data/spec/support/active_record_data/4_2_multi.txt +220 -0
- data/spec/support/active_record_data/4_2_multi_legacy.txt +220 -0
- data/spec/support/active_record_data/5_0_diana.txt +105 -0
- data/spec/support/active_record_data/5_0_multi.txt +212 -0
- data/spec/support/active_record_data/5_1_diana.txt +104 -0
- data/spec/support/active_record_data/5_1_multi.txt +210 -0
- data/spec/support/active_record_data/5_2_diana.txt +104 -0
- data/spec/support/active_record_data/5_2_multi.txt +210 -0
- data/spec/support/active_record_data/6_0_diana.txt +104 -0
- data/spec/support/active_record_data/6_0_multi.txt +210 -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/active_record_data.rb +20 -0
- data/spec/support/ext_verifier.rb +42 -0
- data/spec/support/mongoid_versions.rb +26 -0
- data/spec/support/rails_versions.rb +55 -0
- metadata +90 -26
@@ -0,0 +1,55 @@
|
|
1
|
+
module RailsVersions
|
2
|
+
def rails_version
|
3
|
+
Gem::Version.new(Rails::VERSION::STRING)
|
4
|
+
end
|
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
|
+
def rails_5_2?
|
17
|
+
Gem::Requirement.new('~> 5.2.0').satisfied_by?(rails_version)
|
18
|
+
end
|
19
|
+
alias_method :activerecord_5_2?, :rails_5_2?
|
20
|
+
|
21
|
+
def rails_5_1?
|
22
|
+
Gem::Requirement.new('~> 5.1.0').satisfied_by?(rails_version)
|
23
|
+
end
|
24
|
+
alias_method :activerecord_5_1?, :rails_5_1?
|
25
|
+
|
26
|
+
def rails_5_0?
|
27
|
+
Gem::Requirement.new('~> 5.0.0.racecar1').satisfied_by?(rails_version)
|
28
|
+
end
|
29
|
+
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
|
+
end
|
51
|
+
|
52
|
+
RSpec.configure do |config|
|
53
|
+
config.include(RailsVersions)
|
54
|
+
config.extend(RailsVersions)
|
55
|
+
end
|
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.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Dvorkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -72,29 +72,15 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 1.11.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
83
|
-
|
84
|
-
name: codeclimate-test-reporter
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
description: 'Great Ruby dubugging companion: pretty print Ruby objects to visualize
|
82
|
+
version: 1.11.0
|
83
|
+
description: 'Great Ruby debugging companion: pretty print Ruby objects to visualize
|
98
84
|
their structure. Supports custom object formatting via plugins'
|
99
85
|
email: mike@dvorkin.net
|
100
86
|
executables: []
|
@@ -110,16 +96,19 @@ files:
|
|
110
96
|
- LICENSE
|
111
97
|
- README.md
|
112
98
|
- Rakefile
|
99
|
+
- awesome_print.gemspec
|
100
|
+
- init.rb
|
113
101
|
- lib/ap.rb
|
114
102
|
- lib/awesome_print.rb
|
115
103
|
- lib/awesome_print/colorize.rb
|
116
|
-
- lib/awesome_print/core_ext/
|
104
|
+
- lib/awesome_print/core_ext/awesome_method_array.rb
|
117
105
|
- lib/awesome_print/core_ext/class.rb
|
118
106
|
- lib/awesome_print/core_ext/kernel.rb
|
119
107
|
- lib/awesome_print/core_ext/logger.rb
|
120
108
|
- lib/awesome_print/core_ext/method.rb
|
121
109
|
- lib/awesome_print/core_ext/object.rb
|
122
110
|
- lib/awesome_print/core_ext/string.rb
|
111
|
+
- lib/awesome_print/custom_defaults.rb
|
123
112
|
- lib/awesome_print/ext/action_view.rb
|
124
113
|
- lib/awesome_print/ext/active_record.rb
|
125
114
|
- lib/awesome_print/ext/active_support.rb
|
@@ -131,6 +120,7 @@ files:
|
|
131
120
|
- lib/awesome_print/ext/ripple.rb
|
132
121
|
- lib/awesome_print/ext/sequel.rb
|
133
122
|
- lib/awesome_print/formatter.rb
|
123
|
+
- lib/awesome_print/formatters.rb
|
134
124
|
- lib/awesome_print/formatters/array_formatter.rb
|
135
125
|
- lib/awesome_print/formatters/base_formatter.rb
|
136
126
|
- lib/awesome_print/formatters/class_formatter.rb
|
@@ -140,16 +130,54 @@ files:
|
|
140
130
|
- lib/awesome_print/formatters/method_formatter.rb
|
141
131
|
- lib/awesome_print/formatters/object_formatter.rb
|
142
132
|
- lib/awesome_print/formatters/simple_formatter.rb
|
133
|
+
- lib/awesome_print/formatters/struct_formatter.rb
|
143
134
|
- lib/awesome_print/indentator.rb
|
144
135
|
- lib/awesome_print/inspector.rb
|
145
136
|
- lib/awesome_print/version.rb
|
146
137
|
- spec/active_record_helper.rb
|
147
138
|
- spec/colors_spec.rb
|
139
|
+
- spec/core_ext/logger_spec.rb
|
140
|
+
- 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
|
148
150
|
- spec/formats_spec.rb
|
149
151
|
- spec/methods_spec.rb
|
150
152
|
- spec/misc_spec.rb
|
151
153
|
- spec/objects_spec.rb
|
152
154
|
- spec/spec_helper.rb
|
155
|
+
- 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
|
+
- spec/support/active_record_data/5_0_diana.txt
|
169
|
+
- spec/support/active_record_data/5_0_multi.txt
|
170
|
+
- spec/support/active_record_data/5_1_diana.txt
|
171
|
+
- spec/support/active_record_data/5_1_multi.txt
|
172
|
+
- spec/support/active_record_data/5_2_diana.txt
|
173
|
+
- 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
|
+
- spec/support/ext_verifier.rb
|
179
|
+
- spec/support/mongoid_versions.rb
|
180
|
+
- spec/support/rails_versions.rb
|
153
181
|
homepage: https://github.com/awesome-print/awesome_print
|
154
182
|
licenses:
|
155
183
|
- MIT
|
@@ -169,16 +197,52 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
197
|
- !ruby/object:Gem::Version
|
170
198
|
version: '0'
|
171
199
|
requirements: []
|
172
|
-
|
173
|
-
rubygems_version: 2.5.1
|
200
|
+
rubygems_version: 3.1.4
|
174
201
|
signing_key:
|
175
202
|
specification_version: 4
|
176
203
|
summary: Pretty print Ruby objects with proper indentation and colors
|
177
204
|
test_files:
|
178
|
-
- spec/
|
205
|
+
- spec/spec_helper.rb
|
206
|
+
- spec/core_ext/logger_spec.rb
|
207
|
+
- spec/core_ext/string_spec.rb
|
179
208
|
- spec/colors_spec.rb
|
180
|
-
- spec/
|
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
|
181
218
|
- spec/methods_spec.rb
|
182
|
-
- spec/
|
219
|
+
- spec/active_record_helper.rb
|
183
220
|
- spec/objects_spec.rb
|
184
|
-
- spec/
|
221
|
+
- 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
|
+
- spec/support/active_record_data/5_0_multi.txt
|
227
|
+
- 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
|
+
- spec/support/active_record_data/5_1_multi.txt
|
233
|
+
- spec/support/active_record_data/4_0_multi.txt
|
234
|
+
- spec/support/active_record_data/5_1_diana.txt
|
235
|
+
- spec/support/active_record_data/6_0_diana.txt
|
236
|
+
- spec/support/active_record_data/5_2_multi.txt
|
237
|
+
- spec/support/active_record_data/4_1_multi.txt
|
238
|
+
- 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
|
+
- spec/support/ext_verifier.rb
|
245
|
+
- spec/support/rails_versions.rb
|
246
|
+
- spec/support/active_record_data.rb
|
247
|
+
- spec/formats_spec.rb
|
248
|
+
- spec/misc_spec.rb
|