stapfen 2.0.0 → 2.0.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/CHANGES.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Changes to Stapfen
2
2
 
3
3
 
4
+ ## 2.0.1
5
+
6
+ * More verbose exit handlers
7
+ * Invoke `java.lang.System.exit` on the JVM when exiting
8
+
4
9
  ## 2.0.0
5
10
 
6
11
  * Add support for JMS-backed `Stapfen::Worker` classes
data/README.md CHANGED
@@ -9,6 +9,8 @@ Stapfen allows you to write one worker class, and use either protocol
9
9
  depending on the environment and needs.
10
10
 
11
11
 
12
+ **[RDoc here](http://rdoc.info/github/lookout/stapfen/master/frames)**
13
+
12
14
  ## Usage
13
15
 
14
16
  (Examples can be found in the `examples/` directory)
@@ -1,3 +1,3 @@
1
1
  module Stapfen
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
@@ -125,6 +125,11 @@ module Stapfen
125
125
  end
126
126
  end
127
127
 
128
+ if RUBY_PLATFORM == 'java'
129
+ info "Telling the JVM to exit cleanly"
130
+ Java::JavaLang::System.exit(0)
131
+ end
132
+
128
133
  return cleanly
129
134
  end
130
135
 
@@ -208,14 +213,19 @@ module Stapfen
208
213
  # Invokes the shutdown block if it has been created, and closes the
209
214
  # {{Stomp::Client}} connection unless it has already been shut down
210
215
  def exit_cleanly
211
- info("#{self} exiting cleanly")
216
+ info("#{self} exiting ")
212
217
  self.class.destructor.call if self.class.destructor
213
218
 
214
- # Only close the client if we have one sitting around
215
- if client
216
- unless client.closed?
217
- client.close
219
+ info "Killing client"
220
+ begin
221
+ # Only close the client if we have one sitting around
222
+ if client
223
+ unless client.closed?
224
+ client.close
225
+ end
218
226
  end
227
+ rescue StandardError => exc
228
+ error "Exception received while trying to close client! #{exc.inspect}"
219
229
  end
220
230
  end
221
231
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stapfen
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-03 00:00:00.000000000 Z
12
+ date: 2013-10-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A simple gem for writing good basic STOMP workers
15
15
  email:
@@ -58,7 +58,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
58
  version: '0'
59
59
  segments:
60
60
  - 0
61
- hash: 497669016429276389
61
+ hash: -1242747643436314961
62
62
  required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  segments:
69
69
  - 0
70
- hash: 497669016429276389
70
+ hash: -1242747643436314961
71
71
  requirements: []
72
72
  rubyforge_project:
73
73
  rubygems_version: 1.8.25