inquery 1.0.8 → 1.0.9

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: 4abe234fd1834486f21f10e93e1be20335be0a6f32b0f861b414b5cbc08f70e6
4
- data.tar.gz: 40db2f88941705a41d32438d436e00aa58b471537728bacf42a0310386c25767
3
+ metadata.gz: 90b7d62f5ccf00b1ddd813840b80e2bf702d50ae5523a19714130c0c6a3ad570
4
+ data.tar.gz: 9e45803cfbf729c3d8b1cdc8edbe94b02be8c1d3a700dbd64f8fdeb004884974
5
5
  SHA512:
6
- metadata.gz: 51c77a3008be12214250e18445fd4f0fa73f2d988e469ef42379b57e0b890efeff174cff9b0845a446ccc9d56c78eade987f98fb4f27c25c4cde5087f418a34e
7
- data.tar.gz: a0b63cea88fb0df74f0d4cb2dbf97ad728816a8c3eeb6631655e23eebb2142d8cd69ecb17c0518bc99afc209666dbcc0735e619a6f4e35f034a6c9251011895d
6
+ metadata.gz: c6c71a8976c53fc140110fb6a74f3d5aafe680feedbd92622f39323a0042accd82214229e46b6e6e97e52ee78b1e6d07b660641cd0288010c950bc5d8c9879d7
7
+ data.tar.gz: 6832e0f4bc345cf8262a64f063d4d4c4d8a0d82922c635130e383720e08ca9b3ca60afada6baa9ba87f72aaf7693eacc57c8b018409252c6cabb0f82b94b6576
data/.releaser_config CHANGED
@@ -2,3 +2,4 @@ version_file: VERSION
2
2
  always_from_master: true
3
3
  yard_path: doc
4
4
  gem_style: github
5
+ ruby_command: ruby -S
data/.rubocop.yml CHANGED
@@ -1,15 +1,32 @@
1
1
  AllCops:
2
+ NewCops: enable
2
3
  Exclude:
3
4
  - 'local/**/*'
4
5
  - 'vendor/**/*'
5
6
  - 'tmp/**/*'
6
- - '*.gemspec'
7
+ - 'inquery.gemspec'
7
8
 
8
9
  DisplayCopNames: true
9
10
 
11
+ Style/SignalException:
12
+ EnforcedStyle: only_fail
13
+
10
14
  Metrics/MethodLength:
11
15
  Enabled: false
12
16
 
17
+ Metrics/ClassLength:
18
+ Enabled: false
19
+
20
+ Metrics/ModuleLength:
21
+ Enabled: false
22
+
23
+ Metrics/BlockLength:
24
+ Enabled: false
25
+
26
+ Metrics/ParameterLists:
27
+ Max: 5
28
+ CountKeywordArgs: false
29
+
13
30
  Metrics/AbcSize:
14
31
  Enabled: False
15
32
 
@@ -19,9 +36,12 @@ Metrics/CyclomaticComplexity:
19
36
  Metrics/PerceivedComplexity:
20
37
  Enabled: False
21
38
 
22
- Metrics/LineLength:
39
+ Layout/LineLength:
23
40
  Max: 160
24
41
 
42
+ Metrics/BlockNesting:
43
+ Enabled: false
44
+
25
45
  Style/IfUnlessModifier:
26
46
  Enabled: false
27
47
 
@@ -31,6 +51,9 @@ Style/Documentation:
31
51
  Style/RedundantReturn:
32
52
  Enabled: false
33
53
 
54
+ Style/AsciiComments:
55
+ Enabled: false
56
+
34
57
  Style/GuardClause:
35
58
  Enabled: false
36
59
 
@@ -40,3 +63,41 @@ Style/ClassAndModuleChildren:
40
63
  SupportedStyles:
41
64
  - nested
42
65
  - compact
