esse-active_record 0.3.7 → 0.3.8

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
  SHA256:
3
- metadata.gz: 412017405772bf674a32c43510c0fdd15c0d1ac9de09357e523aa87c7d8bb0ab
4
- data.tar.gz: 869613dcb7b78c03097989dbeb2d565dc790b119043d7a1a7e7183ccdca1ba5f
3
+ metadata.gz: 9baa0f1dad618ca3520ad5cfefe4fb22d42e1411c56b7ff168e4503a1d720e75
4
+ data.tar.gz: 2d7c3aa59292b675600b556ddb07537bde6f5d833fc54c0e582f2886fc9f9ecc
5
5
  SHA512:
6
- metadata.gz: b3247f133ad930ea4ac1e69d3a242113c7ac26bc8de33737f350321fbe3b9de01ec21648310ff1b7c7ba326bca763107b4c313c663ae82686bb24da7d47e1cd3
7
- data.tar.gz: 63593435b2cea9284e530351398960f5b73d2aceaad6cb336b30cec90e11cb419b4ad7a55a80265a91cb5b2b9c7704572758129d135ddc5f611e0f98f1be0de6
6
+ metadata.gz: a61ef5cd41fc8a4f2b86819f101c47a88544f7b446467ab1a5fed06e77809684cc04a784ad4699fc36ab3feb4553c0879d0237954db423cfe1b3ac0067647fa0
7
+ data.tar.gz: 4984a7e20c4fd4d359682864d24b543a6e12759e463cbee048f658b3abdf3a27e8d5a8ae434ddd28820f45e699c05c4138de33e86bbae9c2683954005601a4ce
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.3.8 - 2024-08-08
8
+ * Add `connect_with:` option to the collection definition.
9
+ * Adjust UpdateLazyAttribute callback to not use keyword arguments for better compatibility with older versions of Ruby.
10
+
7
11
  ## 0.3.7 - 2024-08-05
8
12
  * Add `connected_to` to the collection for custom connection handling
9
13
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- esse-active_record (0.3.7)
4
+ esse-active_record (0.3.8)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.7)
4
+ esse-active_record (0.3.8)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.7)
4
+ esse-active_record (0.3.8)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.7)
4
+ esse-active_record (0.3.8)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.7)
4
+ esse-active_record (0.3.8)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.7)
4
+ esse-active_record (0.3.8)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -11,10 +11,10 @@ module Esse::ActiveRecord
11
11
  end
12
12
 
13
13
  def call(model)
14
- related_ids = Array(block_result || model.id)
14
+ related_ids = Esse::ArrayUtils.wrap(block_result || model.id)
15
15
  return true if related_ids.empty?
16
16
 
17
- repo.update_documents_attribute(attribute_name, *related_ids, **options)
17
+ repo.update_documents_attribute(attribute_name, related_ids, options)
18
18
 
19
19
  true
20
20
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Esse
4
4
  module ActiveRecord
5
- VERSION = '0.3.7'
5
+ VERSION = '0.3.8'
6
6
  end
7
7
  end
@@ -18,6 +18,7 @@ module Esse
18
18
  repo = Class.new(Esse::ActiveRecord::Collection)
19
19
  repo.base_scope = -> { model_class }
20
20
  repo.batch_size = kwargs.delete(:batch_size) if kwargs.key?(:batch_size)
21
+ repo.connect_with = kwargs.delete(:connect_with) if kwargs.key?(:connect_with)
21
22
  repo.class_eval(&block) if block
22
23
 
23
24
  super(repo, *args, **kwargs)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esse-active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos G. Zimmermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-05 00:00:00.000000000 Z
11
+ date: 2024-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: esse