patchwork_csv_utils 0.1.0-x86_64-linux → 0.1.1-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: ba729e9eb822d521122f896b90643ac9da04de055371c5287842326c8ce5ab3e
4
- data.tar.gz: 0f2ef04d36129c12979caa4b46a270e518c5e17d542b6dd00d2c2c5f85192a7a
3
+ metadata.gz: c22d6595d63535622b2f7d168f9b946a98ca2ff4cbbc7a697e7868a05eca970b
4
+ data.tar.gz: 806261df7e55b9fa404d0b1839c7913f23f98c4c0797f1251b376a88f23dcc70
5
5
  SHA512:
6
- metadata.gz: d1945ee6231d2350eb0ebd1f303d74b85696471fceccde273a09da7ea103f402bfe516125d375b12406a1f667ae9a5bc631fe39f88f4ff591d4b1b7ecbc652a6
7
- data.tar.gz: dff4c46ece08b6a4b0180ccd0e54cf58f6762a8498ffe02f7245a4a725eaa3021603848f3b44ba665789a831da1f6745b2e3cb594dc9ee2c006f2ec040721044
6
+ metadata.gz: 7fb07049e7358fe078b6aaa19f864997d82298087575779cac955f1dae3d6fc873fe1bbc80020bae04799c15afbe5dc3c73d2909367299681d41466db97d879b
7
+ data.tar.gz: 3cd8028e84e0b58e3ad8b40f09fa58e08238c9b064d42abfc673f2a881f798362d6d5172442db79af761707c343e26f2c7b1db289fcf22511a2a802d26605c6e
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.1)
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.10
70
+ 2.4.4
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,12 @@ 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, "{:?}", remove_new_lines(s.trim_end()))
77
77
  } else {
78
- write!(dest, "{}", s.trim_end())
78
+ write!(dest, "{}", remove_new_lines(s.trim_end()))
79
79
  }
80
+ }
81
+
82
+ fn remove_new_lines(s: &str) -> String {
83
+ s.replace("\n", " ").replace("\r", " ")
80
84
  }
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.1'
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.1
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - kingsley.hendrickse