66
+ # Checks the style of children definitions at classes and modules.
67
+ #
68
+ # Basically there are two different styles:
69
+ #
70
+ # `nested` - have each child on a separate line
71
+ # class Foo
72
+ # class Bar
73
+ # end
74
+ # end
75
+ #
76
+ # `compact` - combine definitions as much as possible
77
+ # class Foo::Bar
78
+ # end
79
+ #
80
+ # The compact style is only forced, for classes / modules with one child.
81
+
82
+ Style/FormatString:
83
+ Enabled: false
84
+
85
+ # Multiline hashes should be aligned cleanly as a table to improve readability.
86
+ Layout/HashAlignment:
87
+ EnforcedHashRocketStyle: table
88
+ EnforcedColonStyle: table
89
+
90
+ Style/FrozenStringLiteralComment:
91
+ Enabled: false
92
+
93
+ Style/AccessorGrouping:
94
+ Enabled: false
95
+
96
+ Style/DoubleNegation:
97
+ Enabled: false
98
+
99
+ Style/ConditionalAssignment:
100
+ Enabled: false
101
+
102
+ Style/CaseLikeIf:
103
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,6 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.0
3
+ - 2.5.1
4
+ - 2.6.2
5
+ - 2.7.1
6
+ - 3.0.0
4
7
  script:
5
8
  - bundle install
6
9
  - bundle exec rake test
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Change log
2
2
 
3
+ ## 1.0.9 (2021-02-24)
4
+
5
+ - Update `schemacop` to version `~> 3.0.8`
6
+
7
+ - Add the following ruby versions to travis testing:
8
+ - `2.5.1`
9
+ - `2.6.2`
10
+ - `2.7.1`
11
+ - `3.0.0`
12
+
13
+ - Remove ruby `2.3.0` from travis testing
14
+
3
15
  ## 1.0.8 (2020-11-24)
4
16
 
5
17
  - Improve support for schemacop 3.x
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Sitrox
3
+ Copyright © 2016 - 2021 Sitrox
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -20,6 +20,17 @@ to your `Gemfile`:
20
20
  gem 'inquery'
21
21
  ```
22
22
 
23
+ ## Compatibility
24
+
25
+ Inquery is tested with the following ruby versions:
26
+
27
+ * 2.5.1
28
+ * 2.6.2
29
+ * 2.7.1
30
+ * 3.0.0
31
+
32
+ Other ruby versions might work but are not covered by our Travis tests.
33
+
23
34
  ## Basic usage
24
35
 
25
36
  ```ruby
