with_model 2.1.6 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bundle/config +2 -0
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/ci.yml +21 -27
- data/.gitignore +1 -0
- data/.rspec +1 -1
- data/CHANGELOG.md +17 -0
- data/Gemfile +21 -14
- data/Rakefile +8 -24
- data/lib/with_model/constant_stubber.rb +1 -1
- data/lib/with_model/descendants_tracker.rb +87 -0
- data/lib/with_model/model.rb +12 -16
- data/lib/with_model/table.rb +6 -6
- data/lib/with_model/version.rb +1 -1
- data/lib/with_model.rb +27 -10
- data/spec/active_record_behaviors_spec.rb +28 -28
- data/spec/constant_stubber_spec.rb +7 -8
- data/spec/descendants_tracking_spec.rb +48 -0
- data/spec/readme_spec.rb +27 -27
- data/spec/spec_helper.rb +7 -19
- data/spec/with_model_spec.rb +119 -125
- data/test/test_helper.rb +7 -18
- data/test/with_model_test.rb +9 -9
- data/with_model.gemspec +15 -34
- metadata +11 -189
- data/.rubocop.yml +0 -30
- data/.rubocop_todo.yml +0 -78
- data/spec/.rubocop.yml +0 -5
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: with_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Case Commons, LLC
|
8
8
|
- Grant Hutchins
|
9
9
|
- Andrew Marshall
|
10
|
-
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2025-02-04 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: activerecord
|
@@ -18,182 +17,14 @@ dependencies:
|
|
18
17
|
requirements:
|
19
18
|
- - ">="
|
20
19
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
20
|
+
version: '7.0'
|
22
21
|
type: :runtime
|
23
22
|
prerelease: false
|
24
23
|
version_requirements: !ruby/object:Gem::Requirement
|
25
24
|
requirements:
|
26
25
|
- - ">="
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
29
|
-
- !ruby/object:Gem::Dependency
|
30
|
-
name: bundler
|
31
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
-
requirements:
|
33
|
-
- - ">="
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: '0'
|
36
|
-
type: :development
|
37
|
-
prerelease: false
|
38
|
-
version_requirements: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '0'
|
43
|
-
- !ruby/object:Gem::Dependency
|
44
|
-
name: minitest
|
45
|
-
requirement: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - ">="
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '0'
|
50
|
-
type: :development
|
51
|
-
prerelease: false
|
52
|
-
version_requirements: !ruby/object:Gem::Requirement
|
53
|
-
requirements:
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '0'
|
57
|
-
- !ruby/object:Gem::Dependency
|
58
|
-
name: pry
|
59
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
-
requirements:
|
61
|
-
- - ">="
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '0'
|
64
|
-
type: :development
|
65
|
-
prerelease: false
|
66
|
-
version_requirements: !ruby/object:Gem::Requirement
|
67
|
-
requirements:
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: rake
|
73
|
-
requirement: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
78
|
-
type: :development
|
79
|
-
prerelease: false
|
80
|
-
version_requirements: !ruby/object:Gem::Requirement
|
81
|
-
requirements:
|
82
|
-
- - ">="
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: '0'
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
name: rspec
|
87
|
-
requirement: !ruby/object:Gem::Requirement
|
88
|
-
requirements:
|
89
|
-
- - ">="
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: '0'
|
92
|
-
type: :development
|
93
|
-
prerelease: false
|
94
|
-
version_requirements: !ruby/object:Gem::Requirement
|
95
|
-
requirements:
|
96
|
-
- - ">="
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: '0'
|
99
|
-
- !ruby/object:Gem::Dependency
|
100
|
-
name: rubocop
|
101
|
-
requirement: !ruby/object:Gem::Requirement
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: '0'
|
106
|
-
type: :development
|
107
|
-
prerelease: false
|
108
|
-
version_requirements: !ruby/object:Gem::Requirement
|
109
|
-
requirements:
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: '0'
|
113
|
-
- !ruby/object:Gem::Dependency
|
114
|
-
name: rubocop-minitest
|
115
|
-
requirement: !ruby/object:Gem::Requirement
|
116
|
-
requirements:
|
117
|
-
- - ">="
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: '0'
|
120
|
-
type: :development
|
121
|
-
prerelease: false
|
122
|
-
version_requirements: !ruby/object:Gem::Requirement
|
123
|
-
requirements:
|
124
|
-
- - ">="
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: '0'
|
127
|
-
- !ruby/object:Gem::Dependency
|
128
|
-
name: rubocop-rake
|
129
|
-
requirement: !ruby/object:Gem::Requirement
|
130
|
-
requirements:
|
131
|
-
- - ">="
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: '0'
|
134
|
-
type: :development
|
135
|
-
prerelease: false
|
136
|
-
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
requirements:
|
138
|
-
- - ">="
|
139
|
-
- !ruby/object:Gem::Version
|
140
|
-
version: '0'
|
141
|
-
- !ruby/object:Gem::Dependency
|
142
|
-
name: rubocop-rspec
|
143
|
-
requirement: !ruby/object:Gem::Requirement
|
144
|
-
requirements:
|
145
|
-
- - ">="
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
version: '0'
|
148
|
-
type: :development
|
149
|
-
prerelease: false
|
150
|
-
version_requirements: !ruby/object:Gem::Requirement
|
151
|
-
requirements:
|
152
|
-
- - ">="
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
version: '0'
|
155
|
-
- !ruby/object:Gem::Dependency
|
156
|
-
name: simplecov
|
157
|
-
requirement: !ruby/object:Gem::Requirement
|
158
|
-
requirements:
|
159
|
-
- - ">="
|
160
|
-
- !ruby/object:Gem::Version
|
161
|
-
version: '0'
|
162
|
-
type: :development
|
163
|
-
prerelease: false
|
164
|
-
version_requirements: !ruby/object:Gem::Requirement
|
165
|
-
requirements:
|
166
|
-
- - ">="
|
167
|
-
- !ruby/object:Gem::Version
|
168
|
-
version: '0'
|
169
|
-
- !ruby/object:Gem::Dependency
|
170
|
-
name: yard
|
171
|
-
requirement: !ruby/object:Gem::Requirement
|
172
|
-
requirements:
|
173
|
-
- - ">="
|
174
|
-
- !ruby/object:Gem::Version
|
175
|
-
version: '0'
|
176
|
-
type: :development
|
177
|
-
prerelease: false
|
178
|
-
version_requirements: !ruby/object:Gem::Requirement
|
179
|
-
requirements:
|
180
|
-
- - ">="
|
181
|
-
- !ruby/object:Gem::Version
|
182
|
-
version: '0'
|
183
|
-
- !ruby/object:Gem::Dependency
|
184
|
-
name: sqlite3
|
185
|
-
requirement: !ruby/object:Gem::Requirement
|
186
|
-
requirements:
|
187
|
-
- - ">="
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version: '0'
|
190
|
-
type: :development
|
191
|
-
prerelease: false
|
192
|
-
version_requirements: !ruby/object:Gem::Requirement
|
193
|
-
requirements:
|
194
|
-
- - ">="
|
195
|
-
- !ruby/object:Gem::Version
|
196
|
-
version: '0'
|
27
|
+
version: '7.0'
|
197
28
|
description: Dynamically build a model within an RSpec context
|
198
29
|
email:
|
199
30
|
- casecommons-dev@googlegroups.com
|
@@ -203,12 +34,12 @@ executables: []
|
|
203
34
|
extensions: []
|
204
35
|
extra_rdoc_files: []
|
205
36
|
files:
|
37
|
+
- ".bundle/config"
|
38
|
+
- ".github/dependabot.yml"
|
206
39
|
- ".github/workflows/ci.yml"
|
207
40
|
- ".gitignore"
|
208
41
|
- ".jrubyrc"
|
209
42
|
- ".rspec"
|
210
|
-
- ".rubocop.yml"
|
211
|
-
- ".rubocop_todo.yml"
|
212
43
|
- ".yardopts"
|
213
44
|
- CHANGELOG.md
|
214
45
|
- Gemfile
|
@@ -217,14 +48,15 @@ files:
|
|
217
48
|
- Rakefile
|
218
49
|
- lib/with_model.rb
|
219
50
|
- lib/with_model/constant_stubber.rb
|
51
|
+
- lib/with_model/descendants_tracker.rb
|
220
52
|
- lib/with_model/methods.rb
|
221
53
|
- lib/with_model/model.rb
|
222
54
|
- lib/with_model/model/dsl.rb
|
223
55
|
- lib/with_model/table.rb
|
224
56
|
- lib/with_model/version.rb
|
225
|
-
- spec/.rubocop.yml
|
226
57
|
- spec/active_record_behaviors_spec.rb
|
227
58
|
- spec/constant_stubber_spec.rb
|
59
|
+
- spec/descendants_tracking_spec.rb
|
228
60
|
- spec/readme_spec.rb
|
229
61
|
- spec/spec_helper.rb
|
230
62
|
- spec/with_model_spec.rb
|
@@ -236,7 +68,6 @@ licenses:
|
|
236
68
|
- MIT
|
237
69
|
metadata:
|
238
70
|
rubygems_mfa_required: 'true'
|
239
|
-
post_install_message:
|
240
71
|
rdoc_options: []
|
241
72
|
require_paths:
|
242
73
|
- lib
|
@@ -244,23 +75,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
244
75
|
requirements:
|
245
76
|
- - ">="
|
246
77
|
- !ruby/object:Gem::Version
|
247
|
-
version: '
|
78
|
+
version: '3.1'
|
248
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
249
80
|
requirements:
|
250
81
|
- - ">="
|
251
82
|
- !ruby/object:Gem::Version
|
252
83
|
version: '0'
|
253
84
|
requirements: []
|
254
|
-
rubygems_version: 3.
|
255
|
-
signing_key:
|
85
|
+
rubygems_version: 3.6.3
|
256
86
|
specification_version: 4
|
257
87
|
summary: Dynamically build a model within an RSpec context
|
258
|
-
test_files:
|
259
|
-
- spec/.rubocop.yml
|
260
|
-
- spec/active_record_behaviors_spec.rb
|
261
|
-
- spec/constant_stubber_spec.rb
|
262
|
-
- spec/readme_spec.rb
|
263
|
-
- spec/spec_helper.rb
|
264
|
-
- spec/with_model_spec.rb
|
265
|
-
- test/test_helper.rb
|
266
|
-
- test/with_model_test.rb
|
88
|
+
test_files: []
|
data/.rubocop.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
2
|
-
|
3
|
-
require:
|
4
|
-
- rubocop-rake
|
5
|
-
- rubocop-rspec
|
6
|
-
- rubocop-minitest
|
7
|
-
|
8
|
-
AllCops:
|
9
|
-
NewCops: enable
|
10
|
-
TargetRubyVersion: 2.6
|
11
|
-
|
12
|
-
Metrics/BlockLength:
|
13
|
-
Exclude:
|
14
|
-
- 'spec/**/*'
|
15
|
-
- 'with_model.gemspec'
|
16
|
-
|
17
|
-
Bundler/OrderedGems:
|
18
|
-
Enabled: false
|
19
|
-
|
20
|
-
Bundler/DuplicatedGem:
|
21
|
-
Enabled: false
|
22
|
-
|
23
|
-
RSpec/Be:
|
24
|
-
Enabled: false
|
25
|
-
|
26
|
-
RSpec/BeforeAfterAll:
|
27
|
-
Enabled: false
|
28
|
-
|
29
|
-
Style/Documentation:
|
30
|
-
Enabled: false
|
data/.rubocop_todo.yml
DELETED
@@ -1,78 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-11-22 01:30:26 UTC using RuboCop version 1.3.1.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 6
|
10
|
-
# Configuration parameters: Prefixes.
|
11
|
-
# Prefixes: when, with, without
|
12
|
-
RSpec/ContextWording:
|
13
|
-
Exclude:
|
14
|
-
- 'spec/active_record_behaviors_spec.rb'
|
15
|
-
- 'spec/with_model_spec.rb'
|
16
|
-
|
17
|
-
# Offense count: 6
|
18
|
-
# Configuration parameters: IgnoredMetadata.
|
19
|
-
RSpec/DescribeClass:
|
20
|
-
Exclude:
|
21
|
-
- 'spec/active_record_behaviors_spec.rb'
|
22
|
-
- 'spec/readme_spec.rb'
|
23
|
-
- 'spec/with_model_spec.rb'
|
24
|
-
|
25
|
-
# Offense count: 5
|
26
|
-
# Configuration parameters: Max.
|
27
|
-
RSpec/ExampleLength:
|
28
|
-
Exclude:
|
29
|
-
- 'spec/active_record_behaviors_spec.rb'
|
30
|
-
- 'spec/readme_spec.rb'
|
31
|
-
- 'spec/with_model_spec.rb'
|
32
|
-
|
33
|
-
# Offense count: 7
|
34
|
-
# Configuration parameters: AssignmentOnly.
|
35
|
-
RSpec/InstanceVariable:
|
36
|
-
Exclude:
|
37
|
-
- 'spec/active_record_behaviors_spec.rb'
|
38
|
-
|
39
|
-
# Offense count: 2
|
40
|
-
RSpec/LeakyConstantDeclaration:
|
41
|
-
Exclude:
|
42
|
-
- 'spec/readme_spec.rb'
|
43
|
-
- 'spec/with_model_spec.rb'
|
44
|
-
|
45
|
-
# Offense count: 2
|
46
|
-
# Configuration parameters: .
|
47
|
-
# SupportedStyles: have_received, receive
|
48
|
-
RSpec/MessageSpies:
|
49
|
-
EnforcedStyle: receive
|
50
|
-
|
51
|
-
# Offense count: 1
|
52
|
-
RSpec/MultipleDescribes:
|
53
|
-
Exclude:
|
54
|
-
- 'spec/readme_spec.rb'
|
55
|
-
|
56
|
-
# Offense count: 13
|
57
|
-
RSpec/MultipleExpectations:
|
58
|
-
Max: 5
|
59
|
-
|
60
|
-
# Offense count: 4
|
61
|
-
# Configuration parameters: IgnoreSharedExamples.
|
62
|
-
RSpec/NamedSubject:
|
63
|
-
Exclude:
|
64
|
-
- 'spec/with_model_spec.rb'
|
65
|
-
|
66
|
-
# Offense count: 2
|
67
|
-
RSpec/NestedGroups:
|
68
|
-
Max: 4
|
69
|
-
|
70
|
-
# Offense count: 4
|
71
|
-
RSpec/RepeatedExample:
|
72
|
-
Exclude:
|
73
|
-
- 'spec/with_model_spec.rb'
|
74
|
-
|
75
|
-
# Offense count: 2
|
76
|
-
RSpec/SubjectStub:
|
77
|
-
Exclude:
|
78
|
-
- 'spec/with_model_spec.rb'
|