inquery 1.0.3 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39e19e13ad88defbc2be460c18bff9101cabd8ec157783b737da5ec6dd051f03
4
- data.tar.gz: 7b69058c75be27e17c8204f2e7bafef7161db6412c4a24c420799bae8b81344e
3
+ metadata.gz: 4abe234fd1834486f21f10e93e1be20335be0a6f32b0f861b414b5cbc08f70e6
4
+ data.tar.gz: 40db2f88941705a41d32438d436e00aa58b471537728bacf42a0310386c25767
5
5
  SHA512:
6
- metadata.gz: 0ced2783b3590ae0eb76272f70a1ef387519fe773cb6d7a660136e11cb59a3a054287667e42f3dd5186ccc3d673bf3ebc1e9cc19c118abf6c44465e869ca8fd4
7
- data.tar.gz: d485bfa3b54ebfb9042fc2d3678b538f9e3b1e8cc535b9f41363bb967c68516bc260a3d9a8db50e40e0f4e87a1d13d689da1d14a053c720f22bacc3b287d9934
6
+ metadata.gz: 51c77a3008be12214250e18445fd4f0fa73f2d988e469ef42379b57e0b890efeff174cff9b0845a446ccc9d56c78eade987f98fb4f27c25c4cde5087f418a34e
7
+ data.tar.gz: a0b63cea88fb0df74f0d4cb2dbf97ad728816a8c3eeb6631655e23eebb2142d8cd69ecb17c0518bc99afc209666dbcc0735e619a6f4e35f034a6c9251011895d
@@ -1,5 +1,25 @@
1
1
  # Change log
2
2
 
3
+ ## 1.0.8 (2020-11-24)
4
+
5
+ - Improve support for schemacop 3.x
6
+
7
+ ## 1.0.7 (2020-11-24)
8
+
9
+ - Improve support for schemacop 3.x
10
+
11
+ ## 1.0.6 (2020-11-24)
12
+
13
+ - Improve support for schemacop 3.x
14
+
15
+ ## 1.0.5 (2020-11-24)
16
+
17
+ - Improve support for schemacop 3.x and document it
18
+
19
+ ## 1.0.4 (2020-11-24)
20
+
21
+ - Add support for schemacop 3.x (but still using 2.x schema version)
22
+
3
23
  ## 1.0.3 (2020-05-12)
4
24
 
5
25
  - Overwrite parameter hash with the casted version if using
data/README.md CHANGED
@@ -284,6 +284,9 @@ class SomeQueryClass < Inquery::Query
284
284
  end
