meibo 0.24.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +1 -1
- data/Gemfile.lock +1 -1
- data/lib/meibo/converter.rb +11 -3
- data/lib/meibo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d13051f54e9e4f678df529710d8241c5d1222772775484c3e6febce4dce309e
|
4
|
+
data.tar.gz: 347825b32f8c292f8de1857e40bc33ab58452d1e1b4429205835e2e785ef48a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a13bf3cf70f6a21ecad8d1c9f5ad555fa31f80cb4189035e985eb3328637644449c23b5498699581b639823f1d66ac7832fe211979545a33963fdae551162c30
|
7
|
+
data.tar.gz: 7b4cdd9a43409053306a461660212dee2c74646ddbc998b8a11929b1e9c6e1bb44a9b80552da038f5f0b3aaa02710386b099a157bc5d3549839b930aa83ce6f4
|
data/.rubocop_todo.yml
CHANGED
data/Gemfile.lock
CHANGED
data/lib/meibo/converter.rb
CHANGED
@@ -38,8 +38,8 @@ module Meibo
|
|
38
38
|
|
39
39
|
private
|
40
40
|
|
41
|
-
def
|
42
|
-
|
41
|
+
def build_converter_list(fields:, converters:, write_or_parser:)
|
42
|
+
TYPES.filter_map do |converter_type|
|
43
43
|
fields_to_be_converted = converters[converter_type]
|
44
44
|
method_name = "build_#{converter_type}_field_#{write_or_parser}_converter"
|
45
45
|
if fields_to_be_converted && respond_to?(method_name, true)
|
@@ -52,14 +52,22 @@ module Meibo
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def converter_list_to_convert_proc(converter_list)
|
55
58
|
lambda do |field, field_info|
|
56
59
|
# NOTE: convert blank sourcedId to nil
|
57
|
-
field = nil if field
|
60
|
+
field = nil if field == "NULL" || field == "" # rubocop:disable Style/MultipleComparison
|
58
61
|
converter_list.each { |converter| field = converter[field, field_info] }
|
59
62
|
field
|
60
63
|
end
|
61
64
|
end
|
62
65
|
|
66
|
+
def build_converter(fields:, converters:, write_or_parser:)
|
67
|
+
converter_list = build_converter_list(fields: fields, converters: converters, write_or_parser: write_or_parser).freeze
|
68
|
+
converter_list_to_convert_proc(converter_list)
|
69
|
+
end
|
70
|
+
|
63
71
|
def build_boolean_field_parser_converter(boolean_field_indexes)
|
64
72
|
boolean_field_indexes = boolean_field_indexes.dup.freeze
|
65
73
|
lambda do |field, field_info|
|
data/lib/meibo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meibo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seiei Miyagi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: csv
|
@@ -142,7 +142,7 @@ metadata:
|
|
142
142
|
allowed_push_host: https://rubygems.org/
|
143
143
|
homepage_uri: https://github.com/hanachin/meibo
|
144
144
|
source_code_uri: https://github.com/hanachin/meibo
|
145
|
-
changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.
|
145
|
+
changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.25.0/CHANGELOG.md
|
146
146
|
rubygems_mfa_required: 'true'
|
147
147
|
post_install_message:
|
148
148
|
rdoc_options: []
|