csv_step_importer 0.6.4 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/lib/csv_step_importer/model/dao.rb +5 -4
- data/lib/csv_step_importer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfa874f3de2cb6ba36d9e70c74f31ddb0ce167c04fe5073915514ed99305411f
|
4
|
+
data.tar.gz: 8c6cf5dbec7e34eecf7759e7b682c11389ef7a8233bdae85ad20cca769592ce3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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.
|
96
|
+
rubocop-rails (1.4.1)
|
97
97
|
railties (>= 3.0)
|
98
|
-
rubocop (~> 0.
|
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.
|
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
|
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
|
|
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.
|
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-
|
11
|
+
date: 2018-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|