disk-stats 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/disk-stats.gemspec +1 -1
- data/lib/disk-stats.rb +4 -0
- data/test/test_disk_stats.rb +8 -0
- metadata +7 -7
data/disk-stats.gemspec
CHANGED
data/lib/disk-stats.rb
CHANGED
data/test/test_disk_stats.rb
CHANGED
@@ -31,6 +31,10 @@ describe DiskStats::Parser do
|
|
31
31
|
@parser.count.must_equal 10
|
32
32
|
end
|
33
33
|
|
34
|
+
it 'should know the devices it has' do
|
35
|
+
@parser.devices.must_equal [:ram0, :loop0, :loop1, :sda1, :sdb, :sdf8, :sdf1, :sde1, :md0, :'dm-0']
|
36
|
+
end
|
37
|
+
|
34
38
|
it 'should be enumerable' do
|
35
39
|
@parser.is_a? Enumerable
|
36
40
|
end
|
@@ -41,6 +45,10 @@ describe DiskStats::Parser do
|
|
41
45
|
end
|
42
46
|
end
|
43
47
|
|
48
|
+
it 'should return nil for a disk that does not exist' do
|
49
|
+
@parser[:foozle].must_be_nil
|
50
|
+
end
|
51
|
+
|
44
52
|
it 'should return a device when indexed by the device name' do
|
45
53
|
@parser[:ram0].must_be_instance_of DiskStats::Device
|
46
54
|
@parser[:ram0].name.must_equal 'ram0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: disk-stats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-26 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
16
|
-
requirement: &
|
16
|
+
requirement: &70255972279160 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70255972279160
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &70255972278580 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.1.rc
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70255972278580
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &70255972274380 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70255972274380
|
47
47
|
description: Some stuff for dealing with /proc/diskstats
|
48
48
|
email: edward@heroku.com
|
49
49
|
executables: []
|