awesome_print 1.6.1 → 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 +45 -22
- data/{CHANGELOG → CHANGELOG.md} +83 -18
- data/CONTRIBUTING.md +45 -4
- data/Gemfile.lock +28 -22
- data/LICENSE +16 -19
- data/README.md +97 -92
- 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 +24 -0
- 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 +52 -0
- 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 +54 -327
- data/lib/awesome_print/formatters/array_formatter.rb +139 -0
- data/lib/awesome_print/formatters/base_formatter.rb +140 -0
- data/lib/awesome_print/formatters/class_formatter.rb +25 -0
- data/lib/awesome_print/formatters/dir_formatter.rb +22 -0
- data/lib/awesome_print/formatters/file_formatter.rb +22 -0
- data/lib/awesome_print/formatters/hash_formatter.rb +106 -0
- data/lib/awesome_print/formatters/method_formatter.rb +22 -0
- data/lib/awesome_print/formatters/object_formatter.rb +78 -0
- data/lib/awesome_print/formatters/simple_formatter.rb +21 -0
- data/lib/awesome_print/formatters/struct_formatter.rb +71 -0
- data/lib/awesome_print/formatters.rb +15 -0
- data/lib/awesome_print/indentator.rb +18 -0
- data/lib/awesome_print/inspector.rb +92 -94
- data/lib/awesome_print/version.rb +2 -2
- data/lib/awesome_print.rb +19 -18
- data/spec/active_record_helper.rb +24 -28
- data/spec/colors_spec.rb +31 -31
- 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 +251 -184
- data/spec/methods_spec.rb +126 -130
- data/spec/misc_spec.rb +98 -93
- data/spec/objects_spec.rb +162 -27
- data/spec/spec_helper.rb +72 -38
- 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 +104 -15
- data/lib/awesome_print/ext/no_brainer.rb +0 -58
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2016 Michael Dvorkin and contributors
|
2
2
|
#
|
3
3
|
# Awesome Print is freely distributable under the terms of MIT license.
|
4
4
|
# See LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
@@ -14,55 +14,89 @@
|
|
14
14
|
# $ gem install bundler -v=1.0.2
|
15
15
|
# $ gem install rspec -v=2.6.0
|
16
16
|
#
|
17
|
+
|
18
|
+
# require 'simplecov'
|
19
|
+
# SimpleCov.start
|
20
|
+
|
17
21
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
18
22
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
19
|
-
require 'awesome_print'
|
20
23
|
|
21
24
|
Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each do |file|
|
22
25
|
require file
|
23
26
|
end
|
24
27
|
|
28
|
+
ExtVerifier.require_dependencies!(
|
29
|
+
%w(
|
30
|
+
rails
|
31
|
+
active_record
|
32
|
+
action_view
|
33
|
+
active_support/all
|
34
|
+
mongoid
|
35
|
+
mongo_mapper
|
36
|
+
ripple nobrainer
|
37
|
+
)
|
38
|
+
)
|
39
|
+
require 'nokogiri'
|
40
|
+
require 'ostruct'
|
41
|
+
require 'awesome_print'
|
42
|
+
|
43
|
+
RSpec.configure do |config|
|
44
|
+
config.disable_monkey_patching!
|
45
|
+
# TODO: Make specs not order dependent
|
46
|
+
# config.order = :random
|
47
|
+
Kernel.srand config.seed
|
48
|
+
config.filter_run focus: true
|
49
|
+
config.run_all_when_everything_filtered = true
|
50
|
+
config.expect_with :rspec do |expectations|
|
51
|
+
expectations.syntax = :expect
|
52
|
+
end
|
53
|
+
config.mock_with :rspec do |mocks|
|
54
|
+
mocks.syntax = :expect
|
55
|
+
mocks.verify_partial_doubles = true
|
56
|
+
end
|
57
|
+
|
58
|
+
config.default_formatter = 'doc' if config.files_to_run.one?
|
59
|
+
|
60
|
+
# Run before all examples. Using suite or all will not work as stubs are
|
61
|
+
# killed after each example ends.
|
62
|
+
config.before(:each) do |_example|
|
63
|
+
stub_dotfile!
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# This matcher handles the normalization of objects to replace non deterministic
|
68
|
+
# parts (such as object IDs) with simple placeholder strings before doing a
|
69
|
+
# comparison with a given string. It's important that this method only matches
|
70
|
+
# a string which strictly conforms to the expected object ID format.
|
71
|
+
RSpec::Matchers.define :be_similar_to do |expected, options|
|
72
|
+
match do |actual|
|
73
|
+
options ||= {}
|
74
|
+
@actual = normalize_object_id_strings(actual, options)
|
75
|
+
values_match? expected, @actual
|
76
|
+
end
|
77
|
+
|
78
|
+
diffable
|
79
|
+
end
|
80
|
+
|
81
|
+
# Override the Object IDs with a placeholder so that we are only checking
|
82
|
+
# that an ID is present and not that it matches a certain value. This is
|
83
|
+
# necessary as the Object IDs are not deterministic.
|
84
|
+
def normalize_object_id_strings(str, options)
|
85
|
+
str = str.gsub(/#<(.*?):0x[a-f\d]+/, '#<\1:placeholder_id') unless options[:skip_standard]
|
86
|
+
str = str.gsub(/BSON::ObjectId\('[a-f\d]{24}'\)/, 'placeholder_bson_id') unless options[:skip_bson]
|
87
|
+
str
|
88
|
+
end
|
89
|
+
|
25
90
|
def stub_dotfile!
|
26
|
-
|
27
|
-
|
91
|
+
allow_any_instance_of(AwesomePrint::Inspector)
|
92
|
+
.to receive(:load_dotfile)
|
93
|
+
.and_return(true)
|
28
94
|
end
|
29
95
|
|
30
96
|
def capture!
|
31
|
-
standard
|
97
|
+
standard = $stdout
|
98
|
+
$stdout = StringIO.new
|
32
99
|
yield
|
33
100
|
ensure
|
34
101
|
$stdout = standard
|
35
102
|
end
|
36
|
-
|
37
|
-
# The following is needed for the Infinity Test. It runs tests as subprocesses,
|
38
|
-
# which sets STDOUT.tty? to false and would otherwise prematurely disallow colors.
|
39
|
-
### AwesomePrint.force_colors!
|
40
|
-
|
41
|
-
# Ruby 1.8.6 only: define missing String methods that are needed for the specs to pass.
|
42
|
-
if RUBY_VERSION < '1.8.7'
|
43
|
-
class String
|
44
|
-
def shellescape # Taken from Ruby 1.9.2 standard library, see lib/shellwords.rb.
|
45
|
-
return "''" if self.empty?
|
46
|
-
str = self.dup
|
47
|
-
str.gsub!(/([^A-Za-z0-9_\-.,:\/@\n])/n, "\\\\\\1")
|
48
|
-
str.gsub!(/\n/, "'\n'")
|
49
|
-
str
|
50
|
-
end
|
51
|
-
|
52
|
-
def start_with?(*prefixes)
|
53
|
-
prefixes.each do |prefix|
|
54
|
-
prefix = prefix.to_s
|
55
|
-
return true if prefix == self[0, prefix.size]
|
56
|
-
end
|
57
|
-
false
|
58
|
-
end
|
59
|
-
|
60
|
-
def end_with?(*suffixes)
|
61
|
-
suffixes.each do |suffix|
|
62
|
-
suffix = suffix.to_s
|
63
|
-
return true if suffix == self[-suffix.size, suffix.size]
|
64
|
-
end
|
65
|
-
false
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#<User:placeholder_id
|
2
|
+
@aggregation_cache = {},
|
3
|
+
@attributes_cache = {},
|
4
|
+
@destroyed = false,
|
5
|
+
@marked_for_destruction = false,
|
6
|
+
@mass_assignment_options = nil,
|
7
|
+
@new_record = true,
|
8
|
+
@previously_changed = {},
|
9
|
+
@readonly = false,
|
10
|
+
attr_accessor :attributes = {
|
11
|
+
"admin" => false,
|
12
|
+
"created_at" => "1992-10-10 12:30:00",
|
13
|
+
"id" => nil,
|
14
|
+
"name" => "Diana",
|
15
|
+
"rank" => 1
|
16
|
+
},
|
17
|
+
attr_reader :association_cache = {},
|
18
|
+
attr_reader :changed_attributes = {
|
19
|
+
"admin" => nil,
|
20
|
+
"created_at" => nil,
|
21
|
+
"name" => nil,
|
22
|
+
"rank" => nil
|
23
|
+
}
|
24
|
+
>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#<User:placeholder_id
|
2
|
+
@aggregation_cache = {},
|
3
|
+
@attributes_cache = {},
|
4
|
+
@destroyed = false,
|
5
|
+
@marked_for_destruction = false,
|
6
|
+
@new_record = true,
|
7
|
+
@previously_changed = {},
|
8
|
+
@readonly = false,
|
9
|
+
attr_accessor :attributes = {
|
10
|
+
"admin" => false,
|
11
|
+
"created_at" => "1992-10-10 12:30:00",
|
12
|
+
"id" => nil,
|
13
|
+
"name" => "Diana",
|
14
|
+
"rank" => 1
|
15
|
+
},
|
16
|
+
attr_reader :association_cache = {},
|
17
|
+
attr_reader :changed_attributes = {
|
18
|
+
"admin" => nil,
|
19
|
+
"created_at" => nil,
|
20
|
+
"name" => nil,
|
21
|
+
"rank" => nil
|
22
|
+
},
|
23
|
+
attr_reader :mass_assignment_options = nil
|
24
|
+
>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
[
|
2
|
+
[0] #<User:placeholder_id
|
3
|
+
@aggregation_cache = {},
|
4
|
+
@attributes_cache = {},
|
5
|
+
@destroyed = false,
|
6
|
+
@marked_for_destruction = false,
|
7
|
+
@mass_assignment_options = nil,
|
8
|
+
@new_record = true,
|
9
|
+
@previously_changed = {},
|
10
|
+
@readonly = false,
|
11
|
+
attr_accessor :attributes = {
|
12
|
+
"admin" => false,
|
13
|
+
"created_at" => "1992-10-10 12:30:00",
|
14
|
+
"id" => nil,
|
15
|
+
"name" => "Diana",
|
16
|
+
"rank" => 1
|
17
|
+
},
|
18
|
+
attr_reader :association_cache = {},
|
19
|
+
attr_reader :changed_attributes = {
|
20
|
+
"admin" => nil,
|
21
|
+
"created_at" => nil,
|
22
|
+
"name" => nil,
|
23
|
+
"rank" => nil
|
24
|
+
}
|
25
|
+
>,
|
26
|
+
[1] #<User:placeholder_id
|
27
|
+
@aggregation_cache = {},
|
28
|
+
@attributes_cache = {},
|
29
|
+
@destroyed = false,
|
30
|
+
@marked_for_destruction = false,
|
31
|
+
@mass_assignment_options = nil,
|
32
|
+
@new_record = true,
|
33
|
+
@previously_changed = {},
|
34
|
+
@readonly = false,
|
35
|
+
attr_accessor :attributes = {
|
36
|
+
"admin" => true,
|
37
|
+
"created_at" => "2003-05-26 14:15:00",
|
38
|
+
"id" => nil,
|
39
|
+
"name" => "Laura",
|
40
|
+
"rank" => 2
|
41
|
+
},
|
42
|
+
attr_reader :association_cache = {},
|
43
|
+
attr_reader :changed_attributes = {
|
44
|
+
"admin" => nil,
|
45
|
+
"created_at" => nil,
|
46
|
+
"name" => nil,
|
47
|
+
"rank" => nil
|
48
|
+
}
|
49
|
+
>
|
50
|
+
]
|
@@ -0,0 +1,50 @@
|
|
1
|
+
[
|
2
|
+
[0] #<User:placeholder_id
|
3
|
+
@aggregation_cache = {},
|
4
|
+
@attributes_cache = {},
|
5
|
+
@destroyed = false,
|
6
|
+
@marked_for_destruction = false,
|
7
|
+
@new_record = true,
|
8
|
+
@previously_changed = {},
|
9
|
+
@readonly = false,
|
10
|
+
attr_accessor :attributes = {
|
11
|
+
"admin" => false,
|
12
|
+
"created_at" => "1992-10-10 12:30:00",
|
13
|
+
"id" => nil,
|
14
|
+
"name" => "Diana",
|
15
|
+
"rank" => 1
|
16
|
+
},
|
17
|
+
attr_reader :association_cache = {},
|
18
|
+
attr_reader :changed_attributes = {
|
19
|
+
"admin" => nil,
|
20
|
+
"created_at" => nil,
|
21
|
+
"name" => nil,
|
22
|
+
"rank" => nil
|
23
|
+
},
|
24
|
+
attr_reader :mass_assignment_options = nil
|
25
|
+
>,
|
26
|
+
[1] #<User:placeholder_id
|
27
|
+
@aggregation_cache = {},
|
28
|
+
@attributes_cache = {},
|
29
|
+
@destroyed = false,
|
30
|
+
@marked_for_destruction = false,
|
31
|
+
@new_record = true,
|
32
|
+
@previously_changed = {},
|
33
|
+
@readonly = false,
|
34
|
+
attr_accessor :attributes = {
|
35
|
+
"admin" => true,
|
36
|
+
"created_at" => "2003-05-26 14:15:00",
|
37
|
+
"id" => nil,
|
38
|
+
"name" => "Laura",
|
39
|
+
"rank" => 2
|
40
|
+
},
|
41
|
+
attr_reader :association_cache = {},
|
42
|
+
attr_reader :changed_attributes = {
|
43
|
+
"admin" => nil,
|
44
|
+
"created_at" => nil,
|
45
|
+
"name" => nil,
|
46
|
+
"rank" => nil
|
47
|
+
},
|
48
|
+
attr_reader :mass_assignment_options = nil
|
49
|
+
>
|
50
|
+
]
|
@@ -0,0 +1,98 @@
|
|
1
|
+
#<User:placeholder_id
|
2
|
+
@_start_transaction_state = {},
|
3
|
+
@aggregation_cache = {},
|
4
|
+
@attributes_cache = {},
|
5
|
+
@column_types = {
|
6
|
+
"admin" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
7
|
+
attr_accessor :coder = nil,
|
8
|
+
attr_accessor :primary = false,
|
9
|
+
attr_reader :default = nil,
|
10
|
+
attr_reader :default_function = nil,
|
11
|
+
attr_reader :limit = nil,
|
12
|
+
attr_reader :name = "admin",
|
13
|
+
attr_reader :null = true,
|
14
|
+
attr_reader :precision = nil,
|
15
|
+
attr_reader :scale = nil,
|
16
|
+
attr_reader :sql_type = "boolean",
|
17
|
+
attr_reader :type = :boolean
|
18
|
+
>,
|
19
|
+
"created_at" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
20
|
+
attr_accessor :coder = nil,
|
21
|
+
attr_accessor :primary = false,
|
22
|
+
attr_reader :default = nil,
|
23
|
+
attr_reader :default_function = nil,
|
24
|
+
attr_reader :limit = nil,
|
25
|
+
attr_reader :name = "created_at",
|
26
|
+
attr_reader :null = true,
|
27
|
+
attr_reader :precision = nil,
|
28
|
+
attr_reader :scale = nil,
|
29
|
+
attr_reader :sql_type = "datetime",
|
30
|
+
attr_reader :type = :datetime
|
31
|
+
>,
|
32
|
+
"id" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
33
|
+
attr_accessor :coder = nil,
|
34
|
+
attr_accessor :primary = true,
|
35
|
+
attr_reader :default = nil,
|
36
|
+
attr_reader :default_function = nil,
|
37
|
+
attr_reader :limit = nil,
|
38
|
+
attr_reader :name = "id",
|
39
|
+
attr_reader :null = false,
|
40
|
+
attr_reader :precision = nil,
|
41
|
+
attr_reader :scale = nil,
|
42
|
+
attr_reader :sql_type = "INTEGER",
|
43
|
+
attr_reader :type = :integer
|
44
|
+
>,
|
45
|
+
"name" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
46
|
+
attr_accessor :coder = nil,
|
47
|
+
attr_accessor :primary = false,
|
48
|
+
attr_reader :default = nil,
|
49
|
+
attr_reader :default_function = nil,
|
50
|
+
attr_reader :limit = 255,
|
51
|
+
attr_reader :name = "name",
|
52
|
+
attr_reader :null = true,
|
53
|
+
attr_reader :precision = nil,
|
54
|
+
attr_reader :scale = nil,
|
55
|
+
attr_reader :sql_type = "varchar(255)",
|
56
|
+
attr_reader :type = :string
|
57
|
+
>,
|
58
|
+
"rank" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
59
|
+
attr_accessor :coder = nil,
|
60
|
+
attr_accessor :primary = false,
|
61
|
+
attr_reader :default = nil,
|
62
|
+
attr_reader :default_function = nil,
|
63
|
+
attr_reader :limit = nil,
|
64
|
+
attr_reader :name = "rank",
|
65
|
+
attr_reader :null = true,
|
66
|
+
attr_reader :precision = nil,
|
67
|
+
attr_reader :scale = nil,
|
68
|
+
attr_reader :sql_type = "integer",
|
69
|
+
attr_reader :type = :integer
|
70
|
+
>
|
71
|
+
},
|
72
|
+
@column_types_override = nil,
|
73
|
+
@destroyed = false,
|
74
|
+
@marked_for_destruction = false,
|
75
|
+
@new_record = true,
|
76
|
+
@previously_changed = {},
|
77
|
+
@readonly = false,
|
78
|
+
@reflects_state = [
|
79
|
+
[0] false
|
80
|
+
],
|
81
|
+
@transaction_state = nil,
|
82
|
+
@txn = nil,
|
83
|
+
attr_accessor :attributes = {
|
84
|
+
"admin" => false,
|
85
|
+
"created_at" => "1992-10-10 12:30:00",
|
86
|
+
"id" => nil,
|
87
|
+
"name" => "Diana",
|
88
|
+
"rank" => 1
|
89
|
+
},
|
90
|
+
attr_accessor :destroyed_by_association = nil,
|
91
|
+
attr_reader :association_cache = {},
|
92
|
+
attr_reader :changed_attributes = {
|
93
|
+
"admin" => nil,
|
94
|
+
"created_at" => nil,
|
95
|
+
"name" => nil,
|
96
|
+
"rank" => nil
|
97
|
+
}
|
98
|
+
>
|
@@ -0,0 +1,198 @@
|
|
1
|
+
[
|
2
|
+
[0] #<User:placeholder_id
|
3
|
+
@_start_transaction_state = {},
|
4
|
+
@aggregation_cache = {},
|
5
|
+
@attributes_cache = {},
|
6
|
+
@column_types = {
|
7
|
+
"admin" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
8
|
+
attr_accessor :coder = nil,
|
9
|
+
attr_accessor :primary = false,
|
10
|
+
attr_reader :default = nil,
|
11
|
+
attr_reader :default_function = nil,
|
12
|
+
attr_reader :limit = nil,
|
13
|
+
attr_reader :name = "admin",
|
14
|
+
attr_reader :null = true,
|
15
|
+
attr_reader :precision = nil,
|
16
|
+
attr_reader :scale = nil,
|
17
|
+
attr_reader :sql_type = "boolean",
|
18
|
+
attr_reader :type = :boolean
|
19
|
+
>,
|
20
|
+
"created_at" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
21
|
+
attr_accessor :coder = nil,
|
22
|
+
attr_accessor :primary = false,
|
23
|
+
attr_reader :default = nil,
|
24
|
+
attr_reader :default_function = nil,
|
25
|
+
attr_reader :limit = nil,
|
26
|
+
attr_reader :name = "created_at",
|
27
|
+
attr_reader :null = true,
|
28
|
+
attr_reader :precision = nil,
|
29
|
+
attr_reader :scale = nil,
|
30
|
+
attr_reader :sql_type = "datetime",
|
31
|
+
attr_reader :type = :datetime
|
32
|
+
>,
|
33
|
+
"id" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
34
|
+
attr_accessor :coder = nil,
|
35
|
+
attr_accessor :primary = true,
|
36
|
+
attr_reader :default = nil,
|
37
|
+
attr_reader :default_function = nil,
|
38
|
+
attr_reader :limit = nil,
|
39
|
+
attr_reader :name = "id",
|
40
|
+
attr_reader :null = false,
|
41
|
+
attr_reader :precision = nil,
|
42
|
+
attr_reader :scale = nil,
|
43
|
+
attr_reader :sql_type = "INTEGER",
|
44
|
+
attr_reader :type = :integer
|
45
|
+
>,
|
46
|
+
"name" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
47
|
+
attr_accessor :coder = nil,
|
48
|
+
attr_accessor :primary = false,
|
49
|
+
attr_reader :default = nil,
|
50
|
+
attr_reader :default_function = nil,
|
51
|
+
attr_reader :limit = 255,
|
52
|
+
attr_reader :name = "name",
|
53
|
+
attr_reader :null = true,
|
54
|
+
attr_reader :precision = nil,
|
55
|
+
attr_reader :scale = nil,
|
56
|
+
attr_reader :sql_type = "varchar(255)",
|
57
|
+
attr_reader :type = :string
|
58
|
+
>,
|
59
|
+
"rank" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
60
|
+
attr_accessor :coder = nil,
|
61
|
+
attr_accessor :primary = false,
|
62
|
+
attr_reader :default = nil,
|
63
|
+
attr_reader :default_function = nil,
|
64
|
+
attr_reader :limit = nil,
|
65
|
+
attr_reader :name = "rank",
|
66
|
+
attr_reader :null = true,
|
67
|
+
attr_reader :precision = nil,
|
68
|
+
attr_reader :scale = nil,
|
69
|
+
attr_reader :sql_type = "integer",
|
70
|
+
attr_reader :type = :integer
|
71
|
+
>
|
72
|
+
},
|
73
|
+
@column_types_override = nil,
|
74
|
+
@destroyed = false,
|
75
|
+
@marked_for_destruction = false,
|
76
|
+
@new_record = true,
|
77
|
+
@previously_changed = {},
|
78
|
+
@readonly = false,
|
79
|
+
@reflects_state = [
|
80
|
+
[0] false
|
81
|
+
],
|
82
|
+
@transaction_state = nil,
|
83
|
+
@txn = nil,
|
84
|
+
attr_accessor :attributes = {
|
85
|
+
"admin" => false,
|
86
|
+
"created_at" => "1992-10-10 12:30:00",
|
87
|
+
"id" => nil,
|
88
|
+
"name" => "Diana",
|
89
|
+
"rank" => 1
|
90
|
+
},
|
91
|
+
attr_accessor :destroyed_by_association = nil,
|
92
|
+
attr_reader :association_cache = {},
|
93
|
+
attr_reader :changed_attributes = {
|
94
|
+
"admin" => nil,
|
95
|
+
"created_at" => nil,
|
96
|
+
"name" => nil,
|
97
|
+
"rank" => nil
|
98
|
+
}
|
99
|
+
>,
|
100
|
+
[1] #<User:placeholder_id
|
101
|
+
@_start_transaction_state = {},
|
102
|
+
@aggregation_cache = {},
|
103
|
+
@attributes_cache = {},
|
104
|
+
@column_types = {
|
105
|
+
"admin" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
106
|
+
attr_accessor :coder = nil,
|
107
|
+
attr_accessor :primary = false,
|
108
|
+
attr_reader :default = nil,
|
109
|
+
attr_reader :default_function = nil,
|
110
|
+
attr_reader :limit = nil,
|
111
|
+
attr_reader :name = "admin",
|
112
|
+
attr_reader :null = true,
|
113
|
+
attr_reader :precision = nil,
|
114
|
+
attr_reader :scale = nil,
|
115
|
+
attr_reader :sql_type = "boolean",
|
116
|
+
attr_reader :type = :boolean
|
117
|
+
>,
|
118
|
+
"created_at" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
119
|
+
attr_accessor :coder = nil,
|
120
|
+
attr_accessor :primary = false,
|
121
|
+
attr_reader :default = nil,
|
122
|
+
attr_reader :default_function = nil,
|
123
|
+
attr_reader :limit = nil,
|
124
|
+
attr_reader :name = "created_at",
|
125
|
+
attr_reader :null = true,
|
126
|
+
attr_reader :precision = nil,
|
127
|
+
attr_reader :scale = nil,
|
128
|
+
attr_reader :sql_type = "datetime",
|
129
|
+
attr_reader :type = :datetime
|
130
|
+
>,
|
131
|
+
"id" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
132
|
+
attr_accessor :coder = nil,
|
133
|
+
attr_accessor :primary = true,
|
134
|
+
attr_reader :default = nil,
|
135
|
+
attr_reader :default_function = nil,
|
136
|
+
attr_reader :limit = nil,
|
137
|
+
attr_reader :name = "id",
|
138
|
+
attr_reader :null = false,
|
139
|
+
attr_reader :precision = nil,
|
140
|
+
attr_reader :scale = nil,
|
141
|
+
attr_reader :sql_type = "INTEGER",
|
142
|
+
attr_reader :type = :integer
|
143
|
+
>,
|
144
|
+
"name" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
145
|
+
attr_accessor :coder = nil,
|
146
|
+
attr_accessor :primary = false,
|
147
|
+
attr_reader :default = nil,
|
148
|
+
attr_reader :default_function = nil,
|
149
|
+
attr_reader :limit = 255,
|
150
|
+
attr_reader :name = "name",
|
151
|
+
attr_reader :null = true,
|
152
|
+
attr_reader :precision = nil,
|
153
|
+
attr_reader :scale = nil,
|
154
|
+
attr_reader :sql_type = "varchar(255)",
|
155
|
+
attr_reader :type = :string
|
156
|
+
>,
|
157
|
+
"rank" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
158
|
+
attr_accessor :coder = nil,
|
159
|
+
attr_accessor :primary = false,
|
160
|
+
attr_reader :default = nil,
|
161
|
+
attr_reader :default_function = nil,
|
162
|
+
attr_reader :limit = nil,
|
163
|
+
attr_reader :name = "rank",
|
164
|
+
attr_reader :null = true,
|
165
|
+
attr_reader :precision = nil,
|
166
|
+
attr_reader :scale = nil,
|
167
|
+
attr_reader :sql_type = "integer",
|
168
|
+
attr_reader :type = :integer
|
169
|
+
>
|
170
|
+
},
|
171
|
+
@column_types_override = nil,
|
172
|
+
@destroyed = false,
|
173
|
+
@marked_for_destruction = false,
|
174
|
+
@new_record = true,
|
175
|
+
@previously_changed = {},
|
176
|
+
@readonly = false,
|
177
|
+
@reflects_state = [
|
178
|
+
[0] false
|
179
|
+
],
|
180
|
+
@transaction_state = nil,
|
181
|
+
@txn = nil,
|
182
|
+
attr_accessor :attributes = {
|
183
|
+
"admin" => true,
|
184
|
+
"created_at" => "2003-05-26 14:15:00",
|
185
|
+
"id" => nil,
|
186
|
+
"name" => "Laura",
|
187
|
+
"rank" => 2
|
188
|
+
},
|
189
|
+
attr_accessor :destroyed_by_association = nil,
|
190
|
+
attr_reader :association_cache = {},
|
191
|
+
attr_reader :changed_attributes = {
|
192
|
+
"admin" => nil,
|
193
|
+
"created_at" => nil,
|
194
|
+
"name" => nil,
|
195
|
+
"rank" => nil
|
196
|
+
}
|
197
|
+
>
|
198
|
+
]
|
@@ -0,0 +1,97 @@
|
|
1
|
+
#<User:placeholder_id
|
2
|
+
@_start_transaction_state = {},
|
3
|
+
@aggregation_cache = {},
|
4
|
+
@attributes_cache = {},
|
5
|
+
@column_types = {
|
6
|
+
"admin" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
7
|
+
attr_accessor :coder = nil,
|
8
|
+
attr_accessor :primary = false,
|
9
|
+
attr_reader :default = nil,
|
10
|
+
attr_reader :default_function = nil,
|
11
|
+
attr_reader :limit = nil,
|
12
|
+
attr_reader :name = "admin",
|
13
|
+
attr_reader :null = true,
|
14
|
+
attr_reader :precision = nil,
|
15
|
+
attr_reader :scale = nil,
|
16
|
+
attr_reader :sql_type = "boolean",
|
17
|
+
attr_reader :type = :boolean
|
18
|
+
>,
|
19
|
+
"created_at" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
20
|
+
attr_accessor :coder = nil,
|
21
|
+
attr_accessor :primary = false,
|
22
|
+
attr_reader :default = nil,
|
23
|
+
attr_reader :default_function = nil,
|
24
|
+
attr_reader :limit = nil,
|
25
|
+
attr_reader :name = "created_at",
|
26
|
+
attr_reader :null = true,
|
27
|
+
attr_reader :precision = nil,
|
28
|
+
attr_reader :scale = nil,
|
29
|
+
attr_reader :sql_type = "datetime",
|
30
|
+
attr_reader :type = :datetime
|
31
|
+
>,
|
32
|
+
"id" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
33
|
+
attr_accessor :coder = nil,
|
34
|
+
attr_accessor :primary = true,
|
35
|
+
attr_reader :default = nil,
|
36
|
+
attr_reader :default_function = nil,
|
37
|
+
attr_reader :limit = nil,
|
38
|
+
attr_reader :name = "id",
|
39
|
+
attr_reader :null = false,
|
40
|
+
attr_reader :precision = nil,
|
41
|
+
attr_reader :scale = nil,
|
42
|
+
attr_reader :sql_type = "INTEGER",
|
43
|
+
attr_reader :type = :integer
|
44
|
+
>,
|
45
|
+
"name" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
46
|
+
attr_accessor :coder = nil,
|
47
|
+
attr_accessor :primary = false,
|
48
|
+
attr_reader :default = nil,
|
49
|
+
attr_reader :default_function = nil,
|
50
|
+
attr_reader :limit = 255,
|
51
|
+
attr_reader :name = "name",
|
52
|
+
attr_reader :null = true,
|
53
|
+
attr_reader :precision = nil,
|
54
|
+
attr_reader :scale = nil,
|
55
|
+
attr_reader :sql_type = "varchar(255)",
|
56
|
+
attr_reader :type = :string
|
57
|
+
>,
|
58
|
+
"rank" => #<ActiveRecord::ConnectionAdapters::SQLite3Column:placeholder_id
|
59
|
+
attr_accessor :coder = nil,
|
60
|
+
attr_accessor :primary = false,
|
61
|
+
attr_reader :default = nil,
|
62
|
+
attr_reader :default_function = nil,
|
63
|
+
attr_reader :limit = nil,
|
64
|
+
attr_reader :name = "rank",
|
65
|
+
attr_reader :null = true,
|
66
|
+
attr_reader :precision = nil,
|
67
|
+
attr_reader :scale = nil,
|
68
|
+
attr_reader :sql_type = "integer",
|
69
|
+
attr_reader :type = :integer
|
70
|
+
>
|
71
|
+
},
|
72
|
+
@column_types_override = nil,
|
73
|
+
@destroyed = false,
|
74
|
+
@marked_for_destruction = false,
|
75
|
+
@new_record = true,
|
76
|
+
@readonly = false,
|
77
|
+
@reflects_state = [
|
78
|
+
[0] false
|
79
|
+
],
|
80
|
+
@transaction_state = nil,
|
81
|
+
@txn = nil,
|
82
|
+
attr_accessor :attributes = {
|
83
|
+
"admin" => false,
|
84
|
+
"created_at" => "1992-10-10 12:30:00",
|
85
|
+
"id" => nil,
|
86
|
+
"name" => "Diana",
|
87
|
+
"rank" => 1
|
88
|
+
},
|
89
|
+
attr_accessor :destroyed_by_association = nil,
|
90
|
+
attr_reader :association_cache = {},
|
91
|
+
attr_reader :changed_attributes = {
|
92
|
+
"admin" => nil,
|
93
|
+
"created_at" => nil,
|
94
|
+
"name" => nil,
|
95
|
+
"rank" => nil
|
96
|
+
}
|
97
|
+
>
|