grntest 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74d1dc6f79ac8d329d3617251cc20205a8b39dbfff7859923908f7e5bd28297b
4
- data.tar.gz: 9b98ceee1753fc34a3f3bb557e414f8061232e18cf707c35a0b35e16ef624fab
3
+ metadata.gz: 8e90468027680b461a1633c49db9f3feb7babd1a0c2e81a4aad381ade35b4fb3
4
+ data.tar.gz: 31b1cc050ea4b70ed08082a0b5443586676aa5d77c0512287736ee1837b4c371
5
5
  SHA512:
6
- metadata.gz: 9caea14cdead4169fcc5b0d5de94365d7a0f008c3e991112f4d729c4f305159801cec6eac306dcf2e0bfb7753dca8b85bb228e15249a78f56176b2addccdd9ee
7
- data.tar.gz: 9c41048f1554a23aabc0896e65c1ff04e84bf5a44870d56ae03130e5821845edb0ab13bdabf724d216f216eb792482491e334acb8b06c0232bd8ff5400d72c64
6
+ metadata.gz: f8067b106d13ebd121cd96d43eb82b807adb81fe89ea26df1ea4eeb8dfdd6be096e14fdbeeb6ca00528d5704d0d53d6123e28d45973fb5bb283990c59101e090
7
+ data.tar.gz: b8eb794be911a7dc8b7eb74172b4cb109cafe74a945cfc3ca3e626d90a54a36ca61058c91883238b579d4c0a92578a58d46b2aff4a7dbb1c4086059a0109245e
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.4.1: 2020-05-30
4
+
5
+ ### Improvements
6
+
7
+ * Added support for normalizing IO open/close log message.
8
+
3
9
  ## 1.4.0: 2020-05-16
4
10
 
5
11
  ### Improvements
@@ -535,12 +535,32 @@ module Grntest
535
535
  end
536
536
  next if thread_log_message?(entry.message)
537
537
  next if ignore_log_message?(entry.message)
538
- formatted_log_level = format_log_level(entry.log_level)
539
- important_messages << "\#|#{formatted_log_level}| #{entry.message}"
538
+ log_level, message = normalize_log(entry)
539
+ formatted_log_level = format_log_level(log_level)
540
+ important_messages << "\#|#{formatted_log_level}| #{message}"
540
541
  end
541
542
  important_messages.join("\n")
542
543
  end
543
544
 
545
+ def normalize_log(entry)
546
+ case entry.message
547
+ when /\A(\[io\]\[(?:open|close)\]) <(.*?)>\z/
548
+ tag = $1
549
+ path = $2
550
+ normalized_path = File.basename(path)
551
+ normalized_message = "#{tag} <#{normalized_path}>"
552
+ case entry.log_level
553
+ when :info, :debug
554
+ normalized_log_level = :debug
555
+ else
556
+ normalized_log_level = entry.log_level
557
+ end
558
+ [normalized_log_level, normalized_message]
559
+ else
560
+ [entry.log_level, entry.message]
561
+ end
562
+ end
563
+
544
564
  def read_all_readable_content(output, options={})
545
565
  content = ""
546
566
  first_timeout = options[:first_timeout] || @context.read_timeout
@@ -14,5 +14,5 @@
14
14
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
16
  module Grntest
17
- VERSION = "1.4.0"
17
+ VERSION = "1.4.1"
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grntest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-05-16 00:00:00.000000000 Z
12
+ date: 2020-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diff-lcs