We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6f7365 commit 4fddd36Copy full SHA for 4fddd36
1 file changed
spec/octocatalog-diff/tests/spec_helper.rb
@@ -228,6 +228,13 @@ def self.remove_file_and_line(diff)
228
obj.map { |x| x[0] =~ /^[\-\+]$/ ? x[0..2] : x[0..3] }
229
end
230
231
+ # Strip off timestamps and other extraneous content from log messages so that matching
232
+ # of individual elements can be done via string and not regexp.
233
+ def self.strip_log_message(message)
234
+ return message unless message.strip =~ /\A\w,\s*\[[^\]]+\]\s+(\w+)\s*--\s*:(.+)/
235
+ "#{Regexp.last_match(1)} - #{Regexp.last_match(2).strip}"
236
+ end
237
+
238
# Get the Puppet version from the Puppet binary
239
def self.puppet_version
240
require require_path('util/puppetversion')
0 commit comments