activerecord-import 3.0.0 → 3.0.1

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: 44eca8fc38325819cfc2eeb8c9a6151182f5de96135af6ad3ae1cc145c5f7740
4
- data.tar.gz: 9f6ef423efde4813da41b8eb5ba218d4166bb3a86beba83d72b4bbf9e70af27f
3
+ metadata.gz: a217f5193e7780d4c88097d2b57af11f756fe805067d6209d1fe66e2469471b2
4
+ data.tar.gz: 8d64e43716f2e83b06a5221d7a7a7356b1f7f86d62d6ba84e10474b9fd67e246
5
5
  SHA512:
6
- metadata.gz: f534b0b2a47c29484b8957109794ab8924c758993e93ecd871104f97ce8402856999c40d1e845ff7a2857fb92e12291a0d93259a9bdd17d4b60f81cb20ac5e42
7
- data.tar.gz: f9e8de71d80edd76c978a1d85807b6a94247da8366dfda54a4c1e2c01ed25c31767d836c2ec487d39377379492dd896f320a986c1a158cfda7f810e7b3ba3a80
6
+ metadata.gz: 2345d3ab1dc21d0aef164285b008b85a3568afcd69c938a106bea1eadc7ac87a429e1f5234bcd5649c508343a702c35e25b5e7d6841bfd79ace21dd4bb2b46a6
7
+ data.tar.gz: 4ac0791171aef53c39a5da7c5de38c9af9d5f2f7a1cd069293cbc886f8a981014e9d66bf4583a57a86afd05081aa58a92e9fa7689edddb778ccc073a9f805c5a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## Changes in 3.0.1
2
+
3
+ ### Fixes
4
+
5
+ * Fix `synchronize` raising `NoMethodError` (undefined method `clear_aggregation_cache`) for models
6
+ that don't use `composed_of`. This regressed in 3.0.0. Fixes #951 via #952.
7
+ * Quote the primary key that SQLite uses as the default `ON CONFLICT` target, so
8
+ `on_duplicate_key_update` works when the primary key is named after a reserved word such as
9
+ `order`. Thanks to @TakuyaKurimoto via #950.
10
+
11
+ ### Development
12
+
13
+ * Get the benchmarks running again on Ruby 3.4 and Rails 8. via #949.
14
+
1
15
  ## Changes in 3.0.0
2
16
 
3
17
  ### Breaking Changes
@@ -169,7 +169,7 @@ module ActiveRecord::Import::SQLite3Adapter
169
169
  end
170
170
 
171
171
  def sql_for_default_conflict_target( primary_key )
172
- conflict_target = Array(primary_key).join(', ')
172
+ conflict_target = Array(primary_key).map { |key| quote_column_name(key) }.join(', ')
173
173
  "(#{conflict_target}) " if conflict_target.present?
174
174
  end
175
175
 
@@ -60,7 +60,8 @@ module ActiveRecord # :nodoc:
60
60
  next false unless matched_instance
61
61
 
62
62
  instance.instance_variable_set :@association_cache, {}
63
- instance.send :clear_aggregation_cache
63
+ # Aggregations is only included in models that call composed_of
64
+ instance.send :clear_aggregation_cache if instance.respond_to?(:clear_aggregation_cache, true)
64
65
  yield instance, matched_instance.instance_variable_get(:@attributes)
65
66
 
66
67
  # Since the instance now accurately reflects the record in
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module Import
5
- VERSION = "3.0.0"
5
+ VERSION = "3.0.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-import
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Dennis
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubygems_version: 4.0.0
103
+ rubygems_version: 3.6.9
104
104
  specification_version: 4
105
105
  summary: Bulk insert extension for ActiveRecord
106
106
  test_files: []