285
285
  ```
286
286
 
287
+ Inquery supports both schemacop specification versions 2 and 3 using the methods
288
+ `schema` / `schema2` for version 2 and method `schema3` for version 3.
289
+
287
290
  ## Rails integration
288
291
 
289
292
  While it is optional, Inquery has been written from the ground up to be
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ task :gemspec do
21
21
  spec.add_dependency 'minitest'
22
22
  spec.add_dependency 'activesupport'
23
23
  spec.add_dependency 'activerecord'
24
- spec.add_dependency 'schemacop', '~> 2.0'
24
+ spec.add_dependency 'schemacop', '>= 2.0'
25
25
  end
26
26
 
27
27
  File.open('inquery.gemspec', 'w') { |f| f.write(gemspec.to_ruby.strip) }
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.8
@@ -109,7 +109,7 @@
109
109
  </div>
110
110
 
111
111
  <div id="footer">
112
- Generated on Tue May 12 13:33:18 2020 by
112
+ Generated on Wed Nov 25 14:07:10 2020 by
113
113
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
114
114
  0.9.25 (ruby-2.6.2).
115
115
  </div>
@@ -105,7 +105,7 @@
105
105
  </div>
106
106
 
107
107
  <div id="footer">
108
- Generated on Tue May 12 13:33:18 2020 by
108
+ Generated on Wed Nov 25 14:07:10 2020 by
109
109
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
110
  0.9.25 (ruby-2.6.2).
111
111
  </div>
@@ -118,7 +118,7 @@
118
118
  </div>
119
119
 
120
120
  <div id="footer">
121
- Generated on Tue May 12 13:33:18 2020 by
121
+ Generated on Wed Nov 25 14:07:10 2020 by
122
122
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
123
123
  0.9.25 (ruby-2.6.2).
124
124
  </div>
@@ -122,7 +122,7 @@
122
122
  </div>
123
123
 
124
124
  <div id="footer">
125
- Generated on Tue May 12 13:33:18 2020 by
125
+ Generated on Wed Nov 25 14:07:10 2020 by
126
126
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
127
127
  0.9.25 (ruby-2.6.2).
128
128
  </div>
@@ -122,7 +122,7 @@
122
122
  </div>
123
123
 
124
124
  <div id="footer">
125
- Generated on Tue May 12 13:33:18 2020 by
125
+ Generated on Wed Nov 25 14:07:10 2020 by
126
126
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
127
127
  0.9.25 (ruby-2.6.2).
128
128
  </div>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Tue May 12 13:33:18 2020 by
110
+ Generated on Wed Nov 25 14:07:10 2020 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
112
  0.9.25 (ruby-2.6.2).
113
113
  </div>
@@ -106,7 +106,7 @@
106
106
  </div>
107
107
 
108
108
  <div id="footer">
109
- Generated on Tue May 12 13:33:18 2020 by
109
+ Generated on Wed Nov 25 14:07:10 2020 by
110
110
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
111
  0.9.25 (ruby-2.6.2).
112
112
  </div>
@@ -227,15 +227,6 @@ options specified at class level using the <code>relation</code> method.</p>
227
227
  <pre class="lines">
228
228
 
229
229
 
230
- 54
231
- 55
232
- 56
233
- 57
234
- 58
235
- 59
236
- 60
237
- 61
238
- 62
239
230
  63
240
231
  64
241
232
  65
@@ -268,10 +259,19 @@ options specified at class level using the <code>relation</code> method.</p>
268
259
  92
269
260
  93
270
261
  94
271
- 95</pre>
262
+ 95
263
+ 96
264
+ 97
265
+ 98
266
+ 99
267
+ 100
268
+ 101
269
+ 102
270
+ 103
271
+ 104</pre>
272
272
  </td>
273
273
  <td>
274
- <pre class="code"><span class="info file"># File 'lib/inquery/mixins/relation_validation.rb', line 54</span>
274
+ <pre class="code"><span class="info file"># File 'lib/inquery/mixins/relation_validation.rb', line 63</span>
275
275
 
276
276
  <span class='kw'>def</span> <span class='id identifier rubyid_validate_relation!'>validate_relation!</span><span class='lparen'>(</span><span class='id identifier rubyid_relation'>relation</span><span class='rparen'>)</span>
277
277
  <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#DEFAULT_OPTIONS-constant" title="Inquery::Mixins::RelationValidation::DEFAULT_OPTIONS (constant)">DEFAULT_OPTIONS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
@@ -325,7 +325,7 @@ options specified at class level using the <code>relation</code> method.</p>
325
325
  </div>
326
326
 
327
327
  <div id="footer">
328
- Generated on Tue May 12 13:33:18 2020 by
328
+ Generated on Wed Nov 25 14:07:10 2020 by
329
329
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
330
330
  0.9.25 (ruby-2.6.2).
331
331
  </div>
@@ -156,13 +156,13 @@ on. See <span class='object_link'><a href="../RelationValidation.html#OPTIONS_SC
156
156
  <pre class="lines">
157
157
 
158
158
 
159
- 46
160
- 47
161
- 48
162
- 49</pre>
159
+ 55
160
+ 56
161
+ 57
162
+ 58</pre>
163
163
  </td>
164
164
  <td>
165
- <pre class="code"><span class="info file"># File 'lib/inquery/mixins/relation_validation.rb', line 46</span>
165
+ <pre class="code"><span class="info file"># File 'lib/inquery/mixins/relation_validation.rb', line 55</span>
166
166
 
167
167
  <span class='kw'>def</span> <span class='id identifier rubyid_relation'>relation</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
168
168
  <span class='const'><span class='object_link'><a href="../RelationValidation.html#OPTIONS_SCHEMA-constant" title="Inquery::Mixins::RelationValidation::OPTIONS_SCHEMA (constant)">OPTIONS_SCHEMA</a></span></span><span class='period'>.</span><span class='id identifier rubyid_validate!'>validate!</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
@@ -178,7 +178,7 @@ on. See <span class='object_link'><a href="../RelationValidation.html#OPTIONS_SC
178
178
  </div>
179
179
 
180
180
  <div id="footer">
181
- Generated on Tue May 12 13:33:18 2020 by
181
+ Generated on Wed Nov 25 14:07:10 2020 by
182
182
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
183
183
  0.9.25 (ruby-2.6.2).
184
184
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Tue May 12 13:33:18 2020 by
119
+ Generated on Wed Nov 25 14:07:10 2020 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.9.25 (ruby-2.6.2).
122
122
  </div>
@@ -115,6 +115,50 @@
115
115
 
116
116
 
117
117
 
118
+ <span class="summary_desc"><div class='inline'></div></span>
119
+
120
+ </li>
121
+
122
+
123
+ <li class="public ">
124
+ <span class="summary_signature">
125
+
126
+ <a href="#schema2-instance_method" title="#schema2 (instance method)">#<strong>schema2</strong>(*args, &amp;block) &#x21d2; Object </a>
127
+
128
+
129
+
130
+ </span>
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'></div></span>
141
+
142
+ </li>
143
+
144
+
145
+ <li class="public ">
146
+ <span class="summary_signature">
147
+
148
+ <a href="#schema3-instance_method" title="#schema3 (instance method)">#<strong>schema3</strong>(reference = nil, **options, &amp;block) &#x21d2; Object </a>
149
+
150
+
151
+
152
+ </span>
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
118
162
  <span class="summary_desc"><div class='inline'></div></span>
119
163
 
120
164
  </li>
@@ -138,6 +182,52 @@
138
182
 
139
183
 
140
184
 
185
+ </h3><div class="docstring">
186
+ <div class="discussion">
187
+
188
+
189
+ </div>
190
+ </div>
191
+ <div class="tags">
192
+
193
+
194
+ <p class="tag_title">See Also:</p>
195
+ <ul class="see">
196
+
197
+ <li><span class='object_link'><a href="#schema2-instance_method" title="Inquery::Mixins::SchemaValidation::ClassMethods#schema2 (method)">#schema2</a></span></li>
198
+
199
+ </ul>
200
+
201
+ </div><table class="source_code">
202
+ <tr>
203
+ <td>
204
+ <pre class="lines">
205
+
206
+
207
+ 25
208
+ 26
209
+ 27</pre>
210
+ </td>
211
+ <td>
212
+ <pre class="code"><span class="info file"># File 'lib/inquery/mixins/schema_validation.rb', line 25</span>
213
+
214
+ <span class='kw'>def</span> <span class='id identifier rubyid_schema'>schema</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
215
+ <span class='id identifier rubyid_schema2'>schema2</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
216
+ <span class='kw'>end</span></pre>
217
+ </td>
218
+ </tr>
219
+ </table>
220
+ </div>
221
+
222
+ <div class="method_details ">
223
+ <h3 class="signature " id="schema2-instance_method">
224
+
225
+ #<strong>schema2</strong>(*args, &amp;block) &#x21d2; <tt>Object</tt>
226
+
227
+
228
+
229
+
230
+
141
231
  </h3><table class="source_code">
142
232
  <tr>
143
233
  <td>
@@ -146,17 +236,51 @@
146
236
 
147
237
  12
148
238
  13
149
- 14
150
- 15
151
- 16</pre>
239
+ 14</pre>
152
240
  </td>
153
241
  <td>
154
242
  <pre class="code"><span class="info file"># File 'lib/inquery/mixins/schema_validation.rb', line 12</span>
155
243
 
156
- <span class='kw'>def</span> <span class='id identifier rubyid_schema'>schema</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
157
- <span class='id identifier rubyid_schema'>schema</span> <span class='op'>=</span> <span class='const'>Schemacop</span><span class='op'>::</span><span class='const'>Schema</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
244
+ <span class='kw'>def</span> <span class='id identifier rubyid_schema2'>schema2</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
245
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__schema'>_schema</span> <span class='op'>=</span> <span class='const'>Schemacop</span><span class='op'>::</span><span class='const'>Schema</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
246
+ <span class='kw'>end</span></pre>
247
+ </td>
248
+ </tr>
249
+ </table>
250
+ </div>
251
+
252
+ <div class="method_details ">
253
+ <h3 class="signature " id="schema3-instance_method">
254
+
255
+ #<strong>schema3</strong>(reference = nil, **options, &amp;block) &#x21d2; <tt>Object</tt>
256
+
158
257
 
159
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__schema'>_schema</span> <span class='op'>=</span> <span class='id identifier rubyid_schema'>schema</span>
258
+
259
+
260
+
261
+ </h3><table class="source_code">
262
+ <tr>
263
+ <td>
264
+ <pre class="lines">
265
+
266
+
267
+ 16
268
+ 17
269
+ 18
270
+ 19
271
+ 20
272
+ 21
273
+ 22</pre>
274
+ </td>
275
+ <td>
276
+ <pre class="code"><span class="info file"># File 'lib/inquery/mixins/schema_validation.rb', line 16</span>
277
+
278
+ <span class='kw'>def</span> <span class='id identifier rubyid_schema3'>schema3</span><span class='lparen'>(</span><span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
279
+ <span class='kw'>if</span> <span class='id identifier rubyid_reference'>reference</span>
280
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__schema'>_schema</span> <span class='op'>=</span> <span class='const'>Schemacop</span><span class='op'>::</span><span class='const'>Schema3</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:reference</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>path:</span> <span class='id identifier rubyid_reference'>reference</span><span class='rparen'>)</span><span class='rparen'>)</span>
281
+ <span class='kw'>else</span>
282
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__schema'>_schema</span> <span class='op'>=</span> <span class='const'>Schemacop</span><span class='op'>::</span><span class='const'>Schema3</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:hash</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
283
+ <span class='kw'>end</span>
160
284
  <span class='kw'>end</span></pre>
161
285
  </td>
162
286
  </tr>
@@ -168,7 +292,7 @@
168
292
  </div>
169
293
 
170
294
  <div id="footer">
171
- Generated on Tue May 12 13:33:18 2020 by
295
+ Generated on Wed Nov 25 14:07:10 2020 by
172
296
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
297
  0.9.25 (ruby-2.6.2).
174
298
  </div>
@@ -779,7 +779,7 @@ easyer access.</p>
779
779
  </div>
780
780
 
781
781
  <div id="footer">
782
- Generated on Tue May 12 13:33:18 2020 by
782
+ Generated on Wed Nov 25 14:07:10 2020 by
783
783
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
784
784
  0.9.25 (ruby-2.6.2).
785
785
  </div>
@@ -529,7 +529,7 @@
529
529
  </div>
530
530
 
531
531
  <div id="footer">
532
- Generated on Tue May 12 13:33:19 2020 by
532
+ Generated on Wed Nov 25 14:07:10 2020 by
533
533
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
534
534
  0.9.25 (ruby-2.6.2).
535
535
  </div>
@@ -248,7 +248,7 @@
248
248
  </div>
249
249
 
250
250
  <div id="footer">
251
- Generated on Tue May 12 13:33:18 2020 by
251
+ Generated on Wed Nov 25 14:07:10 2020 by
252
252
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
253
253
  0.9.25 (ruby-2.6.2).
254
254
  </div>
@@ -328,6 +328,9 @@ access.</p>
328
328
  <span class='kw'>end</span>
329
329
  </code></pre>
330
330
 
331
+ <p>Inquery supports both schemacop specification versions 2 and 3 using the methods
332
+ <code>schema</code> / <code>schema2</code> for version 2 and method <code>schema3</code> for version 3.</p>
333
+
331
334
  <h2 id="rails-integration">Rails integration</h2>
332
335
 
333
336
  <p>While it is optional, Inquery has been written from the ground up to be
@@ -374,7 +377,7 @@ in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-s
374
377
  </div></div>
375
378
 
376
379
  <div id="footer">
377
- Generated on Tue May 12 13:33:18 2020 by
380
+ Generated on Wed Nov 25 14:07:10 2020 by
378
381
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
379
382
  0.9.25 (ruby-2.6.2).
380
383
  </div>
@@ -328,6 +328,9 @@ access.</p>
328
328
  <span class='kw'>end</span>
329
329
  </code></pre>
330
330
 
331
+ <p>Inquery supports both schemacop specification versions 2 and 3 using the methods
332
+ <code>schema</code> / <code>schema2</code> for version 2 and method <code>schema3</code> for version 3.</p>
333
+
331
334
  <h2 id="rails-integration">Rails integration</h2>
332
335
 
333
336
  <p>While it is optional, Inquery has been written from the ground up to be
@@ -374,7 +377,7 @@ in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-s
374
377
  </div></div>
375
378
 
376
379
  <div id="footer">
377
- Generated on Tue May 12 13:33:18 2020 by
380
+ Generated on Wed Nov 25 14:07:10 2020 by
378
381
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
379
382
  0.9.25 (ruby-2.6.2).
380
383
  </div>
@@ -172,6 +172,22 @@
172
172
  </li>
173
173
 
174
174
 
175
+ <li class="odd ">
176
+ <div class="item">
177
+ <span class='object_link'><a href="Inquery/Mixins/SchemaValidation/ClassMethods.html#schema2-instance_method" title="Inquery::Mixins::SchemaValidation::ClassMethods#schema2 (method)">#schema2</a></span>
178
+ <small>Inquery::Mixins::SchemaValidation::ClassMethods</small>
179
+ </div>
180
+ </li>
181
+
182
+
183
+ <li class="even ">
184
+ <div class="item">
185
+ <span class='object_link'><a href="Inquery/Mixins/SchemaValidation/ClassMethods.html#schema3-instance_method" title="Inquery::Mixins::SchemaValidation::ClassMethods#schema3 (method)">#schema3</a></span>
186
+ <small>Inquery::Mixins::SchemaValidation::ClassMethods</small>
187
+ </div>
188
+ </li>
189
+
190
+
175
191
  <li class="odd ">
176
192
  <div class="item">
177
193
  <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>
@@ -100,7 +100,7 @@
100
100
  </div>
101
101
 
102
102
  <div id="footer">
103
- Generated on Tue May 12 13:33:18 2020 by
103
+ Generated on Wed Nov 25 14:07:10 2020 by
104
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
105
  0.9.25 (ruby-2.6.2).
106
106
  </div>
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: inquery 1.0.3 ruby lib
2
+ # stub: inquery 1.0.8 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "inquery".freeze
6
- s.version = "1.0.3"
6
+ s.version = "1.0.8"
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 = "2020-05-12"
11
+ s.date = "2020-11-25"
12
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
13
  s.rubygems_version = "3.0.3".freeze
14
14
  s.summary = "A skeleton that allows extracting queries into atomic, reusable classes.".freeze
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  s.add_runtime_dependency(%q<minitest>.freeze, [">= 0"])
29
29
  s.add_runtime_dependency(%q<activesupport>.freeze, [">= 0"])
30
30
  s.add_runtime_dependency(%q<activerecord>.freeze, [">= 0"])
31
- s.add_runtime_dependency(%q<schemacop>.freeze, ["~> 2.0"])
31
+ s.add_runtime_dependency(%q<schemacop>.freeze, [">= 2.0"])
32
32
  else
33
33
  s.add_dependency(%q<bundler>.freeze, [">= 0"])
34
34
  s.add_dependency(%q<rake>.freeze, [">= 0"])
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
40
40
  s.add_dependency(%q<minitest>.freeze, [">= 0"])
41
41
  s.add_dependency(%q<activesupport>.freeze, [">= 0"])
42
42
  s.add_dependency(%q<activerecord>.freeze, [">= 0"])
43
- s.add_dependency(%q<schemacop>.freeze, ["~> 2.0"])
43
+ s.add_dependency(%q<schemacop>.freeze, [">= 2.0"])
44
44
  end
45
45
  else
46
46
  s.add_dependency(%q<bundler>.freeze, [">= 0"])
@@ -53,6 +53,6 @@ Gem::Specification.new do |s|
53
53
  s.add_dependency(%q<minitest>.freeze, [">= 0"])
54
54
  s.add_dependency(%q<activesupport>.freeze, [">= 0"])
55
55
  s.add_dependency(%q<activerecord>.freeze, [">= 0"])
56
- s.add_dependency(%q<schemacop>.freeze, ["~> 2.0"])
56
+ s.add_dependency(%q<schemacop>.freeze, [">= 2.0"])
57
57
  end
58
58
  end
@@ -3,11 +3,20 @@ module Inquery
3
3
  module RelationValidation
4
4
  extend ActiveSupport::Concern
5
5
 
6
- OPTIONS_SCHEMA = Schemacop::Schema.new do
7
- opt :class, :string
8
- opt :fields, :integer
9
- opt :default_select, :symbol
10
- opt :default, :object, classes: [Proc, FalseClass]
6
+ if defined?(Schemacop::Schema3)
7
+ OPTIONS_SCHEMA = Schemacop::Schema3.new(:hash) do
8
+ str? :class
9
+ int? :fields
10
+ sym? :default_select
11
+ obj? :default, [Proc, FalseClass]
12
+ end
13
+ else
14
+ OPTIONS_SCHEMA = Schemacop::Schema.new do
15
+ opt :class, :string
16
+ opt :fields, :integer
17
+ opt :default_select, :symbol
18
+ opt :default, :object, classes: [Proc, FalseClass]
19
+ end
11
20
  end
12
21
 
13
22
  DEFAULT_OPTIONS = {
@@ -9,10 +9,21 @@ module Inquery
9
9
  end
10
10
 
11
11
  module ClassMethods
12
- def schema(*args, &block)
13
- schema = Schemacop::Schema.new(*args, &block)
12
+ def schema2(*args, &block)
13
+ self._schema = Schemacop::Schema.new(*args, &block)
14
+ end
14
15
 
15
- self._schema = schema
16
+ def schema3(reference = nil, **options, &block)
17
+ if reference
18
+ self._schema = Schemacop::Schema3.new(:reference, options.merge(path: reference))
19
+ else
20
+ self._schema = Schemacop::Schema3.new(:hash, **options, &block)
21
+ end
22
+ end
23
+
24
+ # @see schema2
25
+ def schema(*args, &block)
26
+ schema2(*args, &block)
16
27
  end
17
28
  end
18
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sitrox
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-12 00:00:00.000000000 Z
11
+ date: 2020-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,18 +154,18 @@ dependencies:
154
154
  name: schemacop
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
159
  version: '2.0'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '2.0'
167
- description:
168
- email:
167
+ description:
168
+ email:
169
169
  executables: []
170
170
  extensions: []
171
171
  extra_rdoc_files: []
@@ -229,10 +229,10 @@ files:
229
229
  - test/queries/user/fetch_in_group.rb
230
230
  - test/queries/user/fetch_in_group_rel.rb
231
231
  - test/test_helper.rb
232
- homepage:
232
+ homepage:
233
233
  licenses: []
234
234
  metadata: {}
235
- post_install_message:
235
+ post_install_message:
236
236
  rdoc_options: []
237
237
  require_paths:
238
238
  - lib
@@ -247,8 +247,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.1.2
251
- signing_key:
250
+ rubygems_version: 3.1.4
251
+ signing_key:
252
252
  specification_version: 4
253
253
  summary: A skeleton that allows extracting queries into atomic, reusable classes.
254
254
  test_files: