csv_step_importer 0.6.4 → 0.7.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: b0f4dae64fc0c6c01a8aad509e78eeba1e429293407c20761a7b42e3d1a0abf0
4
- data.tar.gz: 4648f7356c86759c68817cd34859a64eb1158024cdde86d9cdeba27d0d66dc3a
3
+ metadata.gz: bfa874f3de2cb6ba36d9e70c74f31ddb0ce167c04fe5073915514ed99305411f
4
+ data.tar.gz: 8c6cf5dbec7e34eecf7759e7b682c11389ef7a8233bdae85ad20cca769592ce3
5
5
  SHA512:
6
- metadata.gz: c81924a22e17f79c283e88bed1070a06e1ec1f119bacaec167bb913847a3836da515a216df2071b723dca7eacb6e505a789dceae079810fd517d3cf99788bb1a
7
- data.tar.gz: fa006020905abb478237c841b0a232473822c11013c6526e67dbf70bb0d5c59481089a33402ae3830ec2a77c40878fa185a95f9178bdc88079ead6c30f7ac3b9
6
+ metadata.gz: a42af4caa8611a26f85f1fa4af4054fdc1a4cf755803b22986e4b31abb1aba8ad9fb2b6020bdce97354593f44b237a3127a829719959a70f2b49fd0496db256b
7
+ data.tar.gz: 7d11501b6ce0192552e3a75304abee42b9c11b4f2598212987b6666b18ab0be85f54df453075828b2fd0d36a5b1d239d7a103ddd1d98967f374873187af153d0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csv_step_importer (0.6.4)
4
+ csv_step_importer (0.7.0)
5
5
  activemodel
6
6
  activerecord-import
7
7
  activesupport
@@ -29,7 +29,7 @@ GEM
29
29
  activemodel (= 5.2.0)
30
30
  activesupport (= 5.2.0)
31
31
  arel (>= 9.0)
32
- activerecord-import (0.22.0)
32
+ activerecord-import (0.23.0)
33
33
  activerecord (>= 3.2)
34
34
  activesupport (5.2.0)
35
35
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -86,16 +86,16 @@ GEM
86
86
  diff-lcs (>= 1.2.0, < 2.0)
87
87
  rspec-support (~> 3.7.0)
88
88
  rspec-support (3.7.1)
89
- rubocop (0.55.0)
89
+ rubocop (0.56.0)
90
90
  parallel (~> 1.10)
91
91
  parser (>= 2.5)
92
92
  powerpack (~> 0.1)
93
93
  rainbow (>= 2.2.2, < 4.0)
94
94
  ruby-progressbar (~> 1.7)
95
95
  unicode-display_width (~> 1.0, >= 1.0.1)
96
- rubocop-rails (1.3.0)
96
+ rubocop-rails (1.4.1)
97
97
  railties (>= 3.0)
98
- rubocop (~> 0.49)
98
+ rubocop (~> 0.53)
99
99
  rubocop-rspec (1.25.1)
100
100
  rubocop (>= 0.53.0)
101
101
  ruby-progressbar (1.9.0)
@@ -104,7 +104,7 @@ GEM
104
104
  thread_safe (0.3.6)
105
105
  tzinfo (1.2.5)
106
106
  thread_safe (~> 0.1)
107
- unicode-display_width (1.3.2)
107
+ unicode-display_width (1.3.3)
108
108
 
109
109
  PLATFORMS
110
110
  ruby
@@ -3,15 +3,16 @@
3
3
  module CSVStepImporter
4
4
  module Model
5
5
  class DAO < CSVStepImporter::Node
6
- attr_accessor :id, :row
6
+ attr_accessor :id, :row, :attributes
7
7
 
8
8
  delegate :columns, to: :model
9
9
 
10
10
  validates :row, presence: true
11
11
 
12
- def initialize(row:, **attributes)
13
- super **attributes
12
+ def initialize(parent:, row:, **attributes)
13
+ super parent: parent
14
14
 
15
+ self.attributes = attributes
15
16
  self.row = row
16
17
  end
17
18
 
@@ -21,7 +22,7 @@ module CSVStepImporter
21
22
 
22
23
  def value
23
24
  @value ||= columns.each_with_object({}) do |key, values|
24
- values[key] = send key
25
+ values[key] = respond_to?(key) ? send(key) : attributes[key]
25
26
  end
26
27
  end
27
28
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CSVStepImporter
4
- VERSION = "0.6.4"
4
+ VERSION = "0.7.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_step_importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian-Manuel Butzke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-25 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler