diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 286209d..2fc6150 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: ruby/setup-ruby@7d3497fd78c07c0d84ebafa58d8dac60cd1f0763 # v1.199.0 + - uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 with: ruby-version: '3.3' rubygems: latest @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: ruby/setup-ruby@7d3497fd78c07c0d84ebafa58d8dac60cd1f0763 # v1.199.0 + - uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 with: ruby-version: ${{ matrix.ruby }} rubygems: latest @@ -71,7 +71,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: ruby/setup-ruby@7d3497fd78c07c0d84ebafa58d8dac60cd1f0763 # v1.199.0 + - uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 with: ruby-version: ${{ matrix.ruby }} rubygems: latest @@ -102,7 +102,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: ruby/setup-ruby@7d3497fd78c07c0d84ebafa58d8dac60cd1f0763 # v1.199.0 + - uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 with: ruby-version: ${{ matrix.ruby }} rubygems: latest @@ -130,7 +130,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: ruby/setup-ruby@7d3497fd78c07c0d84ebafa58d8dac60cd1f0763 # v1.199.0 + - uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 with: ruby-version: ${{ matrix.ruby }} rubygems: latest diff --git a/.standard.yml b/.standard.yml index b665f63..2313017 100644 --- a/.standard.yml +++ b/.standard.yml @@ -4,6 +4,7 @@ ruby_version: 3.1 ignore: - 'minitar.gemspec' + - pkg/**/* plugins: - standard-minitest diff --git a/test/test_tar_output.rb b/test/test_tar_output.rb index 29ae1ff..56c6c17 100644 --- a/test/test_tar_output.rb +++ b/test/test_tar_output.rb @@ -31,13 +31,12 @@ def test_open_no_block def test_file_looks_good Minitar::Output.open(@tarfile) do |os| - Dir.chdir("data__") do - NAMES.each do |name| - stat = File.stat(name) - opts = {size: stat.size, mode: 0o644} - os.tar.add_file_simple(name, opts) do |ss| - File.open(name, "rb") { |ff| ss.write(ff.read(4096)) until ff.eof? } - end + NAMES.each do |name| + name = File.join("data__", name) + stat = File.stat(name) + opts = {size: stat.size, mode: 0o644} + os.tar.add_file_simple(name, opts) do |ss| + File.open(name, "rb") { |ff| ss.write(ff.read(4096)) until ff.eof? } end end end