appquery 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
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.1.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-10-14 00:00:00.000000000 Z
11
+ date: 2024-11-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |
14
- A query like `AppQuery[:some_query]` is read from app/queries/some_query.sql.
15
-
16
- Querying a CTE used in this query:
17
- `query.replace_select("select * from some_cte").select_all`
18
-
19
- Query the end-result:
20
- `query.as_cte(select: "select COUNT(*) from app_query").select_all`
21
-
22
- Spec-helpers and generators included.
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.0.0
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.16
73
+ rubygems_version: 3.5.22
62
74
  signing_key:
63
75
  specification_version: 4
64
- summary: Make working with raw SQL queries convenient by improving their introspection
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: []