startback 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3117a103e54b43bf6703778fd08002b65d33bfd7
4
- data.tar.gz: 119886b87454ac00d437a106039aedbf3245859d
3
+ metadata.gz: 9f1310630a538267bf38193493fba48f9e97cae6
4
+ data.tar.gz: e4fd13e830e706e131f132d153282fb5ee71b2e3
5
5
  SHA512:
6
- metadata.gz: 9080577d0443af321abc8def35d0623837ba9a0624ab29341022e895769d3e9c702fec3b0cfd73b99fd1eb0331163b63513e0d8fe3d6aecb1dec567db74f10f7
7
- data.tar.gz: a3d0f8ba4c1d98e084f4989f8868471313c3dccd8931cf31c5be4cec8af794eb2434eff04502e3b69ab615cb793e3ec96b2fdc0a72ceb3ef0fbd47aa23c874fc
6
+ metadata.gz: 7b1834a0ddd45c1dc9a487d58bc3d79c0ab8e42089cf22a79236fe4501e8ea3fe3c357defc06e3d8c5436ba3cc8828781834f1ec674a38a46f57f1f0d5c6ec95
7
+ data.tar.gz: 0a3852e622d89e1c5fe5a304c0dd5a99d04fd834cfd9d8a69f41c9603406c53a02c0b69f8feec5ce29bc9804653a4c1929f6e7ffc6896bdd92d9003b52dbe71e
@@ -5,7 +5,11 @@ module Startback
5
5
  class << self
6
6
 
7
7
  def status(code = nil)
8
- @code = code || @code
8
+ if code.nil?
9
+ @code || (superclass.respond_to?(:status) ? superclass.status : 500)
10
+ else
11
+ @code = code || @code
12
+ end
9
13
  end
10
14
 
11
15
  def keep_error(keep = nil)
@@ -2,7 +2,7 @@ module Startback
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- TINY = 0
5
+ TINY = 1
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
@@ -26,7 +26,9 @@ module Startback
26
26
  self.on(Finitio::TypeError) { 400 }
27
27
 
28
28
  # Various other codes for the framework specific error classes
29
- self.on(Startback::Errors::Error) {|ex| ex.class.status }
29
+ self.on(Startback::Errors::Error) {|ex|
30
+ ex.class.status
31
+ }
30
32
 
31
33
  # A bit of logic to choose the best error message for the user
32
34
  # according to the error class
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: startback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-12 00:00:00.000000000 Z
11
+ date: 2018-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake