mr 0.35.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/Gemfile +13 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/bench/all.rb +4 -0
- data/bench/factory.rb +68 -0
- data/bench/fake_record.rb +174 -0
- data/bench/model.rb +201 -0
- data/bench/read_model.rb +191 -0
- data/bench/results/factory.txt +21 -0
- data/bench/results/fake_record.txt +37 -0
- data/bench/results/model.txt +44 -0
- data/bench/results/read_model.txt +46 -0
- data/bench/setup.rb +132 -0
- data/lib/mr.rb +11 -0
- data/lib/mr/after_commit.rb +49 -0
- data/lib/mr/after_commit/fake_record.rb +39 -0
- data/lib/mr/after_commit/record.rb +48 -0
- data/lib/mr/after_commit/record_procs_methods.rb +82 -0
- data/lib/mr/factory.rb +82 -0
- data/lib/mr/factory/config.rb +240 -0
- data/lib/mr/factory/model_factory.rb +103 -0
- data/lib/mr/factory/model_stack.rb +28 -0
- data/lib/mr/factory/read_model_factory.rb +104 -0
- data/lib/mr/factory/record_factory.rb +130 -0
- data/lib/mr/factory/record_stack.rb +219 -0
- data/lib/mr/fake_query.rb +53 -0
- data/lib/mr/fake_record.rb +58 -0
- data/lib/mr/fake_record/associations.rb +257 -0
- data/lib/mr/fake_record/attributes.rb +168 -0
- data/lib/mr/fake_record/persistence.rb +116 -0
- data/lib/mr/json_field.rb +180 -0
- data/lib/mr/json_field/fake_record.rb +31 -0
- data/lib/mr/json_field/record.rb +38 -0
- data/lib/mr/model.rb +67 -0
- data/lib/mr/model/associations.rb +161 -0
- data/lib/mr/model/configuration.rb +67 -0
- data/lib/mr/model/fields.rb +177 -0
- data/lib/mr/model/persistence.rb +79 -0
- data/lib/mr/query.rb +126 -0
- data/lib/mr/read_model.rb +83 -0
- data/lib/mr/read_model/data.rb +38 -0
- data/lib/mr/read_model/fields.rb +218 -0
- data/lib/mr/read_model/query_expression.rb +188 -0
- data/lib/mr/read_model/querying.rb +214 -0
- data/lib/mr/read_model/set_querying.rb +82 -0
- data/lib/mr/read_model/subquery.rb +98 -0
- data/lib/mr/record.rb +35 -0
- data/lib/mr/test_helpers.rb +229 -0
- data/lib/mr/type_converter.rb +85 -0
- data/lib/mr/version.rb +3 -0
- data/log/.gitkeep +0 -0
- data/mr.gemspec +29 -0
- data/test/helper.rb +21 -0
- data/test/support/db.rb +10 -0
- data/test/support/factory.rb +13 -0
- data/test/support/factory/area.rb +6 -0
- data/test/support/factory/comment.rb +14 -0
- data/test/support/factory/image.rb +6 -0
- data/test/support/factory/user.rb +6 -0
- data/test/support/models/area.rb +58 -0
- data/test/support/models/comment.rb +60 -0
- data/test/support/models/image.rb +53 -0
- data/test/support/models/user.rb +96 -0
- data/test/support/read_model/querying.rb +150 -0
- data/test/support/read_models/comment_with_user_data.rb +27 -0
- data/test/support/read_models/set_data.rb +49 -0
- data/test/support/read_models/subquery_data.rb +41 -0
- data/test/support/read_models/user_with_area_data.rb +15 -0
- data/test/support/schema.rb +39 -0
- data/test/support/setup_test_db.rb +10 -0
- data/test/system/factory/model_factory_tests.rb +87 -0
- data/test/system/factory/model_stack_tests.rb +30 -0
- data/test/system/factory/record_factory_tests.rb +84 -0
- data/test/system/factory/record_stack_tests.rb +51 -0
- data/test/system/factory_tests.rb +32 -0
- data/test/system/read_model_tests.rb +199 -0
- data/test/system/with_model_tests.rb +275 -0
- data/test/unit/after_commit/fake_record_tests.rb +110 -0
- data/test/unit/after_commit/record_procs_methods_tests.rb +177 -0
- data/test/unit/after_commit/record_tests.rb +134 -0
- data/test/unit/after_commit_tests.rb +113 -0
- data/test/unit/factory/config_tests.rb +651 -0
- data/test/unit/factory/model_factory_tests.rb +473 -0
- data/test/unit/factory/model_stack_tests.rb +97 -0
- data/test/unit/factory/read_model_factory_tests.rb +195 -0
- data/test/unit/factory/record_factory_tests.rb +446 -0
- data/test/unit/factory/record_stack_tests.rb +549 -0
- data/test/unit/factory_tests.rb +213 -0
- data/test/unit/fake_query_tests.rb +137 -0
- data/test/unit/fake_record/associations_tests.rb +585 -0
- data/test/unit/fake_record/attributes_tests.rb +265 -0
- data/test/unit/fake_record/persistence_tests.rb +239 -0
- data/test/unit/fake_record_tests.rb +106 -0
- data/test/unit/json_field/fake_record_tests.rb +75 -0
- data/test/unit/json_field/record_tests.rb +80 -0
- data/test/unit/json_field_tests.rb +302 -0
- data/test/unit/model/associations_tests.rb +346 -0
- data/test/unit/model/configuration_tests.rb +92 -0
- data/test/unit/model/fields_tests.rb +278 -0
- data/test/unit/model/persistence_tests.rb +114 -0
- data/test/unit/model_tests.rb +137 -0
- data/test/unit/query_tests.rb +300 -0
- data/test/unit/read_model/data_tests.rb +56 -0
- data/test/unit/read_model/fields_tests.rb +416 -0
- data/test/unit/read_model/query_expression_tests.rb +381 -0
- data/test/unit/read_model/querying_tests.rb +613 -0
- data/test/unit/read_model/set_querying_tests.rb +149 -0
- data/test/unit/read_model/subquery_tests.rb +242 -0
- data/test/unit/read_model_tests.rb +187 -0
- data/test/unit/record_tests.rb +45 -0
- data/test/unit/test_helpers_tests.rb +431 -0
- data/test/unit/type_converter_tests.rb +207 -0
- metadata +285 -0
@@ -0,0 +1,207 @@
|
|
1
|
+
require 'assert'
|
2
|
+
require 'mr/type_converter'
|
3
|
+
|
4
|
+
class MR::TypeConverter
|
5
|
+
|
6
|
+
class UnitTests < Assert::Context
|
7
|
+
desc "MR::TypeConverter"
|
8
|
+
setup do
|
9
|
+
@type_converter = MR::TypeConverter.new
|
10
|
+
end
|
11
|
+
subject{ @type_converter }
|
12
|
+
|
13
|
+
should have_imeths :binary, :boolean
|
14
|
+
should have_imeths :date, :datetime, :timestamp
|
15
|
+
should have_imeths :decimal, :float
|
16
|
+
should have_imeths :integer, :primary_key
|
17
|
+
should have_imeths :string, :text, :slug, :hex, :file_name, :dir_path
|
18
|
+
should have_imeths :file_path, :path, :url, :email
|
19
|
+
should have_imeths :time
|
20
|
+
should have_cmeths :valid?
|
21
|
+
|
22
|
+
should "return whether a type is valid" do
|
23
|
+
assert_equal true, MR::TypeConverter.valid?(:string)
|
24
|
+
assert_equal false, MR::TypeConverter.valid?(:invalid)
|
25
|
+
end
|
26
|
+
|
27
|
+
should "properly type cast binary values using `binary`" do
|
28
|
+
binary_string = "\000\001\002\003\004"
|
29
|
+
assert_equal binary_string, subject.binary(binary_string)
|
30
|
+
end
|
31
|
+
|
32
|
+
should "return `nil` when `binary` is passed a `nil` value" do
|
33
|
+
assert_nil subject.binary(nil)
|
34
|
+
end
|
35
|
+
|
36
|
+
should "properly type cast boolean values using `boolean`" do
|
37
|
+
assert_equal true, subject.boolean('true')
|
38
|
+
assert_equal true, subject.boolean('1')
|
39
|
+
assert_equal true, subject.boolean('t')
|
40
|
+
assert_equal true, subject.boolean('T')
|
41
|
+
|
42
|
+
assert_equal false, subject.boolean('false')
|
43
|
+
assert_equal false, subject.boolean('0')
|
44
|
+
assert_equal false, subject.boolean('f')
|
45
|
+
assert_equal false, subject.boolean('F')
|
46
|
+
end
|
47
|
+
|
48
|
+
should "return `nil` when `boolean` is passed a `nil` value" do
|
49
|
+
assert_nil subject.boolean(nil)
|
50
|
+
end
|
51
|
+
|
52
|
+
should "properly type cast date values using `date`" do
|
53
|
+
expected = Date.parse('2013-11-18')
|
54
|
+
assert_equal expected, subject.date('2013-11-18')
|
55
|
+
end
|
56
|
+
|
57
|
+
should "return `nil` when `date` is passed a `nil` value" do
|
58
|
+
assert_nil subject.date(nil)
|
59
|
+
end
|
60
|
+
|
61
|
+
should "properly type cast datetime values using `datetime`" do
|
62
|
+
expected = Time.parse('2013-11-18 21:29:10')
|
63
|
+
assert_equal expected, subject.datetime('2013-11-18 21:29:10')
|
64
|
+
end
|
65
|
+
|
66
|
+
should "return `nil` when `datetime` is passed a `nil` value" do
|
67
|
+
assert_nil subject.datetime(nil)
|
68
|
+
end
|
69
|
+
|
70
|
+
should "properly type cast decimal values using `decimal`" do
|
71
|
+
expected = BigDecimal.new('33.4755926134924')
|
72
|
+
assert_equal expected, subject.decimal('33.4755926134924')
|
73
|
+
end
|
74
|
+
|
75
|
+
should "return `nil` when `decimal` is passed a `nil` value" do
|
76
|
+
assert_nil subject.decimal(nil)
|
77
|
+
end
|
78
|
+
|
79
|
+
should "properly type cast dir path values using `dir_path`" do
|
80
|
+
assert_equal 'a/path', subject.dir_path('a/path')
|
81
|
+
end
|
82
|
+
|
83
|
+
should "return `nil` when `dir_path` is passed a `nil` value" do
|
84
|
+
assert_nil subject.dir_path(nil)
|
85
|
+
end
|
86
|
+
|
87
|
+
should "properly type cast email values using `email`" do
|
88
|
+
assert_equal 'email@example.com', subject.email('email@example.com')
|
89
|
+
end
|
90
|
+
|
91
|
+
should "return `nil` when `email` is passed a `nil` value" do
|
92
|
+
assert_nil subject.email(nil)
|
93
|
+
end
|
94
|
+
|
95
|
+
should "properly type cast file name values using `file_name`" do
|
96
|
+
assert_equal 'file.txt', subject.file_name('file.txt')
|
97
|
+
end
|
98
|
+
|
99
|
+
should "return `nil` when `file_name` is passed a `nil` value" do
|
100
|
+
assert_nil subject.file_name(nil)
|
101
|
+
end
|
102
|
+
|
103
|
+
should "properly type cast float values using `float`" do
|
104
|
+
assert_equal 6.1374, subject.float('6.1374')
|
105
|
+
end
|
106
|
+
|
107
|
+
should "return `nil` when `float` is passed a `nil` value" do
|
108
|
+
assert_nil subject.float(nil)
|
109
|
+
end
|
110
|
+
|
111
|
+
should "properly type cast hex values using `hex`" do
|
112
|
+
assert_equal '1a2b3c4d', subject.hex('1a2b3c4d')
|
113
|
+
end
|
114
|
+
|
115
|
+
should "return `nil` when `hex` is passed a `nil` value" do
|
116
|
+
assert_nil subject.hex(nil)
|
117
|
+
end
|
118
|
+
|
119
|
+
should "properly type cast integer values using `integer`" do
|
120
|
+
assert_equal 100, subject.integer('100')
|
121
|
+
end
|
122
|
+
|
123
|
+
should "return `nil` when `integer` is passed a `nil` value" do
|
124
|
+
assert_nil subject.integer(nil)
|
125
|
+
end
|
126
|
+
|
127
|
+
should "properly type cast path values using `path`" do
|
128
|
+
assert_equal 'a/path', subject.path('a/path')
|
129
|
+
end
|
130
|
+
|
131
|
+
should "return `nil` when `path` is passed a `nil` value" do
|
132
|
+
assert_nil subject.path(nil)
|
133
|
+
end
|
134
|
+
|
135
|
+
should "properly type cast primary key values using `convert`" do
|
136
|
+
assert_equal 100, subject.primary_key('100')
|
137
|
+
end
|
138
|
+
|
139
|
+
should "return `nil` when `primary_key` is passed a `nil` value" do
|
140
|
+
assert_nil subject.primary_key(nil)
|
141
|
+
end
|
142
|
+
|
143
|
+
should "properly type cast slug values using `slug`" do
|
144
|
+
assert_equal 'a-slug', subject.slug('a-slug')
|
145
|
+
end
|
146
|
+
|
147
|
+
should "return `nil` when `slug` is passed a `nil` value" do
|
148
|
+
assert_nil subject.slug(nil)
|
149
|
+
end
|
150
|
+
|
151
|
+
should "properly type cast string values using `string`" do
|
152
|
+
assert_equal 'string', subject.string('string')
|
153
|
+
end
|
154
|
+
|
155
|
+
should "return `nil` when `string` is passed a `nil` value" do
|
156
|
+
assert_nil subject.string(nil)
|
157
|
+
end
|
158
|
+
|
159
|
+
should "properly type cast text values using `text`" do
|
160
|
+
assert_equal 'text', subject.text('text')
|
161
|
+
end
|
162
|
+
|
163
|
+
should "return `nil` when `text` is passed a `nil` value" do
|
164
|
+
assert_nil subject.text(nil)
|
165
|
+
end
|
166
|
+
|
167
|
+
should "properly type cast time values using `time`" do
|
168
|
+
expected = Time.parse('2000-01-01 21:29:10.905011')
|
169
|
+
assert_equal expected, subject.time('21:29:10.905011')
|
170
|
+
end
|
171
|
+
|
172
|
+
should "return `nil` when `time` is passed a `nil` value" do
|
173
|
+
assert_nil subject.time(nil)
|
174
|
+
end
|
175
|
+
|
176
|
+
should "properly type cast timestamp values using `timestamp`" do
|
177
|
+
expected = Time.parse('2013-11-18 22:10:36.660846')
|
178
|
+
assert_equal expected, subject.timestamp('2013-11-18 22:10:36.660846')
|
179
|
+
end
|
180
|
+
|
181
|
+
should "return `nil` when `timestamp` is passed a `nil` value" do
|
182
|
+
assert_nil subject.timestamp(nil)
|
183
|
+
end
|
184
|
+
|
185
|
+
should "properly type cast url values using `url`" do
|
186
|
+
assert_equal 'http://example.com/url', subject.url('http://example.com/url')
|
187
|
+
end
|
188
|
+
|
189
|
+
should "return `nil` when `url` is passed a `nil` value" do
|
190
|
+
assert_nil subject.url(nil)
|
191
|
+
end
|
192
|
+
|
193
|
+
should "allow using a custom ActiveRecord column class" do
|
194
|
+
type_converter = MR::TypeConverter.new(FakeARColumn)
|
195
|
+
assert_equal 'test', type_converter.string('test')
|
196
|
+
assert_equal 'fake-ar-column', type_converter.datetime('test')
|
197
|
+
end
|
198
|
+
|
199
|
+
end
|
200
|
+
|
201
|
+
module FakeARColumn
|
202
|
+
def self.method_missing(method, *args, &block)
|
203
|
+
'fake-ar-column'
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
end
|
metadata
ADDED
@@ -0,0 +1,285 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.35.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kelly Redding
|
8
|
+
- Collin Redding
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2018-06-12 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: ardb
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.28.3
|
23
|
+
type: :development
|
24
|
+
version_requirements: *id001
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: sqlite3
|
27
|
+
prerelease: false
|
28
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.3.9
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id002
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: activerecord
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ~>
|
41
|
+
- &id004 !ruby/object:Gem::Version
|
42
|
+
version: "3.2"
|
43
|
+
type: :runtime
|
44
|
+
version_requirements: *id003
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: activesupport
|
47
|
+
prerelease: false
|
48
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ~>
|
51
|
+
- *id004
|
52
|
+
type: :runtime
|
53
|
+
version_requirements: *id005
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: assert
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.16.3
|
62
|
+
type: :runtime
|
63
|
+
version_requirements: *id006
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: much-plugin
|
66
|
+
prerelease: false
|
67
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ~>
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: 0.2.0
|
72
|
+
type: :runtime
|
73
|
+
version_requirements: *id007
|
74
|
+
description: Model-record pattern
|
75
|
+
email:
|
76
|
+
- kelly@kellyredding.com
|
77
|
+
- collin.redding@me.com
|
78
|
+
executables: []
|
79
|
+
|
80
|
+
extensions: []
|
81
|
+
|
82
|
+
extra_rdoc_files: []
|
83
|
+
|
84
|
+
files:
|
85
|
+
- .gitignore
|
86
|
+
- Gemfile
|
87
|
+
- LICENSE
|
88
|
+
- README.md
|
89
|
+
- bench/all.rb
|
90
|
+
- bench/factory.rb
|
91
|
+
- bench/fake_record.rb
|
92
|
+
- bench/model.rb
|
93
|
+
- bench/read_model.rb
|
94
|
+
- bench/results/factory.txt
|
95
|
+
- bench/results/fake_record.txt
|
96
|
+
- bench/results/model.txt
|
97
|
+
- bench/results/read_model.txt
|
98
|
+
- bench/setup.rb
|
99
|
+
- lib/mr.rb
|
100
|
+
- lib/mr/after_commit.rb
|
101
|
+
- lib/mr/after_commit/fake_record.rb
|
102
|
+
- lib/mr/after_commit/record.rb
|
103
|
+
- lib/mr/after_commit/record_procs_methods.rb
|
104
|
+
- lib/mr/factory.rb
|
105
|
+
- lib/mr/factory/config.rb
|
106
|
+
- lib/mr/factory/model_factory.rb
|
107
|
+
- lib/mr/factory/model_stack.rb
|
108
|
+
- lib/mr/factory/read_model_factory.rb
|
109
|
+
- lib/mr/factory/record_factory.rb
|
110
|
+
- lib/mr/factory/record_stack.rb
|
111
|
+
- lib/mr/fake_query.rb
|
112
|
+
- lib/mr/fake_record.rb
|
113
|
+
- lib/mr/fake_record/associations.rb
|
114
|
+
- lib/mr/fake_record/attributes.rb
|
115
|
+
- lib/mr/fake_record/persistence.rb
|
116
|
+
- lib/mr/json_field.rb
|
117
|
+
- lib/mr/json_field/fake_record.rb
|
118
|
+
- lib/mr/json_field/record.rb
|
119
|
+
- lib/mr/model.rb
|
120
|
+
- lib/mr/model/associations.rb
|
121
|
+
- lib/mr/model/configuration.rb
|
122
|
+
- lib/mr/model/fields.rb
|
123
|
+
- lib/mr/model/persistence.rb
|
124
|
+
- lib/mr/query.rb
|
125
|
+
- lib/mr/read_model.rb
|
126
|
+
- lib/mr/read_model/data.rb
|
127
|
+
- lib/mr/read_model/fields.rb
|
128
|
+
- lib/mr/read_model/query_expression.rb
|
129
|
+
- lib/mr/read_model/querying.rb
|
130
|
+
- lib/mr/read_model/set_querying.rb
|
131
|
+
- lib/mr/read_model/subquery.rb
|
132
|
+
- lib/mr/record.rb
|
133
|
+
- lib/mr/test_helpers.rb
|
134
|
+
- lib/mr/type_converter.rb
|
135
|
+
- lib/mr/version.rb
|
136
|
+
- log/.gitkeep
|
137
|
+
- mr.gemspec
|
138
|
+
- test/helper.rb
|
139
|
+
- test/support/db.rb
|
140
|
+
- test/support/factory.rb
|
141
|
+
- test/support/factory/area.rb
|
142
|
+
- test/support/factory/comment.rb
|
143
|
+
- test/support/factory/image.rb
|
144
|
+
- test/support/factory/user.rb
|
145
|
+
- test/support/models/area.rb
|
146
|
+
- test/support/models/comment.rb
|
147
|
+
- test/support/models/image.rb
|
148
|
+
- test/support/models/user.rb
|
149
|
+
- test/support/read_model/querying.rb
|
150
|
+
- test/support/read_models/comment_with_user_data.rb
|
151
|
+
- test/support/read_models/set_data.rb
|
152
|
+
- test/support/read_models/subquery_data.rb
|
153
|
+
- test/support/read_models/user_with_area_data.rb
|
154
|
+
- test/support/schema.rb
|
155
|
+
- test/support/setup_test_db.rb
|
156
|
+
- test/system/factory/model_factory_tests.rb
|
157
|
+
- test/system/factory/model_stack_tests.rb
|
158
|
+
- test/system/factory/record_factory_tests.rb
|
159
|
+
- test/system/factory/record_stack_tests.rb
|
160
|
+
- test/system/factory_tests.rb
|
161
|
+
- test/system/read_model_tests.rb
|
162
|
+
- test/system/with_model_tests.rb
|
163
|
+
- test/unit/after_commit/fake_record_tests.rb
|
164
|
+
- test/unit/after_commit/record_procs_methods_tests.rb
|
165
|
+
- test/unit/after_commit/record_tests.rb
|
166
|
+
- test/unit/after_commit_tests.rb
|
167
|
+
- test/unit/factory/config_tests.rb
|
168
|
+
- test/unit/factory/model_factory_tests.rb
|
169
|
+
- test/unit/factory/model_stack_tests.rb
|
170
|
+
- test/unit/factory/read_model_factory_tests.rb
|
171
|
+
- test/unit/factory/record_factory_tests.rb
|
172
|
+
- test/unit/factory/record_stack_tests.rb
|
173
|
+
- test/unit/factory_tests.rb
|
174
|
+
- test/unit/fake_query_tests.rb
|
175
|
+
- test/unit/fake_record/associations_tests.rb
|
176
|
+
- test/unit/fake_record/attributes_tests.rb
|
177
|
+
- test/unit/fake_record/persistence_tests.rb
|
178
|
+
- test/unit/fake_record_tests.rb
|
179
|
+
- test/unit/json_field/fake_record_tests.rb
|
180
|
+
- test/unit/json_field/record_tests.rb
|
181
|
+
- test/unit/json_field_tests.rb
|
182
|
+
- test/unit/model/associations_tests.rb
|
183
|
+
- test/unit/model/configuration_tests.rb
|
184
|
+
- test/unit/model/fields_tests.rb
|
185
|
+
- test/unit/model/persistence_tests.rb
|
186
|
+
- test/unit/model_tests.rb
|
187
|
+
- test/unit/query_tests.rb
|
188
|
+
- test/unit/read_model/data_tests.rb
|
189
|
+
- test/unit/read_model/fields_tests.rb
|
190
|
+
- test/unit/read_model/query_expression_tests.rb
|
191
|
+
- test/unit/read_model/querying_tests.rb
|
192
|
+
- test/unit/read_model/set_querying_tests.rb
|
193
|
+
- test/unit/read_model/subquery_tests.rb
|
194
|
+
- test/unit/read_model_tests.rb
|
195
|
+
- test/unit/record_tests.rb
|
196
|
+
- test/unit/test_helpers_tests.rb
|
197
|
+
- test/unit/type_converter_tests.rb
|
198
|
+
- tmp/.gitkeep
|
199
|
+
homepage: https://rubygems.org/gems/mr
|
200
|
+
licenses:
|
201
|
+
- MIT
|
202
|
+
metadata: {}
|
203
|
+
|
204
|
+
post_install_message:
|
205
|
+
rdoc_options: []
|
206
|
+
|
207
|
+
require_paths:
|
208
|
+
- lib
|
209
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
210
|
+
requirements:
|
211
|
+
- &id008
|
212
|
+
- ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: "0"
|
215
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
|
+
requirements:
|
217
|
+
- *id008
|
218
|
+
requirements: []
|
219
|
+
|
220
|
+
rubyforge_project:
|
221
|
+
rubygems_version: 2.6.6
|
222
|
+
signing_key:
|
223
|
+
specification_version: 4
|
224
|
+
summary: Model-record pattern
|
225
|
+
test_files:
|
226
|
+
- test/helper.rb
|
227
|
+
- test/support/db.rb
|
228
|
+
- test/support/factory.rb
|
229
|
+
- test/support/factory/area.rb
|
230
|
+
- test/support/factory/comment.rb
|
231
|
+
- test/support/factory/image.rb
|
232
|
+
- test/support/factory/user.rb
|
233
|
+
- test/support/models/area.rb
|
234
|
+
- test/support/models/comment.rb
|
235
|
+
- test/support/models/image.rb
|
236
|
+
- test/support/models/user.rb
|
237
|
+
- test/support/read_model/querying.rb
|
238
|
+
- test/support/read_models/comment_with_user_data.rb
|
239
|
+
- test/support/read_models/set_data.rb
|
240
|
+
- test/support/read_models/subquery_data.rb
|
241
|
+
- test/support/read_models/user_with_area_data.rb
|
242
|
+
- test/support/schema.rb
|
243
|
+
- test/support/setup_test_db.rb
|
244
|
+
- test/system/factory/model_factory_tests.rb
|
245
|
+
- test/system/factory/model_stack_tests.rb
|
246
|
+
- test/system/factory/record_factory_tests.rb
|
247
|
+
- test/system/factory/record_stack_tests.rb
|
248
|
+
- test/system/factory_tests.rb
|
249
|
+
- test/system/read_model_tests.rb
|
250
|
+
- test/system/with_model_tests.rb
|
251
|
+
- test/unit/after_commit/fake_record_tests.rb
|
252
|
+
- test/unit/after_commit/record_procs_methods_tests.rb
|
253
|
+
- test/unit/after_commit/record_tests.rb
|
254
|
+
- test/unit/after_commit_tests.rb
|
255
|
+
- test/unit/factory/config_tests.rb
|
256
|
+
- test/unit/factory/model_factory_tests.rb
|
257
|
+
- test/unit/factory/model_stack_tests.rb
|
258
|
+
- test/unit/factory/read_model_factory_tests.rb
|
259
|
+
- test/unit/factory/record_factory_tests.rb
|
260
|
+
- test/unit/factory/record_stack_tests.rb
|
261
|
+
- test/unit/factory_tests.rb
|
262
|
+
- test/unit/fake_query_tests.rb
|
263
|
+
- test/unit/fake_record/associations_tests.rb
|
264
|
+
- test/unit/fake_record/attributes_tests.rb
|
265
|
+
- test/unit/fake_record/persistence_tests.rb
|
266
|
+
- test/unit/fake_record_tests.rb
|
267
|
+
- test/unit/json_field/fake_record_tests.rb
|
268
|
+
- test/unit/json_field/record_tests.rb
|
269
|
+
- test/unit/json_field_tests.rb
|
270
|
+
- test/unit/model/associations_tests.rb
|
271
|
+
- test/unit/model/configuration_tests.rb
|
272
|
+
- test/unit/model/fields_tests.rb
|
273
|
+
- test/unit/model/persistence_tests.rb
|
274
|
+
- test/unit/model_tests.rb
|
275
|
+
- test/unit/query_tests.rb
|
276
|
+
- test/unit/read_model/data_tests.rb
|
277
|
+
- test/unit/read_model/fields_tests.rb
|
278
|
+
- test/unit/read_model/query_expression_tests.rb
|
279
|
+
- test/unit/read_model/querying_tests.rb
|
280
|
+
- test/unit/read_model/set_querying_tests.rb
|
281
|
+
- test/unit/read_model/subquery_tests.rb
|
282
|
+
- test/unit/read_model_tests.rb
|
283
|
+
- test/unit/record_tests.rb
|
284
|
+
- test/unit/test_helpers_tests.rb
|
285
|
+
- test/unit/type_converter_tests.rb
|