sys-filesystem 0.3.4-x86-mingw32 → 1.0.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,198 +1,198 @@
1
- ####################################################################
2
- # test_sys_filesystem_windows.rb
3
- #
4
- # Test case for the Sys::Filesystem.stat method and related stuff.
5
- # This should be run via the 'rake test' task.
6
- ####################################################################
7
- require 'rubygems'
8
- gem 'test-unit'
9
-
10
- require 'test/unit'
11
- require 'sys/filesystem'
12
- require 'rbconfig'
13
- include Sys
14
-
15
- class TC_Sys_Filesystem_Windows < Test::Unit::TestCase
16
- def setup
17
- @dir = '/'
18
- @stat = Filesystem.stat(@dir)
19
- @mount = Filesystem.mounts[0]
20
- @size = 58720256
21
- @array = []
22
- end
23
-
24
- def test_version
25
- assert_equal('0.3.4', Filesystem::VERSION)
26
- end
27
-
28
- def test_stat_path
29
- assert_respond_to(@stat, :path)
30
- assert_equal("/", @stat.path)
31
- end
32
-
33
- def test_stat_block_size
34
- assert_respond_to(@stat, :block_size)
35
- assert_kind_of(Fixnum, @stat.block_size)
36
- end
37
-
38
- def test_stat_fragment_size
39
- assert_respond_to(@stat, :fragment_size)
40
- assert_nil(@stat.fragment_size)
41
- end
42
-
43
- def test_stat_blocks
44
- assert_respond_to(@stat, :blocks)
45
- assert_kind_of(Fixnum, @stat.blocks)
46
- end
47
-
48
- def test_stat_blocks_free
49
- assert_respond_to(@stat, :blocks_free)
50
- assert_kind_of(Fixnum, @stat.blocks_free)
51
- end
52
-
53
- def test_stat_blocks_available
54
- assert_respond_to(@stat, :blocks_available)
55
- assert_kind_of(Fixnum, @stat.blocks_available)
56
- end
57
-
58
- def test_stat_files
59
- assert_respond_to(@stat, :files)
60
- assert_respond_to(@stat, :inodes) # Alias
61
- assert_nil(@stat.files)
62
- end
63
-
64
- def test_stat_files_free
65
- assert_respond_to(@stat, :files_free)
66
- assert_respond_to(@stat, :inodes_free) # Alias
67
- assert_nil(@stat.files_free)
68
- end
69
-
70
- def test_stat_files_available
71
- assert_respond_to(@stat, :files_available)
72
- assert_respond_to(@stat, :inodes_available) # Alias
73
- assert_nil(@stat.files_available)
74
- end
75
-
76
- def test_stat_filesystem_id
77
- assert_respond_to(@stat, :filesystem_id)
78
- assert_kind_of(Integer, @stat.filesystem_id)
79
- end
80
-
81
- def test_stat_flags
82
- assert_respond_to(@stat, :flags)
83
- assert_kind_of(Fixnum, @stat.flags)
84
- end
85
-
86
- def test_stat_name_max
87
- assert_respond_to(@stat, :name_max)
88
- assert_kind_of(Fixnum, @stat.name_max)
89
- end
90
-
91
- def test_stat_base_type
92
- assert_respond_to(@stat, :base_type)
93
- assert_kind_of(String, @stat.base_type)
94
- end
95
-
96
- def test_mount_point_singleton
97
- assert_respond_to(Filesystem, :mount_point)
98
- assert_nothing_raised{ Filesystem.mount_point(Dir.pwd) }
99
- assert_kind_of(String, Filesystem.mount_point(Dir.pwd))
100
- end
101
-
102
- def test_constants
103
- assert_not_nil(Filesystem::CASE_SENSITIVE_SEARCH)
104
- assert_not_nil(Filesystem::CASE_PRESERVED_NAMES)
105
- assert_not_nil(Filesystem::UNICODE_ON_DISK)
106
- assert_not_nil(Filesystem::PERSISTENT_ACLS)
107
- assert_not_nil(Filesystem::FILE_COMPRESSION)
108
- assert_not_nil(Filesystem::VOLUME_QUOTAS)
109
- assert_not_nil(Filesystem::SUPPORTS_SPARSE_FILES)
110
- assert_not_nil(Filesystem::SUPPORTS_REPARSE_POINTS)
111
- assert_not_nil(Filesystem::SUPPORTS_REMOTE_STORAGE)
112
- assert_not_nil(Filesystem::VOLUME_IS_COMPRESSED)
113
- assert_not_nil(Filesystem::SUPPORTS_OBJECT_IDS)
114
- assert_not_nil(Filesystem::SUPPORTS_ENCRYPTION)
115
- assert_not_nil(Filesystem::NAMED_STREAMS)
116
- assert_not_nil(Filesystem::READ_ONLY_VOLUME)
117
- end
118
-
119
- def test_stat_expected_errors
120
- assert_raises(ArgumentError){ Filesystem.stat }
121
- end
122
-
123
- # Filesystem.mounts
124
-
125
- def test_mounts_constructor_basic
126
- assert_respond_to(Filesystem, :mounts)
127
- assert_nothing_raised{ Filesystem.mounts }
128
- assert_nothing_raised{ Filesystem.mounts{} }
129
- end
130
-
131
- def test_mounts
132
- assert_kind_of(Array, Filesystem.mounts)
133
- assert_kind_of(Filesystem::Mount, Filesystem.mounts[0])
134
- end
135
-
136
- def test_mounts_block_form
137
- assert_nil(Filesystem.mounts{})
138
- assert_nothing_raised{ Filesystem.mounts{ |mt| @array << mt }}
139
- assert_kind_of(Filesystem::Mount, @array[0])
140
- end
141
-
142
- def test_mount_name
143
- assert_respond_to(@mount, :name)
144
- assert_kind_of(String, @mount.name)
145
- end
146
-
147
- def test_mount_time
148
- assert_respond_to(@mount, :mount_time)
149
- assert_kind_of(Time, @mount.mount_time)
150
- end
151
-
152
- def test_mount_type
153
- assert_respond_to(@mount, :mount_type)
154
- assert_kind_of(String, @mount.mount_type)
155
- end
156
-
157
- def test_mount_point
158
- assert_respond_to(@mount, :mount_point)
159
- assert_kind_of(String, @mount.mount_point)
160
- end
161
-
162
- def test_mount_options
163
- assert_respond_to(@mount, :options)
164
- assert_kind_of(String, @mount.options)
165
- end
166
-
167
- def test_pass_number
168
- assert_respond_to(@mount, :pass_number)
169
- assert_nil(@mount.pass_number)
170
- end
171
-
172
- def test_frequency
173
- assert_respond_to(@mount, :frequency)
174
- assert_nil(@mount.frequency)
175
- end
176
-
177
- def test_mounts_expected_errors
178
- assert_raise(ArgumentError){ Filesystem.mounts("C:\\") }
179
- end
180
-
181
- def test_fixnum_methods
182
- assert_respond_to(@size, :to_kb)
183
- assert_respond_to(@size, :to_mb)
184
- assert_respond_to(@size, :to_gb)
185
-
186
- assert_equal(57344, @size.to_kb)
187
- assert_equal(56, @size.to_mb)
188
- assert_equal(0, @size.to_gb)
189
- end
190
-
191
- def teardown
192
- @array = nil
193
- @dir = nil
194
- @stat = nil
195
- @size = nil
196
- @mount = nil
197
- end
198
- end
1
+ ####################################################################
2
+ # test_sys_filesystem_windows.rb
3
+ #
4
+ # Test case for the Sys::Filesystem.stat method and related stuff.
5
+ # This should be run via the 'rake test' task.
6
+ ####################################################################
7
+ require 'rubygems'
8
+ gem 'test-unit'
9
+
10
+ require 'test/unit'
11
+ require 'sys/filesystem'
12
+ require 'rbconfig'
13
+ include Sys
14
+
15
+ class TC_Sys_Filesystem_Windows < Test::Unit::TestCase
16
+ def setup
17
+ @dir = '/'
18
+ @stat = Filesystem.stat(@dir)
19
+ @mount = Filesystem.mounts[0]
20
+ @size = 58720256
21
+ @array = []
22
+ end
23
+
24
+ def test_version
25
+ assert_equal('1.0.0', Filesystem::VERSION)
26
+ end
27
+
28
+ def test_stat_path
29
+ assert_respond_to(@stat, :path)
30
+ assert_equal("/", @stat.path)
31
+ end
32
+
33
+ def test_stat_block_size
34
+ assert_respond_to(@stat, :block_size)
35
+ assert_kind_of(Fixnum, @stat.block_size)
36
+ end
37
+
38
+ def test_stat_fragment_size
39
+ assert_respond_to(@stat, :fragment_size)
40
+ assert_nil(@stat.fragment_size)
41
+ end
42
+
43
+ def test_stat_blocks
44
+ assert_respond_to(@stat, :blocks)
45
+ assert_kind_of(Fixnum, @stat.blocks)
46
+ end
47
+
48
+ def test_stat_blocks_free
49
+ assert_respond_to(@stat, :blocks_free)
50
+ assert_kind_of(Fixnum, @stat.blocks_free)
51
+ end
52
+
53
+ def test_stat_blocks_available
54
+ assert_respond_to(@stat, :blocks_available)
55
+ assert_kind_of(Fixnum, @stat.blocks_available)
56
+ end
57
+
58
+ def test_stat_files
59
+ assert_respond_to(@stat, :files)
60
+ assert_respond_to(@stat, :inodes) # Alias
61
+ assert_nil(@stat.files)
62
+ end
63
+
64
+ def test_stat_files_free
65
+ assert_respond_to(@stat, :files_free)
66
+ assert_respond_to(@stat, :inodes_free) # Alias
67
+ assert_nil(@stat.files_free)
68
+ end
69
+
70
+ def test_stat_files_available
71
+ assert_respond_to(@stat, :files_available)
72
+ assert_respond_to(@stat, :inodes_available) # Alias
73
+ assert_nil(@stat.files_available)
74
+ end
75
+
76
+ def test_stat_filesystem_id
77
+ assert_respond_to(@stat, :filesystem_id)
78
+ assert_kind_of(Integer, @stat.filesystem_id)
79
+ end
80
+
81
+ def test_stat_flags
82
+ assert_respond_to(@stat, :flags)
83
+ assert_kind_of(Fixnum, @stat.flags)
84
+ end
85
+
86
+ def test_stat_name_max
87
+ assert_respond_to(@stat, :name_max)
88
+ assert_kind_of(Fixnum, @stat.name_max)
89
+ end
90
+
91
+ def test_stat_base_type
92
+ assert_respond_to(@stat, :base_type)
93
+ assert_kind_of(String, @stat.base_type)
94
+ end
95
+
96
+ def test_mount_point_singleton
97
+ assert_respond_to(Filesystem, :mount_point)
98
+ assert_nothing_raised{ Filesystem.mount_point(Dir.pwd) }
99
+ assert_kind_of(String, Filesystem.mount_point(Dir.pwd))
100
+ end
101
+
102
+ def test_constants
103
+ assert_not_nil(Filesystem::CASE_SENSITIVE_SEARCH)
104
+ assert_not_nil(Filesystem::CASE_PRESERVED_NAMES)
105
+ assert_not_nil(Filesystem::UNICODE_ON_DISK)
106
+ assert_not_nil(Filesystem::PERSISTENT_ACLS)
107
+ assert_not_nil(Filesystem::FILE_COMPRESSION)
108
+ assert_not_nil(Filesystem::VOLUME_QUOTAS)
109
+ assert_not_nil(Filesystem::SUPPORTS_SPARSE_FILES)
110
+ assert_not_nil(Filesystem::SUPPORTS_REPARSE_POINTS)
111
+ assert_not_nil(Filesystem::SUPPORTS_REMOTE_STORAGE)
112
+ assert_not_nil(Filesystem::VOLUME_IS_COMPRESSED)
113
+ assert_not_nil(Filesystem::SUPPORTS_OBJECT_IDS)
114
+ assert_not_nil(Filesystem::SUPPORTS_ENCRYPTION)
115
+ assert_not_nil(Filesystem::NAMED_STREAMS)
116
+ assert_not_nil(Filesystem::READ_ONLY_VOLUME)
117
+ end
118
+
119
+ def test_stat_expected_errors
120
+ assert_raises(ArgumentError){ Filesystem.stat }
121
+ end
122
+
123
+ # Filesystem.mounts
124
+
125
+ def test_mounts_constructor_basic
126
+ assert_respond_to(Filesystem, :mounts)
127
+ assert_nothing_raised{ Filesystem.mounts }
128
+ assert_nothing_raised{ Filesystem.mounts{} }
129
+ end
130
+
131
+ def test_mounts
132
+ assert_kind_of(Array, Filesystem.mounts)
133
+ assert_kind_of(Filesystem::Mount, Filesystem.mounts[0])
134
+ end
135
+
136
+ def test_mounts_block_form
137
+ assert_nil(Filesystem.mounts{})
138
+ assert_nothing_raised{ Filesystem.mounts{ |mt| @array << mt }}
139
+ assert_kind_of(Filesystem::Mount, @array[0])
140
+ end
141
+
142
+ def test_mount_name
143
+ assert_respond_to(@mount, :name)
144
+ assert_kind_of(String, @mount.name)
145
+ end
146
+
147
+ def test_mount_time
148
+ assert_respond_to(@mount, :mount_time)
149
+ assert_kind_of(Time, @mount.mount_time)
150
+ end
151
+
152
+ def test_mount_type
153
+ assert_respond_to(@mount, :mount_type)
154
+ assert_kind_of(String, @mount.mount_type)
155
+ end
156
+
157
+ def test_mount_point
158
+ assert_respond_to(@mount, :mount_point)
159
+ assert_kind_of(String, @mount.mount_point)
160
+ end
161
+
162
+ def test_mount_options
163
+ assert_respond_to(@mount, :options)
164
+ assert_kind_of(String, @mount.options)
165
+ end
166
+
167
+ def test_pass_number
168
+ assert_respond_to(@mount, :pass_number)
169
+ assert_nil(@mount.pass_number)
170
+ end
171
+
172
+ def test_frequency
173
+ assert_respond_to(@mount, :frequency)
174
+ assert_nil(@mount.frequency)
175
+ end
176
+
177
+ def test_mounts_expected_errors
178
+ assert_raise(ArgumentError){ Filesystem.mounts("C:\\") }
179
+ end
180
+
181
+ def test_fixnum_methods
182
+ assert_respond_to(@size, :to_kb)
183
+ assert_respond_to(@size, :to_mb)
184
+ assert_respond_to(@size, :to_gb)
185
+
186
+ assert_equal(57344, @size.to_kb)
187
+ assert_equal(56, @size.to_mb)
188
+ assert_equal(0, @size.to_gb)
189
+ end
190
+
191
+ def teardown
192
+ @array = nil
193
+ @dir = nil
194
+ @stat = nil
195
+ @size = nil
196
+ @mount = nil
197
+ end
198
+ end
metadata CHANGED
@@ -1,69 +1,53 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: sys-filesystem
3
- version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 3
9
- - 4
10
- version: 0.3.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
11
6
  platform: x86-mingw32
