async 1.15.2 → 1.15.3
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 +4 -4
- data/README.md +4 -0
- data/lib/async/logger.rb +8 -1
- data/lib/async/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1d8ef7fbe5fb3a4f0f2a26d992abd86f5b682b7f1e400fe28cf6407eaa65fb1
|
4
|
+
data.tar.gz: 879eb59f05f3195af21f83018e043f808077710e8d527684e715cf52124d4d11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c6b8aa080c13320200b17953e5a0f51bedbefcdaeb3c21df0d0e9d52c2ae81c0ec9d3b81e292a9890d3cb44352b93b3b8fdd3c7446de59610af36eb1498848d
|
7
|
+
data.tar.gz: d5c08e906390930a34e0439f9077481a139181871ad7ab49b81b2a2f8752e9a02d32520c246c6be5ed2d9e3ff578a317676635fa610fd798e66a550ee5251ae6
|
data/README.md
CHANGED
@@ -301,6 +301,10 @@ end
|
|
301
301
|
|
302
302
|
Due to limitations within Ruby and the nature of this library, it is not possible to use `to_enum` on methods which invoke asynchronous behavior. We hope to [fix this issue in the future](https://github.com/socketry/async/issues/23).
|
303
303
|
|
304
|
+
### Blocking Methods in Standard Library
|
305
|
+
|
306
|
+
Blocking Ruby methods such as `pop` in the `Queue` class require access to their own threads and will not yield control back to the reactor which can result in a deadlock. As a substitute for the standard library `Queue`, the `Async::Queue` class can be used.
|
307
|
+
|
304
308
|
## Contributing
|
305
309
|
|
306
310
|
1. Fork it
|
data/lib/async/logger.rb
CHANGED
@@ -69,6 +69,7 @@ module Async
|
|
69
69
|
@prefix_style = @terminal.color(Terminal::Colors::CYAN)
|
70
70
|
@subject_style = @terminal.color(nil, nil, Terminal::Attributes::BOLD)
|
71
71
|
@exception_title_style = @terminal.color(Terminal::Colors::RED, nil, Terminal::Attributes::BOLD)
|
72
|
+
@exception_details_style = @terminal.color(Terminal::Colors::YELLOW)
|
72
73
|
@exception_line_style = @terminal.color(Terminal::Colors::RED)
|
73
74
|
|
74
75
|
@subjects = {}
|
@@ -138,7 +139,13 @@ module Async
|
|
138
139
|
end
|
139
140
|
|
140
141
|
def format_exception(exception, prefix = nil, pwd: Dir.pwd, output: @output)
|
141
|
-
|
142
|
+
lines = exception.message.lines.map{|line| line.chomp!}
|
143
|
+
|
144
|
+
output.puts " #{prefix}#{@exception_title_style}#{exception.class}#{@reset_style}: #{lines.shift}"
|
145
|
+
|
146
|
+
lines.each do |line|
|
147
|
+
output.puts " #{@exception_details_style}" + line + @reset_style
|
148
|
+
end
|
142
149
|
|
143
150
|
exception.backtrace.each_with_index do |line, index|
|
144
151
|
path, offset, message = line.split(":")
|
data/lib/async/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.15.
|
4
|
+
version: 1.15.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nio4r
|