sixword 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 412a951ad1786d3f978ebc77305e6b7094004b36
4
- data.tar.gz: 1a70321549259a131a8a10a536117d29a529110a
3
+ metadata.gz: 510c9016d6296108aea1122a763e3389c608715e
4
+ data.tar.gz: 8e93476177ebc6c328c7ea7972b65b9c6f660e83
5
5
  SHA512:
6
- metadata.gz: 9a2ca1765246ff2b0df8e4ae6b6f8554abec1fbbf7c07478b5e9b36ea38e7b34cb22e352b8c49c4786e9ebaf85927a3d270c48f005fa7e8fba4a00ab24ea09b0
7
- data.tar.gz: 0b44ad6d9bd5c7d2b7d0c5ddf9272357be00bf4e1917a46321c595afd72d754a33eae2eda1af3c503539f388427345b59d8ffc81e0505e544b139e910845d760
6
+ metadata.gz: 5c295ddfd1e6b4c616cc1257bd71a0aab7707c42bab0fafa8b88b5e9ee3c29658d8715ffb236353f27d2018b6cb46285769a0f8ee50a0030b474423cc08f0d0b
7
+ data.tar.gz: 32824743c047bba15734a0819bb896ba1c9ff299b9cfb6214da582fe5c4999560e595fe249b82b2aa7942193811003d5402547aee62a187ba2835c050599c294
@@ -7,3 +7,4 @@ rvm:
7
7
  - "jruby-19mode"
8
8
  script:
9
9
  bundle exec rake test
10
+ sudo: false
@@ -4,6 +4,13 @@ This project adheres to [Semantic Versioning](http://semver.org).
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.3.3] -- 2015-12-01
8
+
9
+ - Fix handling of words that straddle the 2048-byte buffer boundary. Previously
10
+ any word that was split over the boundary would be mangled into two words,
11
+ resulting in an error or incorrect output. This only affected the sixword
12
+ CLI. [#3](https://github.com/ab/sixword/issues/3)
13
+
7
14
  ## [0.3.2] -- 2015-11-25
8
15
 
9
16
  - Add lots of documentation and a change log!
@@ -165,16 +165,15 @@ module Sixword
165
165
 
166
166
  # Yield data 6 words at a time until EOF
167
167
  def read_input_by_6_words
168
- block_size = 2048
169
168
  word_arr = []
170
169
 
171
170
  while true
172
- buf = stream.read(block_size)
173
- if buf.nil?
171
+ line = stream.gets
172
+ if line.nil?
174
173
  break # EOF
175
174
  end
176
175
 
177
- buf.scan(/\S+/) do |word|
176
+ line.scan(/\S+/) do |word|
178
177
  word_arr << word
179
178
 
180
179
  # return the array if we have accumulated 6 words
@@ -1,4 +1,4 @@
1
1
  module Sixword
2
2
  # version string
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sixword
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Brody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-25 00:00:00.000000000 Z
11
+ date: 2015-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler