censive 0.15 → 0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/censive.gemspec +1 -1
  3. data/lib/censive.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4211eb0036bcbadf9d1683f10084bb8cbb109d26845d6990778e159b634b8d00
4
- data.tar.gz: 1f97a3e5343958a86d54b7f1f87ada5d05a8f091d597253c3079c1a15eeb4dfa
3
+ metadata.gz: 88b2018e7ca027d44e36061d9cdc983b56e510632bc125ca632b85fbdc15999b
4
+ data.tar.gz: 3ec807310f681afdec72505269c23a6a6d9b0262134dbbcd0b16cc6406c9fc50
5
5
  SHA512:
6
- metadata.gz: f3b8e0ee3cf2d8eadbb26d6be5b590418a844561062779f47eec0863b87cfbc65868a8c89624865eb74ee7f6825ee3fb1d2d26611353a30f805d40d567c1f1ac
7
- data.tar.gz: 949e07f3f2208cbecc868a85c7bde5e67f38bf570ae1708496fd7745703c3fc133e8d48fc03c5c18c85264c0bff5b394d5ce2c2b2894daa8b7ca9033f9d68828
6
+ metadata.gz: b0110e0ff7dc4f902ede1c7086e6431d3671f1c5886c6947e493bc85ad48bda3232d3604b269703ad3bfdb0d7b1d180cb55ea12fdf06bcc9729a1d67d2cd85a7
7
+ data.tar.gz: 90dbb68deed9124a723eba91574f46829bf870277f874433ad34fc63dfb4376a8bda243b9fdbb86fbfee90e18bd169e4b8cc97fa6f6f3dac43bbc2125dac877d
data/censive.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "censive"
5
- s.version = "0.15"
5
+ s.version = "0.17"
6
6
  s.author = "Steve Shreeve"
7
7
  s.email = "steve.shreeve@gmail.com"
8
8
  s.summary =
data/lib/censive.rb CHANGED
@@ -43,6 +43,7 @@ class Censive < StringScanner
43
43
  strip: false , # strip fields when reading
44
44
  **opts # grab bag
45
45
  )
46
+ str = File.read(str) if str =~ /\A.{,100}\z/
46
47
  super(str || "")
47
48
  reset
48
49
 
@@ -86,8 +87,7 @@ class Censive < StringScanner
86
87
  token << @quote and next if scan(@quote)
87
88
  break if scan(@eoc)
88
89
  @relax or bomb "invalid character after quote"
89
- quoted = scan_until(/#{@quote}/o) or bomb "invalid inline quote"
90
- token << @quote + quoted + @quote
90
+ token << @quote + (scan_until(/#{@quote}/o) or bomb "bad inline quote")
91
91
  end
92
92
  elsif scan(@sep) then return @es
93
93
  elsif scan(@eol) then return nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: censive
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.15'
4
+ version: '0.17'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Shreeve