dedup_csv 0.1.3-x86_64-linux → 0.1.5-x86_64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83d0ef76fe9ba660b38c50344798223fcc0036dfaa435ce8078644e4edc3d41f
4
- data.tar.gz: 6f873454d04484261b233300823405ff34c1fe7258cb86d5eda6dc40c8d7d68a
3
+ metadata.gz: 6227e7351dcceefa8cbfd13fb0e74db8ab7b3912e3181afd5c1e74e7adda9957
4
+ data.tar.gz: bb1d47c0513e21740196ef3935e1720584095194328364b66b393962f1f4567b
5
5
  SHA512:
6
- metadata.gz: e71dea4fdd2b104e54d904d39fa94b37c85f68da114efea94bdfcdded956d375d5f228ade5670c352b8fe2429cf93674a41ca9b979ed740eb7373fa8b4eb2d64
7
- data.tar.gz: 39b4f7d50dbcbc016267fdfd2e0cc01b844167000fc81824bc1d319c5524c27a0702bd046f86e8b942817fc5e1e1c3623c19f4d58cb0151fa5191b78820c6a26
6
+ metadata.gz: e76bb33d2c0bffe31839d504ded9af5b0446acb1ab114dfccef55aba5c3260ebd7bd898f3e8156fab07340de74f966838a98d39d5912d66a44ddb0c2d969f70b
7
+ data.tar.gz: 7a23b151d5fc8cc6be8d637cbb4c409d5f653efeb3adf301444c4055ea119643109206de85f970da55e5fd790a5f62c7e49c6a2c3e6235c48a1e459e67eaeaf9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dedup_csv (0.1.3)
4
+ dedup_csv (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -67,4 +67,4 @@ DEPENDENCIES
67
67
  rubocop (~> 1.21)
68
68
 
69
69
  BUNDLED WITH
70
- 2.4.4
70
+ 2.4.10
@@ -7,10 +7,10 @@ use magnus::{define_module, function, prelude::*, Ruby};
7
7
 
8
8
  fn dedup(ruby: &Ruby, previous_csv_path: String, new_csv_path: String, target_path: String) -> magnus::error::Result<()> {
9
9
  if !previous_csv_path.has_extension(&["csv"]) {
10
- return Err(magnus::Error::new(ruby.exception_exception(), "previous_csv_path must be a csv file".to_string()));
10
+ return Err(magnus::Error::new(ruby.exception_standard_error(), "previous_csv_path must be a csv file".to_string()));
11
11
  }
12
12
  if !new_csv_path.has_extension(&["csv"]) {
13
- return Err(magnus::Error::new(ruby.exception_exception(), "new_csv_path must be a csv file".to_string()));
13
+ return Err(magnus::Error::new(ruby.exception_standard_error(), "new_csv_path must be a csv file".to_string()));
14
14
  }
15
15
 
16
16
  let csv1 = File::open(previous_csv_path).map_err(|e| magnus_err(ruby, e, "previous_csv_path"))?;
@@ -25,7 +25,7 @@ fn dedup(ruby: &Ruby, previous_csv_path: String, new_csv_path: String, target_pa
25
25
  let new_headers = new_csv.headers().map_err(|e| magnus_err(ruby, e, "new_csv_path headers"))?;
26
26
 
27
27
  if previous_headers != new_headers {
28
- return Err(magnus::Error::new(ruby.exception_exception(), "headers of both csv files must be the same".to_string()));
28
+ return Err(magnus::Error::new(ruby.exception_standard_error(), "headers of both csv files must be the same".to_string()));
29
29
  }
30
30
 
31
31
  wtr.write_byte_record(previous_headers.as_byte_record()).unwrap();
@@ -50,7 +50,7 @@ fn dedup(ruby: &Ruby, previous_csv_path: String, new_csv_path: String, target_pa
50
50
  }
51
51
 
52
52
  fn magnus_err<E: Error>(ruby: &Ruby, e: E, msg: &str) -> magnus::Error {
53
- magnus::Error::new(ruby.exception_exception(), format!("{}: {}", msg, e.to_string()))
53
+ magnus::Error::new(ruby.exception_standard_error(), format!("{}: {}", msg, e.to_string()))
54
54
  }
55
55
 
56
56
  #[magnus::init]
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.3'
4
+ VERSION = '0.1.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dedup_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - kingsley.hendrickse
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 3.0.0
61
+ version: 3.1.6
62
62
  requirements: []
63
63
  rubygems_version: 3.4.4
64
64
  signing_key: