dedup_csv 0.1.14-x86_64-linux → 0.1.15-x86_64-linux

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: 7253b1f87b5f010b8c149a8a0e801e6bc89bce1760ecad07c2247883a65e8743
4
- data.tar.gz: 7f84d147429b115704dd6920aa6627ced5929607a60987bdc21565bf9bd2b7d7
3
+ metadata.gz: 378cc3bba650237b74e1e1c7bdc849845683bee45cb90421782a4555f77e1894
4
+ data.tar.gz: eadb753475b169e8024321d4401e4b26dac3291f4ee4b0046ebbad802de0b3c2
5
5
  SHA512:
6
- metadata.gz: 0f57b7f44d4b564e7cd6f9bc117b04638b33342019bcc3f32c733298217f8a71ba044d8c67b5080083b8993cb07d04eaeecbb169e7f2d6f799c4096e843eb54f
7
- data.tar.gz: 13c6a430fa9a47e17e1d056820f9b46e2851cc044e40ab5dd26739bb2d4941377b25879b6243576b3f29ee5ba5cd021fae483f7753352a5b4b8a684986efcc70
6
+ metadata.gz: d11ac899029fb0117108533b7eb19d7d1baaf4b7a462d7c73bfdaf0a66dc5306b577e933a66f0d64885dca4fc1fa6627b892b39a168bb7424a3dc99331b25101
7
+ data.tar.gz: 998fa1e91cc4e005e17e1edcc2b9b357d722faa1003686412f97db61a3967f297eadb8ccd72d8fe917fe2631badedc2dd86f4cdefb3259b23e02e968bed552ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dedup_csv (0.1.14)
4
+ dedup_csv (0.1.15)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -33,13 +33,14 @@ fn dedup(ruby: &Ruby, previous_csv_path: String, new_csv_path: String, target_pa
33
33
  let mut previous_records = vec![];
34
34
  for previous_record in previous_csv.records() {
35
35
  let previous_record = previous_record.map_err(|e| magnus_err(ruby, e, "previous_record"))?;
36
+ let previous_record = previous_record.into_iter().map(|r| r.trim_end()).collect::<StringRecord>();
36
37
  previous_records.push(previous_record)
37
38
  }
38
39
 
39
40
  for new_record in new_csv.records() {
40
41
  let new_record = new_record.map_err(|e| magnus_err(ruby, e, "new_record"))?;
42
+ let new_record = new_record.into_iter().map(|r| r.trim_end()).collect::<StringRecord>();
41
43
  if !previous_records.contains(&new_record) {
42
- let new_record = new_record.into_iter().map(|r| r.trim_end()).collect::<StringRecord>();
43
44
  wtr.write_byte_record(new_record.as_byte_record()).unwrap();
44
45
  }
45
46
  }
Binary file
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DedupCsv
4
- VERSION = '0.1.14'
4
+ VERSION = '0.1.15'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dedup_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - kingsley.hendrickse
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-22 00:00:00.000000000 Z
11
+ date: 2024-07-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Given 2 CSV files, remove all rows from the second CSV that are present
14
14
  in the first CSV.