@@ -325,4 +336,4 @@ in his [blog post](http://craftingruby.com/posts/2015/06/29/query-objects-throug
325
336
 
326
337
  ## Copyright
327
338
 
328
- Copyright (c) 2020 Sitrox. See `LICENSE` for further details.
339
+ Copyright © 2016 - 2021 Sitrox. See `LICENSE` for further details.
data/Rakefile CHANGED
@@ -16,12 +16,12 @@ task :gemspec do
16
16
  spec.add_development_dependency 'sqlite3'
17
17
  spec.add_development_dependency 'haml'
18
18
  spec.add_development_dependency 'yard'
19
- spec.add_development_dependency 'rubocop', '0.35.1'
19
+ spec.add_development_dependency 'rubocop', '0.92.0'
20
20
  spec.add_development_dependency 'redcarpet'
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', '~> 3.0.8'
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.8
1
+ 1.0.9
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.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -109,9 +109,9 @@
109
109
  </div>
110
110
 
111
111
  <div id="footer">
112
- Generated on Wed Nov 25 14:07:10 2020 by
112
+ Generated on Wed Feb 24 10:57:42 2021 by
113
113
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
114
- 0.9.25 (ruby-2.6.2).
114
+ 0.9.26 (ruby-2.6.2).
115
115
  </div>
116
116
 
117
117
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Inquery::Exceptions
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -105,9 +105,9 @@
105
105
  </div>
106
106
 
107
107
  <div id="footer">
108
- Generated on Wed Nov 25 14:07:10 2020 by
108
+ Generated on Wed Feb 24 10:57:42 2021 by
109
109
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
- 0.9.25 (ruby-2.6.2).
110
+ 0.9.26 (ruby-2.6.2).
111
111
  </div>
112
112
 
113
113
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Exception: Inquery::Exceptions::Base
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -118,9 +118,9 @@
118
118
  </div>
119
119
 
120
120
  <div id="footer">
121
- Generated on Wed Nov 25 14:07:10 2020 by
121
+ Generated on Wed Feb 24 10:57:42 2021 by
122
122
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
123
- 0.9.25 (ruby-2.6.2).
123
+ 0.9.26 (ruby-2.6.2).
124
124
  </div>
125
125
 
126
126
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Exception: Inquery::Exceptions::InvalidRelation
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -122,9 +122,9 @@
122
122
  </div>
123
123
 
124
124
  <div id="footer">
125
- Generated on Wed Nov 25 14:07:10 2020 by
125
+ Generated on Wed Feb 24 10:57:42 2021 by
126
126
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
127
- 0.9.25 (ruby-2.6.2).
127
+ 0.9.26 (ruby-2.6.2).
128
128
  </div>
129
129
 
130
130
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Exception: Inquery::Exceptions::UnknownCallSignature
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -122,9 +122,9 @@
122
122
  </div>
123
123
 
124
124
  <div id="footer">
125
- Generated on Wed Nov 25 14:07:10 2020 by
125
+ Generated on Wed Feb 24 10:57:42 2021 by
126
126
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
127
- 0.9.25 (ruby-2.6.2).
127
+ 0.9.26 (ruby-2.6.2).
128
128
  </div>
129
129
 
130
130
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -107,9 +107,9 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Wed Nov 25 14:07:10 2020 by
110
+ Generated on Wed Feb 24 10:57:42 2021 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
- 0.9.25 (ruby-2.6.2).
112
+ 0.9.26 (ruby-2.6.2).
113
113
  </div>
114
114
 
115
115
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins::RawSqlUtils
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -106,9 +106,9 @@
106
106
  </div>
107
107
 
108
108
  <div id="footer">
109
- Generated on Wed Nov 25 14:07:10 2020 by
109
+ Generated on Wed Feb 24 10:57:42 2021 by
110
110
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
- 0.9.25 (ruby-2.6.2).
111
+ 0.9.26 (ruby-2.6.2).
112
112
  </div>
113
113
 
114
114
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins::RelationValidation
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -130,26 +130,26 @@
130
130
  </span> <span class='comment'># `nil` to not perform any checks. The `class` attribute will also be
131
131
  </span> <span class='comment'># taken to infer a default if no relation is given and you didn&#39;t
132
132
  </span> <span class='comment'># specify any `default`.
133
- </span> <span class='label'>class:</span> <span class='kw'>nil</span><span class='comma'>,</span>
133
+ </span> <span class='label'>class:</span> <span class='kw'>nil</span><span class='comma'>,</span>
134
134
 
135
135
  <span class='comment'># This allows to specify a default relation that will be taken if no
136
136
  </span> <span class='comment'># relation is given. This must be specified as a Proc returning the
137
137
  </span> <span class='comment'># relation. Set this to `false` for no default. If this is set to `nil`,
138
138
  </span> <span class='comment'># it will try to infer the default from the option `class` (if given).
139
- </span> <span class='label'>default:</span> <span class='kw'>nil</span><span class='comma'>,</span>
139
+ </span> <span class='label'>default:</span> <span class='kw'>nil</span><span class='comma'>,</span>
140
140
 
141
141
  <span class='comment'># Allows to restrict the number of fields / values the relation must
142
142
  </span> <span class='comment'># select. This is particularly useful if you&#39;re using the query as a
143
143
  </span> <span class='comment'># subquery and need it to return exactly one field. Use `nil` to not
144
144
  </span> <span class='comment'># perform any checks.
145
- </span> <span class='label'>fields:</span> <span class='kw'>nil</span><span class='comma'>,</span>
145
+ </span> <span class='label'>fields:</span> <span class='kw'>nil</span><span class='comma'>,</span>
146
146
 
147
147
  <span class='comment'># If this is set to a symbol, the relation does not have any select
148
148
  </span> <span class='comment'># fields specified (`select_values` is empty) and `fields` is &gt; 0, it
149
149
  </span> <span class='comment'># will automatically select the given field. Use `nil` to disable this
150
150
  </span> <span class='comment'># behavior.
151
151
  </span> <span class='label'>default_select:</span> <span class='symbol'>:id</span>
152
- <span class='rbrace'>}</span></pre></dd>
152
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
153
153
 
154
154
  </dl>
155
155
 
@@ -304,7 +304,7 @@ options specified at class level using the <code>relation</code> method.</p>
304
304
  </span> <span class='comment'># ---------------------------------------------------------------
305
305
  </span> <span class='id identifier rubyid_fields_count'>fields_count</span> <span class='op'>=</span> <span class='id identifier rubyid_relation'>relation</span><span class='period'>.</span><span class='id identifier rubyid_select_values'>select_values</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
306
306
 
