gizzard 0.7.0 → 0.8.0

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: 7835d4c05720dfbe30c00af4019b823ce0e5098c4151ced2744147272bbddd87
4
- data.tar.gz: 6735ab05f95da9f5ac49846f33856fba7d7efb3a34803a344e5ec3c78097b94a
3
+ metadata.gz: c8bb051ec47485a5252ebd7aa6b6d0f00a5fce77ccc985f3dba400ce3b4564b6
4
+ data.tar.gz: 319d1ac24f2da5174c7ed75a141d1f34909afac0b0ea5b8d0aafb233315c54a3
5
5
  SHA512:
6
- metadata.gz: 316d1946ed962e152b33aae18b72188d4b4ae04495d5da3184db902143a95dd93534ff401ddb4cbd71b78bf7711c08cb7b3511dee29d1f6ca8b8fcf88cce1ed5
7
- data.tar.gz: 30ee2722af67585d7888257bcb04aae0dd8850077e1c8104b1734db3080d1003e32da7b52aa7aac9758c53290aaf79394fc73e30fd2ae25aa6d2a86629a60143
6
+ metadata.gz: 6af2539ed91ffc9aa2528d6b1d301ad41972a7fb969d5074b0e7f3368fdd8cd2148b2b25b875768d108eac7151b82c03660eea961bfc8219017e3e690ee7a3d1
7
+ data.tar.gz: 69d5665693686af4f7a765f1e90142e4ba49d8bd39391381bfeed8501fa8cf455d3a7e7cfb6378044e48244f0617c65e92674bb725f98400bc8ccbe958c10ee1
@@ -21,25 +21,16 @@ jobs:
21
21
 
22
22
  matrix:
23
23
  ruby:
24
- - 2.6
25
- - 2.7
26
- - 3.0
27
- - 3.1
28
- gemfile:
29
- - activerecord52
30
- - activerecord61
31
- - activerecord70
32
- exclude: # https://github.com/sue445/activerecord-compatible_legacy_migration/blob/master/.github/workflows/test.yml
33
- - ruby: 2.6
34
- gemfile: activerecord70
35
- - ruby: 3.0
36
- gemfile: activerecord52
37
- - ruby: 3.1
38
- gemfile: activerecord52
39
-
24
+ - '3.0'
25
+ - '3.1'
26
+ activerecord:
27
+ - '6.0'
28
+ - '6.1'
29
+ - '7.0'
30
+ - '7.1'
40
31
  services:
41
32
  mysql:
42
- image: mysql:5.7
33
+ image: mysql:8
43
34
  ports:
44
35
  - 3306:3306
45
36
  env:
@@ -51,9 +42,8 @@ jobs:
51
42
  --health-timeout 5s
52
43
  --health-retries 5
53
44
 
54
-
55
45
  env:
56
- BUNDLE_GEMFILE: /home/runner/work/gizzard/gizzard/gemfiles/${{ matrix.gemfile }}.gemfile
46
+ BUNDLE_GEMFILE: gemfiles/activerecord${{ matrix.activerecord }}.gemfile
57
47
  DB_HOST: 127.0.0.1
58
48
 
59
49
  steps:
@@ -64,14 +54,14 @@ jobs:
64
54
  with:
65
55
  ruby-version: ${{ matrix.ruby }}
66
56
  bundler-cache: true
57
+ cache-version: 1
67
58
 
68
59
  - name: set MySQL sql_mode
69
60
  run: |
70
- 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
71
62
  SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';
72
- SET GLOBAL character_set_server = 'utf8mb4';
73
- SET GLOBAL innodb_file_per_table = 1;
74
- SET GLOBAL innodb_large_prefix = ON;
63
+ SET GLOBAL character_set_server = 'latin1';
64
+ SET GLOBAL innodb_file_per_table = ON;
75
65
  SQL
76
66
 
77
67
  - name: set ENV
