dedup_csv 0.1.14-x86_64-darwin → 0.1.15-x86_64-darwin

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: 6794272311fb5fa9ae4c07a81b94bf63d16fd8c9e3fccd9345605531a682038f
4
- data.tar.gz: a94d9255445c58c35a2c98e4a27aa7633ea3a5d175d5cf5d1063aff693122956
3
+ metadata.gz: eb66959bded540ca67fe9db1283a9e659e53de9baf47fd51735fdae627cbc1ba
4
+ data.tar.gz: a5adddd18dce5e864b56721a9c321b53b0ff662bc1812f172d0429bbac8536d5
5
5
  SHA512:
6
- metadata.gz: 6759d1bf78e453a45e1f076fe583ab3b5480911ad47656c8146c9acacd7bd55262ebb79574fd946c59b2694183af3611bea0b21f39e9f99da34fb41c83e105a3
7
- data.tar.gz: 84ee57d9b5ea5fb60bec5ce3b86cb466ede437cb82b7c667a4b261fbac862242c7d4fb88472fc472bf26256debedc4ec746c9a77aa9cf241af7193cd03e734be
6
+ metadata.gz: 37d6b3f523f983ae8c7ed193fbfee2d8ca0e6900913c70564981f5cff2488ad5332bfe13128fa395a15237e7870a5f2999e42383d6eecba8cfde1f569b0cded4
7
+ data.tar.gz: 601c19d06cddc802c2452e3241d663f3310918b7b39e03bfadb5dd23cc23bf6b767d22c42d91b8156b82dfb0a30c5d681f4293270671dfdfd0c6969f43035c9e
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-darwin
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.