307
- <span class='kw'>if</span> <span class='id identifier rubyid_fields_count'>fields_count</span> <span class='op'>==</span> <span class='int'>0</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:default_select</span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:fields</span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:fields</span><span class='rbracket'>]</span> <span class='op'>&gt;</span> <span class='int'>0</span>
307
+ <span class='kw'>if</span> <span class='id identifier rubyid_fields_count'>fields_count</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:default_select</span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:fields</span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:fields</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
308
308
  <span class='id identifier rubyid_relation'>relation</span> <span class='op'>=</span> <span class='id identifier rubyid_relation'>relation</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:default_select</span><span class='rbracket'>]</span><span class='rparen'>)</span>
309
309
  <span class='id identifier rubyid_fields_count'>fields_count</span> <span class='op'>=</span> <span class='int'>1</span>
310
310
  <span class='kw'>end</span>
@@ -325,9 +325,9 @@ 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 Wed Nov 25 14:07:10 2020 by
328
+ Generated on Wed Feb 24 10:57:42 2021 by
329
329
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
330
- 0.9.25 (ruby-2.6.2).
330
+ 0.9.26 (ruby-2.6.2).
331
331
  </div>
332
332
 
333
333
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins::RelationValidation::ClassMethods
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -178,9 +178,9 @@ 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 Wed Nov 25 14:07:10 2020 by
181
+ Generated on Wed Feb 24 10:57:42 2021 by
182
182
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
183
- 0.9.25 (ruby-2.6.2).
183
+ 0.9.26 (ruby-2.6.2).
184
184
  </div>
185
185
 
186
186
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins::SchemaValidation
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -116,9 +116,9 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Wed Nov 25 14:07:10 2020 by
119
+ Generated on Wed Feb 24 10:57:42 2021 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
- 0.9.25 (ruby-2.6.2).
121
+ 0.9.26 (ruby-2.6.2).
122
122
  </div>
123
123
 
124
124
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Inquery::Mixins::SchemaValidation::ClassMethods
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -292,9 +292,9 @@
292
292
  </div>
293
293
 
294
294
  <div id="footer">
295
- Generated on Wed Nov 25 14:07:10 2020 by
295
+ Generated on Wed Feb 24 10:57:42 2021 by
296
296
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
297
- 0.9.25 (ruby-2.6.2).
297
+ 0.9.26 (ruby-2.6.2).
298
298
  </div>
299
299
 
300
300
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Inquery::Query
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -779,9 +779,9 @@ easyer access.</p>
779
779
  </div>
780
780
 
781
781
  <div id="footer">
782
- Generated on Wed Nov 25 14:07:10 2020 by
782
+ Generated on Wed Feb 24 10:57:42 2021 by
783
783
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
784
- 0.9.25 (ruby-2.6.2).
784
+ 0.9.26 (ruby-2.6.2).
785
785
  </div>
786
786
 
787
787
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Inquery::Query::Chainable
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -529,9 +529,9 @@
529
529
  </div>
530
530
 
531
531
  <div id="footer">
532
- Generated on Wed Nov 25 14:07:10 2020 by
532
+ Generated on Wed Feb 24 10:57:42 2021 by
533
533
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
534
- 0.9.25 (ruby-2.6.2).
534
+ 0.9.26 (ruby-2.6.2).
535
535
  </div>
536
536
 
537
537
  </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.25
7
+ Documentation by YARD 0.9.26
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.25</h1>
55
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.9.26</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/RelationValidation/ClassMethods.html" title="Inquery::Mixins::RelationValidation::ClassMethods (module)">ClassMethods</a></span>
106
+ <span class='object_link'><a href="Inquery/Mixins/SchemaValidation/ClassMethods.html" title="Inquery::Mixins::SchemaValidation::ClassMethods (module)">ClassMethods</a></span>
107
107
 
108
- <small>(Inquery::Mixins::RelationValidation)</small>
108
+ <small>(Inquery::Mixins::SchemaValidation)</small>
109
109
 
110
110
  </li>
111
111
 
112
112
  <li>
113
- <span class='object_link'><a href="Inquery/Mixins/SchemaValidation/ClassMethods.html" title="Inquery::Mixins::SchemaValidation::ClassMethods (module)">ClassMethods</a></span>
113
+ <span class='object_link'><a href="Inquery/Mixins/RelationValidation/ClassMethods.html" title="Inquery::Mixins::RelationValidation::ClassMethods (module)">ClassMethods</a></span>
114
114
 
