inquery 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/README.md +11 -2
- data/RUBY_VERSION +1 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/doc/Inquery.html +38 -38
- data/doc/Inquery/Exceptions.html +38 -38
- data/doc/Inquery/Exceptions/Base.html +44 -43
- data/doc/Inquery/Exceptions/InvalidRelation.html +44 -43
- data/doc/Inquery/Exceptions/UnknownCallSignature.html +44 -43
- data/doc/Inquery/Mixins.html +38 -38
- data/doc/Inquery/Mixins/RelationValidation.html +70 -73
- data/doc/Inquery/Mixins/RelationValidation/ClassMethods.html +45 -47
- data/doc/Inquery/Mixins/SchemaValidation.html +47 -45
- data/doc/Inquery/Mixins/SchemaValidation/ClassMethods.html +41 -41
- data/doc/Inquery/Query.html +87 -105
- data/doc/Inquery/Query/Chainable.html +66 -73
- data/doc/_index.html +28 -31
- data/doc/class_list.html +24 -31
- data/doc/css/full_list.css +32 -31
- data/doc/css/style.css +244 -91
- data/doc/file.README.html +135 -143
- data/doc/file_list.html +26 -30
- data/doc/frames.html +7 -16
- data/doc/index.html +135 -143
- data/doc/js/app.js +106 -77
- data/doc/js/full_list.js +170 -135
- data/doc/method_list.html +98 -74
- data/doc/top-level-namespace.html +34 -36
- data/inquery.gemspec +44 -44
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aec4e3689d2f6830ee142beb89ef38d8c7e03d65
|
4
|
+
data.tar.gz: 491f28cd6d7b8335362d77699f0f0c214824b893
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d009ad21e0578929aa49c050210096c6f3d747c9b6aed1ede3ab26d4e4255d7695a0d22ec896b657167cca300642158ecf040cac48f0d3a2c7e8d374aec603f
|
7
|
+
data.tar.gz: '08ad570e01461f620e959923cc8cbc8083efe08296982f5517ab1e99df22dad1d3b6bb73fe9eba1c68205bacdffb782ab8b4df92538eb568d015d70c3c412ae5'
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/sitrox/inquery.svg?branch=master)](https://travis-ci.org/sitrox/inquery)
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/inquery.svg)](https://badge.fury.io/rb/inquery)
|
3
|
+
|
1
4
|
# Inquery
|
2
5
|
|
3
6
|
A skeleton that allows extracting queries into atomic, reusable classes.
|
@@ -49,7 +52,7 @@ For this basic functionality, inherit from {Inquery::Query} and overwrite
|
|
49
52
|
the `call` and optionally the `process` method:
|
50
53
|
|
51
54
|
```ruby
|
52
|
-
class FetchRedCarsAsJson
|
55
|
+
class FetchRedCarsAsJson < Inquery::Query
|
53
56
|
# The `call` method must be overwritten for every query. It is usually called
|
54
57
|
# via `run`.
|
55
58
|
def call
|
@@ -283,6 +286,12 @@ There are some key benefits to this approach:
|
|
283
286
|
clear where to find the corresponding unit tests for each one of your
|
284
287
|
query classes.
|
285
288
|
|
289
|
+
## Contributors
|
290
|
+
|
291
|
+
Thanks to Jeroen Weeink for his insights regarding using query classes as scopes
|
292
|
+
in his [blog post](http://craftingruby.com/posts/2015/06/29/query-objects-through-scopes.html).
|
293
|
+
And special thanks to [SubGit](http://www.subgit.com/) for their great open source licensing.
|
294
|
+
|
286
295
|
## Copyright
|
287
296
|
|
288
|
-
Copyright (c)
|
297
|
+
Copyright (c) 2017 Sitrox. See `LICENSE` for further details.
|
data/RUBY_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.3.1-p112
|
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', '
|
24
|
+
spec.add_dependency 'schemacop', '~> 1'
|
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
|
-
0.0
|
1
|
+
0.1.0
|
data/doc/Inquery.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Module: Inquery
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.9
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
15
|
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
18
|
+
pathId = "Inquery";
|
19
19
|
relpath = '';
|
20
|
-
framesUrl = "frames.html#!Inquery.html";
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,63 +27,63 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
33
38
|
|
34
39
|
<a href="_index.html">Index (I)</a> »
|
35
40
|
|
36
41
|
|
37
42
|
<span class="title">Inquery</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="file_list.html">
|
57
|
-
File List
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
<div id="content"><h1>Module: Inquery
|
62
|
+
<div id="content"><h1>Module: Inquery
|
67
63
|
|
68
64
|
|
69
65
|
|
70
66
|
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
71
69
|
|
72
|
-
<dl class="box">
|
73
70
|
|
74
71
|
|
75
|
-
|
76
72
|
|
77
|
-
|
78
73
|
|
79
74
|
|
75
|
+
|
80
76
|
|
81
|
-
|
82
|
-
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/inquery.rb<span class="defines">,<br />
|
83
82
|
lib/inquery/query.rb,<br /> lib/inquery/exceptions.rb,<br /> lib/inquery/query/chainable.rb,<br /> lib/inquery/mixins/schema_validation.rb,<br /> lib/inquery/mixins/relation_validation.rb</span>
|
84
83
|
</dd>
|
84
|
+
</dl>
|
85
85
|
|
86
|
-
</
|
87
|
-
<div class="clear"></div>
|
86
|
+
</div>
|
88
87
|
|
89
88
|
<h2>Defined Under Namespace</h2>
|
90
89
|
<p class="children">
|
@@ -109,11 +108,12 @@
|
|
109
108
|
|
110
109
|
</div>
|
111
110
|
|
112
|
-
|
113
|
-
Generated on
|
111
|
+
<div id="footer">
|
112
|
+
Generated on Tue May 16 10:49:05 2017 by
|
114
113
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
115
|
-
0.
|
114
|
+
0.9.9 (ruby-2.3.1).
|
116
115
|
</div>
|
117
116
|
|
117
|
+
</div>
|
118
118
|
</body>
|
119
119
|
</html>
|
data/doc/Inquery/Exceptions.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Module: Inquery::Exceptions
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.9
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
15
|
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
18
|
+
pathId = "Inquery::Exceptions";
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!Inquery/Exceptions.html";
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,61 +27,61 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
33
38
|
|
34
39
|
<a href="../_index.html">Index (E)</a> »
|
35
40
|
<span class='title'><span class='object_link'><a href="../Inquery.html" title="Inquery (module)">Inquery</a></span></span>
|
36
41
|
»
|
37
42
|
<span class="title">Exceptions</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="../class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../file_list.html">
|
57
|
-
File List
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
<div id="content"><h1>Module: Inquery::Exceptions
|
62
|
+
<div id="content"><h1>Module: Inquery::Exceptions
|
67
63
|
|
68
64
|
|
69
65
|
|
70
66
|
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
71
69
|
|
72
|
-
<dl class="box">
|
73
70
|
|
74
71
|
|
75
|
-
|
76
72
|
|
77
|
-
|
78
73
|
|
79
74
|
|
75
|
+
|
80
76
|
|
81
|
-
|
82
|
-
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/inquery/exceptions.rb</dd>
|
82
|
+
</dl>
|
83
83
|
|
84
|
-
</
|
85
|
-
<div class="clear"></div>
|
84
|
+
</div>
|
86
85
|
|
87
86
|
<h2>Defined Under Namespace</h2>
|
88
87
|
<p class="children">
|
@@ -105,11 +104,12 @@
|
|
105
104
|
|
106
105
|
</div>
|
107
106
|
|
108
|
-
|
109
|
-
Generated on
|
107
|
+
<div id="footer">
|
108
|
+
Generated on Tue May 16 10:49:05 2017 by
|
110
109
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
111
|
-
0.
|
110
|
+
0.9.9 (ruby-2.3.1).
|
112
111
|
</div>
|
113
112
|
|
113
|
+
</div>
|
114
114
|
</body>
|
115
115
|
</html>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Exception: Inquery::Exceptions::Base
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.9
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
15
|
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
18
|
+
pathId = "Inquery::Exceptions::Base";
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!Inquery/Exceptions/Base.html";
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,51 +27,48 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
33
38
|
|
34
39
|
<a href="../../_index.html">Index (B)</a> »
|
35
40
|
<span class='title'><span class='object_link'><a href="../../Inquery.html" title="Inquery (module)">Inquery</a></span></span> » <span class='title'><span class='object_link'><a href="../Exceptions.html" title="Inquery::Exceptions (module)">Exceptions</a></span></span>
|
36
41
|
»
|
37
42
|
<span class="title">Base</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="../../class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../../file_list.html">
|
57
|
-
File List
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
<div id="content"><h1>Exception: Inquery::Exceptions::Base
|
62
|
+
<div id="content"><h1>Exception: Inquery::Exceptions::Base
|
67
63
|
|
68
64
|
|
69
65
|
|
70
66
|
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
67
|
+
<div class="box_info">
|
73
68
|
|
74
|
-
|
75
|
-
<
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
76
72
|
<span class="inheritName">StandardError</span>
|
77
73
|
|
78
74
|
<ul class="fullTree">
|
@@ -85,21 +81,25 @@
|
|
85
81
|
</ul>
|
86
82
|
<a href="#" class="inheritanceTree">show all</a>
|
87
83
|
|
88
|
-
|
89
|
-
|
84
|
+
</dd>
|
85
|
+
</dl>
|
90
86
|
|
87
|
+
|
91
88
|
|
92
|
-
|
93
89
|
|
94
|
-
|
95
90
|
|
96
91
|
|
97
92
|
|
98
|
-
|
99
|
-
<dd class="r2 last">lib/inquery/exceptions.rb</dd>
|
93
|
+
|
100
94
|
|
101
|
-
|
102
|
-
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/inquery/exceptions.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
103
|
|
104
104
|
<div id="subclasses">
|
105
105
|
<h2>Direct Known Subclasses</h2>
|
@@ -117,11 +117,12 @@
|
|
117
117
|
|
118
118
|
</div>
|
119
119
|
|
120
|
-
|
121
|
-
Generated on
|
120
|
+
<div id="footer">
|
121
|
+
Generated on Tue May 16 10:49:05 2017 by
|
122
122
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
123
|
-
0.
|
123
|
+
0.9.9 (ruby-2.3.1).
|
124
124
|
</div>
|
125
125
|
|
126
|
+
</div>
|
126
127
|
</body>
|
127
128
|
</html>
|