grape-batch 1.0.1 → 1.0.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: db1806d354260f5e8cdd8cd4a8204cac75de506a
4
- data.tar.gz: e01094dc5260032ea96a73faf9cc8b4d601470e3
3
+ metadata.gz: 5a517a0d3926d273000e7259b84423dd40a45944
4
+ data.tar.gz: 789334e06c793af86de50fd4acc500077e08eef9
5
5
  SHA512:
6
- metadata.gz: d755be590d55adf502c581dea10ccaf7e8181c71cbedc799e4acf7bb1ab37243625eff699dcfb14ef443848ae9f7a9c971ad4101b6d81216b48a887982aa09b1
7
- data.tar.gz: 6d040c4336d8c1caa0cea6b497029b6012f4131c14f93ecddda324669d4327a1b79245e97bfbe12d090184a5642769b79458abb218113889c5aa6b0f7c593966
6
+ metadata.gz: 9995c121e9d6a16727d441437c8c529d9a4e1617d3b7a1ef33f2257f5f632a872e43f751cc2f72c4d621cd31ef966a32e5f37d54905d458c5ab513b4d16371d6
7
+ data.tar.gz: 06d85f22c110749398f9058485e7e44c45c260fbccdb542bc8f2022aedfa22c247e54660da6198269edd8b1106f0d2c04a3e968e1f9ce9705e93f48c244adc4e
@@ -1,5 +1,5 @@
1
1
  module Grape
2
2
  module Batch
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
5
5
  end
data/lib/grape/batch.rb CHANGED
@@ -28,10 +28,10 @@ module Grape
28
28
  body = MultiJson.encode(result)
29
29
  rescue Grape::Batch::RequestBodyError, Grape::Batch::TooManyRequestsError => e
30
30
  e.class == TooManyRequestsError ? status = 429 : status = 400
31
- body = [e.message]
31
+ body = e.message
32
32
  end
33
33
 
34
- [status, headers, body]
34
+ [status, headers, [body]]
35
35
  end
36
36
 
37
37
  private
@@ -131,7 +131,7 @@ RSpec.describe Grape::Batch::Base do
131
131
  describe '404 errors' do
132
132
  let(:request_body) { encode({requests: [{method: 'GET', path: '/api/v1/unknown'}]}) }
133
133
  it { expect(response.status).to eq(200) }
134
- it { expect(response.body).to eq(encode([{code: 404, message: '/api/v1/unknown not found'}])) }
134
+ it { expect(response.body).to eq(encode([{code: 404, error: '/api/v1/unknown not found'}])) }
135
135
  end
136
136
  end
137
137
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-batch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lionel Oto
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-07 00:00:00.000000000 Z
12
+ date: 2014-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack