kuali_toolbox 0.49 → 0.50
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/bin/transform_CSV_to_HR_XML +16 -11
- data/lib/kuali_toolbox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d44a176a7da107662843317caa231f220818269a
|
|
4
|
+
data.tar.gz: 96eb38dce5b80ed03a0514f222ca48e18f564379
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77d221cfacf90c64152c74562e6e10440cdddd223d3ad26fbe38c52e656c76ba831b5fd4fe06f85d068006b6f2cb804f13afb8c8cbd7cb84e1008c645adce26f
|
|
7
|
+
data.tar.gz: b0ad9c839a7c95d8fe8eacb5c1c6db34b17c5751da92dcf90f9da7506ec67efbde11c45184a68c18c9e99f186f5f6b9ac3813b83880b1b15d79ce4186e5e8874
|
data/bin/transform_CSV_to_HR_XML
CHANGED
|
@@ -15,23 +15,26 @@ GRM = KualiCo::ETL::GRM
|
|
|
15
15
|
TextParseError = KualiCo::ETL::TextParseError
|
|
16
16
|
|
|
17
17
|
def self.parse_command_line_options(
|
|
18
|
-
executable, args, opt={
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
executable, args, opt={})
|
|
19
|
+
|
|
20
|
+
csv_options = {
|
|
21
|
+
headers: :first_row,
|
|
22
|
+
header_converters: :symbol,
|
|
23
|
+
skip_blanks: true,
|
|
24
|
+
col_sep: ",", # comma by default
|
|
25
|
+
quote_char: '"', # double quote by default
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
optparse = OptionParser.new do |opts|
|
|
26
29
|
opts.banner = "Usage: #{executable} [options] csv_file"
|
|
27
30
|
opts.on( '-o [xml_file_output]' ,'--output [xml_file_output]', 'The file in which the the XML data will be writen (defaults to <csv_file>.xml)') do |f|
|
|
28
31
|
opt[:xml_filename] = f
|
|
29
32
|
end
|
|
30
33
|
opts.on( '-s [separator_character]' ,'--separator [separator_character]', 'The character that separates each column of the CSV file.' ) do |s|
|
|
31
|
-
|
|
34
|
+
csv_options[:col_sep] = s
|
|
32
35
|
end
|
|
33
36
|
opts.on( '-q [quote_character]' ,'--quote [quote_character]', 'The character used to quote fields.' ) do |q|
|
|
34
|
-
|
|
37
|
+
csv_options[:quote_char] = q
|
|
35
38
|
end
|
|
36
39
|
opts.on( '-e [email_recipients]', '--email [email_recipients]', 'Email recipient list that will receive job report status.' ) do |e|
|
|
37
40
|
opt[:email_recipients] = e
|
|
@@ -53,6 +56,8 @@ def self.parse_command_line_options(
|
|
|
53
56
|
exit 1
|
|
54
57
|
end
|
|
55
58
|
|
|
59
|
+
opt[:csv_options] = csv_options
|
|
60
|
+
|
|
56
61
|
opt[:csv_filename] = args[0] unless opt[:csv_filename]
|
|
57
62
|
if opt[:csv_filename].nil? || opt[:csv_filename].empty?
|
|
58
63
|
puts opts
|
|
@@ -60,7 +65,7 @@ def self.parse_command_line_options(
|
|
|
60
65
|
end
|
|
61
66
|
end
|
|
62
67
|
optparse.parse!
|
|
63
|
-
|
|
68
|
+
|
|
64
69
|
# construct a sensible default ouptput filename
|
|
65
70
|
unless opt[:xml_filename]
|
|
66
71
|
file_extension = File.extname opt[:csv_filename]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kuali_toolbox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.50'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- KualiCo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: builder
|