gizzard 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +6 -15
- data/Appraisals +8 -4
- data/gemfiles/activerecord6.0.gemfile +1 -1
- data/gemfiles/activerecord6.1.gemfile +1 -1
- data/gemfiles/activerecord7.0.gemfile +1 -1
- data/gemfiles/{activerecord5.2.gemfile → activerecord7.1.gemfile} +1 -1
- data/gizzard.gemspec +1 -1
- data/lib/gizzard/base.rb +3 -0
- data/lib/gizzard/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8bb051ec47485a5252ebd7aa6b6d0f00a5fce77ccc985f3dba400ce3b4564b6
|
4
|
+
data.tar.gz: 319d1ac24f2da5174c7ed75a141d1f34909afac0b0ea5b8d0aafb233315c54a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6af2539ed91ffc9aa2528d6b1d301ad41972a7fb969d5074b0e7f3368fdd8cd2148b2b25b875768d108eac7151b82c03660eea961bfc8219017e3e690ee7a3d1
|
7
|
+
data.tar.gz: 69d5665693686af4f7a765f1e90142e4ba49d8bd39391381bfeed8501fa8cf455d3a7e7cfb6378044e48244f0617c65e92674bb725f98400bc8ccbe958c10ee1
|
data/.github/workflows/main.yml
CHANGED
@@ -21,25 +21,16 @@ jobs:
|
|
21
21
|
|
22
22
|
matrix:
|
23
23
|
ruby:
|
24
|
-
- '2.6'
|
25
|
-
- '2.7'
|
26
24
|
- '3.0'
|
27
25
|
- '3.1'
|
28
26
|
activerecord:
|
29
|
-
- '5.2'
|
30
27
|
- '6.0'
|
31
28
|
- '6.1'
|
32
29
|
- '7.0'
|
33
|
-
|
34
|
-
- ruby: '2.6'
|
35
|
-
activerecord: '7.0'
|
36
|
-
- ruby: '3.0'
|
37
|
-
activerecord: '5.2'
|
38
|
-
- ruby: '3.1'
|
39
|
-
activerecord: '5.2'
|
30
|
+
- '7.1'
|
40
31
|
services:
|
41
32
|
mysql:
|
42
|
-
image: mysql:
|
33
|
+
image: mysql:8
|
43
34
|
ports:
|
44
35
|
- 3306:3306
|
45
36
|
env:
|
@@ -63,14 +54,14 @@ jobs:
|
|
63
54
|
with:
|
64
55
|
ruby-version: ${{ matrix.ruby }}
|
65
56
|
bundler-cache: true
|
57
|
+
cache-version: 1
|
66
58
|
|
67
59
|
- name: set MySQL sql_mode
|
68
60
|
run: |
|
69
|
-
mysql --ssl-mode=DISABLE --protocol=tcp --host 127.0.0.1 --user=root --password=${{ env.DB_PASSWORD }} mysql <<SQL
|
61
|
+
mysql --ssl-mode=DISABLE --get-server-public-key --protocol=tcp --host 127.0.0.1 --user=root --password=${{ env.DB_PASSWORD }} mysql <<SQL
|
70
62
|
SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
71
|
-
SET GLOBAL character_set_server = '
|
72
|
-
SET GLOBAL innodb_file_per_table =
|
73
|
-
SET GLOBAL innodb_large_prefix = ON;
|
63
|
+
SET GLOBAL character_set_server = 'latin1';
|
64
|
+
SET GLOBAL innodb_file_per_table = ON;
|
74
65
|
SQL
|
75
66
|
|
76
67
|
- name: set ENV
|
data/Appraisals
CHANGED
@@ -1,17 +1,21 @@
|
|
1
1
|
appraise 'activerecord5.2' do
|
2
|
-
gem 'activerecord', '~> 5.2'
|
2
|
+
gem 'activerecord', '~> 5.2.0'
|
3
3
|
end
|
4
4
|
|
5
5
|
appraise 'activerecord6.0' do
|
6
|
-
gem 'activerecord', '~> 6.0'
|
6
|
+
gem 'activerecord', '~> 6.0.0'
|
7
7
|
end
|
8
8
|
|
9
9
|
appraise 'activerecord6.1' do
|
10
|
-
gem 'activerecord', '~> 6.1'
|
10
|
+
gem 'activerecord', '~> 6.1.0'
|
11
11
|
end
|
12
12
|
|
13
13
|
if RUBY_VERSION >= '2.7.0'
|
14
14
|
appraise 'activerecord7.0' do
|
15
|
-
gem 'activerecord', '~> 7.0'
|
15
|
+
gem 'activerecord', '~> 7.0.0'
|
16
|
+
end
|
17
|
+
|
18
|
+
appraise 'activerecord7.1' do
|
19
|
+
gem 'activerecord', '~> 7.1.0'
|
16
20
|
end
|
17
21
|
end
|
data/gizzard.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "database_cleaner-active_record"
|
30
30
|
spec.add_development_dependency "mysql2"
|
31
31
|
spec.add_development_dependency "psych", "~> 3.1"
|
32
|
-
spec.add_development_dependency "standalone_activerecord_boot_loader"
|
32
|
+
spec.add_development_dependency "standalone_activerecord_boot_loader", ">= 0.3"
|
33
33
|
spec.add_development_dependency "appraisal"
|
34
34
|
spec.add_development_dependency "bundler"
|
35
35
|
spec.add_development_dependency "rake", ">= 12.3.3"
|
data/lib/gizzard/base.rb
CHANGED
@@ -4,6 +4,9 @@ module Gizzard
|
|
4
4
|
|
5
5
|
class_methods do
|
6
6
|
def preload_associations(records:, associations:, scope: nil)
|
7
|
+
records = Array(records)
|
8
|
+
return if records.empty?
|
9
|
+
|
7
10
|
if Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new(7)
|
8
11
|
ActiveRecord::Associations::Preloader.new(records: records, associations: associations, scope: scope).call
|
9
12
|
else
|
data/lib/gizzard/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gizzard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiro Ooishi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
103
|
+
version: '0.3'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
110
|
+
version: '0.3'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: appraisal
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,10 +185,10 @@ files:
|
|
185
185
|
- bin/setup
|
186
186
|
- docker-compose.yml
|
187
187
|
- gemfiles/.bundle/config
|
188
|
-
- gemfiles/activerecord5.2.gemfile
|
189
188
|
- gemfiles/activerecord6.0.gemfile
|
190
189
|
- gemfiles/activerecord6.1.gemfile
|
191
190
|
- gemfiles/activerecord7.0.gemfile
|
191
|
+
- gemfiles/activerecord7.1.gemfile
|
192
192
|
- gizzard.gemspec
|
193
193
|
- lib/gizzard.rb
|
194
194
|
- lib/gizzard/base.rb
|
@@ -198,7 +198,7 @@ files:
|
|
198
198
|
homepage: https://github.com/taka0125/gizzard
|
199
199
|
licenses: []
|
200
200
|
metadata: {}
|
201
|
-
post_install_message:
|
201
|
+
post_install_message:
|
202
202
|
rdoc_options: []
|
203
203
|
require_paths:
|
204
204
|
- lib
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
version: '0'
|
215
215
|
requirements: []
|
216
216
|
rubygems_version: 3.3.7
|
217
|
-
signing_key:
|
217
|
+
signing_key:
|
218
218
|
specification_version: 4
|
219
219
|
summary: Often use snippet for ActiveRecord.
|
220
220
|
test_files: []
|