Skip to content

Commit

Permalink
Merge pull request #26 from randallreedjr/ruby-3.2
Browse files Browse the repository at this point in the history
Upgrade to be compatible with ruby >= 3.2.0
  • Loading branch information
randallreedjr committed Jul 30, 2023
2 parents 1645f57 + 323b7c3 commit 85e75a0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.4
3.2.2
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
git_swap (1.1.5)
git_swap (2.0.0)

GEM
remote: https://rubygems.org/
Expand All @@ -25,6 +25,7 @@ GEM
rspec-core (>= 2, < 4, != 2.12.0)

PLATFORMS
arm64-darwin-22
x86_64-darwin-20
x86_64-linux

Expand Down
4 changes: 2 additions & 2 deletions lib/git_swap/git_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def self.root_directory?(file_path)
# Returns the git root directory given a path inside the repo. Returns nil if
# the path is not in a git repo.
def self.find_git_repo(start_path = '.')
raise NoSuchPathError unless File.exists?(start_path)
raise NoSuchPathError unless File.exist?(start_path)

current_path = File.expand_path(start_path)

Expand All @@ -29,7 +29,7 @@ def self.find_git_repo(start_path = '.')
return_path = nil

until root_directory?(current_path)
if File.exists?(File.join(current_path, '.git'))
if File.exist?(File.join(current_path, '.git'))
# done
return_path = current_path
break
Expand Down
2 changes: 1 addition & 1 deletion lib/git_swap/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module GitSwap
VERSION = "1.1.5" unless defined? VERSION
VERSION = "2.0.0" unless defined? VERSION
end

0 comments on commit 85e75a0

Please sign in to comment.