ci_logger 0.2.1 → 0.3.0

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: 89e72539f48e1d431cf0aea68bc94bc68f634ff387ab7f403e3a32b0dc8e5968
4
- data.tar.gz: f702a6a73bdaacad98c3c145fe143479d7e5f2ba0eb30fddea8ba418c6007cec
3
+ metadata.gz: 9fde8e8c982e386e5408e29c2ee568fc2b3e12502244789491dfcd05ce3e9bc8
4
+ data.tar.gz: 94e60f18f513c046441f1846b53c853e44c81f5fc40556f61ffd1431ed4e8cae
5
5
  SHA512:
6
- metadata.gz: 35e497db83054eb3fe825ab4ff04046e9fa1e9bb0960b7a4222975eb6896f8368397d352808d7bea4c6d3636016b71eeaec9327ae2fbd18d849905fd9a4d0fba
7
- data.tar.gz: aec951a589e55cd68c65a5eeda83a5fe82f891c93df407017ae2bf487c82b8cb03beb545bf8c72231fdeba886a8805522104109ca03e025de36d5e254819e399
6
+ metadata.gz: 4550236a3a02548d9c2f6a4a6e9ba9fecd204ce7de40835c729a843ea505ae9d316c9e09e6c916efc8f293daf22140070d9b983348d5e59288341a26c56fedec
7
+ data.tar.gz: f4d84dadd47e86e3199e4be4afa44a875de238f825972d26d8985e9054560a20fc93b7db58280b50908d631598503416071306d7c100dfdc4d42bce834f50d39
@@ -42,6 +42,17 @@ module CiLogger
42
42
  end
43
43
 
44
44
  def add(severity, message = nil, progname = nil)
45
+ if progname.nil?
46
+ progname = @progname
47
+ end
48
+ if message.nil?
49
+ if block_given?
50
+ message = yield
51
+ else
52
+ message = progname
53
+ progname = @progname
54
+ end
55
+ end
45
56
  temporary_log << { severity: severity, message: message, progname: progname }
46
57
  end
47
58
 
@@ -8,7 +8,7 @@ module CiLogger
8
8
  Rails.logger = CiLogger::Logger.new(Rails.logger)
9
9
 
10
10
  RSpec.configure do |config|
11
- config.add_formatter 'progress'
11
+ config.add_formatter 'progress' if config.formatters.empty?
12
12
  config.add_formatter ::CiLogger::RspecFormatter
13
13
  config.before do |example|
14
14
  Rails.logger.debug("start example at #{example.location}")
@@ -1,3 +1,3 @@
1
1
  module CiLogger
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - willnet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-27 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubygems_version: 3.2.22
93
+ rubygems_version: 3.3.3
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Faster logger for CI