excavate 0.3.3 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae1e2f6707705a5247f26db5c29f7ffb3618ccdf890277ca664cc91361e9ab7c
4
- data.tar.gz: 5ea58834d2bcbb1005a36c9f239d32f34a7e61a2bff4a4a0548cdc5e4ae38688
3
+ metadata.gz: 704f5dd69fe570114126bfbf749ed868c09d349fe1674985c80a17220925b79e
4
+ data.tar.gz: 2d0379e74a4bd6aca696a9152e34af882ff571d90e3e6733c068cfc115aa0eb0
5
5
  SHA512:
6
- metadata.gz: 38d73443fa50e9d4af01d9adcde21e45cee4c201f7bb586ce9097d37e092153d18acd5109183ba3bec3c9ecbd4a017d4f4882a44f3f1caf9e83ad98b769b8997
7
- data.tar.gz: 0c6b9f6673b571ca5f582b4b0080180b89d091cfbaa85932b642f3c9ee690433e9e0afbac4b7ad1536307c09f54f2d614dc9df1a1690cdde0e0f736ac9f3151b
6
+ metadata.gz: 00510a511d26c739c7974731029ab2e6a568d0cf89528fed6b738040d84184aa82cd351c2f762ec69c42e54790cf550019a80c9853a59330a364ab590b5a8223
7
+ data.tar.gz: c9ae9914ef53b9677c1e0eff643c667f756f464c258e6f427c34010162c3f2b8aede1ad3c5d06176e18dc3fe390f3e4e15ebd6c6abbe4e1f001b7ebe53e0937b
@@ -11,71 +11,78 @@ concurrency:
11
11
  cancel-in-progress: true
12
12
 
13
13
  env:
14
- BUNDLER_VER: 2.3.24
14
+ BUNDLER_VER: 2.4.22
15
15
  # Forcing bundler version to ensure that it is consistent everywhere and
16
16
  # does not cause bundler gem reinstalls
17
- # bundler/rubygems 2.3.22 is a minimal requirement to support gnu/musl differentiation
18
- # https://github.com/rubygems/rubygems/pull/4488
19
17
 
20
18
  jobs:
19
+ prepare:
20
+ uses: metanorma/ci/.github/workflows/prepare-rake.yml@main
21
+
21
22
  test:
22
- name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
23
+ name: Test on Ruby ${{ matrix.ruby.version }} ${{ matrix.os }}
23
24
  runs-on: ${{ matrix.os }}
24
- continue-on-error: false
25
+
26
+ needs: prepare
27
+ if: needs.prepare.outputs.push-for-tag != 'true'
28
+
29
+ continue-on-error: ${{ matrix.ruby.experimental }}
25
30
  strategy:
26
31
  fail-fast: false
27
- matrix:
28
- ruby: [ '2.7', '3.0', '3.1' ]
29
- os: [ ubuntu-latest, windows-latest, macos-latest ]
32
+ max-parallel: 5
33
+ matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
30
34
 
31
35
  steps:
32
- - uses: actions/checkout@v3
36
+ - uses: actions/checkout@v4
33
37
 
34
38
  - uses: ruby/setup-ruby@v1
35
39
  with:
36
- ruby-version: ${{ matrix.ruby }}
40
+ ruby-version: ${{ matrix.ruby.version }}
41
+ rubygems: ${{ matrix.ruby.rubygems }}
37
42
  bundler: ${{ env.BUNDLER_VER }}
38
43
  bundler-cache: true
39
44
 
40
45
  - run: bundle exec rspec
41
46
 
42
47
  metanorma:
43
- name: Test with Metanorma on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
48
+ name: Test with Metanorma on Ruby ${{ matrix.ruby.version }} ${{ matrix.os }}
44
49
  runs-on: ${{ matrix.os }}
45
- continue-on-error: false
50
+
51
+ needs: prepare
52
+ if: needs.prepare.outputs.push-for-tag != 'true'
53
+
54
+ continue-on-error: ${{ matrix.ruby.experimental }}
55
+
46
56
  strategy:
47
57
  fail-fast: false
48
- matrix:
49
- ruby: [ '2.7', '3.0', '3.1' ]
50
- os: [ ubuntu-latest, windows-latest, macos-latest ]
58
+ matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
59
+
51
60
  steps:
52
- - uses: actions/checkout@v3
61
+ - uses: actions/checkout@v4
53
62
  with:
54
63
  repository: metanorma/metanorma
55
64
 
56
65
  - uses: metanorma/metanorma-build-scripts/inkscape-setup-action@main
57
66
 
58
- - uses: actions/checkout@v3
67
+ - uses: actions/checkout@v4
59
68
  with:
60
- path: "excavate"
69
+ path: excavate
61
70
 
62
- - run: 'echo ''gem "excavate", path: "./excavate"'' > Gemfile.devel'
63
-
64
- # https://github.com/rubygems/rubygems/issues/5160
65
- - if: matrix.ruby == '3.0'
66
- uses: ruby/setup-ruby@v1
71
+ - uses: ruby/setup-ruby@v1
67
72
  with:
