thrash 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/thrash/thrash.rb CHANGED
@@ -55,6 +55,7 @@ class Thrash
55
55
  o.write(v)
56
56
  end
57
57
  end
58
+ clear_buffer!
58
59
  end
59
60
 
60
61
  # empty the buffer
@@ -2,7 +2,7 @@ class Thrash
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- PATCH = 1
5
+ PATCH = 2
6
6
  STRING = [MAJOR, MINOR, PATCH].join('.')
7
7
  end
8
8
  end
data/readme.md CHANGED
@@ -6,8 +6,11 @@ Randomly write to many, many files. Inspired by desperation.
6
6
 
7
7
  thrasher = Thrash.new
8
8
 
9
+ random_numbers = (0..10_000).to_a
10
+
9
11
  1_000_000.times do |x|
10
- thrasher.add "thrash-#{(0..10000).to_a.sample}", ">:|\n"
12
+ filename = "thrash-#{random_numbers.sample}"
13
+ thrasher.write(filename, "data")
11
14
  end
12
15
 
13
16
  thrasher.finalize
data/thrash.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "thrash"
8
- s.version = "1.0.1"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Austin G. Davis-Richardson"]
12
- s.date = "2012-10-23"
12
+ s.date = "2013-01-18"
13
13
  s.description = "Randomly write to many, many files using an in-memory buffer"
14
14
  s.email = "harekrishna@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.homepage = "http://github.com/audy/thrash"
32
32
  s.licenses = ["MIT"]
33
33
  s.require_paths = ["lib"]
34
- s.rubygems_version = "1.8.24"
34
+ s.rubygems_version = "1.8.23"
35
35
  s.summary = "Randomly write to many, many files"
36
36
 
37
37
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thrash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-23 00:00:00.000000000 Z
12
+ date: 2013-01-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  segments:
94
94
  - 0
95
- hash: -87477105119268361
95
+ hash: 704763298750685507
96
96
  required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 1.8.24
104
+ rubygems_version: 1.8.23
105
105
  signing_key:
106
106
  specification_version: 3
107
107
  summary: Randomly write to many, many files