sixword 0.3.2 → 0.3.3
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 +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +7 -0
- data/lib/sixword/cli.rb +3 -4
- data/lib/sixword/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 510c9016d6296108aea1122a763e3389c608715e
|
4
|
+
data.tar.gz: 8e93476177ebc6c328c7ea7972b65b9c6f660e83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c295ddfd1e6b4c616cc1257bd71a0aab7707c42bab0fafa8b88b5e9ee3c29658d8715ffb236353f27d2018b6cb46285769a0f8ee50a0030b474423cc08f0d0b
|
7
|
+
data.tar.gz: 32824743c047bba15734a0819bb896ba1c9ff299b9cfb6214da582fe5c4999560e595fe249b82b2aa7942193811003d5402547aee62a187ba2835c050599c294
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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!
|
data/lib/sixword/cli.rb
CHANGED
@@ -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
|
-
|
173
|
-
if
|
171
|
+
line = stream.gets
|
172
|
+
if line.nil?
|
174
173
|
break # EOF
|
175
174
|
end
|
176
175
|
|
177
|
-
|
176
|
+
line.scan(/\S+/) do |word|
|
178
177
|
word_arr << word
|
179
178
|
|
180
179
|
# return the array if we have accumulated 6 words
|
data/lib/sixword/version.rb
CHANGED
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.
|
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
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|