Skip to content

Commit

Permalink
Merge pull request #49 from djberg96/big_sur
Browse files Browse the repository at this point in the history
Update for Big Sur
  • Loading branch information
Daniel Berger authored Dec 30, 2020
2 parents c2b939d + a4b51c4 commit c00f568
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gemfile.lock
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.4.1 - 30-Dec-2020
* Fix an FFI function declaration bug for Big Sur and later on Mac. Thanks go
to Roman Gaufman for the spot and Martins Polakovs for testing.
* Fixed the changelog metadata URI.
* Added a .gitignore file.

## 1.4.0 - 6-Sep-2020
* The Sys::Filesystem.stat method now accepts a Pathname and Dir object as
an argument. On most platforms it will also accept a File object. Thanks
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A cross platform Ruby interface for getting file system information.

## Synopsis

```
```ruby
require 'sys/filesystem'
include Sys

Expand Down
2 changes: 1 addition & 1 deletion lib/sys/filesystem.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Sys
class Filesystem
# The version of the sys-filesystem library
VERSION = '1.4.0'.freeze
VERSION = '1.4.1'.freeze
end
end

Expand Down
6 changes: 5 additions & 1 deletion lib/sys/unix/sys/filesystem/functions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ module Functions
end
rescue FFI::NotFoundError
if RbConfig::CONFIG['host_os'] =~ /darwin|osx|mach/i
attach_function(:getmntinfo, :getmntinfo64, [:pointer, :int], :int)
begin
attach_function(:getmntinfo, :getmntinfo64, [:pointer, :int], :int)
rescue FFI::NotFoundError
attach_function(:getmntinfo, [:pointer, :int], :int) # Big Sur and later
end
else
attach_function(:getmntinfo, [:pointer, :int], :int)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/sys_filesystem_unix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

example "version number is set to the expected value" do
expect(Sys::Filesystem::VERSION).to eq('1.4.0')
expect(Sys::Filesystem::VERSION).to eq('1.4.1')
expect(Sys::Filesystem::VERSION).to be_frozen
end

Expand Down
2 changes: 1 addition & 1 deletion spec/sys_filesystem_windows_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
end

example "version number is set to the expected value" do
expect(Sys::Filesystem::VERSION).to eq('1.4.0')
expect(Sys::Filesystem::VERSION).to eq('1.4.1')
expect(Sys::Filesystem::VERSION).to be_frozen
end

Expand Down
4 changes: 2 additions & 2 deletions sys-filesystem.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require 'rubygems'

Gem::Specification.new do |spec|
spec.name = 'sys-filesystem'
spec.version = '1.4.0'
spec.version = '1.4.1'
spec.author = 'Daniel J. Berger'
spec.email = '[email protected]'
spec.homepage = 'https://github.com/djberg96/sys-filesystem'
Expand All @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
spec.metadata = {
'homepage_uri' => 'https://github.com/djberg96/sys-filesystem',
'bug_tracker_uri' => 'https://github.com/djberg96/sys-filesystem/issues',
'changelog_uri' => 'https://github.com/djberg96/sys-filesystem/blob/ffi/CHANGES.rdoc',
'changelog_uri' => 'https://github.com/djberg96/sys-filesystem/blob/ffi/CHANGES.md',
'documentation_uri' => 'https://github.com/djberg96/sys-filesystem/wiki',
'source_code_uri' => 'https://github.com/djberg96/sys-filesystem',
'wiki_uri' => 'https://github.com/djberg96/sys-filesystem/wiki'
Expand Down

0 comments on commit c00f568

Please sign in to comment.