appquery 0.1.0 → 0.2.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 +4 -4
- data/.envrc +6 -1
- data/.envrc.private.example +2 -0
- data/.standard.yml +3 -1
- data/README.md +458 -11
- data/lib/app_query/rspec/helpers.rb +90 -0
- data/lib/app_query/rspec.rb +5 -0
- data/lib/app_query/tokenizer.rb +356 -0
- data/lib/app_query/version.rb +1 -1
- data/lib/app_query.rb +238 -1
- data/lib/appquery.rb +1 -0
- data/lib/rails/generators/query/USAGE +10 -0
- data/lib/rails/generators/query/query_generator.rb +20 -0
- data/lib/rails/generators/query/templates/query.sql.tt +14 -0
- data/lib/rails/generators/rspec/query_generator.rb +20 -0
- data/lib/rails/generators/rspec/templates/query_spec.rb.tt +12 -0
- data/sig/appquery.rbs +1 -1
- data/tmp/.gitkeep +0 -0
- metadata +28 -16
metadata
CHANGED
@@ -1,25 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gert Goet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
description: "Improving introspection and testability of raw SQL queries in Rails\nThis
|
14
|
+
gem improves introspection and testability of raw SQL queries in Rails by:\n- ...providing
|
15
|
+
a separate query-folder and easy instantiation \n A query like `AppQuery[:some_query]`
|
16
|
+
is read from app/queries/some_query.sql.\n\n- ...providing options for rewriting
|
17
|
+
a query:\n\n Query a CTE by replacing the select:\n query.select_all(select: \"select
|
18
|
+
* from some_cte\").entries\n\n ...similarly, query the end result (i.e. CTE `_`):\n
|
19
|
+
\ query.select_all(select: \"select count(*) from _\").entries\n\n- ...providing
|
20
|
+
(custom) casting: \n AppQuery(\"select array[1,2]\").select_value(cast: true)\n\n
|
21
|
+
\ custom deserializers:\n AppQuery(\"select '1' id\").select_all(cast: {\"id\"
|
22
|
+
=> ActiveRecord::Type::Integer.new}).entries\n\n- ...providing spec-helpers and
|
23
|
+
generators\n"
|
23
24
|
email:
|
24
25
|
- gert@thinkcreate.dk
|
25
26
|
executables: []
|
@@ -27,6 +28,7 @@ extensions: []
|
|
27
28
|
extra_rdoc_files: []
|
28
29
|
files:
|
29
30
|
- ".envrc"
|
31
|
+
- ".envrc.private.example"
|
30
32
|
- ".rspec"
|
31
33
|
- ".standard.yml"
|
32
34
|
- CHANGELOG.md
|
@@ -34,8 +36,18 @@ files:
|
|
34
36
|
- README.md
|
35
37
|
- Rakefile
|
36
38
|
- lib/app_query.rb
|
39
|
+
- lib/app_query/rspec.rb
|
40
|
+
- lib/app_query/rspec/helpers.rb
|
41
|
+
- lib/app_query/tokenizer.rb
|
37
42
|
- lib/app_query/version.rb
|
43
|
+
- lib/appquery.rb
|
44
|
+
- lib/rails/generators/query/USAGE
|
45
|
+
- lib/rails/generators/query/query_generator.rb
|
46
|
+
- lib/rails/generators/query/templates/query.sql.tt
|
47
|
+
- lib/rails/generators/rspec/query_generator.rb
|
48
|
+
- lib/rails/generators/rspec/templates/query_spec.rb.tt
|
38
49
|
- sig/appquery.rbs
|
50
|
+
- tmp/.gitkeep
|
39
51
|
homepage: https://github.com/eval/appquery
|
40
52
|
licenses:
|
41
53
|
- MIT
|
@@ -51,16 +63,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
63
|
requirements:
|
52
64
|
- - ">="
|
53
65
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.
|
66
|
+
version: 3.1.0
|
55
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
68
|
requirements:
|
57
69
|
- - ">="
|
58
70
|
- !ruby/object:Gem::Version
|
59
71
|
version: '0'
|
60
72
|
requirements: []
|
61
|
-
rubygems_version: 3.5.
|
73
|
+
rubygems_version: 3.5.22
|
62
74
|
signing_key:
|
63
75
|
specification_version: 4
|
64
|
-
summary:
|
65
|
-
and testability.
|
76
|
+
summary: "raw SQL \U0001F966, cooked \U0001F372 or: make working with raw SQL queries
|
77
|
+
in Rails convenient by improving their introspection and testability."
|
66
78
|
test_files: []
|