68
- ruby-version: ${{ matrix.ruby }}
69
- bundler-cache: true
73
+ ruby-version: ${{ matrix.ruby.version }}
74
+ rubygems: ${{ matrix.ruby.rubygems }}
70
75
  bundler: ${{ env.BUNDLER_VER }}
71
- rubygems: latest
76
+ bundler-cache: false
72
77
 
73
- - if: matrix.ruby != '3.0'
74
- uses: ruby/setup-ruby@v1
75
- with:
76
- ruby-version: ${{ matrix.ruby }}
77
- bundler: ${{ env.BUNDLER_VER }}
78
- bundler-cache: true
78
+ - name: Install excavate from source
79
+ run: |
80
+ cd excavate
81
+ bundle install
82
+ bundle exec rake install
83
+
84
+ - name: Install metanorma
85
+ run: bundle install
79
86
 
80
87
  - run: bundle exec rake
81
88
 
@@ -85,7 +92,7 @@ jobs:
85
92
  runs-on: ubuntu-latest
86
93
  if: contains(github.ref, 'refs/tags/v')
87
94
  steps:
88
- - uses: actions/checkout@v3
95
+ - uses: actions/checkout@v4
89
96
 
90
97
  - uses: cadwallion/publish-rubygems-action@master
91
98
  env:
data/README.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  image:https://img.shields.io/gem/v/excavate.svg["Gem Version", link="https://rubygems.org/gems/excavate"]
2
- // image:https://codeclimate.com/github/fontist/expressir/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/fontist/excavate"]
3
- image:https://github.com/fontist/excavate/workflows/rspec/badge.svg["Build Status", link="https://github.com/fontist/excavate/actions?workflow=rspec"]
2
+ image:https://codeclimate.com/github/fontist/excavate/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/fontist/excavate"]
3
+ image:https://github.com/fontist/excavate/workflows/test-and-release/badge.svg["Build Status", link="https://github.com/fontist/excavate/actions?workflow=test-and-release"]
4
4
 
5
5
  = Excavate: Ruby gem to extract nested archives
6
6
 
data/excavate.gemspec CHANGED
@@ -40,9 +40,13 @@ Gem::Specification.new do |spec|
40
40
  spec.add_runtime_dependency "seven-zip", "~> 1.4"
41
41
  spec.add_runtime_dependency "thor", "~> 1.0"
42
42
 
43
+ # Workaround for https://github.com/metanorma/ruby-libmspack/issues/2
44
+ spec.add_development_dependency "ffi-compiler2", "= 2.0.1"
45
+
43
46
  spec.add_development_dependency "rspec", "~> 3.0"
44
47
  spec.add_development_dependency "rubocop", "~> 1.7"
45
48
  spec.add_development_dependency "rubocop-performance", "~> 1.15"
49
+
46
50
  spec.metadata["rubygems_mfa_required"] = "false"
47
51
  end
48
52
 
@@ -240,6 +240,8 @@ module Excavate
240
240
  return false unless File.file?(file)
241
241
 
242
242
  ext = normalized_extension(file)
243
+ return false if ext == "gz" && FileMagic.detect(file) != :gzip
244
+
243
245
  TYPES.key?(ext)
244
246
  end
245
247
  end
@@ -9,9 +9,15 @@ module Excavate
9
9
  end
10
10
 
11
11
  def detect
12
- case File.read(@path, 8, mode: "rb")
12
+ beginning = File.read(@path, 8, mode: "rb")
13
+ case beginning
13
14
  when "MSCF\x00\x00\x00\x00".force_encoding("BINARY")
14
15
  :cab
16
+ else
17
+ case beginning.byteslice(0, 2)
18
+ when "\x1F\x8B".force_encoding("BINARY")
19
+ :gzip
20
+ end
15
21
  end
16
22
  end
17
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Excavate
4
- VERSION = "0.3.3"
4
+ VERSION = "0.3.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excavate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-27 00:00:00.000000000 Z
11
+ date: 2024-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arr-pm
@@ -128,6 +128,20 @@ dependencies:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '1.0'
131
+ - !ruby/object:Gem::Dependency
132
+ name: ffi-compiler2
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - '='
136
+ - !ruby/object:Gem::Version
137
+ version: 2.0.1
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - '='
143
+ - !ruby/object:Gem::Version
144
+ version: 2.0.1
131
145
  - !ruby/object:Gem::Dependency
132
146
  name: rspec
133
147
  requirement: !ruby/object:Gem::Requirement
@@ -215,7 +229,7 @@ metadata:
215
229
  source_code_uri: https://github.com/fontist/excavate
216
230
  changelog_uri: https://github.com/fontist/excavate
217
231
  rubygems_mfa_required: 'false'
218
- post_install_message:
232
+ post_install_message:
219
233
  rdoc_options: []
220
234
  require_paths:
221
235
  - lib
@@ -230,8 +244,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
244
  - !ruby/object:Gem::Version
231
245
  version: '0'
232
246
  requirements: []
233
- rubygems_version: 3.3.7
234
- signing_key:
247
+ rubygems_version: 3.5.3
248
+ signing_key:
235
249
  specification_version: 4
236
250
  summary: Extract nested archives with a single command.
237
251
  test_files: []