excavate 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/post-rake.yml +29 -0
- data/.github/workflows/rake-metanorma.yaml +60 -0
- data/.github/workflows/rake.yml +81 -0
- data/.github/workflows/release.yml +24 -0
- data/.rubocop.yml +11 -10
- data/.rubocop_todo.yml +78 -0
- data/Gemfile +7 -0
- data/README.adoc +480 -52
- data/excavate.gemspec +9 -13
- data/lib/excavate/archive.rb +2 -1
- data/lib/excavate/extractors/ole_extractor.rb +1 -1
- data/lib/excavate/extractors/xz_extractor.rb +58 -0
- data/lib/excavate/extractors.rb +1 -0
- data/lib/excavate/file_magic.rb +8 -3
- data/lib/excavate/utils.rb +1 -1
- data/lib/excavate/version.rb +1 -1
- metadata +17 -68
- data/.github/workflows/test-and-release.yml +0 -99
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56401e5430415802c560b8f23c9b83da63c363e41b6fe0cf9237542a3903959b
|
|
4
|
+
data.tar.gz: 56d280616e5ec8dc1d1833a3453df61ab3cfd99bccea7bb6985f47c58b1a5aa6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 316e2bcb6575a02d21ea2463074b242c5ee8a0c819851fbe161d0df8c27267fcfaa4bc84411a8ee5a5a5158f4e03f0bd3cf48b92a9de89be2781ea8c03100a6f
|
|
7
|
+
data.tar.gz: 3193c2e4c10eee70a64f3944e5aa274bb76912a58e32cbf9ed971f3bd44b9106725e37371fd658b02d2273ff43ca4bbbca0f55f6b69e8cf71393e2d0297c8287
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: post-rake
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
workflow_run:
|
|
9
|
+
workflows:
|
|
10
|
+
- rake
|
|
11
|
+
- rake-metanorma
|
|
12
|
+
types:
|
|
13
|
+
- completed
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
post-rake:
|
|
17
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' && contains(github.ref, 'refs/tags/v') }}
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- if: contains(github.ref, 'refs/tags/v')
|
|
23
|
+
name: Repository ready for release
|
|
24
|
+
uses: peter-evans/repository-dispatch@v3
|
|
25
|
+
with:
|
|
26
|
+
token: ${{ secrets.FONTIST_CI_PAT_TOKEN }}
|
|
27
|
+
repository: ${{ github.repository }}
|
|
28
|
+
event-type: do-release
|
|
29
|
+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "type": "do-release"}'
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: rake-metanorma
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
tags: [ 'v*' ]
|
|
10
|
+
pull_request:
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
# Forcing bundler version to ensure that it is consistent everywhere and
|
|
18
|
+
# does not cause bundler gem reinstalls
|
|
19
|
+
# bundler/rubygems 2.3.22 is a minimal requirement to support gnu/musl differentiation
|
|
20
|
+
# https://github.com/rubygems/rubygems/pull/4488
|
|
21
|
+
BUNDLER_VER: latest
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
prepare:
|
|
25
|
+
uses: metanorma/ci/.github/workflows/prepare-rake.yml@main
|
|
26
|
+
|
|
27
|
+
metanorma:
|
|
28
|
+
name: Test metanorma on Ruby ${{ matrix.ruby.version }} ${{ matrix.os }}
|
|
29
|
+
runs-on: ${{ matrix.os }}
|
|
30
|
+
|
|
31
|
+
needs: prepare
|
|
32
|
+
if: needs.prepare.outputs.push-for-tag != 'true'
|
|
33
|
+
|
|
34
|
+
continue-on-error: ${{ matrix.ruby.experimental }}
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
max-parallel: 5
|
|
38
|
+
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
|
|
39
|
+
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
with:
|
|
43
|
+
repository: metanorma/metanorma
|
|
44
|
+
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
with:
|
|
47
|
+
path: "excavate"
|
|
48
|
+
|
|
49
|
+
- run: 'echo ''gem "excavate", path: "./excavate"'' > Gemfile.devel'
|
|
50
|
+
|
|
51
|
+
- uses: ruby/setup-ruby@v1
|
|
52
|
+
with:
|
|
53
|
+
ruby-version: ${{ matrix.ruby.version }}
|
|
54
|
+
rubygems: ${{ matrix.ruby.rubygems }}
|
|
55
|
+
bundler: ${{ env.BUNDLER_VER }}
|
|
56
|
+
bundler-cache: true
|
|
57
|
+
|
|
58
|
+
- uses: metanorma/metanorma-build-scripts/inkscape-setup-action@main
|
|
59
|
+
|
|
60
|
+
- run: bundle exec rake
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: rake
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
tags: [ 'v*' ]
|
|
10
|
+
paths-ignore:
|
|
11
|
+
- '**.adoc'
|
|
12
|
+
pull_request:
|
|
13
|
+
paths-ignore:
|
|
14
|
+
- '**.adoc'
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
env:
|
|
21
|
+
BUNDLER_VER: latest
|
|
22
|
+
# Forcing bundler version to ensure that it is consistent everywhere and
|
|
23
|
+
# does not cause bundler gem reinstalls
|
|
24
|
+
# bundler/rubygems 2.3.22 is a minimal requirement to support gnu/musl differentiation
|
|
25
|
+
# https://github.com/rubygems/rubygems/pull/4488
|
|
26
|
+
GOOGLE_FONTS_API_KEY: ${{secrets.FONTIST_CI_GOOGLE_FONTS_API_KEY}}
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
prepare:
|
|
30
|
+
uses: metanorma/ci/.github/workflows/prepare-rake.yml@main
|
|
31
|
+
|
|
32
|
+
test:
|
|
33
|
+
name: Test on Ruby ${{ matrix.ruby.version }} ${{ matrix.os }}
|
|
34
|
+
runs-on: ${{ matrix.os }}
|
|
35
|
+
|
|
36
|
+
needs: prepare
|
|
37
|
+
if: needs.prepare.outputs.push-for-tag != 'true'
|
|
38
|
+
|
|
39
|
+
continue-on-error: ${{ matrix.ruby.experimental }}
|
|
40
|
+
strategy:
|
|
41
|
+
fail-fast: false
|
|
42
|
+
max-parallel: 5
|
|
43
|
+
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
|
|
48
|
+
- uses: ruby/setup-ruby@v1
|
|
49
|
+
with:
|
|
50
|
+
ruby-version: ${{ matrix.ruby.version }}
|
|
51
|
+
rubygems: ${{ matrix.ruby.rubygems }}
|
|
52
|
+
bundler: ${{ env.BUNDLER_VER }}
|
|
53
|
+
bundler-cache: true
|
|
54
|
+
|
|
55
|
+
- run: bundle exec rake
|
|
56
|
+
|
|
57
|
+
archlinux-test:
|
|
58
|
+
name: Test on Arch Linux
|
|
59
|
+
needs: prepare
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
container:
|
|
62
|
+
image: 'archlinux:latest'
|
|
63
|
+
env:
|
|
64
|
+
CI: true
|
|
65
|
+
|
|
66
|
+
steps:
|
|
67
|
+
- name: Setup packages
|
|
68
|
+
run: pacman -Syu --noconfirm git binutils gcc autoconf make libffi libyaml gmp
|
|
69
|
+
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
|
|
72
|
+
- uses: asdf-vm/actions/install@v3
|
|
73
|
+
with:
|
|
74
|
+
tool_versions: ruby ${{ needs.prepare.outputs.default-ruby-version }}
|
|
75
|
+
|
|
76
|
+
- run: |
|
|
77
|
+
gem install bundler
|
|
78
|
+
bundle install
|
|
79
|
+
|
|
80
|
+
- name: Test
|
|
81
|
+
run: bundle exec rake
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
next_version:
|
|
10
|
+
description: |
|
|
11
|
+
Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
|
|
12
|
+
Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
|
|
13
|
+
required: true
|
|
14
|
+
default: 'skip'
|
|
15
|
+
repository_dispatch:
|
|
16
|
+
types: [ do-release ]
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
release:
|
|
20
|
+
uses: fontist/support/.github/workflows/release.yml@main
|
|
21
|
+
with:
|
|
22
|
+
next_version: ${{ github.event.inputs.next_version }}
|
|
23
|
+
secrets:
|
|
24
|
+
rubygems-api-key: ${{ secrets.FONTIST_CI_RUBYGEMS_API_KEY }}
|
data/.rubocop.yml
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
|
+
# See https://github.com/metanorma/cimas
|
|
1
3
|
inherit_from:
|
|
2
|
-
-
|
|
3
|
-
|
|
4
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
|
|
5
|
+
- .rubocop_todo.yml
|
|
4
6
|
|
|
7
|
+
# local repo-specific modifications
|
|
5
8
|
AllCops:
|
|
6
|
-
TargetRubyVersion: 2.7
|
|
7
|
-
SuggestExtensions: false
|
|
8
9
|
Exclude:
|
|
9
|
-
- '
|
|
10
|
-
|
|
11
|
-
Gemspec/RequireMFA:
|
|
12
|
-
Enabled: false
|
|
10
|
+
- 'lib/excavate/extractors/cpio/cpio_old_format.rb'
|
|
11
|
+
- 'vendor/**/*'
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
plugins:
|
|
14
|
+
- rubocop-performance
|
|
15
|
+
- rubocop-rake
|
|
16
|
+
- rubocop-rspec
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2025-11-08 05:21:43 UTC using RuboCop version 1.81.7.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# Configuration parameters: Severity.
|
|
11
|
+
Gemspec/RequiredRubyVersion:
|
|
12
|
+
Exclude:
|
|
13
|
+
- 'excavate.gemspec'
|
|
14
|
+
|
|
15
|
+
# Offense count: 8
|
|
16
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
17
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
|
18
|
+
# URISchemes: http, https
|
|
19
|
+
Layout/LineLength:
|
|
20
|
+
Exclude:
|
|
21
|
+
- 'bin/rspec'
|
|
22
|
+
- 'excavate.gemspec'
|
|
23
|
+
- 'lib/excavate/extractors/rpm_extractor.rb'
|
|
24
|
+
- 'lib/excavate/extractors/xz_extractor.rb'
|
|
25
|
+
- 'lib/excavate/utils.rb'
|
|
26
|
+
- 'spec/excavate/extractors/xz_extractor_spec.rb'
|
|
27
|
+
|
|
28
|
+
# Offense count: 1
|
|
29
|
+
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
30
|
+
Lint/DuplicateBranch:
|
|
31
|
+
Exclude:
|
|
32
|
+
- 'lib/excavate/utils.rb'
|
|
33
|
+
|
|
34
|
+
# Offense count: 1
|
|
35
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
36
|
+
Metrics/MethodLength:
|
|
37
|
+
Max: 15
|
|
38
|
+
|
|
39
|
+
# Offense count: 1
|
|
40
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
41
|
+
Performance/RegexpMatch:
|
|
42
|
+
Exclude:
|
|
43
|
+
- 'lib/excavate/utils.rb'
|
|
44
|
+
|
|
45
|
+
# Offense count: 42
|
|
46
|
+
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
47
|
+
# Prefixes: when, with, without
|
|
48
|
+
RSpec/ContextWording:
|
|
49
|
+
Exclude:
|
|
50
|
+
- 'spec/excavate/archive_spec.rb'
|
|
51
|
+
- 'spec/excavate/cli_spec.rb'
|
|
52
|
+
- 'spec/support/fresh_work_dir.rb'
|
|
53
|
+
|
|
54
|
+
# Offense count: 9
|
|
55
|
+
# Configuration parameters: CountAsOne.
|
|
56
|
+
RSpec/ExampleLength:
|
|
57
|
+
Max: 7
|
|
58
|
+
|
|
59
|
+
# Offense count: 1
|
|
60
|
+
# Configuration parameters: .
|
|
61
|
+
# SupportedStyles: have_received, receive
|
|
62
|
+
RSpec/MessageSpies:
|
|
63
|
+
EnforcedStyle: receive
|
|
64
|
+
|
|
65
|
+
# Offense count: 10
|
|
66
|
+
RSpec/MultipleExpectations:
|
|
67
|
+
Max: 2
|
|
68
|
+
|
|
69
|
+
# Offense count: 14
|
|
70
|
+
# Configuration parameters: AllowedGroups.
|
|
71
|
+
RSpec/NestedGroups:
|
|
72
|
+
Max: 4
|
|
73
|
+
|
|
74
|
+
# Offense count: 2
|
|
75
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
76
|
+
Style/IdenticalConditionalBranches:
|
|
77
|
+
Exclude:
|
|
78
|
+
- 'lib/excavate/utils.rb'
|