sys-filesystem 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/CHANGES +4 -0
- data/README +8 -1
- data/Rakefile +6 -1
- data/lib/unix/sys/filesystem.rb +17 -12
- data/lib/windows/sys/filesystem.rb +1 -1
- data/sys-filesystem.gemspec +2 -1
- data/test/test_sys_filesystem_unix.rb +1 -1
- data/test/test_sys_filesystem_windows.rb +1 -1
- metadata +19 -11
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
ZGE1OWI0MWYwNTQ0OTFmNWZlMWVjOWZjYzVlNjkwNjFjYmU5MzdkOQ==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
MDU1NzgzNDY5YjEyODA5NWI1NDBhZGE1YjVmYTk4MDEzOGYwOGM5YQ==
|
|
7
|
+
!binary "U0hBNTEy":
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
NzQ1NmJhMThiZDY0YTg0NDJjOTFkNGNlNzMxYWU4YjI5MmNhOTQ5ZjQ1N2Iy
|
|
10
|
+
MjQ3NmZmNTllZDkzODk2YmZlYWZmYjA5YWNmNTMxOGZhOWJmOWZlZDUxNzcx
|
|
11
|
+
N2Q2YmM2NWM1YTBjNzFiOGY0ZTlmYzczNTI1ODNmNzU0ODk3ZjQ=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
ZGQ0ZWIzNTc3MWQwZmQwMGNhYzJiNjdiNjU3MDk0MjYxZWI3NzcxZjI0NGM0
|
|
14
|
+
MGE3MTUzOTVmOTlkYzg3MmQxMTk0MTMxMmZlYzI1MDA3ZTA5N2EyMzNmOTk4
|
|
15
|
+
NTJkZGRhNThhZTJiNGY1ZjA4ZWQwYTVmNGUxOWViZmQ3ZWFkZmQ=
|
data/CHANGES
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
== 1.1.1 - 3-Oct-2013
|
|
2
|
+
* Solaris now always uses statvfs64 on Solaris for better 64-bit support.
|
|
3
|
+
Thanks go to Jeff Shantz for the spot.
|
|
4
|
+
|
|
1
5
|
== 1.1.0 - 19-Jan-2013
|
|
2
6
|
* Converted the Windows source code to use FFI. Consequently, there is now
|
|
3
7
|
a single gem rather than separate gems for Windows and Unix.
|
data/README
CHANGED
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
https://github.com/djberg96/sys-filesystem
|
|
49
49
|
|
|
50
50
|
= Future Plans
|
|
51
|
-
|
|
51
|
+
Add better 64-bit support for Linux and BSD.
|
|
52
|
+
Other suggestions welcome.
|
|
52
53
|
|
|
53
54
|
= Acknowledgements
|
|
54
55
|
Mike Hall, for ideas and code that I borrowed from his 'filesystem'
|
|
@@ -61,6 +62,12 @@
|
|
|
61
62
|
= License
|
|
62
63
|
Artistic 2.0
|
|
63
64
|
|
|
65
|
+
== Contributions
|
|
66
|
+
Although this library is free, please consider having your company
|
|
67
|
+
setup a gittip if used by your company professionally.
|
|
68
|
+
|
|
69
|
+
http://www.gittip.com/djberg96/
|
|
70
|
+
|
|
64
71
|
= Copyright
|
|
65
72
|
(C) 2003-2013 Daniel J. Berger
|
|
66
73
|
All Rights Reserved
|
data/Rakefile
CHANGED
|
@@ -26,7 +26,12 @@ namespace :gem do
|
|
|
26
26
|
desc "Build the sys-filesystem gem"
|
|
27
27
|
task :create do |t|
|
|
28
28
|
spec = eval(IO.read('sys-filesystem.gemspec'))
|
|
29
|
-
Gem::
|
|
29
|
+
if Gem::VERSION >= "2.0.0"
|
|
30
|
+
require 'rubygems/package'
|
|
31
|
+
Gem::Package.build(spec)
|
|
32
|
+
else
|
|
33
|
+
Gem::Builder.new(spec).build
|
|
34
|
+
end
|
|
30
35
|
end
|
|
31
36
|
|
|
32
37
|
desc "Install the sys-filesystem gem"
|
data/lib/unix/sys/filesystem.rb
CHANGED
|
@@ -7,14 +7,19 @@ module Sys
|
|
|
7
7
|
# return objects of other types. Do not instantiate.
|
|
8
8
|
class Filesystem
|
|
9
9
|
extend FFI::Library
|
|
10
|
-
ffi_lib
|
|
10
|
+
ffi_lib FFI::Library::LIBC
|
|
11
11
|
|
|
12
12
|
# The version of the sys-filesystem library.
|
|
13
|
-
VERSION = '1.1.
|
|
13
|
+
VERSION = '1.1.1'
|
|
14
14
|
|
|
15
15
|
private
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
if RbConfig::CONFIG['host_os'] =~ /sunos|solaris/i
|
|
18
|
+
attach_function(:statvfs, :statvfs64, [:string, :pointer], :int)
|
|
19
|
+
else
|
|
20
|
+
attach_function(:statvfs, [:string, :pointer], :int)
|
|
21
|
+
end
|
|
22
|
+
|
|
18
23
|
attach_function(:strerror, [:int], :string)
|
|
19
24
|
|
|
20
25
|
private_class_method :statvfs, :strerror
|
|
@@ -188,18 +193,18 @@ module Sys
|
|
|
188
193
|
layout(
|
|
189
194
|
:f_bsize, :ulong,
|
|
190
195
|
:f_frsize, :ulong,
|
|
191
|
-
:f_blocks, :
|
|
192
|
-
:f_bfree, :
|
|
193
|
-
:f_bavail, :
|
|
194
|
-
:f_files, :
|
|
195
|
-
:f_ffree, :
|
|
196
|
-
:f_favail, :
|
|
196
|
+
:f_blocks, :uint64_t,
|
|
197
|
+
:f_bfree, :uint64_t,
|
|
198
|
+
:f_bavail, :uint64_t,
|
|
199
|
+
:f_files, :uint64_t,
|
|
200
|
+
:f_ffree, :uint64_t,
|
|
201
|
+
:f_favail, :uint64_t,
|
|
197
202
|
:f_fsid, :ulong,
|
|
198
203
|
:f_basetype, [:char, 16],
|
|
199
|
-
:f_flag, :
|
|
200
|
-
:f_namemax, :
|
|
204
|
+
:f_flag, :ulong,
|
|
205
|
+
:f_namemax, :ulong,
|
|
201
206
|
:f_fstr, [:char, 32],
|
|
202
|
-
:f_filler, [:
|
|
207
|
+
:f_filler, [:ulong, 16]
|
|
203
208
|
)
|
|
204
209
|
else
|
|
205
210
|
layout(
|
data/sys-filesystem.gemspec
CHANGED
|
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = 'sys-filesystem'
|
|
5
|
-
spec.version = '1.1.
|
|
5
|
+
spec.version = '1.1.1'
|
|
6
6
|
spec.author = 'Daniel J. Berger'
|
|
7
7
|
spec.email = 'djberg96@gmail.com'
|
|
8
8
|
spec.homepage = 'https://github.com/djberg96/sys-filesystem'
|
|
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
|
|
|
16
16
|
|
|
17
17
|
spec.add_dependency('ffi')
|
|
18
18
|
spec.add_development_dependency('test-unit', '>= 2.5.0')
|
|
19
|
+
spec.add_development_dependency('rake')
|
|
19
20
|
|
|
20
21
|
spec.description = <<-EOF
|
|
21
22
|
The sys-filesystem library provides an interface for gathering filesystem
|
|
@@ -19,7 +19,7 @@ class TC_Sys_Filesystem_Windows < Test::Unit::TestCase
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
test "version number is set to the expected value" do
|
|
22
|
-
assert_equal('1.1.
|
|
22
|
+
assert_equal('1.1.1', Filesystem::VERSION)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
test "stat path works as expected" do
|
metadata
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sys-filesystem
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 1.1.1
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Daniel J. Berger
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
11
|
+
date: 2013-10-04 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: ffi
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
17
|
- - ! '>='
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
@@ -22,7 +20,6 @@ dependencies:
|
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
23
|
requirements:
|
|
27
24
|
- - ! '>='
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
@@ -30,7 +27,6 @@ dependencies:
|
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
|
31
28
|
name: test-unit
|
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
none: false
|
|
34
30
|
requirements:
|
|
35
31
|
- - ! '>='
|
|
36
32
|
- !ruby/object:Gem::Version
|
|
@@ -38,11 +34,24 @@ dependencies:
|
|
|
38
34
|
type: :development
|
|
39
35
|
prerelease: false
|
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
-
none: false
|
|
42
37
|
requirements:
|
|
43
38
|
- - ! '>='
|
|
44
39
|
- !ruby/object:Gem::Version
|
|
45
40
|
version: 2.5.0
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ! '>='
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ! '>='
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
46
55
|
description: ! " The sys-filesystem library provides an interface for gathering
|
|
47
56
|
filesystem\n information, such as disk space and mount point data.\n"
|
|
48
57
|
email: djberg96@gmail.com
|
|
@@ -72,27 +81,26 @@ files:
|
|
|
72
81
|
homepage: https://github.com/djberg96/sys-filesystem
|
|
73
82
|
licenses:
|
|
74
83
|
- Artistic 2.0
|
|
84
|
+
metadata: {}
|
|
75
85
|
post_install_message:
|
|
76
86
|
rdoc_options: []
|
|
77
87
|
require_paths:
|
|
78
88
|
- lib
|
|
79
89
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
|
-
none: false
|
|
81
90
|
requirements:
|
|
82
91
|
- - ! '>='
|
|
83
92
|
- !ruby/object:Gem::Version
|
|
84
93
|
version: '0'
|
|
85
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
|
-
none: false
|
|
87
95
|
requirements:
|
|
88
96
|
- - ! '>='
|
|
89
97
|
- !ruby/object:Gem::Version
|
|
90
98
|
version: '0'
|
|
91
99
|
requirements: []
|
|
92
100
|
rubyforge_project: sysutils
|
|
93
|
-
rubygems_version:
|
|
101
|
+
rubygems_version: 2.0.3
|
|
94
102
|
signing_key:
|
|
95
|
-
specification_version:
|
|
103
|
+
specification_version: 4
|
|
96
104
|
summary: A Ruby interface for getting file system information.
|
|
97
105
|
test_files:
|
|
98
106
|
- test/test_sys_filesystem.rb
|