test-prof 1.0.4 → 1.0.5

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: c90e1ef55e15100f84c70ca251e27113353a7998735966f56401fea543a43d1f
4
- data.tar.gz: c91c7e49b98bb8904dcb18805bf38d8b9c1f29ea80559c037626dd5439929c32
3
+ metadata.gz: edd58f04fbf02f8bfa863b2c68e19f26fbdfb95c36bb361d012848f0a4f76790
4
+ data.tar.gz: 820c00eeaaea782bc89581005ac83cc147551550477519d7dd1a59a212f497c9
5
5
  SHA512:
6
- metadata.gz: d983f2986f990eb2a81064604dbd5f488bd34ffb80d74f2450cdf265601583062ba6eddc0746b6e10fa168b5aafe8c987350deb427198e011d937e27f210865e
7
- data.tar.gz: 6c391a64e5d34ea094d81854bd03b142ae1e6bdf8040f9e3273430a26d7f92190e4455c2acb5db8ee6741b37b5a6529c0b2bee1fb871a884b0cf6e4bb1126b9e
6
+ metadata.gz: f999f2073374210ef7c2afbedc977c21210f69e6e180fb54f6ce452741db1841b396b9358c9892e85ae972019d7204676d8a906d6a9f1f896c3669249027c935
7
+ data.tar.gz: 38c1f0d45d386acca3edbbd7c52b9d246f02f030cce0717f2480b2917b003c6f2b3542beb6caac45d8fe432bc69b6a7db1720768297eb4a1588f471727664409
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master (unrealeased)
4
4
 
5
+ ## 1.0.5 (2021-05-13)
6
+
7
+ - Fix logging regression when no newline has been added. ([@palkan][])
8
+
5
9
  ## 1.0.4 (2021-05-12)
6
10
 
7
11
  - Add ability to use custom logger. ([@palkan][])
data/lib/test_prof.rb CHANGED
@@ -133,7 +133,6 @@ module TestProf
133
133
  # TestProf configuration
134
134
  class Configuration
135
135
  attr_accessor :output, # IO to write logs
136
- :logger, # Logger instance to write to the output io
137
136
  :color, # Whether to colorize output or not
138
137
  :output_dir, # Directory to store artifacts
139
138
  :timestamps, # Whether to use timestamped names for artifacts,
@@ -141,7 +140,6 @@ module TestProf
141
140
 
142
141
  def initialize
143
142
  @output = $stdout
144
- @logger = Logger.new(@output, formatter: Logging::Formatter.new)
145
143
  @color = true
146
144
  @output_dir = "tmp/test_prof"
147
145
  @timestamps = false
@@ -149,12 +147,16 @@ module TestProf
149
147
  end
150
148
 
151
149
  def color?
152
- color == true
150
+ color == true && output.is_a?(IO) && output.tty?
153
151
  end
154
152
 
155
153
  def timestamps?
156
154
  timestamps == true
157
155
  end
156
+
157
+ def logger
158
+ @logger ||= Logger.new(output, formatter: Logging::Formatter.new)
159
+ end
158
160
  end
159
161
  end
160
162
 
@@ -11,7 +11,7 @@ module TestProf
11
11
 
12
12
  class Formatter
13
13
  def call(severity, _time, progname, msg)
14
- colorize(severity.to_sym, "[#{progname} #{severity}] #{msg}")
14
+ colorize(severity.to_sym, "[#{progname} #{severity}] #{msg}\n")
15
15
  end
16
16
 
17
17
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TestProf
4
- VERSION = "1.0.4"
4
+ VERSION = "1.0.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-prof
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-12 00:00:00.000000000 Z
11
+ date: 2021-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler