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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e26a6e33886dfdb5cb2d3000e32c9de7e04bb7b26cc4434c5df7f1deb094ac58
4
- data.tar.gz: 9cc37f3ab8beeef6e55d5adae2e1f76268acad3381b789f70c896a515abe8cfa
3
+ metadata.gz: a7d307ad8676050496976606227a5a671dbccb156be8ba2799b2e845f7b79be8
4
+ data.tar.gz: 0c268a2bf9dc72f045067608b7981b12c18577623ebb497bd3551a82a43cbeea
5
5
  SHA512:
6
- metadata.gz: a8236d746e52a2890dfb83e838db153150c249ff0b5fb53a1bc949d386258b5047dc93e63a40d747e0f584ffbcaf3d069122962c23a2fc3691a4e162044927af
7
- data.tar.gz: 1883cb2f7d7817561837b911828b56b540b5dff7845a943340c489786b73be9b3c24270ec2d32a5e7b9ecdb324a21f346948f183e13439e9339424ee9b593ad9
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
- Full documentation is available at [rubydoc.info/gems/occams-record](http://www.rubydoc.info/gems/occams-record).
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 vX only
323
+ # Run tests only for Ruby 3.1
320
324
  bin/testall ruby-3.1
321
325
 
322
- # Run tests for ActiveRecord vX only
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 sqlite|postgres-14|mysql-8
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
- unescape = escape
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 unescape
59
+ escape = false if clear_escape
60
60
  end
61
61
  yield flush_sql if @i > @start_i
62
62
  end
@@ -87,6 +87,7 @@ module OccamsRecord
87
87
  end
88
88
 
89
89
  alias_method :to_hash, :to_h
90
+ alias_method :attributes, :to_h
90
91
 
91
92
  #
92
93
  # Returns the name of the model and the attributes.
@@ -3,5 +3,5 @@
3
3
  #
4
4
  module OccamsRecord
5
5
  # @private
6
- VERSION = "1.9.0".freeze
6
+ VERSION = "1.9.1".freeze
7
7
  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.0
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-07-11 00:00:00.000000000 Z
11
+ date: 2023-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord