piper-ruby 1.2.0 → 1.2.1

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.
data/README.md CHANGED
@@ -26,6 +26,10 @@ an example of how to use the Piper::Actor module functions.
26
26
 
27
27
  ## Release Notes
28
28
 
29
+ ### Release 1.2.1 - March 20, 2016
30
+
31
+ - Added rescue for Interrupt to avoid error message on shutdown with control C.
32
+
29
33
  ### Release 1.2.0 - March 20, 2016
30
34
 
31
35
  - Added the Piper::Actor module to support the Piper Push Cache process flows.
@@ -18,15 +18,19 @@ module Piper
18
18
  # Starts a JSON processing loop that reads from $stdin. The proc provided
19
19
  # with the call should call ship() to continue on with the processing.
20
20
  def self.process()
21
- Oj::load($stdin, :mode => :strict) { |json|
22
- begin
23
- id = json['id']
24
- rec = json['rec']
25
- yield(id, rec)
26
- rescue Exception => e
27
- ship(id, { 'kind' => 'Error', 'message' => e.message, 'class' => e.class.to_s }, 'error')
28
- end
29
- }
21
+ begin
22
+ Oj::load($stdin, :mode => :strict) { |json|
23
+ begin
24
+ id = json['id']
25
+ rec = json['rec']
26
+ yield(id, rec)
27
+ rescue Exception => e
28
+ ship(id, { 'kind' => 'Error', 'message' => e.message, 'class' => e.class.to_s }, 'error')
29
+ end
30
+ }
31
+ rescue Interrupt
32
+ # ^C or parent went away
33
+ end
30
34
  end
31
35
 
32
36
  # Ships or sends a response to the calling task in the Piper Flow.
@@ -1,4 +1,4 @@
1
1
  module Piper
2
2
  # Current version of the module.
3
- VERSION = '1.2.0'
3
+ VERSION = '1.2.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piper-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: