kanrisuru 0.8.12 → 0.8.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/lib/kanrisuru/core/file.rb +1 -1
- data/lib/kanrisuru/version.rb +1 -1
- data/spec/functional/core/file_spec.rb +10 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2465d4419a5fa15bc4ec736c6064e48386be6e130d4a934404b8a1b0f7eaaa0
|
4
|
+
data.tar.gz: 5441c0ae297aad2fdc7f08686eca97585793f747aaf92b32339da66c4343f3cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 328fdfb44f1d0b18f4bd1fb49ab54779fb464e3f8948a8600f2d2e5cdddfe8ac351fa4499ee0f981a8f12fd262bf1d7757f71d721dafbf447834c8d6ff17ac6f
|
7
|
+
data.tar.gz: 20c59fd7d9e2e57e356beecf55809c3cbb009fe5d0e8b5692088731ed6bac3665e1e88f6e162d6cda1b7874e8a9a30e30ef52a6c5572cdfbd33f4328ee402eda
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
## Kanrisuru 0.8.
|
1
|
+
## Kanrisuru 0.8.13 (October 4, 20201)
|
2
|
+
* Fix `wc` command. Ensure result parsing is cast to integer values.
|
3
|
+
|
4
|
+
## Kanrisuru 0.8.12 (October 4, 20201)
|
2
5
|
* Refactor `rmdir` command to only work on empty directories.
|
3
6
|
|
4
7
|
## Kanrisuru 0.8.11 (October 1, 20201)
|
data/lib/kanrisuru/core/file.rb
CHANGED
data/lib/kanrisuru/version.rb
CHANGED
@@ -349,10 +349,17 @@ RSpec.describe Kanrisuru::Core::File do
|
|
349
349
|
expect(result.success?).to eq(true)
|
350
350
|
expect(result).to respond_to(:lines, :words, :characters)
|
351
351
|
|
352
|
-
|
353
|
-
|
352
|
+
## Need to remap data including newline chars to get byte size
|
353
|
+
data = host.cat('/etc/hosts').command.raw_result
|
354
|
+
doc = data.map(&:lines).flatten
|
354
355
|
|
355
|
-
|
356
|
+
lines = doc.length
|
357
|
+
words = doc.map(&:split).flatten
|
358
|
+
chars = doc.map(&:length).flatten
|
359
|
+
|
360
|
+
expect(result.lines).to eq(doc.length)
|
361
|
+
expect(result.words).to eq(words.length)
|
362
|
+
expect(result.characters).to eq(chars.sum)
|
356
363
|
end
|
357
364
|
end
|
358
365
|
end
|