kuali_toolbox 0.49 → 0.50

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0093d75500dbc996f01bafd6d3e9c8ae734937f
4
- data.tar.gz: 0a90308846fddca2ea671e4bc9ba58a5781e196a
3
+ metadata.gz: d44a176a7da107662843317caa231f220818269a
4
+ data.tar.gz: 96eb38dce5b80ed03a0514f222ca48e18f564379
5
5
  SHA512:
6
- metadata.gz: 701e9bf3011ace38d9cce620494085dff791aff2b9bb6b3228252366ed1a1cd6e1d7e98308847d1f31d310649f595a9b66d5b57c7915c63a7d28bfbc2138f0dd
7
- data.tar.gz: 205040930ea923e3cd81dd4ad8f1554a67fc121cdab65f0db663972467e2e60716429a24618331de59ede9e41dd52c37652295af1040460bde77286c97909802
6
+ metadata.gz: 77d221cfacf90c64152c74562e6e10440cdddd223d3ad26fbe38c52e656c76ba831b5fd4fe06f85d068006b6f2cb804f13afb8c8cbd7cb84e1008c645adce26f
7
+ data.tar.gz: b0ad9c839a7c95d8fe8eacb5c1c6db34b17c5751da92dcf90f9da7506ec67efbde11c45184a68c18c9e99f186f5f6b9ac3813b83880b1b15d79ce4186e5e8874
@@ -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={ csv_options: { headers: :first_row,
19
- header_converters: :symbol,
20
- skip_blanks: true,
21
- col_sep: ",", # comma by default
22
- quote_char: '"', # double quote by default
23
- }
24
- } )
25
- optparse = OptionParser.new do |opts|
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
- opt[:col_sep] = s
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
- opt[:quote_char] = q
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]
@@ -16,5 +16,5 @@
16
16
 
17
17
  module KualiCo
18
18
  # The gem version number.
19
- VERSION = "0.49"
19
+ VERSION = "0.50"
20
20
  end
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.49'
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-03-02 00:00:00.000000000 Z
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder