kugiru 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -0
- data/lib/kugiru/builder.rb +6 -1
- data/lib/kugiru/configuration.rb +1 -1
- data/lib/kugiru/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa7bc91575fcd4bcba43119d4939f7fbad250e3907fcecbf2831cc5b054c696d
|
4
|
+
data.tar.gz: 2d740938aa02d08b411cd957ca71ad7856d3176700544afdb55ea8b403c8dded
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15b6ed5b697ab277f56236724cdb6718f4125827945002958cb1ac96a996621cbde11123777bf99f2b356164649f798c752d215817b23617872b5090a689261d
|
7
|
+
data.tar.gz: 928177c225872a231cb4664e58ac15b4da2e7ca445b6cb5f88edbada940ebf30956395fe4f3644aa91e7202066c6a766840f42ab704ae3a07c1e8968af5cb610
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -66,6 +66,10 @@ In `config/initializers/kugiru.rb`, you can configure the following values.
|
|
66
66
|
Kugiru.configure do |config|
|
67
67
|
config.utf8_bom = true # default: false
|
68
68
|
config.streaming = false # default: true
|
69
|
+
config.after_streaming_error = ->(error) do # default: nil
|
70
|
+
Rails.logger.error(error)
|
71
|
+
Bugsnag.notify(error)
|
72
|
+
end
|
69
73
|
end
|
70
74
|
```
|
71
75
|
|
data/lib/kugiru/builder.rb
CHANGED
@@ -29,7 +29,12 @@ module Kugiru
|
|
29
29
|
|
30
30
|
def self.build_enumerator(**args)
|
31
31
|
Enumerator.new do |y|
|
32
|
-
|
32
|
+
begin
|
33
|
+
self.new(y, args).build
|
34
|
+
rescue => error
|
35
|
+
Kugiru.configuration.after_streaming_error.try(:call, error)
|
36
|
+
raise error
|
37
|
+
end
|
33
38
|
end
|
34
39
|
end
|
35
40
|
end
|
data/lib/kugiru/configuration.rb
CHANGED
data/lib/kugiru/version.rb
CHANGED