patchwork_csv_utils 0.1.0-arm64-darwin → 0.1.2-arm64-darwin

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: 10d3183c51f70814cdee3310a5a99905cf79c3591ce487fc41d180055dcdd9cd
4
- data.tar.gz: 15fca90894a0b3750607b4ada2bdd9c40028271ab5dab92cff121a79e50156a1
3
+ metadata.gz: 5d48484a389b0f61fa40b9ff495a9529d5b6672531ec8a46058fcb031ff58e1f
4
+ data.tar.gz: c817216b32c72b30887582774d31057547beec706679080905ad8c8b0a724e24
5
5
  SHA512:
6
- metadata.gz: dbeeb09f3f3f0602ff794ef429ed7eeb90a1fe5c48b2a6eef40ff6d368fcb40a46fb3ed9c673d7d09058a2edb34f1ae8a00154222e85b66b07aa4d44e77dca4c
7
- data.tar.gz: 6c115d9df13b641bf193d95cff0d1e7a8a59f3c18c2c35c578cc36ef6c8c3c06567ab532fa7ef335ecbd5258980a464d8ab71a114129602cc6fe164119223c05
6
+ metadata.gz: 95eca6a03e0ff76c85764e18b8e59c48e2c4e3dc30ce7921fbfa264f7aab9b5c9cbf431c9c912232bb84d2a3343bd7e91ddc97124a80b525095b2e7b74b8945b
7
+ data.tar.gz: 3d9c7bedc83f9f6d8e4cf79b40f1dd647e75a1ad78b8a4f006d252f7e2c76344304e9502bc32867a66309233118332e774d6001dac1221e865ca15aa59c83402
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- patchwork_csv_utils (0.1.0)
4
+ patchwork_csv_utils (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -12,7 +12,7 @@ gem install patchwork_csv_utils
12
12
  ## Usage
13
13
 
14
14
  ```irb
15
- require 'patchwork_csv_utils'
15
+ require 'csv_utils'
16
16
  CsvUtils.dedup('file1.csv', 'file2.csv', 'output.csv')
17
17
  CsvUtils.to_csv('file1.xls', 'output_file1.csv', 'sheet_name')
18
18
  ```
@@ -73,8 +73,14 @@ fn transform_time_to_datetime(t1: NaiveDateTime, t2: NaiveDateTime) -> NaiveDate
73
73
 
74
74
  fn handle_commas<W: Write>(dest: &mut W, s: &str) -> std::io::Result<()> {
75
75
  if s.contains(",") {
76
- write!(dest, "{:?}", s.trim_end())
76
+ write!(dest, "{:?}", clean_strings(s).trim_end())
77
77
  } else {
78
- write!(dest, "{}", s.trim_end())
78
+ write!(dest, "{}", clean_strings(s).trim_end())
79
79
  }
80
+ }
81
+
82
+ fn clean_strings(s: &str) -> String {
83
+ s.replace("\n", " ")
84
+ .replace("\r", " ")
85
+ .replace("\"", "")
80
86
  }
Binary file
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CsvUtils
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patchwork_csv_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - kingsley.hendrickse