dimsum 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -19,7 +19,12 @@ Or install it yourself as:
19
19
 
20
20
  ## Usage
21
21
  ```sh
22
- sample.rb filename
22
+ dimsum filename
23
+ -n, --number [Fixnum]
24
+ ```
25
+ or
26
+ ```sh
27
+ cat filename | dimsum
23
28
  -n, --number [Fixnum]
24
29
  ```
25
30
  ## Contributing
@@ -17,7 +17,7 @@ module Dimsum
17
17
  input_line_number = 0
18
18
  out = []
19
19
 
20
- STDIN.readlines.each do |line|
20
+ STDIN.each_line do |line|
21
21
  keep, index = keep_line_in_index(input_line_number, sample_size, random)
22
22
  out[index] = line if keep
23
23
  input_line_number += 1
@@ -1,3 +1,3 @@
1
1
  module Dimsum
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dimsum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-11-24 00:00:00.000000000 Z
14
+ date: 2012-11-27 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: dimsum is a very simple ruby script that performs reservoir sampling
17
17
  on the input file.
@@ -48,7 +48,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
48
  version: '0'
49
49
  segments:
50
50
  - 0
51
- hash: -2110486468089540385
51
+ hash: 244000597652478059
52
52
  required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  segments:
59
59
  - 0
60
- hash: -2110486468089540385
60
+ hash: 244000597652478059
61
61
  requirements: []
62
62
  rubyforge_project:
63
63
  rubygems_version: 1.8.11