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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96b168459e76c64aa511a58fc43d0d777d5d783874e47a24c373dd6da2ef3ff4
4
- data.tar.gz: 461c0236448253694f369cfc1b7757f61aeb0a4e0af3841cea62b6297d862c14
3
+ metadata.gz: f2465d4419a5fa15bc4ec736c6064e48386be6e130d4a934404b8a1b0f7eaaa0
4
+ data.tar.gz: 5441c0ae297aad2fdc7f08686eca97585793f747aaf92b32339da66c4343f3cf
5
5
  SHA512:
6
- metadata.gz: 4d8b47306256c698e30c7950fc18a59551fb156b14bc6e077df323a27832af8125f567213ec066ec1c8e5f7295411a0a113823ef4a6c97df0bbf5a6d753fc851
7
- data.tar.gz: 5152a07e2d3580c4de9fb477d36c8de6f1d3fae3a6e234a6c3a80318524cb8ae6fefaebd984501f63b3b5de79350c2d9b53eac92b133453aebd1c47ba4323619
6
+ metadata.gz: 328fdfb44f1d0b18f4bd1fb49ab54779fb464e3f8948a8600f2d2e5cdddfe8ac351fa4499ee0f981a8f12fd262bf1d7757f71d721dafbf447834c8d6ff17ac6f
7
+ data.tar.gz: 20c59fd7d9e2e57e356beecf55809c3cbb009fe5d0e8b5692088731ed6bac3665e1e88f6e162d6cda1b7874e8a9a30e30ef52a6c5572cdfbd33f4328ee402eda
data/CHANGELOG.md CHANGED
@@ -1,4 +1,7 @@
1
- ## Kanrisuru 0.8.12 (October 3, 20201)
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)
@@ -332,7 +332,7 @@ module Kanrisuru
332
332
  execute_shell(command)
333
333
 
334
334
  Kanrisuru::Result.new(command) do |cmd|
335
- items = cmd.to_a
335
+ items = cmd.to_s.split
336
336
  FileCount.new(items[0].to_i, items[1].to_i, items[2].to_i)
337
337
  end
338
338
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kanrisuru
4
- VERSION = '0.8.12'
4
+ VERSION = '0.8.13'
5
5
  end
@@ -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
- lines = result.lines
353
- result = host.cat('/etc/hosts')
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
- expect(lines).to eq(result.to_a.length)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanrisuru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.12
4
+ version: 0.8.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Mammina