csvbuilder-importer 0.1.5.1 → 0.2.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 +4 -4
- data/.rubocop.yml +2 -5
- data/.rubocop_todo.yml +25 -32
- data/.tool-versions +1 -0
- data/CHANGELOG.md +32 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +108 -51
- data/gemfiles/Gemfile.7.0._gemfile +6 -1
- data/gemfiles/{Gemfile.5.2._gemfile → Gemfile.8.0._gemfile} +9 -3
- data/gemfiles/rails_edge.gemfile +5 -0
- data/lib/csvbuilder/importer/concerns/import/attributes.rb +1 -1
- data/lib/csvbuilder/importer/public/import/file.rb +28 -1
- data/lib/csvbuilder/importer/version.rb +1 -1
- metadata +20 -9
- data/gemfiles/Gemfile.6.1._gemfile +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4195598e7f3fc0e1018cccca0ce4fef93b023d7a2e4b780c9f151d92900f705c
|
4
|
+
data.tar.gz: 9e8adb9ace73d9fcb4052139699f8706897ac621a8947f621ae4f91478bd7623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9283917ea073ac6dd84ea8ac6f240695b3926419cfa7844d70fd83685e8e6fd602955243b4e1ea34f4a63f507511deae2f95c890974d162dcd06c0600124fac1
|
7
|
+
data.tar.gz: 668ad191a771c00edc7c5e196f8cb2f2b620ce2a6350e718fa58a4068e27e286b36f49492feef6b32d787f7b945bc9c21c2b84f5f2d37bbeeccf1868283cda86
|
data/.rubocop.yml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
|
3
|
-
|
3
|
+
plugins:
|
4
4
|
- rubocop-performance
|
5
5
|
- rubocop-rake
|
6
6
|
- rubocop-rspec
|
7
7
|
|
8
8
|
AllCops:
|
9
9
|
NewCops: enable
|
10
|
-
TargetRubyVersion:
|
10
|
+
TargetRubyVersion: 3.4
|
11
11
|
|
12
12
|
Style/StringLiterals:
|
13
13
|
Enabled: true
|
@@ -16,6 +16,3 @@ Style/StringLiterals:
|
|
16
16
|
Style/StringLiteralsInInterpolation:
|
17
17
|
Enabled: true
|
18
18
|
EnforcedStyle: double_quotes
|
19
|
-
|
20
|
-
Layout/LineLength:
|
21
|
-
Max: 120
|
data/.rubocop_todo.yml
CHANGED
@@ -1,54 +1,42 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2025-03-01 09:09:10 UTC using RuboCop version 1.73.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count: 5
|
10
|
-
# This cop supports safe autocorrection (--autocorrect).
|
11
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
|
12
|
-
# URISchemes: http, https
|
13
|
-
Layout/LineLength:
|
14
|
-
Max: 189
|
15
|
-
Exclude:
|
16
|
-
- 'lib/csvbuilder/importer/internal/import/csv.rb'
|
17
|
-
- 'lib/csvbuilder/importer/public/import/file.rb'
|
18
|
-
- 'spec/csvbuilder/importer/public/import/file_spec.rb'
|
19
|
-
|
20
9
|
# Offense count: 1
|
21
10
|
Lint/RescueException:
|
22
11
|
Exclude:
|
23
12
|
- 'lib/csvbuilder/importer/internal/import/csv.rb'
|
24
13
|
|
25
|
-
# Offense count:
|
26
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns,
|
14
|
+
# Offense count: 3
|
15
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
27
16
|
Metrics/AbcSize:
|
28
|
-
Max:
|
17
|
+
Max: 23
|
29
18
|
|
30
19
|
# Offense count: 1
|
31
|
-
# Configuration parameters: CountComments, CountAsOne
|
32
|
-
|
33
|
-
|
34
|
-
Max: 29
|
20
|
+
# Configuration parameters: CountComments, CountAsOne.
|
21
|
+
Metrics/ClassLength:
|
22
|
+
Max: 103
|
35
23
|
|
36
24
|
# Offense count: 1
|
37
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns
|
25
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
38
26
|
Metrics/CyclomaticComplexity:
|
39
27
|
Max: 8
|
40
28
|
|
41
|
-
# Offense count:
|
42
|
-
# Configuration parameters: CountComments, CountAsOne,
|
29
|
+
# Offense count: 3
|
30
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
43
31
|
Metrics/MethodLength:
|
44
|
-
Max:
|
32
|
+
Max: 14
|
45
33
|
|
46
34
|
# Offense count: 2
|
47
35
|
# Configuration parameters: CountComments, CountAsOne.
|
48
36
|
Metrics/ModuleLength:
|
49
|
-
Max:
|
37
|
+
Max: 226
|
50
38
|
|
51
|
-
# Offense count:
|
39
|
+
# Offense count: 9
|
52
40
|
# Configuration parameters: CountAsOne.
|
53
41
|
RSpec/ExampleLength:
|
54
42
|
Max: 15
|
@@ -57,12 +45,12 @@ RSpec/ExampleLength:
|
|
57
45
|
RSpec/MultipleExpectations:
|
58
46
|
Max: 13
|
59
47
|
|
60
|
-
# Offense count:
|
48
|
+
# Offense count: 13
|
61
49
|
# Configuration parameters: AllowSubject.
|
62
50
|
RSpec/MultipleMemoizedHelpers:
|
63
|
-
Max:
|
51
|
+
Max: 8
|
64
52
|
|
65
|
-
# Offense count:
|
53
|
+
# Offense count: 6
|
66
54
|
# Configuration parameters: AllowedGroups.
|
67
55
|
RSpec/NestedGroups:
|
68
56
|
Max: 5
|
@@ -74,7 +62,7 @@ RSpec/NoExpectationExample:
|
|
74
62
|
Exclude:
|
75
63
|
- 'spec/support/shared_examples/methods/define_attribute_method.rb'
|
76
64
|
|
77
|
-
# Offense count:
|
65
|
+
# Offense count: 3
|
78
66
|
# Configuration parameters: AllowedConstants.
|
79
67
|
Style/Documentation:
|
80
68
|
Exclude:
|
@@ -83,10 +71,15 @@ Style/Documentation:
|
|
83
71
|
- 'lib/csvbuilder/importer/concerns/import/attributes.rb'
|
84
72
|
- 'lib/csvbuilder/importer/concerns/import/base.rb'
|
85
73
|
- 'lib/csvbuilder/importer/internal/import/attribute.rb'
|
86
|
-
- 'lib/csvbuilder/importer/public/import/file_model.rb'
|
87
74
|
|
88
|
-
# Offense count:
|
75
|
+
# Offense count: 2
|
89
76
|
Style/OpenStructUse:
|
90
77
|
Exclude:
|
91
78
|
- 'spec/csvbuilder/importer/public/import/file_spec.rb'
|
92
|
-
|
79
|
+
|
80
|
+
# Offense count: 7
|
81
|
+
# This cop supports safe autocorrection (--autocorrect).
|
82
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
83
|
+
# URISchemes: http, https
|
84
|
+
Layout/LineLength:
|
85
|
+
Max: 201
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.4.2
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,38 @@
|
|
2
2
|
|
3
3
|
## [Released]
|
4
4
|
|
5
|
+
## [0.2.0] - 2025-03-02 Sun 2 Mar 2025
|
6
|
+
|
7
|
+
- Check if the headers from the CSV match the Csvbuilder::Model headers definitions.
|
8
|
+
|
9
|
+
If you are expecting the Headers "First Name" and "Last Name"
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
class BasicRowModel
|
13
|
+
include Csvbuilder::Model
|
14
|
+
|
15
|
+
column :first_name, header: "First Name"
|
16
|
+
column :last_name, header: "Last Name"
|
17
|
+
end
|
18
|
+
```
|
19
|
+
|
20
|
+
and the CSV provide
|
21
|
+
|
22
|
+
```CSV
|
23
|
+
"First Name","LastName"
|
24
|
+
John,Doe
|
25
|
+
```
|
26
|
+
|
27
|
+
You will get the following error:
|
28
|
+
|
29
|
+
```
|
30
|
+
"Headers mismatch. Given headers (First Name, LastName). Expected headers (First Name, Last Name). Unrecognized headers (LastName)."
|
31
|
+
```
|
32
|
+
|
33
|
+
This is a potential break change, that why I bump of from 1.x to 2.x
|
34
|
+
|
35
|
+
If you use the formatted headers, `format_header(column_name, _context)`, do keep in mind that it applies to the Model definition, not the CSV Headers. I would recommend not using `formatted headers` for importing anyway.
|
36
|
+
|
5
37
|
## [0.1.5.1] - 2023-07-26
|
6
38
|
|
7
39
|
- Revert: Using Less Memory And Quicker Line Counter https://github.com/joel/csvbuilder-importer/pull/11
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,89 +1,146 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
csvbuilder-importer (0.
|
4
|
+
csvbuilder-importer (0.2.0)
|
5
5
|
activemodel (>= 5.2)
|
6
6
|
activesupport (>= 5.2)
|
7
|
+
csv
|
7
8
|
csvbuilder-core
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
11
12
|
specs:
|
12
|
-
activemodel (
|
13
|
-
activesupport (=
|
14
|
-
|
15
|
-
|
13
|
+
activemodel (8.0.1)
|
14
|
+
activesupport (= 8.0.1)
|
15
|
+
activerecord (8.0.1)
|
16
|
+
activemodel (= 8.0.1)
|
17
|
+
activesupport (= 8.0.1)
|
18
|
+
timeout (>= 0.4.0)
|
19
|
+
activesupport (8.0.1)
|
20
|
+
base64
|
21
|
+
benchmark (>= 0.3)
|
22
|
+
bigdecimal
|
23
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
24
|
+
connection_pool (>= 2.2.5)
|
25
|
+
drb
|
16
26
|
i18n (>= 1.6, < 2)
|
27
|
+
logger (>= 1.4.2)
|
17
28
|
minitest (>= 5.1)
|
18
|
-
|
29
|
+
securerandom (>= 0.3)
|
30
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
31
|
+
uri (>= 0.13.1)
|
19
32
|
ast (2.4.2)
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
33
|
+
base64 (0.2.0)
|
34
|
+
benchmark (0.4.0)
|
35
|
+
bigdecimal (3.1.9)
|
36
|
+
concurrent-ruby (1.3.5)
|
37
|
+
connection_pool (2.5.0)
|
38
|
+
csv (3.3.2)
|
39
|
+
csvbuilder-core (0.1.4)
|
40
|
+
activesupport (>= 5.2)
|
41
|
+
csv
|
42
|
+
database_cleaner-active_record (2.2.0)
|
43
|
+
activerecord (>= 5.a)
|
44
|
+
database_cleaner-core (~> 2.0.0)
|
45
|
+
database_cleaner-core (2.0.1)
|
46
|
+
diff-lcs (1.6.0)
|
47
|
+
drb (2.2.1)
|
48
|
+
i18n (1.14.7)
|
25
49
|
concurrent-ruby (~> 1.0)
|
26
|
-
json (2.
|
27
|
-
|
28
|
-
|
29
|
-
|
50
|
+
json (2.10.1)
|
51
|
+
language_server-protocol (3.17.0.4)
|
52
|
+
lint_roller (1.1.0)
|
53
|
+
logger (1.6.6)
|
54
|
+
minitest (5.25.4)
|
55
|
+
ostruct (0.6.1)
|
56
|
+
parallel (1.26.3)
|
57
|
+
parser (3.3.7.1)
|
30
58
|
ast (~> 2.4.1)
|
59
|
+
racc
|
60
|
+
racc (1.8.1)
|
31
61
|
rainbow (3.1.1)
|
32
|
-
rake (13.
|
33
|
-
regexp_parser (2.
|
34
|
-
|
35
|
-
|
36
|
-
rspec-
|
37
|
-
rspec-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
rspec-expectations (3.12.2)
|
62
|
+
rake (13.2.1)
|
63
|
+
regexp_parser (2.10.0)
|
64
|
+
rspec (3.13.0)
|
65
|
+
rspec-core (~> 3.13.0)
|
66
|
+
rspec-expectations (~> 3.13.0)
|
67
|
+
rspec-mocks (~> 3.13.0)
|
68
|
+
rspec-core (3.13.3)
|
69
|
+
rspec-support (~> 3.13.0)
|
70
|
+
rspec-expectations (3.13.3)
|
42
71
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-mocks (3.
|
72
|
+
rspec-support (~> 3.13.0)
|
73
|
+
rspec-mocks (3.13.2)
|
45
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
-
rspec-support (~> 3.
|
47
|
-
rspec-support (3.
|
48
|
-
rubocop (1.
|
75
|
+
rspec-support (~> 3.13.0)
|
76
|
+
rspec-support (3.13.2)
|
77
|
+
rubocop (1.73.1)
|
49
78
|
json (~> 2.3)
|
79
|
+
language_server-protocol (~> 3.17.0.2)
|
80
|
+
lint_roller (~> 1.1.0)
|
50
81
|
parallel (~> 1.10)
|
51
|
-
parser (>= 3.
|
82
|
+
parser (>= 3.3.0.2)
|
52
83
|
rainbow (>= 2.2.2, < 4.0)
|
53
|
-
regexp_parser (>=
|
54
|
-
|
55
|
-
rubocop-ast (>= 1.28.0, < 2.0)
|
84
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
85
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
56
86
|
ruby-progressbar (~> 1.7)
|
57
|
-
unicode-display_width (>= 2.4.0, <
|
58
|
-
rubocop-ast (1.
|
59
|
-
parser (>= 3.
|
60
|
-
rubocop-
|
61
|
-
|
62
|
-
|
63
|
-
rubocop (>= 1.
|
64
|
-
|
65
|
-
|
66
|
-
rubocop (
|
67
|
-
rubocop-rspec (
|
68
|
-
|
69
|
-
rubocop
|
87
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
88
|
+
rubocop-ast (1.38.1)
|
89
|
+
parser (>= 3.3.1.0)
|
90
|
+
rubocop-performance (1.24.0)
|
91
|
+
lint_roller (~> 1.1)
|
92
|
+
rubocop (>= 1.72.1, < 2.0)
|
93
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
94
|
+
rubocop-rake (0.7.1)
|
95
|
+
lint_roller (~> 1.1)
|
96
|
+
rubocop (>= 1.72.1)
|
97
|
+
rubocop-rspec (3.5.0)
|
98
|
+
lint_roller (~> 1.1)
|
99
|
+
rubocop (~> 1.72, >= 1.72.1)
|
70
100
|
ruby-progressbar (1.13.0)
|
101
|
+
securerandom (0.4.1)
|
102
|
+
sqlite3 (2.6.0-aarch64-linux-gnu)
|
103
|
+
sqlite3 (2.6.0-aarch64-linux-musl)
|
104
|
+
sqlite3 (2.6.0-arm-linux-gnu)
|
105
|
+
sqlite3 (2.6.0-arm-linux-musl)
|
106
|
+
sqlite3 (2.6.0-arm64-darwin)
|
107
|
+
sqlite3 (2.6.0-x86-linux-gnu)
|
108
|
+
sqlite3 (2.6.0-x86-linux-musl)
|
109
|
+
sqlite3 (2.6.0-x86_64-darwin)
|
110
|
+
sqlite3 (2.6.0-x86_64-linux-gnu)
|
111
|
+
sqlite3 (2.6.0-x86_64-linux-musl)
|
112
|
+
timeout (0.4.3)
|
71
113
|
tzinfo (2.0.6)
|
72
114
|
concurrent-ruby (~> 1.0)
|
73
|
-
unicode-display_width (
|
115
|
+
unicode-display_width (3.1.4)
|
116
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
117
|
+
unicode-emoji (4.0.4)
|
118
|
+
uri (1.0.3)
|
74
119
|
|
75
120
|
PLATFORMS
|
76
|
-
|
77
|
-
|
121
|
+
aarch64-linux-gnu
|
122
|
+
aarch64-linux-musl
|
123
|
+
arm-linux-gnu
|
124
|
+
arm-linux-musl
|
125
|
+
arm64-darwin
|
126
|
+
x86-linux-gnu
|
127
|
+
x86-linux-musl
|
128
|
+
x86_64-darwin
|
129
|
+
x86_64-linux-gnu
|
130
|
+
x86_64-linux-musl
|
78
131
|
|
79
132
|
DEPENDENCIES
|
133
|
+
activerecord
|
80
134
|
csvbuilder-importer!
|
135
|
+
database_cleaner-active_record
|
136
|
+
ostruct
|
81
137
|
rake
|
82
138
|
rspec
|
83
139
|
rubocop
|
84
140
|
rubocop-performance
|
85
141
|
rubocop-rake
|
86
142
|
rubocop-rspec
|
143
|
+
sqlite3
|
87
144
|
|
88
145
|
BUNDLED WITH
|
89
|
-
2.
|
146
|
+
2.6.2
|
@@ -5,7 +5,8 @@ source "https://rubygems.org"
|
|
5
5
|
# Runtime dependencies
|
6
6
|
gem "activesupport", "~> 7.0"
|
7
7
|
gem "activemodel", "~> 7.0"
|
8
|
-
gem "csvbuilder-core"
|
8
|
+
gem "csvbuilder-core"
|
9
|
+
gem "csv"
|
9
10
|
|
10
11
|
# Development dependencies
|
11
12
|
gem "rake"
|
@@ -14,3 +15,7 @@ gem "rubocop"
|
|
14
15
|
gem "rubocop-performance"
|
15
16
|
gem "rubocop-rake"
|
16
17
|
gem "rubocop-rspec"
|
18
|
+
gem "activerecord", "~> 7.0"
|
19
|
+
gem "database_cleaner-active_record"
|
20
|
+
gem "sqlite3"
|
21
|
+
gem "ostruct"
|
@@ -3,9 +3,11 @@
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
5
|
# Runtime dependencies
|
6
|
-
gem "activesupport", "~>
|
7
|
-
gem "activemodel", "~>
|
8
|
-
gem "csvbuilder-core"
|
6
|
+
gem "activesupport", "~> 8.0"
|
7
|
+
gem "activemodel", "~> 8.0"
|
8
|
+
gem "csvbuilder-core"
|
9
|
+
gem "csv"
|
10
|
+
gem "ostruct"
|
9
11
|
|
10
12
|
# Development dependencies
|
11
13
|
gem "rake"
|
@@ -14,3 +16,7 @@ gem "rubocop"
|
|
14
16
|
gem "rubocop-performance"
|
15
17
|
gem "rubocop-rake"
|
16
18
|
gem "rubocop-rspec"
|
19
|
+
gem "activerecord", "~> 8.0"
|
20
|
+
gem "database_cleaner-active_record"
|
21
|
+
gem "sqlite3"
|
22
|
+
gem "ostruct"
|
data/gemfiles/rails_edge.gemfile
CHANGED
@@ -5,13 +5,18 @@ source "https://rubygems.org"
|
|
5
5
|
# Runtime dependencies
|
6
6
|
gem "activemodel", github: "rails/rails", branch: "main"
|
7
7
|
gem "activesupport", github: "rails/rails", branch: "main"
|
8
|
+
gem "csv"
|
8
9
|
|
9
10
|
gem "csvbuilder-core"
|
10
11
|
|
11
12
|
# Development dependencies
|
13
|
+
gem "activerecord", github: "rails/rails", branch: "main"
|
14
|
+
gem "database_cleaner-active_record"
|
15
|
+
gem "ostruct"
|
12
16
|
gem "rake"
|
13
17
|
gem "rspec"
|
14
18
|
gem "rubocop"
|
15
19
|
gem "rubocop-performance"
|
16
20
|
gem "rubocop-rake"
|
17
21
|
gem "rubocop-rspec"
|
22
|
+
gem "sqlite3"
|
@@ -50,8 +50,17 @@ module Csvbuilder
|
|
50
50
|
run_callbacks :next do
|
51
51
|
context = context.to_h.reverse_merge(self.context)
|
52
52
|
@previous_row_model = current_row_model
|
53
|
+
|
53
54
|
@index += 1
|
54
55
|
@current_row_model = row_model_class.next(self, context)
|
56
|
+
|
57
|
+
# Check if the headers are valid
|
58
|
+
if previous_row_model.nil? # First row
|
59
|
+
headers_count
|
60
|
+
headers_mismatch
|
61
|
+
abort! if errors.where(:headers).any?
|
62
|
+
end
|
63
|
+
|
55
64
|
@current_row_model = @index = nil if end_of_file?
|
56
65
|
end
|
57
66
|
|
@@ -125,7 +134,25 @@ module Csvbuilder
|
|
125
134
|
message = [
|
126
135
|
"count does not match.",
|
127
136
|
" Given headers (#{size_until_blank}).",
|
128
|
-
" Expected headers (#{expected_headers_size}): #{column_names.join(", ")}"
|
137
|
+
" Expected headers (#{expected_headers_size}): #{column_names.join(", ")}."
|
138
|
+
]
|
139
|
+
|
140
|
+
errors.add(:headers, message.join)
|
141
|
+
end
|
142
|
+
|
143
|
+
def headers_mismatch
|
144
|
+
return if headers_invalid_row || !csv.valid?
|
145
|
+
return if row_model_class.try(:row_names) # FileModel check
|
146
|
+
|
147
|
+
return if headers == row_model_class.headers
|
148
|
+
|
149
|
+
unrecognized_headers = headers - current_row_model.headers
|
150
|
+
|
151
|
+
message = [
|
152
|
+
"mismatch.",
|
153
|
+
" Given headers (#{headers.join(", ")}).",
|
154
|
+
" Expected headers (#{row_model_class.headers.join(", ")}).",
|
155
|
+
" Unrecognized headers (#{unrecognized_headers.join(", ")})."
|
129
156
|
]
|
130
157
|
|
131
158
|
errors.add(:headers, message.join)
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csvbuilder-importer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Azemar
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activemodel
|
@@ -38,6 +37,20 @@ dependencies:
|
|
38
37
|
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
39
|
version: '5.2'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: csv
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
41
54
|
- !ruby/object:Gem::Dependency
|
42
55
|
name: csvbuilder-core
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,6 +75,7 @@ files:
|
|
62
75
|
- ".rspec"
|
63
76
|
- ".rubocop.yml"
|
64
77
|
- ".rubocop_todo.yml"
|
78
|
+
- ".tool-versions"
|
65
79
|
- CHANGELOG.md
|
66
80
|
- CODE_OF_CONDUCT.md
|
67
81
|
- Gemfile
|
@@ -69,9 +83,8 @@ files:
|
|
69
83
|
- LICENSE.txt
|
70
84
|
- README.md
|
71
85
|
- Rakefile
|
72
|
-
- gemfiles/Gemfile.5.2._gemfile
|
73
|
-
- gemfiles/Gemfile.6.1._gemfile
|
74
86
|
- gemfiles/Gemfile.7.0._gemfile
|
87
|
+
- gemfiles/Gemfile.8.0._gemfile
|
75
88
|
- gemfiles/rails_edge.gemfile
|
76
89
|
- lib/csvbuilder/importer.rb
|
77
90
|
- lib/csvbuilder/importer/concerns/import/attributes.rb
|
@@ -90,7 +103,6 @@ metadata:
|
|
90
103
|
source_code_uri: https://github.com/joel/csvbuilder-importer
|
91
104
|
changelog_uri: https://github.com/joel/csvbuilder-importer/blob/main/CHANGELOG.md
|
92
105
|
rubygems_mfa_required: 'true'
|
93
|
-
post_install_message:
|
94
106
|
rdoc_options: []
|
95
107
|
require_paths:
|
96
108
|
- lib
|
@@ -98,15 +110,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
98
110
|
requirements:
|
99
111
|
- - ">="
|
100
112
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
113
|
+
version: '3.4'
|
102
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
115
|
requirements:
|
104
116
|
- - ">="
|
105
117
|
- !ruby/object:Gem::Version
|
106
118
|
version: '0'
|
107
119
|
requirements: []
|
108
|
-
rubygems_version: 3.
|
109
|
-
signing_key:
|
120
|
+
rubygems_version: 3.6.2
|
110
121
|
specification_version: 4
|
111
122
|
summary: Csvbuilder Importer contain the components to handle CSV importing
|
112
123
|
test_files: []
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
# Runtime dependencies
|
6
|
-
gem "activesupport", "~> 6.1"
|
7
|
-
gem "activemodel", "~> 6.1"
|
8
|
-
gem "csvbuilder-core", "0.1.1"
|
9
|
-
|
10
|
-
# Development dependencies
|
11
|
-
gem "rake"
|
12
|
-
gem "rspec"
|
13
|
-
gem "rubocop"
|
14
|
-
gem "rubocop-performance"
|
15
|
-
gem "rubocop-rake"
|
16
|
-
gem "rubocop-rspec"
|