excavate 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed5cec17e4c8c985ae34d044fa170ccbecdc3bd783a0cd0916454a8c567149d7
4
- data.tar.gz: 750dcde7f88158d2e107763a5fc733c4a72ac1030b53e91c6fd7e2697b167686
3
+ metadata.gz: 6360dbc5e452e6a0984a8bb8394051fa74da9d33700afd1ca9b36dbd73f9eeeb
4
+ data.tar.gz: 4d1f8e805be65dd56c6194915a43433561ba29572b016d6dc3d613617140957f
5
5
  SHA512:
6
- metadata.gz: b62877409f75d68041b7b973ee364356e6e47b09bd714ebd4430f0df627643213bd8ff2dc3ca40d4b8d141c2fda3ff6b9b686f4720fc8997424b169effff169e
7
- data.tar.gz: e3b0dee5b195329ecbc6cc85ffc5fc64c7b4c736481ac3c964b0353828c59e0176b71ad3c70ba53b7503a01419f5e6f205e28fd3531fe3584449ad8b39a66082
6
+ metadata.gz: dd1b31fabaf5c27c182bfec752255f918acf63763630bd7b6e39850f8296219b0ff182458efb3cfc5b3fe04f448b657a5e8b197330d532f1ccceed22e78a7ba3
7
+ data.tar.gz: f8a7aa72c8486144b9dcd09c5ecc05fa4c0acefbcc7482dca5a09cb1725d0d84438125438f1020dbdc478e37dce02486d1c4fdab7d37dc62e033a57f0094bd6b
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-03-17 11:57:02 UTC using RuboCop version 1.85.1.
3
+ # on 2026-03-19 00:32:08 UTC using RuboCop version 1.85.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -11,15 +11,7 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'excavate.gemspec'
13
13
 
14
- # Offense count: 1
15
- # This cop supports safe autocorrection (--autocorrect).
16
- # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
17
- # SupportedStylesAlignWith: start_of_line, relative_to_receiver
18
- Layout/IndentationWidth:
19
- Exclude:
20
- - 'spec/excavate/archive_spec.rb'
21
-
22
- # Offense count: 7
14
+ # Offense count: 21
23
15
  # This cop supports safe autocorrection (--autocorrect).
24
16
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
25
17
  # URISchemes: http, https
@@ -30,6 +22,8 @@ Layout/LineLength:
30
22
  - 'lib/excavate/extractors/rpm_extractor.rb'
31
23
  - 'lib/excavate/utils.rb'
32
24
  - 'spec/excavate/archive_spec.rb'
25
+ - 'test_archives/memory_test.rb'
26
+ - 'test_msi_memory.rb'
33
27
 
34
28
  # Offense count: 1
35
29
  # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
@@ -37,10 +31,66 @@ Lint/DuplicateBranch:
37
31
  Exclude:
38
32
  - 'lib/excavate/utils.rb'
39
33
 
34
+ # Offense count: 2
35
+ # This cop supports safe autocorrection (--autocorrect).
36
+ Lint/ScriptPermission:
37
+ Exclude:
38
+ - 'test_archives/memory_test.rb'
39
+ - 'test_msi_memory.rb'
40
+
41
+ # Offense count: 1
42
+ # This cop supports safe autocorrection (--autocorrect).
43
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
44
+ Lint/UnusedBlockArgument:
45
+ Exclude:
46
+ - 'test_msi_memory.rb'
47
+
40
48
  # Offense count: 4
49
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
50
+ Metrics/AbcSize:
51
+ Exclude:
52
+ - 'test_archives/memory_test.rb'
53
+ - 'test_msi_memory.rb'
54
+
55
+ # Offense count: 2
56
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
57
+ Metrics/CyclomaticComplexity:
58
+ Exclude:
59
+ - 'test_archives/memory_test.rb'
60
+ - 'test_msi_memory.rb'
61
+
62
+ # Offense count: 11
41
63
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
42
64
  Metrics/MethodLength:
43
- Max: 12
65
+ Max: 82
66
+
67
+ # Offense count: 2
68
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
69
+ Metrics/PerceivedComplexity:
70
+ Exclude:
71
+ - 'test_archives/memory_test.rb'
72
+ - 'test_msi_memory.rb'
73
+
74
+ # Offense count: 2
75
+ # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
76
+ # AllowedMethods: call
77
+ # WaywardPredicates: infinite?, nonzero?
78
+ Naming/PredicateMethod:
79
+ Exclude:
80
+ - 'test_archives/memory_test.rb'
81
+ - 'test_msi_memory.rb'
82
+
83
+ # Offense count: 1
84
+ # This cop supports safe autocorrection (--autocorrect).
85
+ Performance/RegexpMatch:
86
+ Exclude:
87
+ - 'test_archives/memory_test.rb'
88
+
89
+ # Offense count: 1
90
+ # This cop supports unsafe autocorrection (--autocorrect-all).
91
+ Performance/StringInclude:
92
+ Exclude:
93
+ - 'test_archives/memory_test.rb'
44
94
 
