csv_step_importer 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4101e937149c860c8321d7f620c5108ce505ba6de6bb37602b59405e08ae0d9c
4
- data.tar.gz: 5c739f6d4cb08a19d11e12618e4844bad5b90a66fe785fc5366142230cb6e90e
3
+ metadata.gz: 4caae3839b1bd0f1183e3010f5a313882d55b327558089752ed1eb0a4dc6d437
4
+ data.tar.gz: 719436ba5ed705ef54b824ef2968366877dd2e24ab11aaec50fc89b8f43c048a
5
5
  SHA512:
6
- metadata.gz: d231814e8ce5bbd30f664a52bcde75ff192b03d2cfbd338e1bdb70ed72025b939c43165d6b9a3afef5de9d9a31dfe917e149c5f9db77249dbc4098afeda30900
7
- data.tar.gz: 5f2f9d7ebebf2c0ffd73106a7fd658a22a0a95d9440202a0769e0ce3f635546ab51c6664cee8f76c490c85c0d402921941363cf30c2427d64dfc87b558b30bc9
6
+ metadata.gz: 574968999c2b473da6de3d2e48b3170eb6c13ed9ec69265369d77f06b1546ef90d6e8785c02a899b9c9177646160178512c57b905fe7c3033d37c5a4f2f33a51
7
+ data.tar.gz: f9bde53332d316b0f03daaafa167c2234caf9cf9dc9c9853129f870e2b5028918194172b7b51110fc09db313e998820753a44502948ebcdadff9694a5fd13d33
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csv_step_importer (0.2.8)
4
+ csv_step_importer (0.5.0)
5
5
  activemodel
6
6
  activerecord-import
7
7
  activesupport
@@ -110,8 +110,8 @@ PLATFORMS
110
110
  ruby
111
111
 
112
112
  DEPENDENCIES
113
- csv_step_importer!
114
113
  bundler (~> 1.16)
114
+ csv_step_importer!
115
115
  rake (~> 10.0)
116
116
  rspec (~> 3.0)
117
117
  rubocop-rails
@@ -30,6 +30,11 @@ module CSVStepImporter
30
30
  raise "please extend and implement"
31
31
  end
32
32
 
33
+ # see: https://github.com/zdennis/activerecord-import/wiki/On-Duplicate-Key-Update
34
+ def on_duplicate_key_ignore
35
+ false
36
+ end
37
+
33
38
  # example [:email, :updated_at]
34
39
  # see: https://github.com/zdennis/activerecord-import/wiki/On-Duplicate-Key-Update
35
40
  def on_duplicate_key_update
@@ -7,6 +7,7 @@ module CSVStepImporter
7
7
 
8
8
  delegate :model_class, to: :parent
9
9
  delegate :columns, to: :parent
10
+ delegate :on_duplicate_key_ignore, to: :parent
10
11
  delegate :on_duplicate_key_update, to: :parent
11
12
  delegate :dao_values, to: :parent
12
13
 
@@ -14,6 +15,7 @@ module CSVStepImporter
14
15
  model_class.import(
15
16
  columns,
16
17
  dao_values,
18
+ on_duplicate_key_ignore: on_duplicate_key_ignore,
17
19
  on_duplicate_key_update: on_duplicate_key_update,
18
20
  validate: false,
19
21
  timestamps: false,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CSVStepImporter
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_step_importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian-Manuel Butzke