stream_count 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25598f94168334a3167006a9f146aee1a06c4eec
4
- data.tar.gz: b418501e0d1399972082bb5c62f5a68c2978f223
3
+ metadata.gz: 1630a60b67967f609872ed5ac5bf769f2a2a2a32
4
+ data.tar.gz: 73bf07a9f594ba8f76f7595ea27db5429fc0b6f8
5
5
  SHA512:
6
- metadata.gz: 6d247c6a3acc882209cb7cdf2e8a99ac83b46e8b6a124e22b7765c597480c8f7a82dc73ee4f3a1d1b429c61b0bb84446851bef3d57d2af4c96d4ca99a4a7ef51
7
- data.tar.gz: 2b468f4c5e25fed8ee30db5043f2668feb8b760c4bc79612ca140adf12b6e2214c576b59f133071bc3d8b6c3004a795b1bbf356a40cf1e89c93f5e7c1ee09af5
6
+ metadata.gz: a363ca4d0df7945165a01b809a7ddc8985ecb35b582ccd27536242331897c379c86e109b2152d1e678bf07fa9248ef75126a5e8f626e3078eeb91a6825ff2e36
7
+ data.tar.gz: 0bf14585ed966b63e2f8f461e3c40fc31f6704646eb3cd49cc81087cc3559d03d923bbc8651b8d169ce087d4f6d83d64ac78ff806cd0d630f519ff406d661f7d
data/README.md CHANGED
@@ -4,6 +4,8 @@ Output statistics about data from stdin while redirecting the data to stdout.
4
4
  The statistics are bytes read, bytes read per second, lines read, lines read per
5
5
  second and total seconds.
6
6
 
7
+ <img src="stream_count_demo.gif" />
8
+
7
9
  ## Usage
8
10
 
9
11
  ```sh
@@ -1,3 +1,3 @@
1
1
  module StreamCount
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
data/lib/stream_count.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  require 'stream_count/version'
2
- require 'English'
3
- require 'bigdecimal'
4
2
 
5
3
  # Collects IO stats from stdin and prints the stats to stderr.
6
4
  # Original stdin is output to stdout.
@@ -21,7 +19,7 @@ module StreamCount
21
19
  while (data = io.read(BUFFER_SIZE))
22
20
  $stdout.print(data)
23
21
  bytes += data.size
24
- lines += data.count($INPUT_RECORD_SEPARATOR)
22
+ lines += data.count($/)
25
23
  output(bytes: bytes, lines: lines, throttle: true)
26
24
  end
27
25
  output(bytes: bytes, lines: lines, throttle: false)
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stream_count
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Pierce
@@ -73,6 +73,7 @@ files:
73
73
  - lib/stream_count.rb
74
74
  - lib/stream_count/version.rb
75
75
  - stream_count.gemspec
76
+ - stream_count_demo.gif
76
77
  homepage: https://github.com/ddrscott/stream_count
77
78
  licenses:
78
79
  - MIT