inquery 1.0.9 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rubocop.yml +17 -0
  3. data/.github/workflows/ruby.yml +53 -0
  4. data/.gitignore +2 -1
  5. data/.releaser_config +0 -1
  6. data/.rubocop.yml +4 -0
  7. data/Appraisals +19 -0
  8. data/CHANGELOG.md +13 -1
  9. data/LICENSE +1 -1
  10. data/README.md +23 -6
  11. data/RUBY_VERSION +1 -1
  12. data/Rakefile +4 -4
  13. data/VERSION +1 -1
  14. data/doc/Inquery/Exceptions/Base.html +3 -3
  15. data/doc/Inquery/Exceptions/InvalidRelation.html +3 -3
  16. data/doc/Inquery/Exceptions/UnknownCallSignature.html +3 -3
  17. data/doc/Inquery/Exceptions.html +3 -3
  18. data/doc/Inquery/Mixins/RawSqlUtils.html +3 -3
  19. data/doc/Inquery/Mixins/RelationValidation/ClassMethods.html +3 -3
  20. data/doc/Inquery/Mixins/RelationValidation.html +3 -3
  21. data/doc/Inquery/Mixins/SchemaValidation/ClassMethods.html +19 -5
  22. data/doc/Inquery/Mixins/SchemaValidation.html +3 -3
  23. data/doc/Inquery/Mixins.html +3 -3
  24. data/doc/Inquery/Query/Chainable.html +3 -3
  25. data/doc/Inquery/Query.html +3 -3
  26. data/doc/Inquery.html +115 -3
  27. data/doc/_index.html +8 -8
  28. data/doc/file.README.html +25 -9
  29. data/doc/frames.html +1 -1
  30. data/doc/index.html +25 -9
  31. data/doc/method_list.html +23 -15
  32. data/doc/top-level-namespace.html +3 -3
  33. data/gemfiles/rails_5.1.gemfile +7 -0
  34. data/gemfiles/rails_5.2.gemfile +7 -0
  35. data/gemfiles/rails_6.0.gemfile +7 -0
  36. data/gemfiles/rails_6.1.gemfile +7 -0
  37. data/gemfiles/rails_7.0.gemfile +7 -0
  38. data/inquery.gemspec +20 -32
  39. data/lib/inquery/mixins/schema_validation.rb +8 -1
  40. data/lib/inquery.rb +8 -0
  41. metadata +20 -13
  42. data/.travis.yml +0 -10
data/doc/Inquery.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Inquery
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.27
10
10
 
11
11
  </title>
12
12
 
@@ -104,14 +104,126 @@
104
104
 
105
105
 
106
106
 
107
+
108
+ <h2>
109
+ Class Method Summary
110
+ <small><a href="#" class="summary_toggle">collapse</a></small>
111
+ </h2>
112
+
113
+ <ul class="summary">
114
+
115
+ <li class="public ">
116
+ <span class="summary_signature">
117
+
118
+ <a href="#setup-class_method" title="setup (class method)">.<strong>setup</strong> {|_self| ... } &#x21d2; Object </a>
119
+
120
+
121
+
122
+ </span>
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ <span class="summary_desc"><div class='inline'><p>Setup method that should be called in a dedicated initializer.</p>
133
+ </div></span>
134
+
135
+ </li>
136
+
137
+
138
+ </ul>
139
+
140
+
141
+
107
142
 