115
- <small>(Inquery::Mixins::SchemaValidation)</small>
115
+ <small>(Inquery::Mixins::RelationValidation)</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 Nov 25 14:07:10 2020 by
251
+ Generated on Wed Feb 24 10:57:42 2021 by
252
252
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
253
- 0.9.25 (ruby-2.6.2).
253
+ 0.9.26 (ruby-2.6.2).
254
254
  </div>
255
255
 
256
256
  </div>
data/doc/css/style.css CHANGED
@@ -52,6 +52,7 @@ body {
52
52
  background: #fff;
53
53
  padding: 1.2em;
54
54
  padding-top: 0.2em;
55
+ box-sizing: border-box;
55
56
  }
56
57
 
57
58
  @media (max-width: 920px) {
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.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -77,6 +77,19 @@ to your <code>Gemfile</code>:</p>
77
77
  <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>inquery</span><span class='tstring_end'>&#39;</span></span>
78
78
  </code></pre>
79
79
 
80
+ <h2 id="compatibility">Compatibility</h2>
81
+
82
+ <p>Inquery is tested with the following ruby versions:</p>
83
+
84
+ <ul>
85
+ <li>2.5.1</li>
86
+ <li>2.6.2</li>
87
+ <li>2.7.1</li>
88
+ <li>3.0.0</li>
89
+ </ul>
90
+
91
+ <p>Other ruby versions might work but are not covered by our Travis tests.</p>
92
+
80
93
  <h2 id="basic-usage">Basic usage</h2>
81
94
 
82
95
  <pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>FetchUsersWithACar</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Inquery.html" title="Inquery (module)">Inquery</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Inquery/Query.html" title="Inquery::Query (class)">Query</a></span></span>
@@ -373,13 +386,13 @@ in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-s
373
386
 
374
387
  <h2 id="copyright">Copyright</h2>
375
388
 
376
- <p>Copyright (c) 2020 Sitrox. See <code>LICENSE</code> for further details.</p>
389
+ <p>Copyright © 2016 - 2021 Sitrox. See <code>LICENSE</code> for further details.</p>
377
390
  </div></div>
378
391
 
379
392
  <div id="footer">
380
- Generated on Wed Nov 25 14:07:10 2020 by
393
+ Generated on Wed Feb 24 10:57:42 2021 by
381
394
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
382
- 0.9.25 (ruby-2.6.2).
395
+ 0.9.26 (ruby-2.6.2).
383
396
  </div>
384
397
 
385
398
  </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.25</title>
5
+ <title>Documentation by YARD 0.9.26</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.25
9
+ &mdash; Documentation by YARD 0.9.26
10
10
 
11
11
  </title>
12
12
 
@@ -77,6 +77,19 @@ to your <code>Gemfile</code>:</p>
77
77
  <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>inquery</span><span class='tstring_end'>&#39;</span></span>
78
78
  </code></pre>
79
79
 
80
+ <h2 id="compatibility">Compatibility</h2>
81
+
82
+ <p>Inquery is tested with the following ruby versions:</p>
83
+
84
+ <ul>
85
+ <li>2.5.1</li>
86
+ <li>2.6.2</li>
87
+ <li>2.7.1</li>
88
+ <li>3.0.0</li>
89
+ </ul>
90
+
91
+ <p>Other ruby versions might work but are not covered by our Travis tests.</p>
92
+
80
93
  <h2 id="basic-usage">Basic usage</h2>
81
94
 
82
95
  <pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>FetchUsersWithACar</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="Inquery.html" title="Inquery (module)">Inquery</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Inquery/Query.html" title="Inquery::Query (class)">Query</a></span></span>
@@ -373,13 +386,13 @@ in his <a href="http://craftingruby.com/posts/2015/06/29/query-objects-through-s
373
386
 
374
387
  <h2 id="copyright">Copyright</h2>
375
388
 
376
- <p>Copyright (c) 2020 Sitrox. See <code>LICENSE</code> for further details.</p>
389
+ <p>Copyright © 2016 - 2021 Sitrox. See <code>LICENSE</code> for further details.</p>
377
390
  </div></div>
378
391
 
379
392
  <div id="footer">
380
- Generated on Wed Nov 25 14:07:10 2020 by
393
+ Generated on Wed Feb 24 10:57:42 2021 by
381
394
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
382
- 0.9.25 (ruby-2.6.2).
395
+ 0.9.26 (ruby-2.6.2).
383
396
  </div>
384
397
 
385
398
  </div>
data/doc/method_list.html CHANGED
@@ -46,8 +46,8 @@
46
46
 
47
47
  <li class="odd ">
48
48
  <div class="item">
49
- <span class='object_link'><a href="Inquery/Query/Chainable.html#call-instance_method" title="Inquery::Query::Chainable#call (method)">#call</a></span>
50
- <small>Inquery::Query::Chainable</small>
49
+ <span class='object_link'><a href="Inquery/Query.html#call-class_method" title="Inquery::Query.call (method)">call</a></span>
50
+ <small>Inquery::Query</small>
51
51
  </div>
52
52
  </li>
53
53
 
@@ -62,15 +62,15 @@
62
62
 
63
63
  <li class="odd ">
64
64
  <div class="item">
65
- <span class='object_link'><a href="Inquery/Query.html#call-class_method" title="Inquery::Query.call (method)">call</a></span>
66
- <small>Inquery::Query</small>
65
+ <span class='object_link'><a href="Inquery/Query/Chainable.html#call-class_method" title="Inquery::Query::Chainable.call (method)">call</a></span>
66
+ <small>Inquery::Query::Chainable</small>
67
67
  </div>
68
68
  </li>
69
69
 
70
70
 
71
71
  <li class="even ">
72
72
  <div class="item">
73
- <span class='object_link'><a href="Inquery/Query/Chainable.html#call-class_method" title="Inquery::Query::Chainable.call (method)">call</a></span>
73
+ <span class='object_link'><a href="Inquery/Query/Chainable.html#call-instance_method" title="Inquery::Query::Chainable#call (method)">#call</a></span>
74
74
  <small>Inquery::Query::Chainable</small>
75
75
  </div>
76
76
  </li>
@@ -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/Chainable.html#initialize-instance_method" title="Inquery::Query::Chainable#initialize (method)">#initialize</a></span>
98
- <small>Inquery::Query::Chainable</small>
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>
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.html#initialize-instance_method" title="Inquery::Query#initialize (method)">#initialize</a></span>
106
- <small>Inquery::Query</small>
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>
107
107
  </div>
108
108
  </li>
109
109
 
@@ -150,7 +150,7 @@
150
150
 
151
151
  <li class="even ">
152
152
  <div class="item">
153
- <span class='object_link'><a href="Inquery/Query.html#run-instance_method" title="Inquery::Query#run (method)">#run</a></span>
153
+ <span class='object_link'><a href="Inquery/Query.html#run-class_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-class_method" title="Inquery::Query.run (method)">run</a></span>
161
+ <span class='object_link'><a href="Inquery/Query.html#run-instance_method" title="Inquery::Query#run (method)">#run</a></span>
162
162
  <small>Inquery::Query</small>
163
163
  </div>
164
164
  </li>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.9.25
9
+ &mdash; Documentation by YARD 0.9.26
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 Nov 25 14:07:10 2020 by
103
+ Generated on Wed Feb 24 10:57:42 2021 by
104
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.9.25 (ruby-2.6.2).
105
+ 0.9.26 (ruby-2.6.2).
106
106
  </div>
107
107
 
108
108
  </div>
data/inquery.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: inquery 1.0.8 ruby lib
2
+ # stub: inquery 1.0.9 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "inquery".freeze
6
- s.version = "1.0.8"
6
+ s.version = "1.0.9"
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-11-25"
11
+ s.date = "2021-02-24"
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
@@ -23,24 +23,24 @@ Gem::Specification.new do |s|
23
23
  s.add_development_dependency(%q<sqlite3>.freeze, [">= 0"])
24
24
  s.add_development_dependency(%q<haml>.freeze, [">= 0"])
25
25
  s.add_development_dependency(%q<yard>.freeze, [">= 0"])
26
- s.add_development_dependency(%q<rubocop>.freeze, ["= 0.35.1"])
26
+ s.add_development_dependency(%q<rubocop>.freeze, ["= 0.92.0"])
27
27
  s.add_development_dependency(%q<redcarpet>.freeze, [">= 0"])
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, ["~> 3.0.8"])
32
32
  else
