amazing_print 1.2.2 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +46 -59
- data/lib/amazing_print/ext/action_view.rb +1 -1
- data/lib/amazing_print/ext/active_record.rb +7 -18
- data/lib/amazing_print/version.rb +1 -1
- data/spec/ext/action_controller_spec.rb +2 -2
- data/spec/ext/action_view_spec.rb +6 -1
- data/spec/ext/active_record_spec.rb +29 -8
- data/spec/ext/active_support_spec.rb +10 -1
- 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/rails_versions.rb +5 -0
- metadata +47 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63ce7e50d17b53a5270709def03c7f3075a7068ada7d11ca7f124bda5cddc735
|
4
|
+
data.tar.gz: de6d68e51a4e70fdad3fff7fc5050ab6984280afaa3851a9958bf24731bb022d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb0a4eb248f06fd34e28d5161ab984653af5661347e4d32e76ec3b2be995ff31f9fec4b5c8355a19908bd16f7219ed2148556d383bbb36af740925e5a4ec9004
|
7
|
+
data.tar.gz: c48fe1109d33a49653f8f506233c5bf674137008fed98d083022b46a72b26aa0cd469f13bca4ef1b6b2bdee1657bcf8d66481e505cca045de47dd00a40a6475f
|
data/Appraisals
CHANGED
@@ -1,69 +1,56 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
3
|
+
if RUBY_VERSION < '3'
|
4
|
+
appraise 'rails-5.1' do
|
5
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 51.0', platform: :jruby
|
6
|
+
gem 'rails', '~> 5.1.0'
|
7
|
+
gem 'sqlite3', platform: :mri
|
8
|
+
end
|
9
|
+
|
10
|
+
appraise 'rails-5.2' do
|
11
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 52.0', platform: :jruby
|
12
|
+
gem 'rails', '~> 5.2.0'
|
13
|
+
gem 'sqlite3', platform: :mri
|
14
|
+
end
|
15
|
+
|
16
|
+
appraise 'rails-6.0' do
|
17
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 60.0', platform: :jruby
|
18
|
+
gem 'rails', '~> 6.0.0'
|
19
|
+
gem 'sqlite3', platform: :mri
|
20
|
+
end
|
21
|
+
|
22
|
+
appraise 'mongoid-4.0' do
|
23
|
+
# https://github.com/rails/rails/issues/34822#issuecomment-570670516
|
24
|
+
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
25
|
+
gem 'mongoid', '~> 4.0.0'
|
26
|
+
end
|
27
|
+
|
28
|
+
appraise 'mongoid-5.0' do
|
29
|
+
# https://github.com/rails/rails/issues/34822#issuecomment-570670516
|
30
|
+
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
31
|
+
gem 'mongoid', '~> 5.0.0'
|
32
|
+
end
|
33
|
+
|
34
|
+
appraise 'mongoid-6.0' do
|
35
|
+
gem 'mongoid', '~> 6.0.0'
|
36
|
+
end
|
37
|
+
|
38
|
+
appraise 'mongo_mapper' do
|
39
|
+
gem 'activemodel', '~> 4.2.0'
|
40
|
+
gem 'activesupport', '~> 4.2.0'
|
41
|
+
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
42
|
+
gem 'mongo_mapper', '~> 0.14'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
appraise 'rails-6.1' do
|
47
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 61.0', platform: :jruby
|
48
|
+
gem 'rails', '~> 6.1.0'
|
20
49
|
gem 'sqlite3', platform: :mri
|
21
50
|
end
|
22
51
|
|
23
|
-
appraise 'rails-6.0' do
|
24
|
-
gem 'activerecord-jdbcsqlite3-adapter', '~> 60.0', platform: :jruby
|
25
|
-
gem 'rails', '~> 6.0.0'
|
26
|
-
gem 'sqlite3', platform: :mri
|
27
|
-
end
|
28
|
-
|
29
|
-
appraise 'mongoid-4.0' do
|
30
|
-
# https://github.com/rails/rails/issues/34822#issuecomment-570670516
|
31
|
-
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
32
|
-
gem 'mongoid', '~> 4.0.0'
|
33
|
-
end
|
34
|
-
|
35
|
-
appraise 'mongoid-5.0' do
|
36
|
-
# https://github.com/rails/rails/issues/34822#issuecomment-570670516
|
37
|
-
gem 'bigdecimal', '~> 1.4', platforms: :mri
|
38
|
-
gem 'mongoid', '~> 5.0.0'
|
39
|
-
end
|
40
|
-
|
41
|
-
appraise 'mongoid-6.0' do
|
42
|
-
gem 'mongoid', '~> 6.0.0'
|
43
|
-
end
|
44
|
-
|
45
52
|
appraise 'sequel-5.0' do
|
46
53
|
gem 'jdbc-sqlite3', platform: :jruby
|
47
54
|
gem 'sequel', '~> 5.0'
|
48
55
|
gem 'sqlite3', platform: :mri
|
49
56
|
end
|
50
|
-
|
51
|
-
appraise 'mongo_mapper' do
|
52
|
-
gem 'activemodel', '~> 4.2.0'
|
53
|
-
gem 'activesupport', '~> 4.2.0'
|
54
|
-
gem 'bigdecimal', '~> 1.4'
|
55
|
-
gem 'mongo_mapper', '~> 0.14'
|
56
|
-
end
|
57
|
-
|
58
|
-
# appraise 'ripple' do
|
59
|
-
# gem 'tzinfo'
|
60
|
-
# gem 'ripple'
|
61
|
-
# end
|
62
|
-
#
|
63
|
-
# appraise 'nobrainer' do
|
64
|
-
# gem 'nobrainer'
|
65
|
-
#
|
66
|
-
# # When activesupport 5 was released, it required ruby 2.2.2 as a minimum.
|
67
|
-
# # Locking this down to 4.2.6 allows our Ruby 1.9 tests to keep working.
|
68
|
-
# gem 'activesupport', '4.2.6', :platforms => :ruby_19
|
69
|
-
# end
|
@@ -55,7 +55,7 @@ module AmazingPrint
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
58
|
-
[object.to_s, awesome_hash(data)].join(' ')
|
58
|
+
[awesome_simple(object.to_s, :active_record_instance), awesome_hash(data)].join(' ')
|
59
59
|
end
|
60
60
|
|
61
61
|
# Format ActiveRecord class object.
|
@@ -72,10 +72,7 @@ module AmazingPrint
|
|
72
72
|
hash[c.name.to_sym] = c.type
|
73
73
|
end
|
74
74
|
|
75
|
-
|
76
|
-
base = "< #{awesome_simple(object.superclass.to_s, :class)}"
|
77
|
-
|
78
|
-
[name, base, awesome_hash(data)].join(' ')
|
75
|
+
[awesome_simple("class #{object} < #{object.superclass}", :class), awesome_hash(data)].join(' ')
|
79
76
|
end
|
80
77
|
|
81
78
|
# Format ActiveModel error object.
|
@@ -84,20 +81,12 @@ module AmazingPrint
|
|
84
81
|
return object.inspect unless defined?(::ActiveSupport::OrderedHash)
|
85
82
|
return awesome_object(object) if @options[:raw]
|
86
83
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
object_dump.class.column_names.each_with_object(::ActiveSupport::OrderedHash.new) do |name, hash|
|
92
|
-
if object_dump.has_attribute?(name) || object_dump.new_record?
|
93
|
-
value = object_dump.respond_to?(name) ? object_dump.send(name) : object_dump.read_attribute(name)
|
94
|
-
hash[name.to_sym] = value
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
84
|
+
data = object.instance_variable_get('@base')
|
85
|
+
.attributes
|
86
|
+
.merge(details: object.details.to_h,
|
87
|
+
messages: object.messages.to_h.transform_values(&:to_a))
|
98
88
|
|
99
|
-
|
100
|
-
[object.to_s, awesome_hash(data)].join(' ')
|
89
|
+
[awesome_simple(object.to_s, :active_model_error), awesome_hash(data)].join(' ')
|
101
90
|
end
|
102
91
|
end
|
103
92
|
end
|
@@ -11,8 +11,8 @@ RSpec.describe 'AmazingPrint::ActionController', skip: -> { !ExtVerifier.has_rai
|
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should format as an object' do
|
14
|
-
expect(inspector.send(:awesome, parameters)).to
|
15
|
-
|
14
|
+
expect(inspector.send(:awesome, parameters)).to match(
|
15
|
+
/\A#?<ActionController::Parameters {"post"=>{"id"=>1, "content"=>"Some"}} permitted: false>\z/
|
16
16
|
)
|
17
17
|
end
|
18
18
|
end
|
@@ -2,7 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
RSpec.describe 'AmazingPrint ActionView extensions',
|
5
|
+
RSpec.describe 'AmazingPrint ActionView extensions',
|
6
|
+
skip: -> { !ExtVerifier.has_rails? || ActiveRecord::VERSION::STRING >= '6.1' }.call do
|
6
7
|
before do
|
7
8
|
@view = ActionView::Base.new
|
8
9
|
end
|
@@ -16,4 +17,8 @@ RSpec.describe 'AmazingPrint ActionView extensions', skip: -> { !ExtVerifier.has
|
|
16
17
|
markup = ' &<hello>'
|
17
18
|
expect(@view.ap(markup)).to eq('<pre class="debug_dump"><kbd style="color:brown">" &<hello>"</kbd></pre>')
|
18
19
|
end
|
20
|
+
|
21
|
+
it 'uses HTML and does set output to HTML safe' do
|
22
|
+
expect(@view.ap('<p>Hello World</p>')).to be_html_safe
|
23
|
+
end
|
19
24
|
end
|
@@ -128,7 +128,9 @@ RSpec.describe 'AmazingPrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
|
128
128
|
out = @ap.awesome(@diana)
|
129
129
|
|
130
130
|
raw_object_string =
|
131
|
-
if
|
131
|
+
if activerecord_6_1?
|
132
|
+
ActiveRecordData.raw_6_1_diana
|
133
|
+
elsif activerecord_6_0?
|
132
134
|
ActiveRecordData.raw_6_0_diana
|
133
135
|
elsif activerecord_5_2?
|
134
136
|
ActiveRecordData.raw_5_2_diana
|
@@ -154,7 +156,7 @@ RSpec.describe 'AmazingPrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
|
154
156
|
end
|
155
157
|
end
|
156
158
|
|
157
|
-
if RUBY_PLATFORM == 'java'
|
159
|
+
if RUBY_PLATFORM == 'java' && !activerecord_6_1?
|
158
160
|
raw_object_string.gsub!(
|
159
161
|
'ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer',
|
160
162
|
'ArJdbc::SQLite3::SQLite3Integer'
|
@@ -168,7 +170,9 @@ RSpec.describe 'AmazingPrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
|
168
170
|
out = @ap.awesome([@diana, @laura])
|
169
171
|
|
170
172
|
raw_object_string =
|
171
|
-
if
|
173
|
+
if activerecord_6_1?
|
174
|
+
ActiveRecordData.raw_6_1_multi
|
175
|
+
elsif activerecord_6_0?
|
172
176
|
ActiveRecordData.raw_6_0_multi
|
173
177
|
elsif activerecord_5_2?
|
174
178
|
ActiveRecordData.raw_5_2_multi
|
@@ -194,7 +198,7 @@ RSpec.describe 'AmazingPrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
|
194
198
|
end
|
195
199
|
end
|
196
200
|
|
197
|
-
if RUBY_PLATFORM == 'java'
|
201
|
+
if RUBY_PLATFORM == 'java' && !activerecord_6_1?
|
198
202
|
raw_object_string.gsub!(
|
199
203
|
'ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer',
|
200
204
|
'ArJdbc::SQLite3::SQLite3Integer'
|
@@ -240,6 +244,11 @@ RSpec.describe 'AmazingPrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
|
240
244
|
it 'should print ActiveRecord::Base objects (ex. ancestors)' do
|
241
245
|
expect { @ap.awesome(User.ancestors) }.not_to raise_error
|
242
246
|
end
|
247
|
+
|
248
|
+
it 'should print valid HTML for subclasses' do
|
249
|
+
@ap = AmazingPrint::Inspector.new(html: true)
|
250
|
+
expect(@ap.awesome(SubUser)).to match('SubUser < User')
|
251
|
+
end
|
243
252
|
end
|
244
253
|
|
245
254
|
#------------------------------------------------------------------------------
|
@@ -257,6 +266,14 @@ RSpec.describe 'AmazingPrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
|
257
266
|
expect(out).to match(
|
258
267
|
/\s+first\(\*args,\s&block\)\s+#<Class:\w+>\s+\(ActiveRecord::Querying\)/
|
259
268
|
)
|
269
|
+
elsif RUBY_VERSION >= '3.0.0'
|
270
|
+
expect(out).to match(
|
271
|
+
/\s*first\(\*(\*|args),\s+&(&|block)\)\s+#<Class:User> \(ActiveRecord::Querying\)/
|
272
|
+
)
|
273
|
+
elsif RUBY_VERSION >= '2.7.2'
|
274
|
+
expect(out).to match(
|
275
|
+
/\s*first\(\*(\*|args),\s+&(&|block)\)\s+User/
|
276
|
+
)
|
260
277
|
elsif RUBY_VERSION >= '2.7.0'
|
261
278
|
expect(out).to match(
|
262
279
|
/\s*first\(\*(\*|args),\s+&(&|block)\)\s+#<Class:ActiveRecord::Base> \(ActiveRecord::Querying\)/
|
@@ -278,11 +295,13 @@ RSpec.describe 'AmazingPrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
|
278
295
|
expect(out).to match(
|
279
296
|
/\sprimary_key\(.*?\)\s+#<Class:\w+>\s\(ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods\)/
|
280
297
|
)
|
281
|
-
elsif RUBY_VERSION >= '
|
298
|
+
elsif RUBY_VERSION >= '3.0.0'
|
299
|
+
expect(out).to match(/\sprimary_key\(.*?\)\s+#<Class:User> \(ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods\)/)
|
300
|
+
elsif RUBY_VERSION =~ /^2\.7\.(0|1)/
|
282
301
|
expect(out).to match(
|
283
302
|
/\sprimary_key\(.*?\)\s+.+Class.+\(ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods\)/
|
284
303
|
)
|
285
|
-
elsif RUBY_VERSION =~ /^2\.4\.([4-9]|[1-9][0-9])|^2\.[56]\./
|
304
|
+
elsif RUBY_VERSION =~ /^2\.4\.([4-9]|[1-9][0-9])|^2\.[56]\./ || RUBY_VERSION >= '2.7.2'
|
286
305
|
expect(out).to match(/\sprimary_key\(.*?\)\s+User/)
|
287
306
|
else
|
288
307
|
expect(out).to match(/\sprimary_key\(.*?\)\s+Class \(ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods\)/)
|
@@ -296,11 +315,13 @@ RSpec.describe 'AmazingPrint/ActiveRecord', skip: -> { !ExtVerifier.has_rails? }
|
|
296
315
|
else
|
297
316
|
if RUBY_PLATFORM == 'java'
|
298
317
|
expect(out).to match(/\svalidate\(\*arg.*?\)\s+#<Class:\w+> \(ActiveModel::Validations::ClassMethods\)/)
|
299
|
-
elsif RUBY_VERSION >= '
|
318
|
+
elsif RUBY_VERSION >= '3.0.0'
|
319
|
+
expect(out).to match(/\svalidate\(\*arg.*?\)\s+#<Class:User> \(ActiveModel::Validations::ClassMethods\)/)
|
320
|
+
elsif RUBY_VERSION =~ /2\.7\.(0|1)/
|
300
321
|
expect(out).to match(
|
301
322
|
/\svalidate\(\*args.*?\)\s+#<Class:ActiveRecord::Base> \(ActiveModel::Validations::ClassMethods\)/
|
302
323
|
)
|
303
|
-
elsif RUBY_VERSION =~ /^2\.4\.([4-9]|[1-9][0-9])|^2\.[56]\./
|
324
|
+
elsif RUBY_VERSION =~ /^2\.4\.([4-9]|[1-9][0-9])|^2\.[56]\./ || RUBY_VERSION >= '2.7.2'
|
304
325
|
expect(out).to match(/\svalidate\(\*arg.*?\)\s+User/)
|
305
326
|
else
|
306
327
|
expect(out).to match(/\svalidate\(\*arg.*?\)\s+Class \(ActiveModel::Validations::ClassMethods\)/)
|
@@ -3,6 +3,14 @@
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
RSpec.describe 'AmazingPrint::ActiveSupport', skip: -> { !ExtVerifier.has_rails? }.call do
|
6
|
+
let(:expected_ar_time_str) do
|
7
|
+
if activerecord_6_1?
|
8
|
+
'15:30:45.000000000'
|
9
|
+
else
|
10
|
+
'15:30:45'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
6
14
|
before do
|
7
15
|
@ap = AmazingPrint::Inspector.new
|
8
16
|
end
|
@@ -10,7 +18,8 @@ RSpec.describe 'AmazingPrint::ActiveSupport', skip: -> { !ExtVerifier.has_rails?
|
|
10
18
|
it 'should format ActiveSupport::TimeWithZone as regular Time' do
|
11
19
|
Time.zone = 'Eastern Time (US & Canada)'
|
12
20
|
time = Time.utc(2007, 2, 10, 20, 30, 45).in_time_zone
|
13
|
-
expect(@ap.send(:awesome, time))
|
21
|
+
expect(@ap.send(:awesome, time))
|
22
|
+
.to eq("\e[0;32mSat, 10 Feb 2007 #{expected_ar_time_str} EST -05:00\e[0m")
|
14
23
|
end
|
15
24
|
|
16
25
|
it 'should format HashWithIndifferentAccess as regular Hash' do
|
@@ -0,0 +1,109 @@
|
|
1
|
+
#<User:placeholder_id
|
2
|
+
@_start_transaction_state = nil,
|
3
|
+
@association_cache = {},
|
4
|
+
@destroyed = false,
|
5
|
+
@marked_for_destruction = false,
|
6
|
+
@new_record = true,
|
7
|
+
@previously_new_record = false,
|
8
|
+
@primary_key = "id",
|
9
|
+
@readonly = false,
|
10
|
+
@strict_loading = false,
|
11
|
+
attr_accessor :attributes = #<ActiveModel::AttributeSet:placeholder_id
|
12
|
+
@attributes = {
|
13
|
+
"admin" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
14
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
15
|
+
@original_attribute = nil,
|
16
|
+
attr_reader :name = "admin",
|
17
|
+
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
|
18
|
+
attr_reader :limit = nil,
|
19
|
+
attr_reader :precision = nil,
|
20
|
+
attr_reader :scale = nil
|
21
|
+
>,
|
22
|
+
attr_reader :value_before_type_cast = nil
|
23
|
+
>,
|
24
|
+
attr_reader :name = "admin",
|
25
|
+
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
|
26
|
+
attr_reader :limit = nil,
|
27
|
+
attr_reader :precision = nil,
|
28
|
+
attr_reader :scale = nil
|
29
|
+
>,
|
30
|
+
attr_reader :value_before_type_cast = false
|
31
|
+
>,
|
32
|
+
"created_at" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
33
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
34
|
+
@original_attribute = nil,
|
35
|
+
attr_reader :name = "created_at",
|
36
|
+
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
|
37
|
+
attr_reader :limit = nil,
|
38
|
+
attr_reader :precision = nil,
|
39
|
+
attr_reader :scale = nil
|
40
|
+
>,
|
41
|
+
attr_reader :value_before_type_cast = nil
|
42
|
+
>,
|
43
|
+
attr_reader :name = "created_at",
|
44
|
+
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
|
45
|
+
attr_reader :limit = nil,
|
46
|
+
attr_reader :precision = nil,
|
47
|
+
attr_reader :scale = nil
|
48
|
+
>,
|
49
|
+
attr_reader :value_before_type_cast = "1992-10-10 12:30:00"
|
50
|
+
>,
|
51
|
+
"id" => #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
52
|
+
@original_attribute = nil,
|
53
|
+
attr_reader :name = "id",
|
54
|
+
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
|
55
|
+
@range = -9223372036854775808...9223372036854775808,
|
56
|
+
attr_reader :limit = nil,
|
57
|
+
attr_reader :precision = nil,
|
58
|
+
attr_reader :scale = nil
|
59
|
+
>,
|
60
|
+
attr_reader :value_before_type_cast = nil
|
61
|
+
>,
|
62
|
+
"name" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
63
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
64
|
+
@original_attribute = nil,
|
65
|
+
attr_reader :name = "name",
|
66
|
+
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
|
67
|
+
@false = "f",
|
68
|
+
@true = "t",
|
69
|
+
attr_reader :limit = nil,
|
70
|
+
attr_reader :precision = nil,
|
71
|
+
attr_reader :scale = nil
|
72
|
+
>,
|
73
|
+
attr_reader :value_before_type_cast = nil
|
74
|
+
>,
|
75
|
+
attr_reader :name = "name",
|
76
|
+
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
|
77
|
+
@false = "f",
|
78
|
+
@true = "t",
|
79
|
+
attr_reader :limit = nil,
|
80
|
+
attr_reader :precision = nil,
|
81
|
+
attr_reader :scale = nil
|
82
|
+
>,
|
83
|
+
attr_reader :value_before_type_cast = "Diana"
|
84
|
+
>,
|
85
|
+
"rank" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
86
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
87
|
+
@original_attribute = nil,
|
88
|
+
attr_reader :name = "rank",
|
89
|
+
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
|
90
|
+
@range = -9223372036854775808...9223372036854775808,
|
91
|
+
attr_reader :limit = nil,
|
92
|
+
attr_reader :precision = nil,
|
93
|
+
attr_reader :scale = nil
|
94
|
+
>,
|
95
|
+
attr_reader :value_before_type_cast = nil
|
96
|
+
>,
|
97
|
+
attr_reader :name = "rank",
|
98
|
+
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
|
99
|
+
@range = -9223372036854775808...9223372036854775808,
|
100
|
+
attr_reader :limit = nil,
|
101
|
+
attr_reader :precision = nil,
|
102
|
+
attr_reader :scale = nil
|
103
|
+
>,
|
104
|
+
attr_reader :value_before_type_cast = 1
|
105
|
+
>
|
106
|
+
}
|
107
|
+
>,
|
108
|
+
attr_accessor :destroyed_by_association = nil
|
109
|
+
>
|
@@ -0,0 +1,220 @@
|
|
1
|
+
[
|
2
|
+
[0] #<User:placeholder_id
|
3
|
+
@_start_transaction_state = nil,
|
4
|
+
@association_cache = {},
|
5
|
+
@destroyed = false,
|
6
|
+
@marked_for_destruction = false,
|
7
|
+
@new_record = true,
|
8
|
+
@previously_new_record = false,
|
9
|
+
@primary_key = "id",
|
10
|
+
@readonly = false,
|
11
|
+
@strict_loading = false,
|
12
|
+
attr_accessor :attributes = #<ActiveModel::AttributeSet:placeholder_id
|
13
|
+
@attributes = {
|
14
|
+
"admin" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
15
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
16
|
+
@original_attribute = nil,
|
17
|
+
attr_reader :name = "admin",
|
18
|
+
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
|
19
|
+
attr_reader :limit = nil,
|
20
|
+
attr_reader :precision = nil,
|
21
|
+
attr_reader :scale = nil
|
22
|
+
>,
|
23
|
+
attr_reader :value_before_type_cast = nil
|
24
|
+
>,
|
25
|
+
attr_reader :name = "admin",
|
26
|
+
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
|
27
|
+
attr_reader :limit = nil,
|
28
|
+
attr_reader :precision = nil,
|
29
|
+
attr_reader :scale = nil
|
30
|
+
>,
|
31
|
+
attr_reader :value_before_type_cast = false
|
32
|
+
>,
|
33
|
+
"created_at" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
34
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
35
|
+
@original_attribute = nil,
|
36
|
+
attr_reader :name = "created_at",
|
37
|
+
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
|
38
|
+
attr_reader :limit = nil,
|
39
|
+
attr_reader :precision = nil,
|
40
|
+
attr_reader :scale = nil
|
41
|
+
>,
|
42
|
+
attr_reader :value_before_type_cast = nil
|
43
|
+
>,
|
44
|
+
attr_reader :name = "created_at",
|
45
|
+
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
|
46
|
+
attr_reader :limit = nil,
|
47
|
+
attr_reader :precision = nil,
|
48
|
+
attr_reader :scale = nil
|
49
|
+
>,
|
50
|
+
attr_reader :value_before_type_cast = "1992-10-10 12:30:00"
|
51
|
+
>,
|
52
|
+
"id" => #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
53
|
+
@original_attribute = nil,
|
54
|
+
attr_reader :name = "id",
|
55
|
+
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
|
56
|
+
@range = -9223372036854775808...9223372036854775808,
|
57
|
+
attr_reader :limit = nil,
|
58
|
+
attr_reader :precision = nil,
|
59
|
+
attr_reader :scale = nil
|
60
|
+
>,
|
61
|
+
attr_reader :value_before_type_cast = nil
|
62
|
+
>,
|
63
|
+
"name" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
64
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
65
|
+
@original_attribute = nil,
|
66
|
+
attr_reader :name = "name",
|
67
|
+
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
|
68
|
+
@false = "f",
|
69
|
+
@true = "t",
|
70
|
+
attr_reader :limit = nil,
|
71
|
+
attr_reader :precision = nil,
|
72
|
+
attr_reader :scale = nil
|
73
|
+
>,
|
74
|
+
attr_reader :value_before_type_cast = nil
|
75
|
+
>,
|
76
|
+
attr_reader :name = "name",
|
77
|
+
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
|
78
|
+
@false = "f",
|
79
|
+
@true = "t",
|
80
|
+
attr_reader :limit = nil,
|
81
|
+
attr_reader :precision = nil,
|
82
|
+
attr_reader :scale = nil
|
83
|
+
>,
|
84
|
+
attr_reader :value_before_type_cast = "Diana"
|
85
|
+
>,
|
86
|
+
"rank" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
87
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
88
|
+
@original_attribute = nil,
|
89
|
+
attr_reader :name = "rank",
|
90
|
+
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
|
91
|
+
@range = -9223372036854775808...9223372036854775808,
|
92
|
+
attr_reader :limit = nil,
|
93
|
+
attr_reader :precision = nil,
|
94
|
+
attr_reader :scale = nil
|
95
|
+
>,
|
96
|
+
attr_reader :value_before_type_cast = nil
|
97
|
+
>,
|
98
|
+
attr_reader :name = "rank",
|
99
|
+
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
|
100
|
+
@range = -9223372036854775808...9223372036854775808,
|
101
|
+
attr_reader :limit = nil,
|
102
|
+
attr_reader :precision = nil,
|
103
|
+
attr_reader :scale = nil
|
104
|
+
>,
|
105
|
+
attr_reader :value_before_type_cast = 1
|
106
|
+
>
|
107
|
+
}
|
108
|
+
>,
|
109
|
+
attr_accessor :destroyed_by_association = nil
|
110
|
+
>,
|
111
|
+
[1] #<User:placeholder_id
|
112
|
+
@_start_transaction_state = nil,
|
113
|
+
@association_cache = {},
|
114
|
+
@destroyed = false,
|
115
|
+
@marked_for_destruction = false,
|
116
|
+
@new_record = true,
|
117
|
+
@previously_new_record = false,
|
118
|
+
@primary_key = "id",
|
119
|
+
@readonly = false,
|
120
|
+
@strict_loading = false,
|
121
|
+
attr_accessor :attributes = #<ActiveModel::AttributeSet:placeholder_id
|
122
|
+
@attributes = {
|
123
|
+
"admin" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
124
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
125
|
+
@original_attribute = nil,
|
126
|
+
attr_reader :name = "admin",
|
127
|
+
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
|
128
|
+
attr_reader :limit = nil,
|
129
|
+
attr_reader :precision = nil,
|
130
|
+
attr_reader :scale = nil
|
131
|
+
>,
|
132
|
+
attr_reader :value_before_type_cast = nil
|
133
|
+
>,
|
134
|
+
attr_reader :name = "admin",
|
135
|
+
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
|
136
|
+
attr_reader :limit = nil,
|
137
|
+
attr_reader :precision = nil,
|
138
|
+
attr_reader :scale = nil
|
139
|
+
>,
|
140
|
+
attr_reader :value_before_type_cast = true
|
141
|
+
>,
|
142
|
+
"created_at" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
143
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
144
|
+
@original_attribute = nil,
|
145
|
+
attr_reader :name = "created_at",
|
146
|
+
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
|
147
|
+
attr_reader :limit = nil,
|
148
|
+
attr_reader :precision = nil,
|
149
|
+
attr_reader :scale = nil
|
150
|
+
>,
|
151
|
+
attr_reader :value_before_type_cast = nil
|
152
|
+
>,
|
153
|
+
attr_reader :name = "created_at",
|
154
|
+
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
|
155
|
+
attr_reader :limit = nil,
|
156
|
+
attr_reader :precision = nil,
|
157
|
+
attr_reader :scale = nil
|
158
|
+
>,
|
159
|
+
attr_reader :value_before_type_cast = "2003-05-26 14:15:00"
|
160
|
+
>,
|
161
|
+
"id" => #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
162
|
+
@original_attribute = nil,
|
163
|
+
attr_reader :name = "id",
|
164
|
+
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
|
165
|
+
@range = -9223372036854775808...9223372036854775808,
|
166
|
+
attr_reader :limit = nil,
|
167
|
+
attr_reader :precision = nil,
|
168
|
+
attr_reader :scale = nil
|
169
|
+
>,
|
170
|
+
attr_reader :value_before_type_cast = nil
|
171
|
+
>,
|
172
|
+
"name" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
173
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
174
|
+
@original_attribute = nil,
|
175
|
+
attr_reader :name = "name",
|
176
|
+
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
|
177
|
+
@false = "f",
|
178
|
+
@true = "t",
|
179
|
+
attr_reader :limit = nil,
|
180
|
+
attr_reader :precision = nil,
|
181
|
+
attr_reader :scale = nil
|
182
|
+
>,
|
183
|
+
attr_reader :value_before_type_cast = nil
|
184
|
+
>,
|
185
|
+
attr_reader :name = "name",
|
186
|
+
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
|
187
|
+
@false = "f",
|
188
|
+
@true = "t",
|
189
|
+
attr_reader :limit = nil,
|
190
|
+
attr_reader :precision = nil,
|
191
|
+
attr_reader :scale = nil
|
192
|
+
>,
|
193
|
+
attr_reader :value_before_type_cast = "Laura"
|
194
|
+
>,
|
195
|
+
"rank" => #<ActiveModel::Attribute::FromUser:placeholder_id
|
196
|
+
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
|
197
|
+
@original_attribute = nil,
|
198
|
+
attr_reader :name = "rank",
|
199
|
+
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
|
200
|
+
@range = -9223372036854775808...9223372036854775808,
|
201
|
+
attr_reader :limit = nil,
|
202
|
+
attr_reader :precision = nil,
|
203
|
+
attr_reader :scale = nil
|
204
|
+
>,
|
205
|
+
attr_reader :value_before_type_cast = nil
|
206
|
+
>,
|
207
|
+
attr_reader :name = "rank",
|
208
|
+
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
|
209
|
+
@range = -9223372036854775808...9223372036854775808,
|
210
|
+
attr_reader :limit = nil,
|
211
|
+
attr_reader :precision = nil,
|
212
|
+
attr_reader :scale = nil
|
213
|
+
>,
|
214
|
+
attr_reader :value_before_type_cast = 2
|
215
|
+
>
|
216
|
+
}
|
217
|
+
>,
|
218
|
+
attr_accessor :destroyed_by_association = nil
|
219
|
+
>
|
220
|
+
]
|
@@ -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,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amazing_print
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Dvorkin
|
8
8
|
- Kevin McCormackPatrik Wenger
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-03-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: appraisal
|
@@ -189,6 +189,8 @@ files:
|
|
189
189
|
- spec/support/active_record_data/5_2_multi.txt
|
190
190
|
- spec/support/active_record_data/6_0_diana.txt
|
191
191
|
- spec/support/active_record_data/6_0_multi.txt
|
192
|
+
- spec/support/active_record_data/6_1_diana.txt
|
193
|
+
- spec/support/active_record_data/6_1_multi.txt
|
192
194
|
- spec/support/ext_verifier.rb
|
193
195
|
- spec/support/mongoid_versions.rb
|
194
196
|
- spec/support/rails_versions.rb
|
@@ -196,7 +198,7 @@ homepage: https://github.com/amazing-print/amazing_print
|
|
196
198
|
licenses:
|
197
199
|
- MIT
|
198
200
|
metadata: {}
|
199
|
-
post_install_message:
|
201
|
+
post_install_message:
|
200
202
|
rdoc_options: []
|
201
203
|
require_paths:
|
202
204
|
- lib
|
@@ -211,54 +213,56 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
213
|
- !ruby/object:Gem::Version
|
212
214
|
version: '0'
|
213
215
|
requirements: []
|
214
|
-
rubygems_version: 3.
|
215
|
-
signing_key:
|
216
|
+
rubygems_version: 3.2.3
|
217
|
+
signing_key:
|
216
218
|
specification_version: 4
|
217
219
|
summary: Pretty print Ruby objects with proper indentation and colors
|
218
220
|
test_files:
|
219
|
-
- spec/
|
220
|
-
- spec/support/rails_versions.rb
|
221
|
-
- spec/support/mongoid_versions.rb
|
222
|
-
- spec/support/active_record_data/4_0_multi.txt
|
223
|
-
- spec/support/active_record_data/3_2_multi_legacy.txt
|
224
|
-
- spec/support/active_record_data/4_1_diana.txt
|
225
|
-
- spec/support/active_record_data/4_2_multi.txt
|
226
|
-
- spec/support/active_record_data/5_2_multi.txt
|
227
|
-
- spec/support/active_record_data/3_2_multi.txt
|
228
|
-
- spec/support/active_record_data/4_1_multi.txt
|
229
|
-
- spec/support/active_record_data/3_2_diana.txt
|
230
|
-
- spec/support/active_record_data/5_0_diana.txt
|
231
|
-
- spec/support/active_record_data/6_0_multi.txt
|
232
|
-
- spec/support/active_record_data/6_0_diana.txt
|
233
|
-
- spec/support/active_record_data/5_1_multi.txt
|
234
|
-
- spec/support/active_record_data/5_0_multi.txt
|
235
|
-
- spec/support/active_record_data/4_2_diana.txt
|
236
|
-
- spec/support/active_record_data/5_1_diana.txt
|
237
|
-
- spec/support/active_record_data/4_2_diana_legacy.txt
|
238
|
-
- spec/support/active_record_data/5_2_diana.txt
|
239
|
-
- spec/support/active_record_data/4_0_diana.txt
|
240
|
-
- spec/support/active_record_data/3_2_diana_legacy.txt
|
241
|
-
- spec/support/active_record_data/4_2_multi_legacy.txt
|
242
|
-
- spec/support/ext_verifier.rb
|
221
|
+
- spec/active_record_helper.rb
|
243
222
|
- spec/colors_spec.rb
|
244
|
-
- spec/core_ext/string_spec.rb
|
245
223
|
- spec/core_ext/logger_spec.rb
|
246
|
-
- spec/
|
247
|
-
- spec/ext/active_record_spec.rb
|
248
|
-
- spec/ext/active_model_spec.rb
|
249
|
-
- spec/ext/action_view_spec.rb
|
250
|
-
- spec/ext/nobrainer_spec.rb
|
224
|
+
- spec/core_ext/string_spec.rb
|
251
225
|
- spec/ext/action_controller_spec.rb
|
252
|
-
- spec/ext/
|
226
|
+
- spec/ext/action_view_spec.rb
|
227
|
+
- spec/ext/active_model_spec.rb
|
228
|
+
- spec/ext/active_record_spec.rb
|
229
|
+
- spec/ext/active_support_spec.rb
|
230
|
+
- spec/ext/mongo_mapper_spec.rb
|
253
231
|
- spec/ext/mongoid_spec.rb
|
254
|
-
- spec/ext/
|
255
|
-
- spec/ext/ostruct_spec.rb
|
232
|
+
- spec/ext/nobrainer_spec.rb
|
256
233
|
- spec/ext/nokogiri_spec.rb
|
257
|
-
- spec/ext/
|
258
|
-
- spec/
|
234
|
+
- spec/ext/ostruct_spec.rb
|
235
|
+
- spec/ext/ripple_spec.rb
|
236
|
+
- spec/ext/sequel_spec.rb
|
259
237
|
- spec/formats_spec.rb
|
260
|
-
- spec/spec_helper.rb
|
261
|
-
- spec/active_record_helper.rb
|
262
238
|
- spec/methods_spec.rb
|
263
239
|
- spec/misc_spec.rb
|
264
240
|
- spec/objects_spec.rb
|
241
|
+
- spec/sequel_helper.rb
|
242
|
+
- spec/spec_helper.rb
|
243
|
+
- spec/support/active_record_data/3_2_diana.txt
|
244
|
+
- spec/support/active_record_data/3_2_diana_legacy.txt
|
245
|
+
- spec/support/active_record_data/3_2_multi.txt
|
246
|
+
- spec/support/active_record_data/3_2_multi_legacy.txt
|
247
|
+
- spec/support/active_record_data/4_0_diana.txt
|
248
|
+
- spec/support/active_record_data/4_0_multi.txt
|
249
|
+
- spec/support/active_record_data/4_1_diana.txt
|
250
|
+
- spec/support/active_record_data/4_1_multi.txt
|
251
|
+
- spec/support/active_record_data/4_2_diana.txt
|
252
|
+
- spec/support/active_record_data/4_2_diana_legacy.txt
|
253
|
+
- spec/support/active_record_data/4_2_multi.txt
|
254
|
+
- spec/support/active_record_data/4_2_multi_legacy.txt
|
255
|
+
- spec/support/active_record_data/5_0_diana.txt
|
256
|
+
- spec/support/active_record_data/5_0_multi.txt
|
257
|
+
- spec/support/active_record_data/5_1_diana.txt
|
258
|
+
- spec/support/active_record_data/5_1_multi.txt
|
259
|
+
- spec/support/active_record_data/5_2_diana.txt
|
260
|
+
- spec/support/active_record_data/5_2_multi.txt
|
261
|
+
- spec/support/active_record_data/6_0_diana.txt
|
262
|
+
- spec/support/active_record_data/6_0_multi.txt
|
263
|
+
- spec/support/active_record_data/6_1_diana.txt
|
264
|
+
- spec/support/active_record_data/6_1_multi.txt
|
265
|
+
- spec/support/active_record_data.rb
|
266
|
+
- spec/support/ext_verifier.rb
|
267
|
+
- spec/support/mongoid_versions.rb
|
268
|
+
- spec/support/rails_versions.rb
|