143
+ <div id="class_method_details" class="method_details_list">
144
+ <h2>Class Method Details</h2>
145
+
146
+
147
+ <div class="method_details first">
148
+ <h3 class="signature first" id="setup-class_method">
149
+
150
+ .<strong>setup</strong> {|_self| ... } &#x21d2; <tt>Object</tt>
151
+
152
+
153
+
154
+
155
+
156
+ </h3><div class="docstring">
157
+ <div class="discussion">
158
+ <p>Setup method that should be called in a dedicated initializer.</p>
159
+
160
+
161
+ </div>
162
+ </div>
163
+ <div class="tags">
164
+
165
+ <p class="tag_title">Yields:</p>
166
+ <ul class="yield">
167
+
168
+ <li>
169
+
170
+
171
+ <span class='type'>(<tt>_self</tt>)</span>
172
+
173
+
174
+
175
+ </li>
176
+
177
+ </ul>
178
+ <p class="tag_title">Yield Parameters:</p>
179
+ <ul class="yieldparam">
180
+
181
+ <li>
182
+
183
+ <span class='name'>_self</span>
184
+
185
+
186
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Inquery (module)">Inquery</a></span></tt>)</span>
187
+
188
+
189
+
190
+ &mdash;
191
+ <div class='inline'><p>the object that the method was called on</p>
192
+ </div>
193
+
194
+ </li>
195
+
196
+ </ul>
197
+
198
+ </div><table class="source_code">
199
+ <tr>
200
+ <td>
201
+ <pre class="lines">
202
+
203
+
204
+ 6
205
+ 7
206
+ 8</pre>
207
+ </td>
208
+ <td>
209
+ <pre class="code"><span class="info file"># File 'lib/inquery.rb', line 6</span>
210
+
211
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
212
+ <span class='kw'>yield</span> <span class='kw'>self</span>
213
+ <span class='kw'>end</span></pre>
214
+ </td>
215
+ </tr>
216
+ </table>
217
+ </div>
218
+
219
+ </div>
108
220
 
109
221
  </div>
110
222
 
111
223
  <div id="footer">
112
- Generated on Wed Feb 24 10:57:42 2021 by
224
+ Generated on Thu Aug 24 11:11:23 2023 by
113
225
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
114
- 0.9.26 (ruby-2.6.2).
226
+ 0.9.27 (ruby-3.0.1).
115
227
  </div>
116
228
 
117
229
  </div>
data/doc/_index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>
7
- Documentation by YARD 0.9.26
7
+ Documentation by YARD 0.9.27
8
8
 
9
9
  </title>
10
10
 
@@ -52,7 +52,7 @@
52
52
  <div class="clear"></div>
53
53
  </div>
54
54
 
55
- <div id="content"><h1 class="noborder title">Documentation by YARD 0.9.26</h1>
55
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.9.27</h1>
56
56
  <div id="listing">
57
57
  <h1 class="alphaindex">Alphabetic Index</h1>
58
58
 
@@ -103,16 +103,16 @@
103
103
  </li>
104
104
 
105
105
  <li>
106
- <span class='object_link'><a href="Inquery/Mixins/SchemaValidation/ClassMethods.html" title="Inquery::Mixins::SchemaValidation::ClassMethods (module)">ClassMethods</a></span>
106
+ <span class='object_link'><a href="Inquery/Mixins/RelationValidation/ClassMethods.html" title="Inquery::Mixins::RelationValidation::ClassMethods (module)">ClassMethods</a></span>
107
107
 
108
- <small>(Inquery::Mixins::SchemaValidation)</small>
108
+ <small>(Inquery::Mixins::RelationValidation)</small>
109
109
 
110
110
  </li>
111
111
 
112
112
  <li>
113
- <span class='object_link'><a href="Inquery/Mixins/RelationValidation/ClassMethods.html" title="Inquery::Mixins::RelationValidation::ClassMethods (module)">ClassMethods</a></span>
113
+ <span class='object_link'><a href="Inquery/Mixins/SchemaValidation/ClassMethods.html" title="Inquery::Mixins::SchemaValidation::ClassMethods (module)">ClassMethods</a></span>
114
114
 
115
- <small>(Inquery::Mixins::RelationValidation)</small>
115
+ <small>(Inquery::Mixins::SchemaValidation)</small>
116
116
 
117
117
  </li>
118
118
 
@@ -248,9 +248,9 @@
248
248
  </div>
249
249
 
250
250
  <div id="footer">
251
- Generated on Wed Feb 24 10:57:42 2021 by
251
+ Generated on Thu Aug 24 11:11:23 2023 by
252
252
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
253
- 0.9.26 (ruby-2.6.2).
253
+ 0.9.27 (ruby-3.0.1).
254
254
  </div>
255
255
 
256
256
  </div>
data/doc/file.README.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.27
10
10
 
11
11
  </title>
12
12
 