33
33
  s.add_dependency(%q<bundler>.freeze, [">= 0"])
34
34
  s.add_dependency(%q<rake>.freeze, [">= 0"])
35
35
  s.add_dependency(%q<sqlite3>.freeze, [">= 0"])
36
36
  s.add_dependency(%q<haml>.freeze, [">= 0"])
37
37
  s.add_dependency(%q<yard>.freeze, [">= 0"])
38
- s.add_dependency(%q<rubocop>.freeze, ["= 0.35.1"])
38
+ s.add_dependency(%q<rubocop>.freeze, ["= 0.92.0"])
39
39
  s.add_dependency(%q<redcarpet>.freeze, [">= 0"])
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, ["~> 3.0.8"])
44
44
  end
45
45
  else
46
46
  s.add_dependency(%q<bundler>.freeze, [">= 0"])
@@ -48,11 +48,11 @@ Gem::Specification.new do |s|
48
48
  s.add_dependency(%q<sqlite3>.freeze, [">= 0"])
49
49
  s.add_dependency(%q<haml>.freeze, [">= 0"])
50
50
  s.add_dependency(%q<yard>.freeze, [">= 0"])
51
- s.add_dependency(%q<rubocop>.freeze, ["= 0.35.1"])
51
+ s.add_dependency(%q<rubocop>.freeze, ["= 0.92.0"])
52
52
  s.add_dependency(%q<redcarpet>.freeze, [">= 0"])
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, ["~> 3.0.8"])
57
57
  end
