Skip to content

Commit 821462a

Browse files
committed
Try to correct broken workflows
1 parent fbb6ee5 commit 821462a

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', 'jruby-9.2', 'jruby']
12+
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', 'jruby-9.4', 'jruby']
1313

1414
steps:
1515
- uses: actions/checkout@v3

lib/recog/fingerprint.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def match(match_string)
104104

105105
# Use the protocol specified in the XML database if there isn't one
106106
# provided as part of this fingerprint.
107-
result['service.protocol'] = @protocol if @protocol && !(result['service.protocol'])
107+
result['service.protocol'] = @protocol if @protocol && !result['service.protocol']
108108

109109
result['fingerprint_db'] = @match_key if @match_key
110110

@@ -123,7 +123,7 @@ def match(match_string)
123123
# standard of '-' for the version, otherwise raise and exception as
124124
# this code currently does not handle interpolation of undefined
125125
# values in other cases.
126-
raise "Invalid use of nil interpolated non-version value #{replacement} in non-cpe23 fingerprint param #{replacement_k}" unless replacement_k =~ (/\.cpe23$/) && replacement =~ (/\.version$/)
126+
raise "Invalid use of nil interpolated non-version value #{replacement} in non-cpe23 fingerprint param #{replacement_k}" unless replacement_k =~ /\.cpe23$/ && replacement =~ /\.version$/
127127

128128
result[replacement_k] = result[replacement_k].gsub(/\{#{replacement}\}/, '-')
129129

spec/lib/recog/match_reporter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def run_report
1717

1818
describe '#report' do
1919
it 'prints matches' do
20-
expect(formatter).to receive(:success_message).with('MATCH: {"data"=>"a match"}')
20+
expect(formatter).to receive(:success_message).with(a_string_matching(/\AMATCH: \{"data"\s*=>\s*"a match"\}\z/))
2121
run_report
2222
end
2323

0 commit comments

Comments
 (0)