associationist 0.2.2 → 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: 878f0156f854f41b33506890cdd27151fe74fe3c3eec87d158c37815900af93f
4
- data.tar.gz: 89609bc77e61936e2d53c7a6802eac137e772357804d95a82fc5917fa07344e1
3
+ metadata.gz: 032e6fc864287effbb920d7c47c07020586139c5cb77ecb0869a77b42ddf9462
4
+ data.tar.gz: 7632f972a6a12a1c347e29641261708463622bac02b0bb95b8d95ae778836d5b
5
5
  SHA512:
6
- metadata.gz: e0ca3a3b83aeb159c7f172da81830e2f9e1f023731257a6e1e8ede9b7254177d8cf03b5bb934ea7829b004cd78b6b4547c3fb3e2e5169bc9db0f8d98685cd8d5
7
- data.tar.gz: d3643efef8ac1f03f632c563708908d480e1044fa66e7a58f114e80485681cfb9ba9b85e27efc150445703d843b7eb0925aa2c0e0524a12d2ddc5d1c1d363202
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.2'
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.2
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: 2024-08-11 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.3'
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.3'
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.4.1
127
- signing_key:
126
+ rubygems_version: 3.5.16
127
+ signing_key:
128
128
  specification_version: 4
129
129
  summary: ''
130
130
  test_files: []