Skip to content

Commit

Permalink
update bundler version to fix github action problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Largo committed Feb 14, 2024
1 parent dbac389 commit dec412a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
9 changes: 4 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
GEM
remote: https://rubygems.org/
specs:
hoe (4.0.3)
hoe (4.2.0)
rake (>= 0.8, < 15.0)
minitest (5.18.0)
rake (13.0.6)
minitest (5.22.2)
rake (13.1.0)

PLATFORMS
x64-mingw-ucrt
x86_64-linux

DEPENDENCIES
hoe (~> 4.0)
minitest (~> 5.18)

BUNDLED WITH
2.4.13
2.5.6
22 changes: 2 additions & 20 deletions test/test_ocra.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
class Pathname
alias original_relative_path_from relative_path_from
def relative_path_from(other)
puts "#{caller[0]} 123"
original_relative_path_from(other)
end
end

require "minitest/autorun"

require "tmpdir"
Expand Down Expand Up @@ -108,27 +100,17 @@ def with_tmpdir(files = [], path = nil)
end
end

def relative_or_absolute_path(from_path, to_path)
begin
# Attempt to generate a relative path
Pathname.new(to_path).relative_path_from(Pathname.new(from_path)).to_s
rescue ArgumentError
# If a relative path cannot be computed, return the absolute path
Pathname.new(to_path).realpath.to_s
end
end

def each_path_combo(*files)
# In same directory as first file
basedir = Pathname.new(files[0]).realpath.parent
args = files.map{|p| relative_or_absolute_path(basedir, p) }
args = files.map{|p|Pathname.new(p).realpath.relative_path_from(basedir).to_s}
cd basedir do
yield(*args)
end

# In parent directory of first file
basedir = basedir.parent
args = files.map{|p| relative_or_absolute_path(basedir, p) }
args = files.map{|p|Pathname.new(p).realpath.relative_path_from(basedir).to_s}
cd basedir do
yield(*args)
end
Expand Down

0 comments on commit dec412a

Please sign in to comment.