sys-filesystem 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGES.md +8 -0
- data/Rakefile +5 -0
- data/lib/sys/filesystem.rb +1 -1
- data/lib/sys/unix/sys/filesystem/structs.rb +18 -5
- data/lib/sys/unix/sys/filesystem.rb +2 -5
- data/spec/sys_filesystem_shared.rb +1 -1
- data/spec/sys_filesystem_unix_spec.rb +1 -1
- data/spec/sys_filesystem_windows_spec.rb +1 -1
- data/sys-filesystem.gemspec +2 -2
- data.tar.gz.sig +0 -0
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18cc0ade6b1331f272da7eb9d1ab569c82b975ccffd31ac9821d9c3a160b6789
|
4
|
+
data.tar.gz: 0cd1a8e5a0443c9c8629c7b3620782cef9c611dc58908df2f423ea4691d3f30c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49364fcc8177c60d5644629598712582867d33c8701cc7ae1fba43542cee114490ddf74bfcddf9a363b5329487957053bbca96dc112e5e440679ecf99fe051d7
|
7
|
+
data.tar.gz: e09971e9255b113f0ef1531fd000e35b74811024d54c351e811be99b74ad482bef14e9f9b1ff03708b02db8c92fd68f83b863b1a0f0dd8e590ba4f41ec79620c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 1.5.1 - 29-Sep-2024
|
2
|
+
* Add the f_type struct member to the Statvfs struct for Linux. This was added
|
3
|
+
at some point in the Linux lifecycle, though may still be blank depending on
|
4
|
+
your platform. Thanks go to Tasos Sahanidis for the patch.
|
5
|
+
* Added padding on 32-bit Statvfs struct with 64-bit offsets for Linux. Thanks
|
6
|
+
go Tasos Sahanidis again for this update.
|
7
|
+
* Bumped mkmf-lite dependency since the changes were needed to support the above.
|
8
|
+
|
1
9
|
## 1.5.0 - 8-Jun-2024
|
2
10
|
* Add support for DragonFlyBSD.
|
3
11
|
* Remove Solaris support. It's dead, Jim.
|
data/Rakefile
CHANGED
data/lib/sys/filesystem.rb
CHANGED
@@ -16,7 +16,7 @@ module Sys
|
|
16
16
|
# return objects of other types. Do not instantiate.
|
17
17
|
class Filesystem
|
18
18
|
# The version of the sys-filesystem library
|
19
|
-
VERSION = '1.5.
|
19
|
+
VERSION = '1.5.1'
|
20
20
|
|
21
21
|
# Stat objects are returned by the Sys::Filesystem.stat method. Here
|
22
22
|
# we're adding universal methods.
|
@@ -123,7 +123,7 @@ module Sys
|
|
123
123
|
:f_spares1, :short,
|
124
124
|
:f_mntfromname, [:char, 80],
|
125
125
|
:f_spares2, :short,
|
126
|
-
:f_spare, [:long,2]
|
126
|
+
:f_spare, [:long, 2]
|
127
127
|
)
|
128
128
|
else
|
129
129
|
layout(
|
@@ -223,10 +223,13 @@ module Sys
|
|
223
223
|
:f_unused, :int,
|
224
224
|
:f_flag, :ulong,
|
225
225
|
:f_namemax, :ulong,
|
226
|
-
:
|
226
|
+
:f_type, :uint,
|
227
|
+
:f_spare, [:int, 5]
|
227
228
|
)
|
228
229
|
else
|
229
|
-
|
230
|
+
require 'mkmf-lite'
|
231
|
+
extend Mkmf::Lite
|
232
|
+
layout_array = [
|
230
233
|
:f_bsize, :ulong,
|
231
234
|
:f_frsize, :ulong,
|
232
235
|
:f_blocks, :uint64,
|
@@ -238,8 +241,18 @@ module Sys
|
|
238
241
|
:f_fsid, :ulong,
|
239
242
|
:f_flag, :ulong,
|
240
243
|
:f_namemax, :ulong,
|
241
|
-
:
|
242
|
-
|
244
|
+
:f_type, :uint,
|
245
|
+
:f_spare, [:int, 5]
|
246
|
+
]
|
247
|
+
|
248
|
+
# Check if we need to add __f_unused
|
249
|
+
f_unused_bytes = 2 * check_sizeof('int') - check_sizeof('long')
|
250
|
+
if f_unused_bytes > 0
|
251
|
+
# For Big Endian, this should be inserted at -9
|
252
|
+
layout_array.insert(-7, :__f_unused, [:char, f_unused_bytes])
|
253
|
+
end
|
254
|
+
|
255
|
+
layout(*layout_array)
|
243
256
|
end
|
244
257
|
end
|
245
258
|
|
@@ -105,9 +105,6 @@ module Sys
|
|
105
105
|
# The filesystem type, e.g. UFS.
|
106
106
|
attr_accessor :base_type
|
107
107
|
|
108
|
-
# The filesystem ID
|
109
|
-
attr_accessor :filesystem_id
|
110
|
-
|
111
108
|
# The filesystem type
|
112
109
|
attr_accessor :filesystem_type
|
113
110
|
|
@@ -275,8 +272,8 @@ module Sys
|
|
275
272
|
if RbConfig::CONFIG['host_os'] =~ /dragonfly/i
|
276
273
|
obj.owner = fs[:f_owner]
|
277
274
|
obj.filesystem_type = fs[:f_type]
|
278
|
-
obj.sync_reads= fs[:f_syncreads]
|
279
|
-
obj.async_reads= fs[:f_asyncreads]
|
275
|
+
obj.sync_reads = fs[:f_syncreads]
|
276
|
+
obj.async_reads = fs[:f_asyncreads]
|
280
277
|
obj.sync_writes = fs[:f_syncwrites]
|
281
278
|
obj.async_writes = fs[:f_asyncwrites]
|
282
279
|
end
|
@@ -4,7 +4,7 @@ require 'sys-filesystem'
|
|
4
4
|
|
5
5
|
RSpec.shared_examples Sys::Filesystem do
|
6
6
|
example 'version number is set to the expected value' do
|
7
|
-
expect(Sys::Filesystem::VERSION).to eq('1.5.
|
7
|
+
expect(Sys::Filesystem::VERSION).to eq('1.5.1')
|
8
8
|
expect(Sys::Filesystem::VERSION).to be_frozen
|
9
9
|
end
|
10
10
|
|
@@ -10,7 +10,7 @@ require 'spec_helper'
|
|
10
10
|
require 'sys-filesystem'
|
11
11
|
require 'pathname'
|
12
12
|
|
13
|
-
RSpec.describe Sys::Filesystem, :unix
|
13
|
+
RSpec.describe Sys::Filesystem, :unix do
|
14
14
|
let(:linux) { RbConfig::CONFIG['host_os'] =~ /linux/i }
|
15
15
|
let(:bsd) { RbConfig::CONFIG['host_os'] =~ /bsd|dragonfly/i }
|
16
16
|
let(:darwin) { RbConfig::CONFIG['host_os'] =~ /mac|darwin/i }
|
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.5.
|
5
|
+
spec.version = '1.5.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'
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.cert_chain = Dir['certs/*']
|
14
14
|
|
15
15
|
spec.add_dependency('ffi', '~> 1.1')
|
16
|
-
spec.add_development_dependency('mkmf-lite', '~> 0.
|
16
|
+
spec.add_development_dependency('mkmf-lite', '~> 0.7') unless Gem.win_platform?
|
17
17
|
spec.add_development_dependency('rake')
|
18
18
|
spec.add_development_dependency('rspec', '~> 3.9')
|
19
19
|
spec.add_development_dependency('rubocop')
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sys-filesystem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
|
36
36
|
WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-
|
38
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: ffi
|
@@ -57,14 +57,14 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
60
|
+
version: '0.7'
|
61
61
|
type: :development
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
67
|
+
version: '0.7'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: rake
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
|
-
rubygems_version: 3.
|
183
|
+
rubygems_version: 3.5.16
|
184
184
|
signing_key:
|
185
185
|
specification_version: 4
|
186
186
|
summary: A Ruby interface for getting file system information.
|
metadata.gz.sig
CHANGED
Binary file
|