committee 1.7.1 → 1.7.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: 3e94b1d2b86d37d5a8caf1038b86f586b1abcc0e
4
- data.tar.gz: 6c8eeb7064f3153067f00a0435a5a05531e054e9
3
+ metadata.gz: 4db940a56b1cd87d070a6d084aad49a6c3ea75d7
4
+ data.tar.gz: 7cec1cdb5da554e7cd9851c8edfaed73e3007d52
5
5
  SHA512:
6
- metadata.gz: 409d877ea286153b57ca5b3492c53ea86b2b307777c01f64f84612fc5ce22c7125d3ab9f1ec9baab9ebcacbd27bf6d0f18526e847b5b1d34d5853255ca4c69b5
7
- data.tar.gz: 04777cf0d9a53e69f9cbc702cd1c6f83c338fbb2e4c1d7e65d40c387e8428fdc16071a2c7397642a2af508b49704fc2234d74c0890d1cb4daa2d3f4aacbea77c
6
+ metadata.gz: 1593142fbaee0fe7ec0aa232ed517546a4ad5a612d92e7fc370791b164dab2e0529c378d6385a477adf4aa765c4f92249d58ce202bcb963b9e39cb2fb1801053
7
+ data.tar.gz: 7e83215c71913202b83d0304baebe3f742b8d74a8d22addef2361d947643bd86b3e838e2f745d4cc0ae62195a16cadb6b2541c9b7f863a048cf0df0de7ce0711
@@ -36,8 +36,12 @@ module Committee
36
36
 
37
37
  private
38
38
 
39
+ def response_media_type(response)
40
+ response.content_type.to_s.split(";").first.to_s
41
+ end
42
+
39
43
  def check_content_type!(response)
40
- unless Rack::Mime.match?(response.content_type.to_s, @link.enc_type)
44
+ unless Rack::Mime.match?(response_media_type(response), @link.enc_type)
41
45
  raise Committee::InvalidResponse,
42
46
  %{"Content-Type" response header must be set to "#{@link.enc_type}".}
43
47
  end
@@ -21,6 +21,11 @@ describe Committee::ResponseValidator do
21
21
  call
22
22
  end
23
23
 
24
+ it "passes through a valid response with Content-Type options" do
25
+ @headers = { "Content-Type" => "application/json; charset=utf-8" }
26
+ call
27
+ end
28
+
24
29
  it "passes through a valid list response" do
25
30
  @data = [@data]
26
31
  @link = @list_link
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.7.1
4
+ version: 1.7.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: 2015-03-05 00:00:00.000000000 Z
12
+ date: 2015-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_schema
@@ -161,8 +161,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  version: '0'
162
162
  requirements: []
163
163
  rubyforge_project:
164
- rubygems_version: 2.4.5
164
+ rubygems_version: 2.2.2
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: A collection of Rack middleware to support JSON Schema.
168
168
  test_files: []
169
+ has_rdoc: