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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e69ef4806a64a956dfd3b1eb629a17654d7b14a5a8ed8468113f8ee045287682
4
- data.tar.gz: 54182b67d58e77fc0c4b0dc8c96aa7ab64f5c7759943e966abd77d1ba212bfb8
3
+ metadata.gz: 18cc0ade6b1331f272da7eb9d1ab569c82b975ccffd31ac9821d9c3a160b6789
4
+ data.tar.gz: 0cd1a8e5a0443c9c8629c7b3620782cef9c611dc58908df2f423ea4691d3f30c
5
5
  SHA512:
6
- metadata.gz: 496090ea1ac8ef0b3d3fe55489b3e3f7eeb39f0406135ebdc3dfc650c0ea16c2e010a8eafb8ffb47e837b4be79217311c1d0e7cd71bb0c3ee81d189a8b7e54ca
7
- data.tar.gz: fa6242583cf58ea04fa2fc2581030fcc53e62c7871852ffd3105caa8e363685b1521a056ee0a292327a75c497720dd934c23bd7d58d9687157c8265eeac64833
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
@@ -41,4 +41,9 @@ end
41
41
  desc "Run the test suite"
42
42
  RSpec::Core::RakeTask.new(:spec)
43
43
 
44
+ # Clean up afterwards
45
+ Rake::Task[:spec].enhance do
46
+ Rake::Task[:clean].invoke
47
+ end
48
+
44
49
  task :default => :spec
@@ -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.0'
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
- :f_spare, [:int, 6]
226
+ :f_type, :uint,
227
+ :f_spare, [:int, 5]
227
228
  )
228
229
  else
229
- layout(
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
- :f_spare, [:int, 6]
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.0')
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 => true do
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 }
@@ -10,7 +10,7 @@ require 'spec_helper'
10
10
  require 'sys/filesystem'
11
11
  require 'pathname'
12
12
 
13
- RSpec.describe Sys::Filesystem, :windows => true do
13
+ RSpec.describe Sys::Filesystem, :windows do
14
14
  let(:root) { 'C:/' }
15
15
 
16
16
  before do
@@ -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.0'
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.5') unless Gem.win_platform?
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.0
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-06-09 00:00:00.000000000 Z
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.5'
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.5'
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.3.26
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