12
- authors:
7
+ authors:
13
8
  - Daniel J. Berger
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2010-11-18 00:00:00 -07:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-01-11 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: test-unit
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &5714436 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 9
30
- segments:
31
- - 2
32
- - 1
33
- - 1
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
34
21
  version: 2.1.1
35
22
  type: :development
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: windows-pr
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *5714436
25
+ - !ruby/object:Gem::Dependency
26
+ name: windows-pr
27
+ requirement: &5713068 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 29
46
- segments:
47
- - 1
48
- - 0
49
- - 5
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
50
32
  version: 1.0.5
51
33
  type: :runtime
52
- version_requirements: *id002
53
- description: " The sys-filesystem library provides an interface for gathering filesystem\n information, such as disk space and mount point data.\n"
34
+ prerelease: false
35
+ version_requirements: *5713068
36
+ description: ! " The sys-filesystem library provides an interface for gathering
37
+ filesystem\n information, such as disk space and mount point data.\n"
54
38
  email: djberg96@gmail.com
55
39
  executables: []
56
-
57
40
  extensions: []
58
-
59
- extra_rdoc_files:
41
+ extra_rdoc_files:
60
42
  - CHANGES
61
43
  - README
62
44
  - MANIFEST
63
- files:
45
+ files:
64
46
  - CHANGES
