activerecord-import 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yaml +1 -1
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +6 -0
- data/benchmarks/lib/cli_parser.rb +1 -1
- data/lib/activerecord-import/import.rb +3 -2
- data/lib/activerecord-import/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 021d7d0d5b653ef01a5ab1aa23b72cca6f46abc65040014ad02fa790976f0189
|
4
|
+
data.tar.gz: a5440146848bc1bfee194681b9bf53f928150936c3c992eaec1299fec2e7c1bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 460961724684bc286a63ff0880ee8279a5a1528cd02ebd28e4694b8d7c39c22f19183f929ecd525de57a5069bf45218428aae47fd96ea5782e7b51a85aee0e1f
|
7
|
+
data.tar.gz: b864f8eb6fc2a074497761813f29aca981ec23daa7ae12164f1b34a08bbad6175025e6a551575ef2f53f7521f13d15de02eccb24f36c2e18dcdb04fdf77e53a7
|
data/.github/workflows/test.yaml
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -10,7 +10,7 @@ require 'ostruct'
|
|
10
10
|
# * t - the table types to test. ie: myisam, innodb, memory, temporary, etc.
|
11
11
|
#
|
12
12
|
module BenchmarkOptionParser
|
13
|
-
BANNER = "Usage: ruby #{$0} [options]\nSee ruby #{$0} -h for more options."
|
13
|
+
BANNER = "Usage: ruby #{$0} [options]\nSee ruby #{$0} -h for more options.".freeze
|
14
14
|
|
15
15
|
def self.print_banner
|
16
16
|
puts BANNER
|
@@ -94,7 +94,7 @@ module ActiveRecord::Import # :nodoc:
|
|
94
94
|
env = ActiveSupport::Callbacks::Filters::Environment.new(model, false, nil)
|
95
95
|
if runner.respond_to?(:call) # ActiveRecord < 5.1
|
96
96
|
runner.call(env)
|
97
|
-
else # ActiveRecord 5.1
|
97
|
+
else # ActiveRecord >= 5.1
|
98
98
|
# Note that this is a gross simplification of ActiveSupport::Callbacks#run_callbacks.
|
99
99
|
# It's technically possible for there to exist an "around" callback in the
|
100
100
|
# :validate chain, but this would be an aberration, since Rails doesn't define
|
@@ -107,7 +107,8 @@ module ActiveRecord::Import # :nodoc:
|
|
107
107
|
# no real-world use case for it.
|
108
108
|
raise "The :validate callback chain contains an 'around' callback, which is unsupported" unless runner.final?
|
109
109
|
runner.invoke_before(env)
|
110
|
-
|
110
|
+
# Ensure a truthy value is returned. ActiveRecord < 7.2 always returned an array.
|
111
|
+
runner.invoke_after(env) || []
|
111
112
|
end
|
112
113
|
elsif @validate_callbacks.method(:compile).arity == 0 # ActiveRecord = 4.0
|
113
114
|
model.instance_eval @validate_callbacks.compile
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Dennis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
202
|
- !ruby/object:Gem::Version
|
203
203
|
version: '0'
|
204
204
|
requirements: []
|
205
|
-
rubygems_version: 3.
|
205
|
+
rubygems_version: 3.3.9
|
206
206
|
signing_key:
|
207
207
|
specification_version: 4
|
208
208
|
summary: Bulk insert extension for ActiveRecord
|