associationist 0.2.1 → 0.2.3

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: 1d0203bfe4bd1ddbccf693b78b40ef893c83ae9d4b85fb35f794cfdf195310e5
4
- data.tar.gz: d9d7f40a9292bb95bba1939549a7cd6da2691d7554776155255cf024a9507abe
3
+ metadata.gz: 032e6fc864287effbb920d7c47c07020586139c5cb77ecb0869a77b42ddf9462
4
+ data.tar.gz: 7632f972a6a12a1c347e29641261708463622bac02b0bb95b8d95ae778836d5b
5
5
  SHA512:
6
- metadata.gz: 3a08a5834974748c7e56c77d110c85f3861bd6d23ded410ddbc0ec1ac00578c296d870c1ef53548929ed80cd5a866b11c8e7ceab5647dc37642c5ff9e8968068
7
- data.tar.gz: 79303f9760fc82ad5317189f1f4a8acdee8fe7c7b52fc5b3678a09896bfedd440f6518ac79bb453dd77c55eb08ef282901394ec680c9c4669abf1c32f020aaf7
6
+ metadata.gz: f4ecf047d3dbe4c93669357e210aa455711ad1040577f7e5c6887baba98f9ffb38bd83ac9515826d8a892f5aa56a1672b7f5d32927670d0a97897481d0bec5f3
7
+ data.tar.gz: d4d5ced13eb6750df3c0daa0baf34d53ec678da2ab8430007868eb0b28fc3cc55ec32eb3f6228db643cf42523d44db5e6148b90e4ea771ca28b36bc3f10289ef
@@ -9,11 +9,21 @@ module Associationist
9
9
  end
10
10
  end
11
11
 
12
- def find_target
13
- if reflection.config.scope_proc
14
- super
15
- else
16
- reflection.config.loader_proc.call(owner)
12
+ if ActiveRecord.version >= Gem::Version.new('8.0.0')
13
+ def find_target(async: false)
14
+ if reflection.config.scope_proc
15
+ super
16
+ else
17
+ reflection.config.loader_proc.call(owner) # TODO: use async load
18
+ end
19
+ end
20
+ else
21
+ def find_target
22
+ if reflection.config.scope_proc
23
+ super
24
+ else
25
+ reflection.config.loader_proc.call(owner)
26
+ end
17
27
  end
18
28
  end
19
29
 
@@ -1,3 +1,3 @@
1
1
  module Associationist
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.3'
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require 'active_record'
2
2
 
3
- Dir.glob("#{File.dirname(__FILE__)}/**/*.rb").each do |file|
3
+ Dir.glob("#{File.dirname(__FILE__)}/associationist/**/*.rb").each do |file|
4
4
  require file
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: associationist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - onyxblade
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-09 00:00:00.000000000 Z
11
+ date: 2024-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.2'
22
+ version: '8.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '5.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.2'
32
+ version: '8.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: pry
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +108,7 @@ homepage: https://github.com/onyxblade/associationist
108
108
  licenses:
109
109
  - MIT
110
110
  metadata: {}
111
- post_install_message:
111
+ post_install_message:
112
112
  rdoc_options: []
113
113
  require_paths:
114
114
  - lib
@@ -123,8 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.2.33
127
- signing_key:
126
+ rubygems_version: 3.5.16
127
+ signing_key:
128
128
  specification_version: 4
129
129
  summary: ''
130
130
  test_files: []