censive 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/censive.rb +10 -10
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b3192a24670593887dbf1e955c2db44c912248b4eef81c2f89d411190ff7a7c
4
- data.tar.gz: f95e5e02f4930f8478fa0bae557e13f72d93637e7bb1d4458a6fa46e022f76cb
3
+ metadata.gz: 14b2b860b44e06018a627322fe8cb2d6b2e437a0f24cd21ad110d6a7f8f6170e
4
+ data.tar.gz: 942fc5ddcff3239e654ba391a72209e09844ac4e9df430c762ef0d54d38095b4
5
5
  SHA512:
6
- metadata.gz: 38405a381813ba7d8f575b654c1593f3e0cf7d3869258f8956c5631ac8887e78a292bb7838773af9ea6b42590fd28d4aa4f2b654d4caa5c60f24470bd7df3c4e
7
- data.tar.gz: 85168aaaf282d7a273068c906cd98347f91ada39daa8e9d7967dce23796e9ab632ea62d1be9ad0ade55dd01de9865eeff1afdccc571199cb23ff6b2ba976629d
6
+ metadata.gz: 38677787034eb1de1d4272fe0e5b8f5629c14fe28f69d3d1b05652644fc76d3b2fcdd80bdde3c91b5c4107ec634a28f7d7e58b7f417ada84fa2190d76ba3c2d5
7
+ data.tar.gz: 1f6496e143fd7ee75cea6797cf59f55fdda5fc877a5aeb53580de0680827666e66f97b15018db7fd197169366af8ce1f09e2f9a8a014eea70faf784bdb276ef6
data/lib/censive.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  # censive - A quick and lightweight CSV handling library for Ruby
5
5
  #
6
6
  # Author: Steve Shreeve (steve.shreeve@gmail.com)
7
- # Date: Mar 22, 2023
7
+ # Date: June 16, 2023
8
8
  #
9
9
  # https://crystal-lang.org/api/1.7.2/CSV.html (Crystal's CSV library)
10
10
  # https://github.com/ruby/strscan/blob/master/ext/strscan/strscan.c
@@ -29,7 +29,7 @@ require "stringio"
29
29
  require "strscan"
30
30
 
31
31
  class Censive < StringScanner
32
- VERSION="1.0.3"
32
+ VERSION="1.0.4"
33
33
 
34
34
  attr :encoding, :out, :rows
35
35
 
@@ -95,14 +95,14 @@ class Censive < StringScanner
95
95
 
96
96
  # regexes
97
97
  xsep = Regexp.escape(@sep) # may need to be escaped
98
- @eoc = /(?=#{"\\" + xsep}|#{@cr}|#{@lf}|\z)/o # end of cell
99
- @eol = /#{@cr}#{@lf}?|#{@lf}/o # end of line
100
- @escapes = /(#{@quote})|#{xsep}|#{@cr}|#{@lf}/o
101
- @quotable = /#{xsep}|#{@cr}|#{@lf}/o
102
- @quotes = /#{@quote}/o
103
- @seps = /#{xsep}+/o
104
- @quoted = @excel ? /(?:=)?#{@quote}/o : @quote
105
- @unquoted = /[^#{xsep}#{@cr}#{@lf}][^#{@quote}#{@cr}#{@lf}]*/o
98
+ @eoc = /(?=#{"\\" + xsep}|#{@cr}|#{@lf}|\z)/ # end of cell
99
+ @eol = /#{@cr}#{@lf}?|#{@lf}/ # end of line
100
+ @escapes = /(#{@quote})|#{xsep}|#{@cr}|#{@lf}/
101
+ @quotable = /#{xsep}|#{@cr}|#{@lf}/
102
+ @quotes = /#{@quote}/
103
+ @seps = /#{xsep}+/
104
+ @quoted = @excel ? /(?:=)?#{@quote}/ : @quote
105
+ @unquoted = /[^#{xsep}#{@cr}#{@lf}][^#{@quote}#{@cr}#{@lf}]*/
106
106
  @leadzero = /\A0\d*\z/
107
107
 
108
108
  yield self if block_given?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: censive
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Shreeve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-15 00:00:00.000000000 Z
11
+ date: 2023-06-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A quick and lightweight CSV handling library for Ruby
14
14
  email: steve.shreeve@gmail.com