activerecord-import 1.7.0 → 1.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: 5aeed63fcbc9ad647ab901931265d2765baf5d0e5a1e9d2cf2c68af32dd5e1be
4
- data.tar.gz: 47480cc7244aada4bc69ba28043e8ab85ae1cece4420db4453400425a5773126
3
+ metadata.gz: d1478b29daf1e757c91a0ca8693bb1b03f9a90daa2fe02f0959576bcec900d85
4
+ data.tar.gz: dc938a1936c931182675a118ad24a37e2a7c5a27c0419e5bd947e0ec35aa4334
5
5
  SHA512:
6
- metadata.gz: 5f6b5749dd6ce81784f7016c6227a6d0f5047c59a45beb13616853a89599ac507241012a92c3e4f9996c7a465d4d926e0e8d1183af1854f7a0c8a05e2e59219f
7
- data.tar.gz: 72b00e7a5c61af3923b618ebe0d96f945a7af145f38ec5312962220b925e1dfc918da6028bb48d8ff7842c32584b34b06cec8fd8288dbb83212ca035f7a16c08
6
+ metadata.gz: e276196113f433c8989a9a06cfad36df650105183a5559a548bdd8a04bd2da22db36ca996d2d0d04c4561b33ceb44559b50b4ad98e0a2d9f050b8084ee99c8e6
7
+ data.tar.gz: e699052ac2499bac23a9955fef71df853050767785d573523e23a1d216cfba9cb75b81b0db9f5e2afac02afbcb416563af6e7a2bf69f6d1288c6e6c71aeb7e5c
@@ -36,6 +36,8 @@ jobs:
36
36
  ruby:
37
37
  - 3.3
38
38
  env:
39
+ - AR_VERSION: '7.2'
40
+ RUBYOPT: --enable-frozen-string-literal
39
41
  - AR_VERSION: '7.1'
40
42
  RUBYOPT: --enable-frozen-string-literal
41
43
  - AR_VERSION: '7.0'
@@ -43,6 +45,9 @@ jobs:
43
45
  - AR_VERSION: 6.1
44
46
  RUBYOPT: --enable-frozen-string-literal
45
47
  include:
48
+ - ruby: 3.2
49
+ env:
50
+ AR_VERSION: '7.2'
46
51
  - ruby: 3.2
47
52
  env:
48
53
  AR_VERSION: '7.1'
@@ -85,15 +90,6 @@ jobs:
85
90
  - ruby: 2.6
86
91
  env:
87
92
  AR_VERSION: 5.2
88
- - ruby: 2.6
89
- env:
90
- AR_VERSION: 5.1
91
- - ruby: 2.4
92
- env:
93
- AR_VERSION: '5.0'
94
- - ruby: 2.4
95
- env:
96
- AR_VERSION: 4.2
97
93
  runs-on: ubuntu-latest
98
94
  env:
99
95
  AR_VERSION: ${{ matrix.env.AR_VERSION }}
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## Changes in 1.8.0
2
+
3
+ ### New Features
4
+
5
+ * Add support for ActiveRecord 7.2 via \##845.
6
+
1
7
  ## Changes in 1.7.0
2
8
 
3
9
  ### New Features
@@ -10,6 +10,10 @@ Gem::Specification.new do |gem|
10
10
  gem.homepage = "https://github.com/zdennis/activerecord-import"
11
11
  gem.license = "MIT"
12
12
 
13
+ gem.metadata = {
14
+ "changelog_uri" => "https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md"
15
+ }
16
+
13
17
  gem.files = `git ls-files`.split($\)
14
18
  gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
15
19
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ gem 'activerecord', '~> 7.2.0'
@@ -62,6 +62,7 @@ module ActiveRecord::Import # :nodoc:
62
62
  if @validate_callbacks.respond_to?(:chain, true)
63
63
  @validate_callbacks.send(:chain).tap do |chain|
64
64
  callback.instance_variable_set(:@filter, filter)
65
+ callback.instance_variable_set(:@compiled, nil)
65
66
  chain[i] = callback
66
67
  end
67
68
  else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module Import
5
- VERSION = "1.7.0"
5
+ VERSION = "1.8.0"
6
6
  end
7
7
  end
data/test/models/topic.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Topic < ActiveRecord::Base
4
- if ENV['AR_VERSION'].to_i >= 6.0
4
+ if ENV['AR_VERSION'].to_f >= 6.0
5
5
  self.ignored_columns = [:priority]
6
6
  end
7
7
  alias_attribute :name, :title
@@ -19,8 +19,15 @@ class Widget < ActiveRecord::Base
19
19
 
20
20
  default_scope -> { where(active: true) }
21
21
 
22
- serialize :data, Hash
23
- serialize :json_data, JSON
22
+ if ENV['AR_VERSION'].to_f >= 7.1
23
+ serialize :data, coder: YAML
24
+ serialize :json_data, coder: JSON
25
+ serialize :custom_data, coder: CustomCoder.new
26
+ else
27
+ serialize :data, Hash
28
+ serialize :json_data, JSON
29
+ serialize :custom_data, CustomCoder.new
30
+ end
31
+
24
32
  serialize :unspecified_data
25
- serialize :custom_data, CustomCoder.new
26
33
  end
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.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Dennis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-17 00:00:00.000000000 Z
11
+ date: 2024-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -78,6 +78,7 @@ files:
78
78
  - gemfiles/6.1.gemfile
79
79
  - gemfiles/7.0.gemfile
80
80
  - gemfiles/7.1.gemfile
81
+ - gemfiles/7.2.gemfile
81
82
  - lib/activerecord-import.rb
82
83
  - lib/activerecord-import/active_record/adapters/abstract_adapter.rb
83
84
  - lib/activerecord-import/active_record/adapters/jdbcmysql_adapter.rb
@@ -184,8 +185,9 @@ files:
184
185
  homepage: https://github.com/zdennis/activerecord-import
185
186
  licenses:
186
187
  - MIT
187
- metadata: {}
188
- post_install_message:
188
+ metadata:
189
+ changelog_uri: https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md
190
+ post_install_message:
189
191
  rdoc_options: []
190
192
  require_paths:
191
193
  - lib
@@ -200,8 +202,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
202
  - !ruby/object:Gem::Version
201
203
  version: '0'
202
204
  requirements: []
203
- rubygems_version: 3.0.3.1
204
- signing_key:
205
+ rubygems_version: 3.5.11
206
+ signing_key:
205
207
  specification_version: 4
206
208
  summary: Bulk insert extension for ActiveRecord
207
209
  test_files: