dragnet 5.4.1 → 6.0.0
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/release.yml +2 -2
- data/.github/workflows/ruby-linters.yml +1 -1
- data/.github/workflows/ruby-tests.yml +1 -1
- data/.github/workflows/sphinx-doc.yml +1 -1
- data/.github/workflows/verify-requirements.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +11 -0
- data/README.md +1 -1
- data/dragnet.gemspec +2 -2
- data/lib/dragnet/verifiers/changes_verifier.rb +6 -1
- data/lib/dragnet/verifiers/files_verifier.rb +5 -0
- data/lib/dragnet/verifiers/mixins/git_error_handling.rb +26 -0
- data/lib/dragnet/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7d753aca8090f87852e9d4e85f021c6ce0a8500210385337651316119b52c44
|
4
|
+
data.tar.gz: 8feb400e7bc41e1f41bc8987d1777273ee8dd7075a8c6ffcbc3d7d5091e01a8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d385680a7d5a5610f8d959f23e1e3c9f73fd4adf8dca34aa8ab82b7dd65ded853aa20b7361f93443d02626e954079784d5ee036694ee8de2076bbeb18d2df5
|
7
|
+
data.tar.gz: fce543298fcc34525a61abbc2c268b86eb971a95cd842a5cce5f0bc503b38cfa36310ebffb642957c5b2706b55d54d21437f23ba2f5f212339b2d482618fab79
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.0
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,17 @@ Please mark backwards incompatible changes with an exclamation mark at the start
|
|
8
8
|
|
9
9
|
## [Unreleased]
|
10
10
|
|
11
|
+
## [6.0.0] - 2025-09-23
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
- ! Updated the `git` gem dependency from `~> 1.8` to `~> 3`
|
15
|
+
- ! Set the minimum Ruby version requirement to `3.1.0`
|
16
|
+
|
17
|
+
## [5.4.2] - 2025-05-22
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
- Dragnet no longer crashes when an invalid / non-existing SHA1 is used in a MTR.
|
21
|
+
|
11
22
|
## [5.4.1] - 2025-04-23
|
12
23
|
|
13
24
|
### Fixed
|
data/README.md
CHANGED
data/dragnet.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
'performed.'
|
16
16
|
spec.homepage = 'https://github.com/esrlabs/dragnet'
|
17
17
|
spec.license = 'MIT'
|
18
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
18
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
|
19
19
|
|
20
20
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
21
21
|
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.add_runtime_dependency 'activesupport', '~> 7'
|
27
27
|
spec.add_runtime_dependency 'colorize', '~> 0.8'
|
28
|
-
spec.add_runtime_dependency 'git', '~>
|
28
|
+
spec.add_runtime_dependency 'git', '~> 3'
|
29
29
|
spec.add_runtime_dependency 'thor', '~> 1.1'
|
30
30
|
|
31
31
|
# Specify which files should be added to the gem when it is released.
|
@@ -1,12 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative '../verification_result'
|
4
|
+
require_relative 'mixins/git_error_handling'
|
4
5
|
require_relative 'repository_verifier'
|
5
6
|
|
6
7
|
module Dragnet
|
7
8
|
module Verifiers
|
8
9
|
# Checks for changes in the repository since the creation of the MTR Record
|
9
10
|
class ChangesVerifier < Dragnet::Verifiers::RepositoryVerifier
|
11
|
+
include ::Dragnet::Verifiers::Mixins::GitErrorHandling
|
12
|
+
|
10
13
|
attr_reader :test_records
|
11
14
|
|
12
15
|
# @param [Dragnet::TestRecord] test_record The +TestRecord+ object to
|
@@ -33,6 +36,8 @@ module Dragnet
|
|
33
36
|
return unless diff.size.positive?
|
34
37
|
|
35
38
|
find_changes(diff)
|
39
|
+
rescue Git::FailedError => e
|
40
|
+
result_from_git_error(e)
|
36
41
|
end
|
37
42
|
|
38
43
|
private
|
@@ -44,7 +49,7 @@ module Dragnet
|
|
44
49
|
# the details of the changes found in the repository, or +nil+ if no
|
45
50
|
# changes were found.
|
46
51
|
def find_changes(diff)
|
47
|
-
diff.stats[:files].
|
52
|
+
diff.stats[:files].each_key do |file|
|
48
53
|
next if mtr_files.include?(file) # Changes to MTR files are ignored.
|
49
54
|
|
50
55
|
return Dragnet::VerificationResult.new(
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative '../verification_result'
|
4
|
+
require_relative 'mixins/git_error_handling'
|
4
5
|
require_relative 'repository_verifier'
|
5
6
|
|
6
7
|
module Dragnet
|
@@ -8,6 +9,8 @@ module Dragnet
|
|
8
9
|
# Checks if any of the files listed in the MTR have changed since the MTR
|
9
10
|
# was created.
|
10
11
|
class FilesVerifier < Dragnet::Verifiers::RepositoryVerifier
|
12
|
+
include ::Dragnet::Verifiers::Mixins::GitErrorHandling
|
13
|
+
|
11
14
|
# Executes the verification process.
|
12
15
|
# Checks the changes in the repository. If a change in one of the files
|
13
16
|
# is detected a +:result+ key is added to the MTR, including the detected
|
@@ -26,6 +29,8 @@ module Dragnet
|
|
26
29
|
end
|
27
30
|
|
28
31
|
result_from(changes) if changes.any?
|
32
|
+
rescue Git::FailedError => e
|
33
|
+
result_from_git_error(e)
|
29
34
|
end
|
30
35
|
|
31
36
|
private
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dragnet
|
4
|
+
module Verifiers
|
5
|
+
module Mixins
|
6
|
+
# A mixin that provides methods to gracefully handle errors during Git's
|
7
|
+
# execution.
|
8
|
+
module GitErrorHandling
|
9
|
+
private
|
10
|
+
|
11
|
+
# @param [Git::FailedError] error The error that occurred during the
|
12
|
+
# verification.
|
13
|
+
# @return [Dragnet::VerificationResult] A +VerificationResult+ object that
|
14
|
+
# encapsulates the occurred error so that it can be presented to the
|
15
|
+
# user.
|
16
|
+
def result_from_git_error(error)
|
17
|
+
Dragnet::VerificationResult.new(
|
18
|
+
status: :failed,
|
19
|
+
reason: "Unable to diff the revisions: #{shorten_sha1(sha1)}..#{shorten_sha1(repository.head.sha)}: " \
|
20
|
+
"#{error.result.stdout}"
|
21
|
+
)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/dragnet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dragnet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ESR Labs GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,6 +155,7 @@ files:
|
|
155
155
|
- lib/dragnet/verifiers.rb
|
156
156
|
- lib/dragnet/verifiers/changes_verifier.rb
|
157
157
|
- lib/dragnet/verifiers/files_verifier.rb
|
158
|
+
- lib/dragnet/verifiers/mixins/git_error_handling.rb
|
158
159
|
- lib/dragnet/verifiers/repos_verifier.rb
|
159
160
|
- lib/dragnet/verifiers/repository_verifier.rb
|
160
161
|
- lib/dragnet/verifiers/result_verifier.rb
|
@@ -177,14 +178,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
178
|
requirements:
|
178
179
|
- - ">="
|
179
180
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
181
|
+
version: 3.1.0
|
181
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
183
|
requirements:
|
183
184
|
- - ">="
|
184
185
|
- !ruby/object:Gem::Version
|
185
186
|
version: '0'
|
186
187
|
requirements: []
|
187
|
-
rubygems_version: 3.
|
188
|
+
rubygems_version: 3.3.3
|
188
189
|
signing_key:
|
189
190
|
specification_version: 4
|
190
191
|
summary: A gem to verify, validate and analyse MTR (Manual Test Record) files.
|