65
47
  - examples/example_stat.rb
66
48
  - lib/sys/filesystem.rb
49
+ - lib/unix/sys/filesystem.rb
50
+ - lib/windows/sys/filesystem.rb
67
51
  - MANIFEST
68
52
  - Rakefile
69
53
  - README
@@ -71,39 +55,30 @@ files:
71
55
  - test/test_sys_filesystem.rb
72
56
  - test/test_sys_filesystem_unix.rb
73
57
  - test/test_sys_filesystem_windows.rb
74
- has_rdoc: true
75
58
  homepage: http://www.rubyforge.org/projects/sysutils
76
- licenses:
59
+ licenses:
77
60
  - Artistic 2.0
78
61
  post_install_message:
79
62
  rdoc_options: []
80
-
81
- require_paths:
63
+ require_paths:
82
64
  - lib
83
- required_ruby_version: !ruby/object:Gem::Requirement
65
+ required_ruby_version: !ruby/object:Gem::Requirement
84
66
  none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- hash: 3
89
- segments:
90
- - 0
91
- version: "0"
92
- required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
72
  none: false
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- hash: 3
98
- segments:
99
- - 0
100
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
101
77
  requirements: []
102
-
103
78
  rubyforge_project: sysutils
104
- rubygems_version: 1.3.7
79
+ rubygems_version: 1.7.2
105
80
  signing_key:
106
81
  specification_version: 3
107
82
  summary: A Ruby interface for getting file system information.
108
- test_files:
83
+ test_files:
109
84
  - test/test_sys_filesystem.rb