@@ -57,7 +57,8 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
- <div id="content"><div id='filecontents'><p><a href="https://travis-ci.org/sitrox/inquery"><img src="https://travis-ci.org/sitrox/inquery.svg?branch=master" alt="Build Status"></a>
60
+ <div id="content"><div id='filecontents'><p><a href="https://github.com/sitrox/inquery/actions/workflows/ruby.yml"><img src="https://github.com/sitrox/inquery/actions/workflows/ruby.yml/badge.svg" alt="Unit tests"></a>
61
+ <a href="https://github.com/sitrox/inquery/actions/workflows/rubocop.yml"><img src="https://github.com/sitrox/inquery/actions/workflows/rubocop.yml/badge.svg" alt="Rubocop check"></a>
61
62
  <a href="https://badge.fury.io/rb/inquery"><img src="https://badge.fury.io/rb/inquery.svg" alt="Gem Version"></a></p>
62
63
 
63
64
  <h1 id="inquery">Inquery</h1>
@@ -85,10 +86,11 @@ to your <code>Gemfile</code>:</p>
85
86
  <li>2.5.1</li>
86
87
  <li>2.6.2</li>
87
88
  <li>2.7.1</li>
88
- <li>3.0.0</li>
89
+ <li>3.0.1</li>
90
+ <li>3.2.1</li>
89
91
  </ul>
90
92
 
91
- <p>Other ruby versions might work but are not covered by our Travis tests.</p>
93
+ <p>Other ruby versions might work but are not covered by our automated tests.</p>
92
94
 
93
95
  <h2 id="basic-usage">Basic usage</h2>
94
96
 
@@ -342,7 +344,9 @@ access.</p>
342
344
  </code></pre>
343
345
 
344
346
  <p>Inquery supports both schemacop specification versions 2 and 3 using the methods
345
- <code>schema</code> / <code>schema2</code> for version 2 and method <code>schema3</code> for version 3.</p>
347
+ <code>schema2</code> for version 2 and method <code>schema3</code> for version 3. You can also use the
348
+ method <code>schema</code>, which defaults to the schema version configured using
349
+ <code>config.default_schema_version</code> (see <a href="#Configuration">Configuration</a>).</p>
346
350
 
347
351
  <h2 id="rails-integration">Rails integration</h2>
348
352
 
@@ -351,6 +355,17 @@ perfectly integrated into any Rails application. It has proven to be a winning
351
355
  concept to extract all complex queries into separate classes that are
352
356
  independently executable and testable.</p>
353
357
 
358
+ <h2 id="configuration">Configuration</h2>
359
+
360
+ <p>Inquery can be configured globally using an optional initializer:</p>
361
+
362
+ <pre class="code ruby"><code class="ruby"><span class='comment'># config/initializers/inquery.rb
363
+ </span><span class='const'><span class='object_link'><a href="Inquery.html" title="Inquery (module)">Inquery</a></span></span><span class='period'>.</span><span class='id identifier rubyid_setup'><span class='object_link'><a href="Inquery.html#setup-class_method" title="Inquery.setup (method)">setup</a></span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_config'>config</span><span class='op'>|</span>
364
+ <span class='comment'># Specify the default schemacop schema version. Can be one of 2 or 3.
365
+ </span> <span class='comment'># config.default_schema_version = 2
366
+ </span><span class='kw'>end</span>
367
+ </code></pre>
368
+
354
369
  <h3 id="directory-structure">Directory structure</h3>
355
370
 
356
371
  <p>While not enforced, it is encouraged to use the following structure for storing
@@ -382,17 +397,18 @@ query classes.</li>
382
397
  <h2 id="contributors">Contributors</h2>
383
398
 
384
399
  <p>Thanks to Jeroen Weeink for his insights regarding using query classes as scopes
385
- in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-scopes.html">blog post</a>.</p>
400
+ in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-scopes.html">blog
401
+ post</a>.</p>
386
402
 
387
403
  <h2 id="copyright">Copyright</h2>
388
404
 
389
- <p>Copyright © 2016 - 2021 Sitrox. See <code>LICENSE</code> for further details.</p>
405
+ <p>Copyright © 2016 - 2023 Sitrox. See <code>LICENSE</code> for further details.</p>
390
406
  </div></div>
391
407
 
392
408
  <div id="footer">
393
- Generated on Wed Feb 24 10:57:42 2021 by
409
+ Generated on Thu Aug 24 11:11:23 2023 by
394
410
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
395
- 0.9.26 (ruby-2.6.2).
411
+ 0.9.27 (ruby-3.0.1).
396
412
  </div>
397
413
 
398
414
  </div>