58
58
  end
@@ -8,7 +8,7 @@ module Inquery
8
8
  str? :class
9
9
  int? :fields
10
10
  sym? :default_select
11
- obj? :default, [Proc, FalseClass]
11
+ obj? :default, classes: [Proc, FalseClass]
12
12
  end
13
13
  else
14
14
  OPTIONS_SCHEMA = Schemacop::Schema.new do
@@ -24,26 +24,26 @@ module Inquery
24
24
  # `nil` to not perform any checks. The `class` attribute will also be
25
25
  # taken to infer a default if no relation is given and you didn't
26
26
  # specify any `default`.
27
- class: nil,
27
+ class: nil,
28
28
 
29
29
  # This allows to specify a default relation that will be taken if no
30
30
  # relation is given. This must be specified as a Proc returning the
31
31
  # relation. Set this to `false` for no default. If this is set to `nil`,
32
32
  # it will try to infer the default from the option `class` (if given).
33
- default: nil,
33
+ default: nil,
34
34
 
35
35
  # Allows to restrict the number of fields / values the relation must
36
36
  # select. This is particularly useful if you're using the query as a
37
37
  # subquery and need it to return exactly one field. Use `nil` to not
38
38
  # perform any checks.
39
- fields: nil,
39
+ fields: nil,
40
40
 
41
41
  # If this is set to a symbol, the relation does not have any select
42
42
  # fields specified (`select_values` is empty) and `fields` is > 0, it
43
43
  # will automatically select the given field. Use `nil` to disable this
44
44
  # behavior.
45
45
  default_select: :id
46
- }
46
+ }.freeze
47
47
 
48
48
  included do
49
49
  class_attribute :_relation_options
@@ -91,7 +91,7 @@ module Inquery
91
91
  # ---------------------------------------------------------------
92
92
  fields_count = relation.select_values.size
93
93
 
94
- if fields_count == 0 && options[:default_select] && options[:fields] && options[:fields] > 0
94
+ if fields_count.zero? && options[:default_select] && options[:fields] && (options[:fields]).positive?
95
95
  relation = relation.select(options[:default_select])
96
96
  fields_count = 1
97
97
  end
data/test/test_helper.rb CHANGED
@@ -10,7 +10,7 @@ module TestHelper
10
10
 
11
11
  module ClassMethods
12
12
  def setup_db
13
- load File.dirname(__FILE__) + '/db/schema.rb'
13
+ load "#{File.dirname(__FILE__)}/db/schema.rb"
14
14
  end
15
15
 
16
16
  def setup_base_data
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.8
4
+ version: 1.0.9
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-11-25 00:00:00.000000000 Z
11
+ date: 2021-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.35.1
89
+ version: 0.92.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.35.1
96
+ version: 0.92.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: redcarpet
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -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
- version: '2.0'
159
+ version: 3.0.8
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
- version: '2.0'
167
- description:
168
- email:
166
+ version: 3.0.8
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.4
251
- signing_key:
250
+ rubygems_version: 3.0.3
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: