jellyfish 0.9.1 → 0.9.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbbc428cd07afe7548eb82457f5f01f092198fd8
4
- data.tar.gz: 5f669713f1f3bd5b1a69868116c776739cbaeb37
3
+ metadata.gz: c9698c593098db6a1123491fae8d2d4777697dfd
4
+ data.tar.gz: 033cb54f5d56f48f32bc0e44cad8feb573ec6bdb
5
5
  SHA512:
6
- metadata.gz: d3fabf40031fcf2eee773f38d4fc0a021d9d749d69e47aad0e322aa0744e611f3e1e8b69dc85a0f1a39b7bf96d5a7c629cdd2564e1b9ce992f05c557044d22ec
7
- data.tar.gz: 12247188a14f764dba3e66dbf81a31ee6e5162434a376f32d29013c5a3b5910d4fef3fbaec3256d191b7179bd790fb217c7a3f581dda342da01e50a77bb43d1c
6
+ metadata.gz: 62d9b38427f883c2fd1c6a6c7725693e4a4e7bf346211d58de25b9a9fc1d1e6987bf62c27ba3101f443383e3d29bbb0b063a160b6c2818407003d5a6616bee9b
7
+ data.tar.gz: 9918c2af70dcfa60c35ccfae7f4d506d58c582d33cb85e7d96cdd1aa89954ec592efb007eb2a6d0b5511471128208e12521292779d10054208b8dac065d02601
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGES
2
2
 
3
+ ## Jellyfish 0.9.2 -- 2013-09-26
4
+
5
+ * Do not rescue Exception since we don't really want to rescue something
6
+ like SignalException, which would break signal handling.
7
+
3
8
  ## Jellyfish 0.9.1 -- 2013-08-23
4
9
 
5
10
  * Fixed a thread safety bug for initializing exception handlers.
data/README.md CHANGED
@@ -728,7 +728,7 @@ GET /status
728
728
  require 'jellyfish'
729
729
  class Protector
730
730
  include Jellyfish
731
- handle Exception do |e|
731
+ handle StandardError do |e|
732
732
  "Protected: #{e}\n"
733
733
  end
734
734
  end
data/jellyfish.gemspec CHANGED
@@ -1,12 +1,13 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ # stub: jellyfish 0.9.2 ruby lib
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = "jellyfish"
5
- s.version = "0.9.1"
6
+ s.version = "0.9.2"
6
7
 
7
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
9
  s.authors = ["Lin Jen-Shin (godfat)"]
9
- s.date = "2013-08-23"
10
+ s.date = "2013-09-26"
10
11
  s.description = "Pico web framework for building API-centric web applications.\nFor Rack applications or Rack middlewares. Around 250 lines of code."
11
12
  s.email = ["godfat (XD) godfat.org"]
12
13
  s.files = [
@@ -46,7 +47,7 @@ Gem::Specification.new do |s|
46
47
  s.homepage = "https://github.com/godfat/jellyfish"
47
48
  s.licenses = ["Apache License 2.0"]
48
49
  s.require_paths = ["lib"]
49
- s.rubygems_version = "2.0.6"
50
+ s.rubygems_version = "2.1.5"
50
51
  s.summary = "Pico web framework for building API-centric web applications."
51
52
  s.test_files = [
52
53
  "test/sinatra/test_base.rb",
data/lib/jellyfish.rb CHANGED
@@ -183,7 +183,7 @@ module Jellyfish
183
183
  else
184
184
  res || ctrl.block_call(nil, Identity)
185
185
  end
186
- rescue Exception => e
186
+ rescue => e
187
187
  handle(ctrl, e, env['rack.errors'])
188
188
  end
189
189
 
@@ -200,7 +200,7 @@ module Jellyfish
200
200
  private
201
201
  def forward ctrl, env
202
202
  app.call(env)
203
- rescue Exception => e
203
+ rescue => e
204
204
  handle(ctrl, e, env['rack.errors'])
205
205
  end
206
206
 
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Jellyfish
3
- VERSION = '0.9.1'
3
+ VERSION = '0.9.2'
4
4
  end
@@ -29,23 +29,23 @@ describe 'Sinatra mapped_error_test.rb' do
29
29
  get('/', app)
30
30
  end
31
31
 
32
- should 'use the Exception handler if no matching handler found' do
32
+ should 'use the StandardError handler if no matching handler found' do
33
33
  app = Class.new{
34
34
  include Jellyfish
35
- handle(Exception){ 'Exception!' }
35
+ handle(StandardError){ 'StandardError!' }
36
36
  get('/'){ raise exp }
37
37
  }.new
38
38
 
39
39
  status, _, body = get('/', app)
40
40
  status.should.eq 200
41
- body .should.eq ['Exception!']
41
+ body .should.eq ['StandardError!']
42
42
  end
43
43
 
44
44
  should 'favour subclass handler over superclass handler if available' do
45
45
  app = Class.new{
46
46
  include Jellyfish
47
- handle(Exception) { 'Exception!' }
48
- handle(RuntimeError){ 'RuntimeError!' }
47
+ handle(StandardError){ 'StandardError!' }
48
+ handle(RuntimeError) { 'RuntimeError!' }
49
49
  get('/'){ raise exp }
50
50
  }.new
51
51
 
data/test/test_threads.rb CHANGED
@@ -11,7 +11,7 @@ describe Jellyfish do
11
11
 
12
12
  app = Class.new{
13
13
  include Jellyfish
14
- handle(Exception){ |env| 0 }
14
+ handle(StandardError){ |env| 0 }
15
15
  }.new
16
16
 
17
17
  exp = RuntimeError.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jellyfish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lin Jen-Shin (godfat)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-23 00:00:00.000000000 Z
11
+ date: 2013-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project:
117
- rubygems_version: 2.0.6
117
+ rubygems_version: 2.1.5
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Pico web framework for building API-centric web applications.