ol_dump_parser 1.0.1 → 1.1.0

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
  SHA256:
3
- metadata.gz: f84f422d37b4e038f7248a97895c4aefb05dd99310f8c670b0387dea13f37aff
4
- data.tar.gz: 556f70662b2497b3c05ccddccde6bbb5a5b7674d87c9d84fbcee9638202f5b61
3
+ metadata.gz: c17a4b08c430a964231f9a2b86df762523c8f971b9ad110564b7fba139508e0c
4
+ data.tar.gz: db592a483161931b55aaaded5dffca5873ea5ed86bd2a9b3823547db98e04947
5
5
  SHA512:
6
- metadata.gz: 1468b213e31f19f27ec6645535fcc82891173b9580544230bbe9e3c1e573c515c6aa4a54d45cc3ced1b86cd9aa8823143ab619a7e7d6d981ae0a3fab98b9aafd
7
- data.tar.gz: 708aa920d74f29726325e26f12e770cf6427e3c33c95eaefe8519eab9e793eb98c3ae32f87d843bd8cd2553354f63fa68998620aae68d5cafb3b5a3ba2bb5354
6
+ metadata.gz: c7699d775b23712bd18910ff82a589099376fc136f266eac96c6a048a5021c73a27fa7c959d6b516f8fca656fb1f0d4a4e8d0a1b69850e9d576b5ad30c048748
7
+ data.tar.gz: 92c0628f0d6770e2821ebdbea52b7acfcb0718aad9b3b150c5e39319a84c3dc73d24d020af2e6c851c567bc3286b4f33af6491a48dd19632ceaf6b34b80d5b6e
@@ -29,19 +29,19 @@ module OlDumpParser
29
29
  File.open(inp_file).each do |line|
30
30
  # CSV parse returns an array of rows - we need only the first
31
31
  parsed_line = CSV.parse(line.chomp, col_sep: "\t", liberal_parsing: true).first
32
- json_output = csv_row_to_json(parsed_line)
33
- puts json_output[:details]['name'] if verbose
34
- output.puts json_output
32
+ value_map = csv_row_to_map(parsed_line)
33
+ puts value_map[:details]['name'] if verbose
34
+ output.puts value_map.to_json
35
35
  end
36
36
  output.close
37
37
  end
38
38
 
39
39
  private
40
40
 
41
- # Convert the given row values to a json object
41
+ # Convert the given row values to a hashmap
42
42
  # @param row_values [Array] Csv row values
43
- # @return [Hash] Json value
44
- def csv_row_to_json(row_values)
43
+ # @return [Hash] hash map
44
+ def csv_row_to_map(row_values)
45
45
  {
46
46
  type: row_values[0],
47
47
  key: row_values[1],
@@ -1,3 +1,3 @@
1
1
  module OlDumpParser
2
- VERSION = '1.0.1'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ol_dump_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arjun M Das