data/doc/frames.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Documentation by YARD 0.9.26</title>
5
+ <title>Documentation by YARD 0.9.27</title>
6
6
  </head>
7
7
  <script type="text/javascript">
8
8
  var match = unescape(window.location.hash).match(/^#!(.+)/);
data/doc/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.27
10
10
 
11
11
  </title>
12
12
 
@@ -57,7 +57,8 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
- <div id="content"><div id='filecontents'><p><a href="https://travis-ci.org/sitrox/inquery"><img src="https://travis-ci.org/sitrox/inquery.svg?branch=master" alt="Build Status"></a>
60
+ <div id="content"><div id='filecontents'><p><a href="https://github.com/sitrox/inquery/actions/workflows/ruby.yml"><img src="https://github.com/sitrox/inquery/actions/workflows/ruby.yml/badge.svg" alt="Unit tests"></a>
61
+ <a href="https://github.com/sitrox/inquery/actions/workflows/rubocop.yml"><img src="https://github.com/sitrox/inquery/actions/workflows/rubocop.yml/badge.svg" alt="Rubocop check"></a>
61
62
  <a href="https://badge.fury.io/rb/inquery"><img src="https://badge.fury.io/rb/inquery.svg" alt="Gem Version"></a></p>
62
63
 
63
64
  <h1 id="inquery">Inquery</h1>
@@ -85,10 +86,11 @@ to your <code>Gemfile</code>:</p>
85
86
  <li>2.5.1</li>
86
87
  <li>2.6.2</li>
87
88
  <li>2.7.1</li>
88
- <li>3.0.0</li>
89
+ <li>3.0.1</li>
90
+ <li>3.2.1</li>
89
91
  </ul>
90
92
 
91
- <p>Other ruby versions might work but are not covered by our Travis tests.</p>
93
+ <p>Other ruby versions might work but are not covered by our automated tests.</p>
92
94
 
93
95
  <h2 id="basic-usage">Basic usage</h2>
94
96
 
@@ -342,7 +344,9 @@ access.</p>
342
344
  </code></pre>
343
345
 
344
346
  <p>Inquery supports both schemacop specification versions 2 and 3 using the methods
345
- <code>schema</code> / <code>schema2</code> for version 2 and method <code>schema3</code> for version 3.</p>
347
+ <code>schema2</code> for version 2 and method <code>schema3</code> for version 3. You can also use the
348
+ method <code>schema</code>, which defaults to the schema version configured using
349
+ <code>config.default_schema_version</code> (see <a href="#Configuration">Configuration</a>).</p>
346
350
 
347
351
  <h2 id="rails-integration">Rails integration</h2>
348
352
 
@@ -351,6 +355,17 @@ perfectly integrated into any Rails application. It has proven to be a winning
351
355
  concept to extract all complex queries into separate classes that are
352
356
  independently executable and testable.</p>
353
357
 
358
+ <h2 id="configuration">Configuration</h2>
359
+
360
+ <p>Inquery can be configured globally using an optional initializer:</p>
361
+
362
+ <pre class="code ruby"><code class="ruby"><span class='comment'># config/initializers/inquery.rb
363
+ </span><span class='const'><span class='object_link'><a href="Inquery.html" title="Inquery (module)">Inquery</a></span></span><span class='period'>.</span><span class='id identifier rubyid_setup'><span class='object_link'><a href="Inquery.html#setup-class_method" title="Inquery.setup (method)">setup</a></span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_config'>config</span><span class='op'>|</span>
364
+ <span class='comment'># Specify the default schemacop schema version. Can be one of 2 or 3.
365
+ </span> <span class='comment'># config.default_schema_version = 2
366
+ </span><span class='kw'>end</span>
367
+ </code></pre>
368
+
354
369
  <h3 id="directory-structure">Directory structure</h3>
355
370
 
356
371
  <p>While not enforced, it is encouraged to use the following structure for storing
@@ -382,17 +397,18 @@ query classes.</li>
382
397
  <h2 id="contributors">Contributors</h2>
383
398
 
384
399
  <p>Thanks to Jeroen Weeink for his insights regarding using query classes as scopes
385
- in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-scopes.html">blog post</a>.</p>
400
+ in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-scopes.html">blog
401
+ post</a>.</p>
386
402
 
387
403
  <h2 id="copyright">Copyright</h2>
388
404
 
389
- <p>Copyright © 2016 - 2021 Sitrox. See <code>LICENSE</code> for further details.</p>
405
+ <p>Copyright © 2016 - 2023 Sitrox. See <code>LICENSE</code> for further details.</p>
390
406
  </div></div>
391
407
 
392
408
  <div id="footer">
393
- Generated on Wed Feb 24 10:57:42 2021 by
409
+ Generated on Thu Aug 24 11:11:23 2023 by
394
410
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
395
- 0.9.26 (ruby-2.6.2).
411
+ 0.9.27 (ruby-3.0.1).
396
412
  </div>
397
413
 
398
414
  </div>
data/doc/method_list.html CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  <li class="odd ">
48
48
  <div class="item">
49
- <span class='object_link'><a href="Inquery/Query.html#call-class_method" title="Inquery::Query.call (method)">call</a></span>
49
+ <span class='object_link'><a href="Inquery/Query.html#call-instance_method" title="Inquery::Query#call (method)">#call</a></span>
50
50
  <small>Inquery::Query</small>
51
51
  </div>
52
52
  </li>
@@ -54,8 +54,8 @@
54
54
 
55
55
  <li class="even ">
56
56
  <div class="item">
57
- <span class='object_link'><a href="Inquery/Query.html#call-instance_method" title="Inquery::Query#call (method)">#call</a></span>
58
- <small>Inquery::Query</small>
57
+ <span class='object_link'><a href="Inquery/Query/Chainable.html#call-instance_method" title="Inquery::Query::Chainable#call (method)">#call</a></span>
58
+ <small>Inquery::Query::Chainable</small>
59
59
  </div>
60
60
  </li>
61
61
 
@@ -70,8 +70,8 @@
70
70
 
71
71
  <li class="even ">
72
72
  <div class="item">
73
- <span class='object_link'><a href="Inquery/Query/Chainable.html#call-instance_method" title="Inquery::Query::Chainable#call (method)">#call</a></span>
74
- <small>Inquery::Query::Chainable</small>
73
+ <span class='object_link'><a href="Inquery/Query.html#call-class_method" title="Inquery::Query.call (method)">call</a></span>
74
+ <small>Inquery::Query</small>
75
75
  </div>
76
76
  </li>
77
77
 
@@ -94,16 +94,16 @@
94
94
 
95
95
  <li class="odd ">
96
96
  <div class="item">
97
- <span class='object_link'><a href="Inquery/Query.html#initialize-instance_method" title="Inquery::Query#initialize (method)">#initialize</a></span>
98
- <small>Inquery::Query</small>
97
+ <span class='object_link'><a href="Inquery/Query/Chainable.html#initialize-instance_method" title="Inquery::Query::Chainable#initialize (method)">#initialize</a></span>
98
+ <small>Inquery::Query::Chainable</small>
99
99
  </div>
100
100
  </li>
101
101
 
102
102
 
103
103
  <li class="even ">
104
104
  <div class="item">
105
- <span class='object_link'><a href="Inquery/Query/Chainable.html#initialize-instance_method" title="Inquery::Query::Chainable#initialize (method)">#initialize</a></span>
106
- <small>Inquery::Query::Chainable</small>
105
+ <span class='object_link'><a href="Inquery/Query.html#initialize-instance_method" title="Inquery::Query#initialize (method)">#initialize</a></span>
106
+ <small>Inquery::Query</small>
107
107
  </div>
108
108
  </li>
109
109
 
@@ -134,23 +134,23 @@
134
134
 
135
135
  <li class="even ">
136
136
  <div class="item">
137
- <span class='object_link'><a href="Inquery/Query/Chainable.html#relation-instance_method" title="Inquery::Query::Chainable#relation (method)">#relation</a></span>
138
- <small>Inquery::Query::Chainable</small>
137
+ <span class='object_link'><a href="Inquery/Mixins/RelationValidation/ClassMethods.html#relation-instance_method" title="Inquery::Mixins::RelationValidation::ClassMethods#relation (method)">#relation</a></span>
138
+ <small>Inquery::Mixins::RelationValidation::ClassMethods</small>
139
139
  </div>
140
140
  </li>
141
141
 
142
142
 
143
143
  <li class="odd ">
144
144
  <div class="item">
145
- <span class='object_link'><a href="Inquery/Mixins/RelationValidation/ClassMethods.html#relation-instance_method" title="Inquery::Mixins::RelationValidation::ClassMethods#relation (method)">#relation</a></span>
146
- <small>Inquery::Mixins::RelationValidation::ClassMethods</small>
145
+ <span class='object_link'><a href="Inquery/Query/Chainable.html#relation-instance_method" title="Inquery::Query::Chainable#relation (method)">#relation</a></span>
146
+ <small>Inquery::Query::Chainable</small>
147
147
  </div>
148
148
  </li>
149
149
 
150
150
 
151
151
  <li class="even ">
152
152
  <div class="item">
153
- <span class='object_link'><a href="Inquery/Query.html#run-class_method" title="Inquery::Query.run (method)">run</a></span>
153
+ <span class='object_link'><a href="Inquery/Query.html#run-instance_method" title="Inquery::Query#run (method)">#run</a></span>
154
154
  <small>Inquery::Query</small>
155
155
  </div>
156
156
  </li>
@@ -158,7 +158,7 @@
158
158
 
159
159
  <li class="odd ">
160
160
  <div class="item">
161
- <span class='object_link'><a href="Inquery/Query.html#run-instance_method" title="Inquery::Query#run (method)">#run</a></span>
161
+ <span class='object_link'><a href="Inquery/Query.html#run-class_method" title="Inquery::Query.run (method)">run</a></span>
162
162
  <small>Inquery::Query</small>
163
163
  </div>
164
164
  </li>
@@ -189,6 +189,14 @@
189
189
 
190
190
 
191
191
  <li class="odd ">
192
+ <div class="item">
193
+ <span class='object_link'><a href="Inquery.html#setup-class_method" title="Inquery.setup (method)">setup</a></span>
194
+ <small>Inquery</small>
195
+ </div>
196
+ </li>
197
+
198
+
199
+ <li class="even ">
192
200
  <div class="item">
193
201
  <span class='object_link'><a href="Inquery/Mixins/RelationValidation.html#validate_relation!-instance_method" title="Inquery::Mixins::RelationValidation#validate_relation! (method)">#validate_relation!</a></span>
194
202
  <small>Inquery::Mixins::RelationValidation</small>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.27
10
10
 
11
11
  </title>
12
12
 
@@ -100,9 +100,9 @@
100
100
  </div>
101
101
 
102
102
  <div id="footer">
103
- Generated on Wed Feb 24 10:57:42 2021 by
103
+ Generated on Thu Aug 24 11:11:23 2023 by
104
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.9.26 (ruby-2.6.2).
105
+ 0.9.27 (ruby-3.0.1).
106
106
  </div>
107
107
 
108
108
  </div>
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'rails', '~> 5.1.7'
6
+
7
+ gemspec path: '../'
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'rails', '~> 5.2.6'
6
+
7
+ gemspec path: '../'
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'rails', '~> 6.0.4'
6
+
7
+ gemspec path: '../'
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'rails', '~> 6.1.4'
6
+
7
+ gemspec path: '../'
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'rails', '~> 7.0.1'
6
+
7
+ gemspec path: '../'
data/inquery.gemspec CHANGED
@@ -1,54 +1,42 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: inquery 1.0.9 ruby lib
2
+ # stub: inquery 1.0.11 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "inquery".freeze
6
- s.version = "1.0.9"
6
+ s.version = "1.0.11"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Sitrox".freeze]
11
- s.date = "2021-02-24"
12
- s.files = [".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".travis.yml".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "doc/Inquery.html".freeze, "doc/Inquery/Exceptions.html".freeze, "doc/Inquery/Exceptions/Base.html".freeze, "doc/Inquery/Exceptions/InvalidRelation.html".freeze, "doc/Inquery/Exceptions/UnknownCallSignature.html".freeze, "doc/Inquery/Mixins.html".freeze, "doc/Inquery/Mixins/RawSqlUtils.html".freeze, "doc/Inquery/Mixins/RelationValidation.html".freeze, "doc/Inquery/Mixins/RelationValidation/ClassMethods.html".freeze, "doc/Inquery/Mixins/SchemaValidation.html".freeze, "doc/Inquery/Mixins/SchemaValidation/ClassMethods.html".freeze, "doc/Inquery/Query.html".freeze, "doc/Inquery/Query/Chainable.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "inquery.gemspec".freeze, "lib/inquery.rb".freeze, "lib/inquery/exceptions.rb".freeze, "lib/inquery/mixins/raw_sql_utils.rb".freeze, "lib/inquery/mixins/relation_validation.rb".freeze, "lib/inquery/mixins/schema_validation.rb".freeze, "lib/inquery/query.rb".freeze, "lib/inquery/query/chainable.rb".freeze, "test/db/models.rb".freeze, "test/db/schema.rb".freeze, "test/inquery/query/chainable_test.rb".freeze, "test/inquery/query_test.rb".freeze, "test/queries/group/fetch_as_json.rb".freeze, "test/queries/group/fetch_green.rb".freeze, "test/queries/group/fetch_red.rb".freeze, "test/queries/group/filter_with_color.rb".freeze, "test/queries/user/fetch_all.rb".freeze, "test/queries/user/fetch_in_group.rb".freeze, "test/queries/user/fetch_in_group_rel.rb".freeze, "test/test_helper.rb".freeze]
13
- s.rubygems_version = "3.0.3".freeze
11
+ s.date = "2023-08-24"
12
+ s.files = [".github/workflows/rubocop.yml".freeze, ".github/workflows/ruby.yml".freeze, ".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".yardopts".freeze, "Appraisals".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "doc/Inquery.html".freeze, "doc/Inquery/Exceptions.html".freeze, "doc/Inquery/Exceptions/Base.html".freeze, "doc/Inquery/Exceptions/InvalidRelation.html".freeze, "doc/Inquery/Exceptions/UnknownCallSignature.html".freeze, "doc/Inquery/Mixins.html".freeze, "doc/Inquery/Mixins/RawSqlUtils.html".freeze, "doc/Inquery/Mixins/RelationValidation.html".freeze, "doc/Inquery/Mixins/RelationValidation/ClassMethods.html".freeze, "doc/Inquery/Mixins/SchemaValidation.html".freeze, "doc/Inquery/Mixins/SchemaValidation/ClassMethods.html".freeze, "doc/Inquery/Query.html".freeze, "doc/Inquery/Query/Chainable.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "gemfiles/rails_5.1.gemfile".freeze, "gemfiles/rails_5.2.gemfile".freeze, "gemfiles/rails_6.0.gemfile".freeze, "gemfiles/rails_6.1.gemfile".freeze, "gemfiles/rails_7.0.gemfile".freeze, "inquery.gemspec".freeze, "lib/inquery.rb".freeze, "lib/inquery/exceptions.rb".freeze, "lib/inquery/mixins/raw_sql_utils.rb".freeze, "lib/inquery/mixins/relation_validation.rb".freeze, "lib/inquery/mixins/schema_validation.rb".freeze, "lib/inquery/query.rb".freeze, "lib/inquery/query/chainable.rb".freeze, "test/db/models.rb".freeze, "test/db/schema.rb".freeze, "test/inquery/query/chainable_test.rb".freeze, "test/inquery/query_test.rb".freeze, "test/queries/group/fetch_as_json.rb".freeze, "test/queries/group/fetch_green.rb".freeze, "test/queries/group/fetch_red.rb".freeze, "test/queries/group/filter_with_color.rb".freeze, "test/queries/user/fetch_all.rb".freeze, "test/queries/user/fetch_in_group.rb".freeze, "test/queries/user/fetch_in_group_rel.rb".freeze, "test/test_helper.rb".freeze]
13
+ s.rubygems_version = "3.2.16".freeze
14
14
  s.summary = "A skeleton that allows extracting queries into atomic, reusable classes.".freeze
15
15
  s.test_files = ["test/db/models.rb".freeze, "test/db/schema.rb".freeze, "test/inquery/query/chainable_test.rb".freeze, "test/inquery/query_test.rb".freeze, "test/queries/group/fetch_as_json.rb".freeze, "test/queries/group/fetch_green.rb".freeze, "test/queries/group/fetch_red.rb".freeze, "test/queries/group/filter_with_color.rb".freeze, "test/queries/user/fetch_all.rb".freeze, "test/queries/user/fetch_in_group.rb".freeze, "test/queries/user/fetch_in_group_rel.rb".freeze, "test/test_helper.rb".freeze]
16
16
 
17
17
  if s.respond_to? :specification_version then
18
18
  s.specification_version = 4
19
+ end
19
20
 
20
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
21
- s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
22
- s.add_development_dependency(%q<rake>.freeze, [">= 0"])
23
- s.add_development_dependency(%q<sqlite3>.freeze, [">= 0"])
24
- s.add_development_dependency(%q<haml>.freeze, [">= 0"])
25
- s.add_development_dependency(%q<yard>.freeze, [">= 0"])
26
- s.add_development_dependency(%q<rubocop>.freeze, ["= 0.92.0"])
27
- s.add_development_dependency(%q<redcarpet>.freeze, [">= 0"])
28
- s.add_runtime_dependency(%q<minitest>.freeze, [">= 0"])
29
- s.add_runtime_dependency(%q<activesupport>.freeze, [">= 0"])
30
- s.add_runtime_dependency(%q<activerecord>.freeze, [">= 0"])
31
- s.add_runtime_dependency(%q<schemacop>.freeze, ["~> 3.0.8"])
32
- else
33
- s.add_dependency(%q<bundler>.freeze, [">= 0"])
34
- s.add_dependency(%q<rake>.freeze, [">= 0"])
35
- s.add_dependency(%q<sqlite3>.freeze, [">= 0"])
36
- s.add_dependency(%q<haml>.freeze, [">= 0"])
37
- s.add_dependency(%q<yard>.freeze, [">= 0"])
38
- s.add_dependency(%q<rubocop>.freeze, ["= 0.92.0"])
39
- s.add_dependency(%q<redcarpet>.freeze, [">= 0"])
40
- s.add_dependency(%q<minitest>.freeze, [">= 0"])
41
- s.add_dependency(%q<activesupport>.freeze, [">= 0"])
42
- s.add_dependency(%q<activerecord>.freeze, [">= 0"])
43
- s.add_dependency(%q<schemacop>.freeze, ["~> 3.0.8"])
44
- end
21
+ if s.respond_to? :add_runtime_dependency then
22
+ s.add_development_dependency(%q<appraisal>.freeze, [">= 0"])
23
+ s.add_development_dependency(%q<rake>.freeze, [">= 0"])
24
+ s.add_development_dependency(%q<sqlite3>.freeze, [">= 0"])
25
+ s.add_development_dependency(%q<haml>.freeze, [">= 0"])
26
+ s.add_development_dependency(%q<yard>.freeze, [">= 0"])
27
+ s.add_development_dependency(%q<rubocop>.freeze, ["= 1.25"])
28
+ s.add_development_dependency(%q<redcarpet>.freeze, [">= 0"])
29
+ s.add_runtime_dependency(%q<minitest>.freeze, [">= 0"])
30
+ s.add_runtime_dependency(%q<activesupport>.freeze, [">= 0"])
31
+ s.add_runtime_dependency(%q<activerecord>.freeze, [">= 0"])
32
+ s.add_runtime_dependency(%q<schemacop>.freeze, ["~> 3.0.8"])
45
33
  else
46
- s.add_dependency(%q<bundler>.freeze, [">= 0"])
34
+ s.add_dependency(%q<appraisal>.freeze, [">= 0"])
47
35
  s.add_dependency(%q<rake>.freeze, [">= 0"])
48
36
  s.add_dependency(%q<sqlite3>.freeze, [">= 0"])
49
37
  s.add_dependency(%q<haml>.freeze, [">= 0"])
50
38
  s.add_dependency(%q<yard>.freeze, [">= 0"])
51
- s.add_dependency(%q<rubocop>.freeze, ["= 0.92.0"])
39
+ s.add_dependency(%q<rubocop>.freeze, ["= 1.25"])
52
40
  s.add_dependency(%q<redcarpet>.freeze, [">= 0"])
53
41
  s.add_dependency(%q<minitest>.freeze, [">= 0"])
54
42
  s.add_dependency(%q<activesupport>.freeze, [">= 0"])
@@ -23,7 +23,14 @@ module Inquery
23
23
 
24
24
  # @see schema2
25
25
  def schema(*args, &block)
26
- schema2(*args, &block)
26
+ case Inquery.default_schema_version
27
+ when 2
28
+ schema2(*args, &block)
29
+ when 3
30
+ schema3(*args, &block)
31
+ else
32
+ fail 'Schemacop schema versions supported are 2 and 3.'
33
+ end
27
34
  end
28
35
  end
29
36
  end