committee 1.5.2 → 1.6.2

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: d81f47d2d3b01e41ad680cfd912940ef3f40f66e
4
- data.tar.gz: 1d71cb79efc366f9d270290924ff5d8b61f38699
3
+ metadata.gz: 3c1a215cb7740938fdf30e58ee122320d5cdddd4
4
+ data.tar.gz: 1388d0711d069c004807d2c2420a25552f2f058b
5
5
  SHA512:
6
- metadata.gz: 9be392115770ca98523c10ba45e2a56bd16a92ffc3f29782af386d27e1809e12c78ea00eace5b49f7a34048ee3790394e481a1c6eb4390bb15c65874caccd646
7
- data.tar.gz: 5947b7124d67460a576d384807f61d4d10f79bab30eb1e21e06f71abf78c5c9e6037674b84e5e210a872ae25a31eb54ca83c5899299db40bbd807906068cc4e9
6
+ metadata.gz: d07eee23cbcae49bf7b284701ba3c525fdc72259d63469a5a907ebe533890aa6f5ad8b5f496a044ea536b1bd7a0ee771be91a09999f19765d830e02639139f82
7
+ data.tar.gz: 7d49178e2e79052b48bc60509f3bedf98470675d990f840e9257f425f328068d375ebafc5a01257be499d4fb085d6a2a88666bb035dad89725378943697710ad
@@ -28,7 +28,7 @@ module Committee::Middleware
28
28
  end
29
29
 
30
30
  def validate?(status)
31
- @validate_errors || (200...300).include?(status)
31
+ status != 204 and @validate_errors || (200...300).include?(status)
32
32
  end
33
33
  end
34
34
  end
@@ -26,6 +26,12 @@ describe Committee::Middleware::ResponseValidation do
26
26
  assert_equal 404, last_response.status
27
27
  end
28
28
 
29
+ it "passes through a 204 (no content) response" do
30
+ @app = new_rack_app("", {}, app_status: 204)
31
+ get "/apps"
32
+ assert_equal 204, last_response.status
33
+ end
34
+
29
35
  it "rescues JSON errors" do
30
36
  @app = new_rack_app("[{x:y}]")
31
37
  get "/apps"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: committee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandur
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-14 00:00:00.000000000 Z
12
+ date: 2014-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_schema
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0.1'
20
+ version: '0.3'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '0.1'
27
+ version: '0.3'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: multi_json
30
30
  requirement: !ruby/object:Gem::Requirement