inquery 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ab3cd729d1ad08041f09d90c2d3f95925dd4ba5
4
- data.tar.gz: 00f6185d8d34785c27ba9c936b618188f0caa57b
3
+ metadata.gz: aec4e3689d2f6830ee142beb89ef38d8c7e03d65
4
+ data.tar.gz: 491f28cd6d7b8335362d77699f0f0c214824b893
5
5
  SHA512:
6
- metadata.gz: 57bac62a978855077de4f05449c4eebc1128cc72ecad1781104c614f6876dea8bc46aab2a2e95f7d57169a7506fb726510edfa6591bf54dd8306afb420a25939
7
- data.tar.gz: e05f7bc9e5f42c3fdf53f1170cbc0a9c5004ec760d5a0982e645f79ae1cb9b606a9d3095d51ee8a9483b3dcf9e51a488e1f1aa6a207ef0ab9e5902960a43efd5
6
+ metadata.gz: 9d009ad21e0578929aa49c050210096c6f3d747c9b6aed1ede3ab26d4e4255d7695a0d22ec896b657167cca300642158ecf040cac48f0d3a2c7e8d374aec603f
7
+ data.tar.gz: '08ad570e01461f620e959923cc8cbc8083efe08296982f5517ab1e99df22dad1d3b6bb73fe9eba1c68205bacdffb782ab8b4df92538eb568d015d70c3c412ae5'
@@ -1,7 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0
4
- - 2.2
5
3
  - 2.3.0
6
4
  script:
7
5
  - bundle install
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) 2016 Sitrox. See `LICENSE` for further details.
297
+ Copyright (c) 2017 Sitrox. See `LICENSE` for further details.
@@ -1 +1 @@
1
- ruby-2.0.0-p353
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', '>= 1.0.1'
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
1
+ 0.1.0
@@ -1,12 +1,12 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html>
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
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
- &mdash; Documentation by YARD 0.8.7.6
9
+ &mdash; 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
- hasFrames = window.top.frames.main ? true : false;
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 id="header">
32
- <div id="menu">
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> &raquo;
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
- <div id="search">
46
+ <div id="search">
44
47
 
45
48
  <a class="full_list_link" id="class_list_link"
46
49
  href="class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="method_list.html">
52
- Method List
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
- <div class="clear"></div>
62
- </div>
59
+ <div class="clear"></div>
60
+ </div>
63
61
 
64
- <iframe id="search_frame"></iframe>
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
- <dt class="r1 last">Defined in:</dt>
82
- <dd class="r1 last">lib/inquery.rb<span class="defines">,<br />
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
- </dl>
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
- <div id="footer">
113
- Generated on Thu Jun 9 10:26:31 2016 by
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.8.7.6 (ruby-2.2.3).
114
+ 0.9.9 (ruby-2.3.1).
116
115
  </div>
117
116
 
117
+ </div>
118
118
  </body>
119
119
  </html>
@@ -1,12 +1,12 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html>
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
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
- &mdash; Documentation by YARD 0.8.7.6
9
+ &mdash; 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
- hasFrames = window.top.frames.main ? true : false;
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 id="header">
32
- <div id="menu">
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> &raquo;
35
40
  <span class='title'><span class='object_link'><a href="../Inquery.html" title="Inquery (module)">Inquery</a></span></span>
36
41
  &raquo;
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
- <div id="search">
46
+ <div id="search">
44
47
 
45
48
  <a class="full_list_link" id="class_list_link"
46
49
  href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
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
- <div class="clear"></div>
62
- </div>
59
+ <div class="clear"></div>
60
+ </div>
63
61
 
64
- <iframe id="search_frame"></iframe>
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
- <dt class="r1 last">Defined in:</dt>
82
- <dd class="r1 last">lib/inquery/exceptions.rb</dd>
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/inquery/exceptions.rb</dd>
82
+ </dl>
83
83
 
84
- </dl>
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
- <div id="footer">
109
- Generated on Thu Jun 9 10:26:31 2016 by
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.8.7.6 (ruby-2.2.3).
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html>
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
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
- &mdash; Documentation by YARD 0.8.7.6
9
+ &mdash; 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
- hasFrames = window.top.frames.main ? true : false;
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 id="header">
32
- <div id="menu">
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> &raquo;
35
40
  <span class='title'><span class='object_link'><a href="../../Inquery.html" title="Inquery (module)">Inquery</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Exceptions.html" title="Inquery::Exceptions (module)">Exceptions</a></span></span>
36
41
  &raquo;
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
- <div id="search">
46
+ <div id="search">
44
47
 
45
48
  <a class="full_list_link" id="class_list_link"
46
49
  href="../../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../../method_list.html">
52
- Method List
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
- <div class="clear"></div>
62
- </div>
59
+ <div class="clear"></div>
60
+ </div>
63
61
 
64
- <iframe id="search_frame"></iframe>
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
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
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
- </dd>
89
-
84
+ </dd>
85
+ </dl>
90
86
 
87
+
91
88
 
92
-
93
89
 
94
-
95
90
 
96
91
 
97
92
 
98
- <dt class="r2 last">Defined in:</dt>
99
- <dd class="r2 last">lib/inquery/exceptions.rb</dd>
93
+
100
94
 
101
- </dl>
102
- <div class="clear"></div>
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
- <div id="footer">
121
- Generated on Thu Jun 9 10:26:31 2016 by
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.8.7.6 (ruby-2.2.3).
123
+ 0.9.9 (ruby-2.3.1).
124
124
  </div>
125
125
 
126
+ </div>
126
127
  </body>
127
128
  </html>