restify 1.8.0 → 1.9.0.rc1

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
  SHA256:
3
- metadata.gz: 6209f25a9b9d70898ee86458568d669ee588dd7d01a0918855ca39c6995332dd
4
- data.tar.gz: 32e35cd463f1ce87d76cf0ded3bcf3f8266f305a5d10aafbc62fb47ff3145315
3
+ metadata.gz: 56819d6525aa39551a5d638f500585ca7c06ed931ceb0e272bed65cd823db3c8
4
+ data.tar.gz: 803ddcde2d84ceb8b860f73a016844aa2aa08cceeeeec307aa6bc9fde87cf0bf
5
5
  SHA512:
6
- metadata.gz: eb70a7e9edb83c76074566b8607c9439b585b8c95925806a84b343dee96872f2d497fb96edf2120109c8cbcc337a141c8c6447ad35ed88b83c51dddcdb2cb0c0
7
- data.tar.gz: 38cc84e8835134df693ef1161cf1696d15823e28077d5c5c4214c939298db79a01127c3147fe1f9ecdbce08de5a782a592da2bc7d9bfc79afdb7e70d194f0324
6
+ metadata.gz: a5e62bcb309b29872ac78da6d4cb3ea489da01fd4501c7fadc6beaa299a4fc6d23e9428eef49d82032c055598bc763a006d3d91c4e102c2f98d22db4d9f7c5c0
7
+ data.tar.gz: a5e4ade033f7f83fa5d195dd7d034399e96c561121a756dc995577f8e345a9e5aaac9272818902a4f3b9c742d1018c35ee7a39cee1292f2320eece3ce69810a6
@@ -59,7 +59,7 @@ module Restify
59
59
 
60
60
  ret = cache.call(request) {|req| adapter.call(req) }
61
61
  ret.then do |response|
62
- if response.success?
62
+ if !response.errored?
63
63
  process response
64
64
  else
65
65
  Context.raise_response_error(response)
@@ -123,6 +123,15 @@ module Restify
123
123
  (200...300).cover? code
124
124
  end
125
125
 
126
+ # Check if response is erroneous e.g. the status code
127
+ # is one of 4XX or 5XX.
128
+ #
129
+ # @return [Boolean] True if status code is 2XX otherwise false.
130
+ #
131
+ def errored?
132
+ (400...600).cover? code
133
+ end
134
+
126
135
  # @api private
127
136
  def decoded_body
128
137
  @decoded_body ||= begin
@@ -3,9 +3,9 @@
3
3
  module Restify
4
4
  module VERSION
5
5
  MAJOR = 1
6
- MINOR = 8
6
+ MINOR = 9
7
7
  PATCH = 0
8
- STAGE = nil
8
+ STAGE = :rc1
9
9
  STRING = [MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join('.').freeze
10
10
 
11
11
  def self.to_s
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-22 00:00:00.000000000 Z
11
+ date: 2018-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -215,9 +215,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
215
215
  version: '0'
216
216
  required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  requirements:
218
- - - ">="
218
+ - - ">"
219
219
  - !ruby/object:Gem::Version
220
- version: '0'
220
+ version: 1.3.1
221
221
  requirements: []
222
222
  rubyforge_project:
223
223
  rubygems_version: 2.7.7