occams-record 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -6
- data/lib/occams-record/binds_converter/abstract.rb +2 -2
- data/lib/occams-record/results/row.rb +1 -0
- data/lib/occams-record/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7d307ad8676050496976606227a5a671dbccb156be8ba2799b2e845f7b79be8
|
4
|
+
data.tar.gz: 0c268a2bf9dc72f045067608b7981b12c18577623ebb497bd3551a82a43cbeea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6073e65f4e3f7cac8b12f7da49f66dd914249f5b32eb3c42a8a8b0635eafe5bbdff6f63af1cbb8d227cdff82843f839a44b74b9d0d1c193351f96ef7089bd1d9
|
7
|
+
data.tar.gz: f3f42c3c8d3e6f42515a864bd69407093176f1794c92241b9c0c17045a61d5b4698ae1ea699d781d824b5c4779138b006b50079e9b07b1ce089c58be59c3ed9b
|
data/README.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# Occams Record
|
2
2
|
|
3
3
|
> Do not multiply entities beyond necessity. -- Occam's Razor
|
4
|
+
>
|
5
|
+
>
|
4
6
|
|
5
|
-
|
7
|
+
Learn OccamsRecord by reading [The Book at occams.jordanhollinger.com](https://occams.jordanhollinger.com/).
|
8
|
+
|
9
|
+
API documentation is available at [rubydoc.info/gems/occams-record](http://www.rubydoc.info/gems/occams-record).
|
6
10
|
|
7
11
|
OccamsRecord is a high-efficiency, advanced query library for use alongside ActiveRecord. It is **not** an ORM or an ActiveRecord replacement. OccamsRecord can breathe fresh life into your ActiveRecord app by giving it two things:
|
8
12
|
|
@@ -310,24 +314,27 @@ On the other hand, Active Record makes it *very* easy to forget to eager load as
|
|
310
314
|
|
311
315
|
# Testing
|
312
316
|
|
313
|
-
Tests are run with `appraisal` in Docker Compose using the `bin/test` or `bin/testall` scripts.
|
317
|
+
Tests are run with `appraisal` in Docker Compose using the `bin/test` or `bin/testall` scripts. See [test/matrix](./test/matrix) for the full list of Ruby, ActiveRecord, and database versions that are tested against.
|
314
318
|
|
315
319
|
```bash
|
316
320
|
# Run tests against all supported ActiveRecord versions, Ruby versions, and databases
|
317
321
|
bin/testall
|
318
322
|
|
319
|
-
# Run tests for Ruby
|
323
|
+
# Run tests only for Ruby 3.1
|
320
324
|
bin/testall ruby-3.1
|
321
325
|
|
322
|
-
# Run tests for
|
323
|
-
bin/testall ar-6.1
|
326
|
+
# Run tests only for Ruby 3.1 and ActiveRecored 6.1
|
327
|
+
bin/testall ruby-3.1 ar-6.1
|
324
328
|
|
325
329
|
# Run tests against a specific database
|
326
|
-
bin/testall
|
330
|
+
bin/testall sqlite3|postgres-14|mysql-8
|
327
331
|
|
328
332
|
# Run exactly one set of tests
|
329
333
|
bin/test ruby-3.1 ar-7.0 postgres-14
|
330
334
|
|
335
|
+
# Use Podman Compose
|
336
|
+
OCCAMS_PODMAN=1 bin/testall
|
337
|
+
|
331
338
|
# If all tests complete successfully, you'll be rewarded by an ASCII Nyancat!
|
332
339
|
|
333
340
|
+ o + o
|
@@ -31,7 +31,7 @@ module OccamsRecord
|
|
31
31
|
escape = false
|
32
32
|
until @i > @end
|
33
33
|
char = @sql[@i]
|
34
|
-
|
34
|
+
clear_escape = escape
|
35
35
|
case char
|
36
36
|
when @bind_sigil
|
37
37
|
if escape
|
@@ -56,7 +56,7 @@ module OccamsRecord
|
|
56
56
|
else
|
57
57
|
@i += 1
|
58
58
|
end
|
59
|
-
escape = false if
|
59
|
+
escape = false if clear_escape
|
60
60
|
end
|
61
61
|
yield flush_sql if @i > @start_i
|
62
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: occams-record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Hollinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|