@@ -0,0 +1,33 @@
1
+ name: Release gem
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ rubygems-otp-code:
7
+ description: RubyGems OTP code
8
+ required: true
9
+
10
+ permissions:
11
+ contents: write
12
+
13
+ jobs:
14
+ release-gem:
15
+ runs-on: ubuntu-latest
16
+ env:
17
+ GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
18
+ GEM_HOST_OTP_CODE: ${{ github.event.inputs.rubygems-otp-code }}
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ with:
22
+ fetch-depth: 0 # bundle exec rake release で git tag を見るため、tagをfetchするようにしている
23
+ - uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: 3.1.1
26
+ - name: Bundle install
27
+ run: bundle install
28
+ - name: Setup git config # bundle exec rake release でgit tagが打たれていない場合、タグを打ってpushしてくれるため用意している
29
+ run: |
30
+ git config --global user.email "taka0125@gmail.com"
31
+ git config --global user.name "Takahiro Ooishi"
32
+ - name: Release gem
33
+ run: bundle exec rake release
data/Appraisals CHANGED
@@ -1,13 +1,21 @@
1
- appraise 'activerecord52' do
2
- gem 'activerecord', '~> 5.2'
1
+ appraise 'activerecord5.2' do
2
+ gem 'activerecord', '~> 5.2.0'
3
3
  end
4
4
 
5
- appraise 'activerecord61' do
6
- gem 'activerecord', '~> 6.1'
5
+ appraise 'activerecord6.0' do
6
+ gem 'activerecord', '~> 6.0.0'
7
+ end
8
+
9
+ appraise 'activerecord6.1' do
10
+ gem 'activerecord', '~> 6.1.0'
7
11
  end
8
12
 
9
13
  if RUBY_VERSION >= '2.7.0'
10
- appraise 'activerecord70' do
11
- gem 'activerecord', '~> 7.0'
14
+ appraise 'activerecord7.0' do
15
+ gem 'activerecord', '~> 7.0.0'
16
+ end
17
+
18
+ appraise 'activerecord7.1' do
19
+ gem 'activerecord', '~> 7.1.0'
12
20
  end
13
21
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 5.2"
5
+ gem "activerecord", "~> 6.0.0"
6
6
 
7
7
  gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 6.1"
5
+ gem "activerecord", "~> 6.1.0"
6
6
 
7
7
  gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 7.0"
5
+ gem "activerecord", "~> 7.0.0"
6
6
 
7
7
  gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 7.1.0"
6
+
7
+ gemspec path: "../"
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
@@ -1,3 +1,3 @@
1
1
  module Gizzard
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
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.7.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: 2022-07-17 00:00:00.000000000 Z
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
@@ -172,6 +172,7 @@ extensions: []
172
172
  extra_rdoc_files: []
173
173
  files:
174
174
  - ".github/workflows/main.yml"
175
+ - ".github/workflows/release.yml"
175
176
  - ".gitignore"
176
177
  - ".rspec"
177
178
  - ".travis.yml"
@@ -184,9 +185,10 @@ files:
184
185
  - bin/setup
185
186
  - docker-compose.yml
186
187
  - gemfiles/.bundle/config
187
- - gemfiles/activerecord52.gemfile
188
- - gemfiles/activerecord61.gemfile
189
- - gemfiles/activerecord70.gemfile
188
+ - gemfiles/activerecord6.0.gemfile
189
+ - gemfiles/activerecord6.1.gemfile
190
+ - gemfiles/activerecord7.0.gemfile
191
+ - gemfiles/activerecord7.1.gemfile
190
192
  - gizzard.gemspec
191
193
  - lib/gizzard.rb
192
194
  - lib/gizzard/base.rb
@@ -196,7 +198,7 @@ files:
196
198
  homepage: https://github.com/taka0125/gizzard
197
199
  licenses: []
198
200
  metadata: {}
199
- post_install_message:
201
+ post_install_message:
200
202
  rdoc_options: []
201
203
  require_paths:
202
204
  - lib
@@ -211,8 +213,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
213
  - !ruby/object:Gem::Version
212
214
  version: '0'
213
215
  requirements: []
214
- rubygems_version: 3.1.6
215
- signing_key:
216
+ rubygems_version: 3.3.7
217
+ signing_key:
216
218
  specification_version: 4
217
219
  summary: Often use snippet for ActiveRecord.
218
220
  test_files: []