csvbuilder-importer 0.1.0 → 0.1.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 960969ebb5e955cbf5668f047863b5d4dd3acb34b65d8cbc7c3e2f127aa17351
|
|
4
|
+
data.tar.gz: fa5ce80706924c46497d6ca0a85cb0a976c9093c49bf43b4a8a8c6084e31eb69
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c613dd08d3fcca5a01f53f5802839add01d9430d307972e790b1a20b5b399ff889bd98301e7f4bf6aa193d9338077f6f3c8e9ddf37343c62142fdad928e0c0de
|
|
7
|
+
data.tar.gz: 42601bfcb177f735ec954a09054e8ad9d68db42b1589268a22f9de7b6ba9260c44363f66cb1e29dd22263ce3d625c0ebcb09123c7935cfa0d8f3622486db8de4
|
data/Gemfile
CHANGED
|
@@ -26,27 +26,26 @@ module Csvbuilder
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def attribute_objects
|
|
29
|
-
@attribute_objects ||= _attribute_objects
|
|
29
|
+
@attribute_objects ||= _attribute_objects
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def read_attribute_for_validation(attr)
|
|
33
|
+
source_row[self.class.column_names.index(attr)]
|
|
30
34
|
end
|
|
31
35
|
|
|
32
36
|
protected
|
|
33
37
|
|
|
34
|
-
def _attribute_objects
|
|
38
|
+
def _attribute_objects
|
|
35
39
|
index = -1
|
|
36
40
|
|
|
37
41
|
array_to_block_hash(self.class.column_names) do |column_name|
|
|
38
|
-
Attribute.new(column_name, source_row[index += 1],
|
|
42
|
+
Attribute.new(column_name, source_row[index += 1], errors.to_hash[column_name], self)
|
|
39
43
|
end
|
|
40
44
|
end
|
|
41
45
|
|
|
42
46
|
class_methods do
|
|
43
47
|
def define_attribute_method(column_name)
|
|
44
|
-
|
|
45
|
-
super do
|
|
46
|
-
return unless @attribute_objects
|
|
47
|
-
|
|
48
|
-
@attribute_objects[column_name].try(:value)
|
|
49
|
-
end
|
|
48
|
+
return if super { original_attribute(column_name) }.nil?
|
|
50
49
|
end
|
|
51
50
|
end
|
|
52
51
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: csvbuilder-importer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joel Azemar
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-12-
|
|
11
|
+
date: 2022-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -42,16 +42,16 @@ dependencies:
|
|
|
42
42
|
name: csvbuilder-core
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0
|
|
47
|
+
version: '0'
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0
|
|
54
|
+
version: '0'
|
|
55
55
|
description: Help handle CSVs in a more efficient way
|
|
56
56
|
email:
|
|
57
57
|
- joel.azemar@gmail.com
|
|
@@ -65,7 +65,6 @@ files:
|
|
|
65
65
|
- CHANGELOG.md
|
|
66
66
|
- CODE_OF_CONDUCT.md
|
|
67
67
|
- Gemfile
|
|
68
|
-
- Gemfile.lock
|
|
69
68
|
- LICENSE.txt
|
|
70
69
|
- README.md
|
|
71
70
|
- Rakefile
|
data/Gemfile.lock
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ../csvbuilder-core
|
|
3
|
-
specs:
|
|
4
|
-
csvbuilder-core (0.1.1)
|
|
5
|
-
activesupport (~> 6.1)
|
|
6
|
-
|
|
7
|
-
PATH
|
|
8
|
-
remote: .
|
|
9
|
-
specs:
|
|
10
|
-
csvbuilder-importer (0.1.0)
|
|
11
|
-
activemodel (~> 6.1)
|
|
12
|
-
activesupport (~> 6.1)
|
|
13
|
-
csvbuilder-core (= 0.1.1)
|
|
14
|
-
|
|
15
|
-
GEM
|
|
16
|
-
remote: https://rubygems.org/
|
|
17
|
-
specs:
|
|
18
|
-
activemodel (6.1.7)
|
|
19
|
-
activesupport (= 6.1.7)
|
|
20
|
-
activesupport (6.1.7)
|
|
21
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
22
|
-
i18n (>= 1.6, < 2)
|
|
23
|
-
minitest (>= 5.1)
|
|
24
|
-
tzinfo (~> 2.0)
|
|
25
|
-
zeitwerk (~> 2.3)
|
|
26
|
-
ast (2.4.2)
|
|
27
|
-
concurrent-ruby (1.1.10)
|
|
28
|
-
diff-lcs (1.5.0)
|
|
29
|
-
i18n (1.12.0)
|
|
30
|
-
concurrent-ruby (~> 1.0)
|
|
31
|
-
json (2.6.3)
|
|
32
|
-
minitest (5.16.3)
|
|
33
|
-
parallel (1.22.1)
|
|
34
|
-
parser (3.1.3.0)
|
|
35
|
-
ast (~> 2.4.1)
|
|
36
|
-
rainbow (3.1.1)
|
|
37
|
-
rake (13.0.6)
|
|
38
|
-
regexp_parser (2.6.1)
|
|
39
|
-
rexml (3.2.5)
|
|
40
|
-
rspec (3.12.0)
|
|
41
|
-
rspec-core (~> 3.12.0)
|
|
42
|
-
rspec-expectations (~> 3.12.0)
|
|
43
|
-
rspec-mocks (~> 3.12.0)
|
|
44
|
-
rspec-core (3.12.0)
|
|
45
|
-
rspec-support (~> 3.12.0)
|
|
46
|
-
rspec-expectations (3.12.0)
|
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
-
rspec-support (~> 3.12.0)
|
|
49
|
-
rspec-mocks (3.12.0)
|
|
50
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
51
|
-
rspec-support (~> 3.12.0)
|
|
52
|
-
rspec-support (3.12.0)
|
|
53
|
-
rubocop (1.40.0)
|
|
54
|
-
json (~> 2.3)
|
|
55
|
-
parallel (~> 1.10)
|
|
56
|
-
parser (>= 3.1.2.1)
|
|
57
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
58
|
-
regexp_parser (>= 1.8, < 3.0)
|
|
59
|
-
rexml (>= 3.2.5, < 4.0)
|
|
60
|
-
rubocop-ast (>= 1.23.0, < 2.0)
|
|
61
|
-
ruby-progressbar (~> 1.7)
|
|
62
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
|
63
|
-
rubocop-ast (1.24.0)
|
|
64
|
-
parser (>= 3.1.1.0)
|
|
65
|
-
rubocop-performance (1.15.1)
|
|
66
|
-
rubocop (>= 1.7.0, < 2.0)
|
|
67
|
-
rubocop-ast (>= 0.4.0)
|
|
68
|
-
rubocop-rake (0.6.0)
|
|
69
|
-
rubocop (~> 1.0)
|
|
70
|
-
rubocop-rspec (2.15.0)
|
|
71
|
-
rubocop (~> 1.33)
|
|
72
|
-
ruby-progressbar (1.11.0)
|
|
73
|
-
tzinfo (2.0.5)
|
|
74
|
-
concurrent-ruby (~> 1.0)
|
|
75
|
-
unicode-display_width (2.3.0)
|
|
76
|
-
zeitwerk (2.6.6)
|
|
77
|
-
|
|
78
|
-
PLATFORMS
|
|
79
|
-
x86_64-darwin-21
|
|
80
|
-
|
|
81
|
-
DEPENDENCIES
|
|
82
|
-
csvbuilder-core!
|
|
83
|
-
csvbuilder-importer!
|
|
84
|
-
rake
|
|
85
|
-
rspec
|
|
86
|
-
rubocop
|
|
87
|
-
rubocop-performance
|
|
88
|
-
rubocop-rake
|
|
89
|
-
rubocop-rspec
|
|
90
|
-
|
|
91
|
-
BUNDLED WITH
|
|
92
|
-
2.3.22
|