45
95
  # Offense count: 46
46
96
  # Configuration parameters: Prefixes, AllowedPatterns.
@@ -65,18 +115,25 @@ RSpec/MultipleExpectations:
65
115
  RSpec/NestedGroups:
66
116
  Max: 4
67
117
 
68
- # Offense count: 2
118
+ # Offense count: 8
69
119
  # This cop supports safe autocorrection (--autocorrect).
70
- # Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
71
- # RedundantRestArgumentNames: args, arguments
72
- # RedundantKeywordRestArgumentNames: kwargs, options, opts
73
- # RedundantBlockArgumentNames: blk, block, proc
74
- Style/ArgumentsForwarding:
120
+ # Configuration parameters: EnforcedStyle.
121
+ # SupportedStyles: trailing_conditional, ternary
122
+ Style/EmptyStringInsideInterpolation:
75
123
  Exclude:
76
- - 'lib/excavate/archive.rb'
124
+ - 'test_archives/memory_test.rb'
125
+ - 'test_msi_memory.rb'
77
126
 
78
127
  # Offense count: 2
79
128
  # This cop supports unsafe autocorrection (--autocorrect-all).
80
129
  Style/IdenticalConditionalBranches:
81
130
  Exclude:
82
131
  - 'lib/excavate/utils.rb'
132
+
133
+ # Offense count: 1
134
+ # This cop supports safe autocorrection (--autocorrect).
135
+ # Configuration parameters: EnforcedStyle.
136
+ # SupportedStyles: implicit, explicit
137
+ Style/RescueStandardError:
138
+ Exclude:
139
+ - 'test_msi_memory.rb'
data/excavate.gemspec CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  require_relative "lib/excavate/version"
4
4
 
5
- # rubocop:disable Metrics/BlockLength
6
-
7
5
  Gem::Specification.new do |spec|
8
6
  spec.name = "excavate"
9
7
  spec.version = Excavate::VERSION
@@ -32,11 +30,9 @@ Gem::Specification.new do |spec|
32
30
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
31
  spec.require_paths = ["lib"]
34
32
 
35
- spec.add_dependency "cabriolet", "~> 0.2.2"
36
- spec.add_dependency "omnizip", "~> 0.3.8"
33
+ spec.add_dependency "cabriolet", "~> 0.2.4"
34
+ spec.add_dependency "omnizip", "~> 0.3.9"
37
35
  spec.add_dependency "thor", "~> 1.0"
38
36
 
39
- spec.metadata["rubygems_mfa_required"] = "false"
37
+ spec.metadata["rubygems_mfa_required"] = "true"
40
38
  end
41
-
42
- # rubocop:enable Metrics/BlockLength
@@ -109,6 +109,8 @@ module Excavate
109
109
  extract_all(tmp, recursive_packages: recursive_packages)
110
110
  found_files = find_by_filter(tmp, filter)
111
111
  copy_files(found_files, target || Dir.pwd)
112
+ ensure
113
+ FileUtils.rm_rf(tmp)
112
114
  end
113
115
 
114
116
  def find_by_filter(source, filter)
@@ -217,12 +219,13 @@ module Excavate
217
219
  extract_recursively(archive, target)
218
220
  replace_archive_with_contents(archive, target)
219
221
  rescue StandardError
220
- FileUtils.rm_rf(target)
221
222
  # During recursive extraction of nested archives, silently skip
222
223
  # any that fail (e.g. .msi files that aren't real OLE, .cab files
223
224
  # with incompatible format, .exe files with unsupported compression).
224
225
  # Only re-raise for file types we don't recognize as archives.
225
226
  raise unless TYPES.key?(normalized_extension(archive))
227
+ ensure
228
+ FileUtils.rm_rf(target)
226
229
  end
227
230
 
228
231
  def replace_archive_with_contents(archive, target)
@@ -15,10 +15,11 @@ module Excavate
15
15
  rpm.open
16
16
  content = rpm.raw_payload
17
17
  path = target_path(@archive, rpm, target)
18
- rpm.close
19
18
 
20
19
  FileUtils.mkdir_p(File.dirname(path))
21
20
  File.write(path, content, mode: "wb")
21
+ ensure
22
+ rpm&.close
22
23
  end
23
24
 
24
25
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Excavate
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.3"
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: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-03-17 00:00:00.000000000 Z
11
+ date: 2026-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cabriolet
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.2
19
+ version: 0.2.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.2
26
+ version: 0.2.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omnizip
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.8
33
+ version: 0.3.9
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.8
40
+ version: 0.3.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -175,7 +175,7 @@ metadata:
175
175
  source_code_uri: https://github.com/omnizip/excavate
176
176
  changelog_uri: https://github.com/omnizip/excavite/releases
177
177
  documentation_uri: https://omnizip.github.io/excavate
178
- rubygems_mfa_required: 'false'
178
+ rubygems_mfa_required: 'true'
179
179
  post_install_message:
180
180
  rdoc_options: []
181
181
  require_paths: