amazing_print 1.2.0 → 1.4.0
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.
- checksums.yaml +4 -4
- data/Appraisals +38 -54
- data/CHANGELOG.md +36 -2
- data/Gemfile.lock +48 -50
- data/README.md +20 -11
- data/lib/amazing_print/colorize.rb +1 -3
- data/lib/amazing_print/core_ext/awesome_method_array.rb +4 -4
- data/lib/amazing_print/core_ext/class.rb +1 -1
- data/lib/amazing_print/core_ext/logger.rb +10 -5
- data/lib/amazing_print/core_ext/object.rb +1 -1
- data/lib/amazing_print/custom_defaults.rb +10 -3
- data/lib/amazing_print/ext/action_view.rb +1 -1
- data/lib/amazing_print/ext/active_record.rb +12 -27
- data/lib/amazing_print/ext/active_support.rb +1 -3
- data/lib/amazing_print/ext/mongo_mapper.rb +5 -8
- data/lib/amazing_print/ext/mongoid.rb +2 -6
- data/lib/amazing_print/ext/nobrainer.rb +7 -5
- data/lib/amazing_print/ext/nokogiri.rb +1 -3
- data/lib/amazing_print/ext/ostruct.rb +1 -3
- data/lib/amazing_print/ext/ripple.rb +4 -5
- data/lib/amazing_print/formatter.rb +5 -6
- data/lib/amazing_print/formatters/array_formatter.rb +6 -5
- data/lib/amazing_print/formatters/base_formatter.rb +20 -25
- data/lib/amazing_print/formatters/class_formatter.rb +1 -0
- data/lib/amazing_print/formatters/dir_formatter.rb +1 -0
- data/lib/amazing_print/formatters/file_formatter.rb +1 -0
- data/lib/amazing_print/formatters/hash_formatter.rb +5 -4
- data/lib/amazing_print/formatters/method_formatter.rb +1 -0
- data/lib/amazing_print/formatters/object_formatter.rb +2 -1
- data/lib/amazing_print/formatters/simple_formatter.rb +1 -0
- data/lib/amazing_print/formatters/struct_formatter.rb +2 -1
- data/lib/amazing_print/inspector.rb +29 -5
- data/lib/amazing_print/version.rb +1 -1
- data/lib/amazing_print.rb +2 -6
- data/spec/active_record_helper.rb +11 -0
- data/spec/colors_spec.rb +38 -46
- data/spec/core_ext/logger_spec.rb +42 -18
- data/spec/core_ext/string_spec.rb +2 -2
- data/spec/ext/action_controller_spec.rb +4 -4
- data/spec/ext/action_view_spec.rb +6 -1
- data/spec/ext/active_model_spec.rb +37 -0
- data/spec/ext/active_record_spec.rb +44 -23
- data/spec/ext/active_support_spec.rb +13 -4
- data/spec/ext/mongo_mapper_spec.rb +16 -12
- data/spec/ext/mongoid_spec.rb +7 -3
- data/spec/ext/nobrainer_spec.rb +6 -2
- data/spec/ext/nokogiri_spec.rb +3 -3
- data/spec/ext/ripple_spec.rb +6 -2
- data/spec/formats_spec.rb +24 -18
- data/spec/methods_spec.rb +12 -4
- data/spec/misc_spec.rb +15 -10
- data/spec/objects_spec.rb +4 -0
- data/spec/spec_helper.rb +4 -8
- 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/ext_verifier.rb +2 -4
- data/spec/support/rails_versions.rb +5 -0
- metadata +80 -60
data/spec/formats_spec.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# rubocop:disable Lint/ConstantDefinitionInBlock
|
4
|
+
|
3
5
|
require 'spec_helper'
|
4
6
|
require 'bigdecimal'
|
5
7
|
require 'set'
|
@@ -159,7 +161,7 @@ RSpec.describe 'AmazingPrint' do
|
|
159
161
|
|
160
162
|
#------------------------------------------------------------------------------
|
161
163
|
describe 'Limited Output Array' do
|
162
|
-
before
|
164
|
+
before do
|
163
165
|
@arr = (1..1000).to_a
|
164
166
|
end
|
165
167
|
|
@@ -227,7 +229,7 @@ RSpec.describe 'AmazingPrint' do
|
|
227
229
|
|
228
230
|
#------------------------------------------------------------------------------
|
229
231
|
describe 'Limited Output Hash' do
|
230
|
-
before
|
232
|
+
before do
|
231
233
|
@hash = ('a'..'z').inject({}) { |h, v| h.merge({ v => v.to_sym }) }
|
232
234
|
end
|
233
235
|
|
@@ -305,7 +307,8 @@ RSpec.describe 'AmazingPrint' do
|
|
305
307
|
end
|
306
308
|
|
307
309
|
it 'plain single line' do
|
308
|
-
expect(@hash.ai(plain: true,
|
310
|
+
expect(@hash.ai(plain: true,
|
311
|
+
multiline: false)).to eq('{ 1 => { :sym => { "str" => { [ 1, 2, 3 ] => { { :k => :v } => Hash < Object } } } } }')
|
309
312
|
end
|
310
313
|
|
311
314
|
it 'colored multiline (default)' do
|
@@ -390,7 +393,7 @@ RSpec.describe 'AmazingPrint' do
|
|
390
393
|
it 'plain multiline' do
|
391
394
|
out = @hash.ai(plain: true)
|
392
395
|
if RUBY_VERSION.to_f < 1.9 # Order of @hash keys is not guaranteed.
|
393
|
-
expect(out).to match(/^\{[
|
396
|
+
expect(out).to match(/^\{[^}]+\}/m)
|
394
397
|
expect(out).to match(/ "b" => "b",?/)
|
395
398
|
expect(out).to match(/ :a => "a",?/)
|
396
399
|
expect(out).to match(/ :z => "z",?/)
|
@@ -478,18 +481,18 @@ RSpec.describe 'AmazingPrint' do
|
|
478
481
|
|
479
482
|
#------------------------------------------------------------------------------
|
480
483
|
describe 'Class' do
|
481
|
-
it '
|
484
|
+
it 'shows superclass (plain)' do
|
482
485
|
expect(self.class.ai(plain: true)).to eq("#{self.class} < #{self.class.superclass}")
|
483
486
|
end
|
484
487
|
|
485
|
-
it '
|
488
|
+
it 'shows superclass (color)' do
|
486
489
|
expect(self.class.ai).to eq("#{self.class} < #{self.class.superclass}".yellow)
|
487
490
|
end
|
488
491
|
end
|
489
492
|
|
490
493
|
#------------------------------------------------------------------------------
|
491
494
|
describe 'File' do
|
492
|
-
it '
|
495
|
+
it 'displays a file (plain)' do
|
493
496
|
File.open(__FILE__, 'r') do |f|
|
494
497
|
expect(f.ai(plain: true)).to eq("#{f.inspect}\n" + `ls -alF #{f.path}`.chop)
|
495
498
|
end
|
@@ -498,7 +501,7 @@ RSpec.describe 'AmazingPrint' do
|
|
498
501
|
|
499
502
|
#------------------------------------------------------------------------------
|
500
503
|
describe 'Dir' do
|
501
|
-
it '
|
504
|
+
it 'displays a direcory (plain)' do
|
502
505
|
Dir.open(File.dirname(__FILE__)) do |d|
|
503
506
|
expect(d.ai(plain: true)).to eq("#{d.inspect}\n" + `ls -alF #{d.path}`.chop)
|
504
507
|
end
|
@@ -507,12 +510,12 @@ RSpec.describe 'AmazingPrint' do
|
|
507
510
|
|
508
511
|
#------------------------------------------------------------------------------
|
509
512
|
describe 'BigDecimal and Rational' do
|
510
|
-
it '
|
513
|
+
it 'presents BigDecimal object with arbitrary precision' do
|
511
514
|
big = BigDecimal('201020102010201020102010201020102010.4')
|
512
515
|
expect(big.ai(plain: true)).to eq('201020102010201020102010201020102010.4')
|
513
516
|
end
|
514
517
|
|
515
|
-
it '
|
518
|
+
it 'presents Rational object with arbitrary precision' do
|
516
519
|
rat = Rational(201_020_102_010_201_020_102_010_201_020_102_010, 2)
|
517
520
|
out = rat.ai(plain: true)
|
518
521
|
#
|
@@ -530,7 +533,7 @@ RSpec.describe 'AmazingPrint' do
|
|
530
533
|
|
531
534
|
#------------------------------------------------------------------------------
|
532
535
|
describe 'Utility methods' do
|
533
|
-
it '
|
536
|
+
it 'merges options' do
|
534
537
|
ap = AmazingPrint::Inspector.new
|
535
538
|
ap.send(:merge_options!, { color: { array: :black }, indent: 0 })
|
536
539
|
options = ap.instance_variable_get('@options')
|
@@ -576,7 +579,8 @@ RSpec.describe 'AmazingPrint' do
|
|
576
579
|
end
|
577
580
|
|
578
581
|
it 'plain single line' do
|
579
|
-
expect(@set.sort_by(&:to_s).ai(plain: true,
|
582
|
+
expect(@set.sort_by(&:to_s).ai(plain: true,
|
583
|
+
multiline: false)).to eq(@arr.sort_by(&:to_s).ai(plain: true, multiline: false))
|
580
584
|
end
|
581
585
|
|
582
586
|
it 'colored multiline (default)' do
|
@@ -693,10 +697,10 @@ RSpec.describe 'AmazingPrint' do
|
|
693
697
|
class My < File; end
|
694
698
|
|
695
699
|
my = begin
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
+
File.new('/dev/null')
|
701
|
+
rescue StandardError
|
702
|
+
File.new('nul')
|
703
|
+
end
|
700
704
|
expect(my.ai(plain: true)).to eq("#{my.inspect}\n" + `ls -alF #{my.path}`.chop)
|
701
705
|
end
|
702
706
|
|
@@ -708,7 +712,7 @@ RSpec.describe 'AmazingPrint' do
|
|
708
712
|
expect(my.ai(plain: true)).to eq("#{my.inspect}\n" + `ls -alF #{my.path}`.chop)
|
709
713
|
end
|
710
714
|
|
711
|
-
it '
|
715
|
+
it 'handles a class that defines its own #send method' do
|
712
716
|
class My
|
713
717
|
def send(arg1, arg2, arg3); end
|
714
718
|
end
|
@@ -717,7 +721,7 @@ RSpec.describe 'AmazingPrint' do
|
|
717
721
|
expect { my.methods.ai(plain: true) }.not_to raise_error
|
718
722
|
end
|
719
723
|
|
720
|
-
it '
|
724
|
+
it 'handles a class defines its own #method method (ex. request.method)' do
|
721
725
|
class My
|
722
726
|
def method
|
723
727
|
'POST'
|
@@ -779,3 +783,5 @@ RSpec.describe 'AmazingPrint' do
|
|
779
783
|
end
|
780
784
|
end
|
781
785
|
end
|
786
|
+
|
787
|
+
# rubocop:enable Lint/ConstantDefinitionInBlock
|
data/spec/methods_spec.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# rubocop:disable Lint/ConstantDefinitionInBlock
|
4
|
+
|
3
5
|
require 'spec_helper'
|
4
6
|
|
5
7
|
RSpec.describe 'Single method' do
|
@@ -385,7 +387,8 @@ if RUBY_VERSION >= '1.9.2'
|
|
385
387
|
|
386
388
|
it ':opt' do
|
387
389
|
class Hello
|
388
|
-
|
390
|
+
# m1(a, *b, *c)
|
391
|
+
def m1(a, b = 1, c = 2); end
|
389
392
|
end
|
390
393
|
out = Hello.new.methods.ai(plain: true).split("\n").grep(/m1/)
|
391
394
|
expect(out.first).to match(/^\s+\[\s*\d+\]\s+m1\(a, \*b, \*c\)\s+Hello$/)
|
@@ -393,7 +396,8 @@ if RUBY_VERSION >= '1.9.2'
|
|
393
396
|
|
394
397
|
it ':rest' do
|
395
398
|
class Hello
|
396
|
-
|
399
|
+
# m1(*a)
|
400
|
+
def m1(*a); end
|
397
401
|
end
|
398
402
|
out = Hello.new.methods.ai(plain: true).split("\n").grep(/m1/)
|
399
403
|
expect(out.first).to match(/^\s+\[\s*\d+\]\s+m1\(\*a\)\s+Hello$/)
|
@@ -401,7 +405,8 @@ if RUBY_VERSION >= '1.9.2'
|
|
401
405
|
|
402
406
|
it ':block' do
|
403
407
|
class Hello
|
404
|
-
|
408
|
+
# m1(a, *b, &blk)
|
409
|
+
def m1(a, b = nil, &blk); end
|
405
410
|
end
|
406
411
|
out = Hello.new.methods.ai(plain: true).split("\n").grep(/m1/)
|
407
412
|
expect(out.first).to match(/^\s+\[\s*\d+\]\s+m1\(a, \*b, &blk\)\s+Hello$/)
|
@@ -431,10 +436,11 @@ RSpec.describe 'Methods arrays' do
|
|
431
436
|
|
432
437
|
def self.m2; end
|
433
438
|
end
|
439
|
+
|
434
440
|
class World
|
435
441
|
def self.m1; end
|
436
442
|
end
|
437
|
-
out = (Hello.methods & World.methods - Class.methods).ai(plain: true)
|
443
|
+
out = (Hello.methods & (World.methods - Class.methods)).ai(plain: true)
|
438
444
|
expect(out).to eq("[\n [0] m1() Hello\n]")
|
439
445
|
end
|
440
446
|
|
@@ -510,3 +516,5 @@ RSpec.describe 'Methods arrays' do
|
|
510
516
|
end
|
511
517
|
end
|
512
518
|
end
|
519
|
+
|
520
|
+
# rubocop:enable Lint/ConstantDefinitionInBlock
|
data/spec/misc_spec.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# rubocop:disable Lint/ConstantDefinitionInBlock, Lint/EmptyClass
|
4
|
+
|
3
5
|
require 'spec_helper'
|
4
6
|
|
5
7
|
RSpec.describe 'AmazingPrint' do
|
@@ -24,7 +26,7 @@ RSpec.describe 'AmazingPrint' do
|
|
24
26
|
|
25
27
|
# See https://github.com/awesome-print/awesome_print/issues/35
|
26
28
|
it 'handle array grep when pattern contains / chapacter' do
|
27
|
-
hash = { '1/x' => 1, '2//x' => :
|
29
|
+
hash = { '1/x' => 1, '2//x' => :'2' }
|
28
30
|
grepped = hash.keys.sort.grep(%r{^(\d+)/}) { Regexp.last_match(1) }
|
29
31
|
expect(grepped.ai(plain: true, multiline: false)).to eq('[ "1", "2" ]')
|
30
32
|
end
|
@@ -46,7 +48,7 @@ RSpec.describe 'AmazingPrint' do
|
|
46
48
|
|
47
49
|
# Require different file name this time (lib/ap.rb vs. lib/amazing_print).
|
48
50
|
it "several require 'amazing_print' should do no harm" do
|
49
|
-
require File.expand_path(File.dirname(__FILE__)
|
51
|
+
require File.expand_path("#{File.dirname(__FILE__)}/../lib/ap")
|
50
52
|
expect { rand.ai }.not_to raise_error
|
51
53
|
end
|
52
54
|
|
@@ -127,7 +129,7 @@ RSpec.describe 'AmazingPrint' do
|
|
127
129
|
end
|
128
130
|
|
129
131
|
# See https://github.com/awesome-print/awesome_print/issues/98
|
130
|
-
it '
|
132
|
+
it 'properlies merge the defaults' do
|
131
133
|
AmazingPrint.defaults = { indent: -2, sort_keys: true }
|
132
134
|
hash = { [0, 0, 255] => :yellow, :red => 'rgb(255, 0, 0)', 'magenta' => 'rgb(255, 0, 255)' }
|
133
135
|
out = hash.ai(plain: true)
|
@@ -187,7 +189,7 @@ RSpec.describe 'AmazingPrint' do
|
|
187
189
|
|
188
190
|
#------------------------------------------------------------------------------
|
189
191
|
describe 'Console' do
|
190
|
-
it '
|
192
|
+
it 'detects IRB' do
|
191
193
|
class IRB; end
|
192
194
|
ENV.delete('RAILS_ENV')
|
193
195
|
expect(AmazingPrint.console?).to eq(true)
|
@@ -195,7 +197,7 @@ RSpec.describe 'AmazingPrint' do
|
|
195
197
|
Object.instance_eval { remove_const :IRB }
|
196
198
|
end
|
197
199
|
|
198
|
-
it '
|
200
|
+
it 'detects Pry' do
|
199
201
|
class Pry; end
|
200
202
|
ENV.delete('RAILS_ENV')
|
201
203
|
expect(AmazingPrint.console?).to eq(true)
|
@@ -203,8 +205,9 @@ RSpec.describe 'AmazingPrint' do
|
|
203
205
|
Object.instance_eval { remove_const :Pry }
|
204
206
|
end
|
205
207
|
|
206
|
-
it '
|
208
|
+
it 'detects Rails::Console' do
|
207
209
|
class IRB; end
|
210
|
+
|
208
211
|
module Rails; class Console; end; end
|
209
212
|
expect(AmazingPrint.console?).to eq(true)
|
210
213
|
expect(AmazingPrint.rails_console?).to eq(true)
|
@@ -212,7 +215,7 @@ RSpec.describe 'AmazingPrint' do
|
|
212
215
|
Object.instance_eval { remove_const :Rails }
|
213
216
|
end
|
214
217
|
|
215
|
-
it "
|
218
|
+
it "detects ENV['RAILS_ENV']" do
|
216
219
|
class Pry; end
|
217
220
|
ENV['RAILS_ENV'] = 'development'
|
218
221
|
expect(AmazingPrint.console?).to eq(true)
|
@@ -220,12 +223,12 @@ RSpec.describe 'AmazingPrint' do
|
|
220
223
|
Object.instance_eval { remove_const :Pry }
|
221
224
|
end
|
222
225
|
|
223
|
-
it '
|
226
|
+
it 'returns the actual object when *not* running under console' do
|
224
227
|
expect(capture! { ap([1, 2, 3]) }).to eq([1, 2, 3])
|
225
228
|
expect(capture! { ap({ a: 1 }) }).to eq({ a: 1 })
|
226
229
|
end
|
227
230
|
|
228
|
-
it '
|
231
|
+
it 'returns nil when running under console' do
|
229
232
|
class IRB; end
|
230
233
|
expect(capture! { ap([1, 2, 3]) }).to eq(nil)
|
231
234
|
expect(capture! { ap({ a: 1 }) }).to eq(nil)
|
@@ -240,8 +243,10 @@ RSpec.describe 'AmazingPrint' do
|
|
240
243
|
irb.instance_eval { @context = irb_context }
|
241
244
|
AmazingPrint.irb!
|
242
245
|
expect(irb).to receive(:puts).with("(Object doesn't support #ai)")
|
243
|
-
expect { irb.output_value }.
|
246
|
+
expect { irb.output_value }.not_to raise_error
|
244
247
|
Object.instance_eval { remove_const :IRB }
|
245
248
|
end
|
246
249
|
end
|
247
250
|
end
|
251
|
+
|
252
|
+
# rubocop:enable Lint/ConstantDefinitionInBlock, Lint/EmptyClass
|
data/spec/objects_spec.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# rubocop:disable Lint/ConstantDefinitionInBlock
|
4
|
+
|
3
5
|
require 'spec_helper'
|
4
6
|
|
5
7
|
RSpec.describe 'Objects' do
|
@@ -219,3 +221,5 @@ RSpec.describe 'Objects' do
|
|
219
221
|
end
|
220
222
|
end
|
221
223
|
end
|
224
|
+
|
225
|
+
# rubocop:enable Lint/ConstantDefinitionInBlock
|
data/spec/spec_helper.rb
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
24
24
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
25
25
|
|
26
|
-
Dir[File.dirname(__FILE__)
|
26
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each do |file|
|
27
27
|
require file
|
28
28
|
end
|
29
29
|
|
@@ -63,7 +63,7 @@ RSpec.configure do |config|
|
|
63
63
|
|
64
64
|
# Run before all examples. Using suite or all will not work as stubs are
|
65
65
|
# killed after each example ends.
|
66
|
-
config.before
|
66
|
+
config.before do |_example|
|
67
67
|
stub_dotfile!
|
68
68
|
end
|
69
69
|
end
|
@@ -86,12 +86,8 @@ end
|
|
86
86
|
# that an ID is present and not that it matches a certain value. This is
|
87
87
|
# necessary as the Object IDs are not deterministic.
|
88
88
|
def normalize_object_id_strings(str, options)
|
89
|
-
unless options[:skip_standard]
|
90
|
-
|
91
|
-
end
|
92
|
-
unless options[:skip_bson]
|
93
|
-
str = str.gsub(/BSON::ObjectId\('[a-f\d]{24}'\)/, 'placeholder_bson_id')
|
94
|
-
end
|
89
|
+
str = str.gsub(/#<(.*?):0x[a-f\d]+/, '#<\1:placeholder_id') unless options[:skip_standard]
|
90
|
+
str = str.gsub(/BSON::ObjectId\('[a-f\d]{24}'\)/, 'placeholder_bson_id') unless options[:skip_bson]
|
95
91
|
str
|
96
92
|
end
|
97
93
|
|
@@ -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
|
+
]
|