nilio 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,11 @@
1
1
  require 'stringio'
2
+ require 'singleton'
2
3
 
3
4
  # NilIO emulates a null device (like /dev/null).
4
5
  class NilIO < StringIO
5
6
 
7
+ include Singleton
8
+
6
9
  # Write to the null device. Ignores the
7
10
  # string parameter, just returning its byte length
8
11
  def write(string)
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "nilio"
6
- s.version = "0.0.1"
6
+ s.version = "1.0.0"
7
7
  s.authors = "Morgan Brown"
8
8
  s.email = "brown.mhg@gmail.com"
9
9
  s.homepage = "http://github.com/discom4rt/nilio"
@@ -5,7 +5,7 @@ require 'nilio'
5
5
 
6
6
  class NilIOTest < Test::Unit::TestCase
7
7
  def setup
8
- @null_device = NilIO.new
8
+ @null_device = NilIO.instance
9
9
  end
10
10
 
11
11
  def test_should_discard_any_data_written
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nilio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
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-05-08 00:00:00.000000000 Z
12
+ date: 2012-08-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: NilIO emulates a null device
15
15
  email: brown.mhg@gmail.com
@@ -45,10 +45,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  version: '0'
46
46
  requirements: []
47
47
  rubyforge_project:
48
- rubygems_version: 1.8.21
48
+ rubygems_version: 1.8.24
49
49
  signing_key:
50
50
  specification_version: 3
51
51
  summary: NilIO emulates a null device
52
52
  test_files:
53
53
  - test/nilio_test.rb
54
- has_rdoc: