console 1.10.1 → 1.10.2

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: d9156ec2b29460187235a07fa3d66c53a008c78987873413415a8f66d0d3ccb6
4
- data.tar.gz: e27d6622b77fc3b5b2c616523956f67ee33e1cc0243d4d8313242e88cb8fe007
3
+ metadata.gz: 8a777953a8fd749c475d101a185f5f45ab11005574c3f23e413c16058e22500b
4
+ data.tar.gz: 778b3da976350ffc23d5aad6d142a9398ffbd0be6c8e5931c8c5c9b4f3c49f63
5
5
  SHA512:
6
- metadata.gz: ae3e4e8c9aba59786238e9ff0ba6e5568d891aae95f7dbe2276875a62ef895def36fc31d33aced9ed287897374d96d9678a1c7c0f0d045eca2b2e6f4f56f8fbb
7
- data.tar.gz: ec3bba369b4bad6139a1509fe51665b7d75df5af2a4176db6f6abe73e64753a86eca97aa11852cc4073db0645fbe9d3b32981b8507a46409f6c4a4cb43071910
6
+ metadata.gz: '0280c9d59cd23431f0c2ede8da258795790af325c64dacc63dc791a0682baad85348ddbd04ef954ad17ade370958a606b6f83e42ae4c8873eaea4bc11f4a409a'
7
+ data.tar.gz: eb013fb3e45477510bf1cdf40fbfbba739be5cb3fda1f8366eb97c3898d31a7eb932a3c72c8a668e6e78f0ea57cc0d813207f50567168d0e6ea723ef09898533
data/lib/console.rb CHANGED
@@ -20,6 +20,7 @@
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  # THE SOFTWARE.
22
22
 
23
+ require_relative 'console/version'
23
24
  require_relative 'console/logger'
24
25
 
25
26
  module Console
@@ -66,12 +66,14 @@ module Console
66
66
  output.puts " #{terminal[:exception_detail]}#{line}#{terminal.reset}"
67
67
  end
68
68
 
69
+ root_expr = /^#{@root}\// if @root
70
+
69
71
  exception.backtrace&.each_with_index do |line, index|
70
72
  path, offset, message = line.split(":")
71
73
 
72
74
  # Make the path a bit more readable
73
- path.gsub!(/^#{@root}\//, "./") if @root
74
-
75
+ path.sub!(root_expr, "./") if root_expr
76
+
75
77
  output.puts " #{index == 0 ? "→" : " "} #{terminal[:exception_backtrace]}#{path}:#{offset}#{terminal.reset} #{message}"
76
78
  end
77
79
 
@@ -54,7 +54,7 @@ module Console
54
54
  terminal = Terminal::Logger.new(output, verbose: verbose)
55
55
 
56
56
  logger = self.new(terminal, verbose: verbose, level: level)
57
- resolver = Resolver.default_resolver(logger)
57
+ Resolver.default_resolver(logger)
58
58
 
59
59
  return logger
60
60
  end
@@ -108,7 +108,9 @@ module Console
108
108
  end
109
109
 
110
110
  def output?
111
- if duration = duration_since_last_output
111
+ if remaining.zero?
112
+ return true
113
+ elsif duration = duration_since_last_output
112
114
  return duration > @minimum_output_duration
113
115
  else
114
116
  return true
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Console
22
- VERSION = "1.10.1"
22
+ VERSION = "1.10.2"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-01 00:00:00.000000000 Z
11
+ date: 2021-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fiber-local
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  requirements: []
143
- rubygems_version: 3.1.2
143
+ rubygems_version: 3.2.3
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Beautiful logging for Ruby.