Skip to content

Commit

Permalink
Newer Ruby & bindfs versions compatibility (#108)
Browse files Browse the repository at this point in the history
* Update supported bindfs version
* Update test matrix
  • Loading branch information
gael-ian authored Aug 23, 2024
1 parent 136245e commit 5c3e139
Show file tree
Hide file tree
Showing 13 changed files with 109 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["2.7", "3.0", "3.1"]
ruby: ["3.0", "3.1", "3.2", "3.3"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-rspec

AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.3
NewCops: enable

Naming/FileName:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Breaking changes

* Drop support for Ruby < 3.0 (#108)

### Added

* Update bindfs support to 1.17.7 (#108)

## Version 1.2.0 (2023-03-07)

### Breaking changes
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ group :development, :test do
# We depend on Vagrant for development, but we don't add it as a
# gem dependency because we expect to be installed within the
# Vagrant environment itself using `vagrant plugin`.
gem 'vagrant', git: 'https://github.com/hashicorp/vagrant.git', tag: 'v2.3.4'
gem 'vagrant', git: 'https://github.com/hashicorp/vagrant.git' # , tag: 'v2.4.1'

# Development dependencies
gem 'rake'
gem 'rspec', '~> 3.12.0'
gem 'rspec', '~> 3.13.0'

gem 'rubocop', require: false
gem 'rubocop-performance', require: false
Expand Down
166 changes: 87 additions & 79 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
GIT
remote: https://github.com/hashicorp/vagrant.git
revision: 986a01734f008d62897bb66085381090e4fcabfc
tag: v2.3.4
revision: 9df95a200280219ae5899db6eaa2e0eff4ad1a8e
specs:
vagrant (2.3.4)
vagrant (2.4.2.dev)
base64 (~> 0.2.0)
bcrypt_pbkdf (~> 1.1)
childprocess (~> 4.1.0)
ed25519 (~> 1.3.0)
erubi
googleapis-common-protos-types (~> 1.3)
grpc
grpc (~> 1.62)
hashicorp-checkpoint (~> 0.1.5)
i18n (~> 1.8)
i18n (~> 1.12)
ipaddr (>= 1.2.4)
listen (~> 3.6)
listen (~> 3.7)
log4r (~> 1.1.9, < 1.1.11)
mime-types (~> 3.3)
net-ftp (~> 0.1)
net-ftp (~> 0.2)
net-scp (~> 4.0)
net-sftp (~> 4.0)
net-ssh (~> 7.0)
rb-kqueue (~> 0.2.0)
rexml (~> 3.2)
rgl (~> 0.5.7)
rubyzip (~> 2.0)
vagrant_cloud (~> 3.0.5)
wdm (~> 0.1.0)
winrm (>= 2.3.4, < 3.0)
winrm-elevated (>= 1.2.1, < 2.0)
winrm-fs (>= 1.3.4, < 2.0)
rgl (~> 0.5.10)
rubyzip (~> 2.3.2)
vagrant_cloud (~> 3.1.1)
wdm (~> 0.1.1)
winrm (>= 2.3.6, < 3.0)
winrm-elevated (>= 1.2.3, < 2.0)
winrm-fs (>= 1.3.5, < 2.0)

PATH
remote: .
Expand All @@ -39,21 +39,25 @@ GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
bcrypt_pbkdf (1.1.0)
builder (3.2.4)
base64 (0.2.0)
bcrypt_pbkdf (1.1.1)
bigdecimal (3.1.8)
builder (3.3.0)
childprocess (4.1.0)
concurrent-ruby (1.2.2)
date (3.3.3)
diff-lcs (1.5.0)
concurrent-ruby (1.3.4)
date (3.3.4)
diff-lcs (1.5.1)
ed25519 (1.3.0)
erubi (1.12.0)
excon (0.99.0)
ffi (1.15.5)
google-protobuf (3.25.2)
googleapis-common-protos-types (1.11.0)
google-protobuf (~> 3.18)
grpc (1.61.0)
google-protobuf (~> 3.25)
erubi (1.13.0)
excon (0.111.0)
ffi (1.17.0)
google-protobuf (4.27.3)
bigdecimal
rake (>= 13)
googleapis-common-protos-types (1.15.0)
google-protobuf (>= 3.18, < 5.a)
grpc (1.65.2)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
gssapi (1.3.1)
ffi (>= 1.0.1)
Expand All @@ -62,108 +66,112 @@ GEM
rexml (~> 3.0)
hashicorp-checkpoint (0.1.5)
httpclient (2.8.3)
i18n (1.12.0)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
ipaddr (1.2.5)
json (2.6.3)
listen (3.8.0)
ipaddr (1.2.6)
json (2.7.2)
language_server-protocol (3.17.0.3)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
little-plugger (1.1.4)
log4r (1.1.10)
logging (2.3.1)
logging (2.4.0)
little-plugger (~> 1.1)
multi_json (~> 1.14)
mime-types (3.4.1)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mime-types-data (3.2024.0820)
multi_json (1.15.0)
net-ftp (0.2.0)
net-ftp (0.3.7)
net-protocol
time
net-protocol (0.2.1)
net-protocol (0.2.2)
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-sftp (4.0.0)
net-ssh (>= 5.0.0, < 8.0.0)
net-ssh (7.0.1)
nori (2.6.0)
pairing_heap (3.0.0)
parallel (1.22.1)
parser (3.2.1.0)
net-ssh (7.2.3)
nori (2.7.1)
bigdecimal
pairing_heap (3.1.0)
parallel (1.26.3)
parser (3.3.4.2)
ast (~> 2.4.1)
racc
racc (1.8.1)
rainbow (3.1.1)
rake (13.0.6)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
rb-inotify (0.11.1)
ffi (~> 1.0)
rb-kqueue (0.2.8)
ffi (>= 0.5.0)
regexp_parser (2.7.0)
rexml (3.2.8)
strscan (>= 3.0.9)
regexp_parser (2.9.2)
rexml (3.2.9)
strscan
rgl (0.5.10)
pairing_heap (>= 0.3.0)
rexml (~> 3.2, >= 3.2.4)
stream (~> 0.5.3)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.1)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.48.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.65.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.0.0)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.26.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.27.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.17.1)
rubocop (~> 1.41)
rubocop-performance (1.16.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-ast (1.32.1)
parser (>= 3.3.1.0)
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.19.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-rspec (3.0.4)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
rubyntlm (0.6.3)
rubyntlm (0.6.5)
base64
rubyzip (2.3.2)
stream (0.5.5)
strscan (3.1.0)
time (0.2.2)
time (0.3.0)
date
timeout (0.3.2)
unicode-display_width (2.4.2)
vagrant_cloud (3.0.5)
timeout (0.4.1)
unicode-display_width (2.5.0)
vagrant_cloud (3.1.1)
excon (~> 0.73)
log4r (~> 1.1.10)
rexml (~> 3.2.5)
wdm (0.1.1)
winrm (2.3.6)
winrm (2.3.9)
builder (>= 2.1.2)
erubi (~> 1.8)
gssapi (~> 1.2)
gyoku (~> 1.0)
httpclient (~> 2.2, >= 2.2.0.2)
logging (>= 1.6.1, < 3.0)
nori (~> 2.0)
nori (~> 2.0, >= 2.7.1)
rexml (~> 3.0)
rubyntlm (~> 0.6.0, >= 0.6.3)
winrm-elevated (1.2.3)
erubi (~> 1.8)
Expand All @@ -180,7 +188,7 @@ PLATFORMS

DEPENDENCIES
rake
rspec (~> 3.12.0)
rspec (~> 3.13.0)
rubocop
rubocop-performance
rubocop-rake
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-bindfs/bindfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module VagrantBindfs
module Bindfs # :nodoc:
SOURCE_VERSION = '1.17.2'
SOURCE_VERSION = '1.17.7'
SOURCE_URLS = [
'https://bindfs.org/downloads/%<basename>s.tar.gz',
'https://bindfs.dy.fi/downloads/%<basename>s.tar.gz'
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-bindfs/bindfs/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def arguments_for(options)
end

def format_argument(name, value)
send("format_#{argument_type(name)}", name, value)
send(:"format_#{argument_type(name)}", name, value)
end

def format_flag(name, value)
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-bindfs/vagrant/actions/mounter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def call(env)
protected

def bind_folders!
info I18n.t('vagrant-bindfs.actions.mounter.start', hook: hook)
info I18n.t('vagrant-bindfs.actions.mounter.start', hook:)
bound_folders(hook).each_value do |folder|
bind_folder!(folder)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ module Darwin
module SystemChecks # :nodoc:
class << self
def bindfs_exists_user(machine, user)
(
user.nil? || \
user.nil? ||
machine.communicate.test("test -n \"$(dscacheutil -q user -a name #{user.shellescape})\"")
)
end

def bindfs_exists_group(machine, group)
(
group.nil? || \
group.nil? ||
machine.communicate.test("test -n \"$(dscacheutil -q group -a name #{group.shellescape})\"")
)
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ module Linux
module SystemChecks # :nodoc:
class << self
def bindfs_exists_user(machine, user)
(
user.nil? || \
user.nil? ||
machine.communicate.test("getent passwd #{user.shellescape}")
)
end

def bindfs_exists_group(machine, group)
(
group.nil? || \
group.nil? ||
machine.communicate.test("getent group #{group.shellescape}")
)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-bindfs/vagrant/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def bind_folder(source, destination, options = {})
def merge(other) # rubocop:disable Metrics/AbcSize
super.tap do |result|
%i[debug force_empty_mountpoints install_bindfs_from_source].each do |boolean|
result.send("#{boolean}=", (send(boolean) || other.send(boolean)))
result.send(:"#{boolean}=", (send(boolean) || other.send(boolean)))
end
result.bound_folders = bound_folders.merge(other.bound_folders)
result.skip_validations = (skip_validations + other.skip_validations).uniq
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-bindfs/vagrant/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Plugin < ::Vagrant.plugin('2') # :nodoc:
include Capabilities

%w[up reload].each do |action|
action_hook(:bindfs, "machine_action_#{action}".to_sym) do |hook|
action_hook(:bindfs, :"machine_action_#{action}") do |hook|
hooks.each do |(name, middleware)|
hook.before(middleware, Actions::Mounter, name)
end
Expand Down
2 changes: 1 addition & 1 deletion vagrant-bindfs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ Gem::Specification.new do |spec|
f.match(excluded_dirs) || excluded_files.include?(f)
end

spec.required_ruby_version = '>= 2.7'
spec.required_ruby_version = '>= 3.0', '< 3.4'
end

0 comments on commit 5c3e139

Please sign in to comment.