rabbitmq 1.1.3 → 1.1.4

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: 1749ac3c7bfd2721f2f9f48c5ba5ede63a2d0deb
4
- data.tar.gz: 305c391b8dcfd9ae007e4b8c5851d7ff078212fa
3
+ metadata.gz: 6f7f5531b0607d524ad9df9035c824c19c71ad6c
4
+ data.tar.gz: 233f9131b8a37d444a7bc31f86a6a3d32bf5875a
5
5
  SHA512:
6
- metadata.gz: e9fd333f784c4c909446db25edff71e15789550c1a0b9a815279070c3b0800a339a4cb26a5a2611ee6cf7cdb1078ea566f9ffe05a155cb44971b0c08471cee40
7
- data.tar.gz: 17339c5fce83ae1335ee8151bceea6d50002536299d1b44fbc8f722b8dc3eb324ccd61e565bbcb8eb4acebee0808d16f2a2fb765538c442351be55de4a67fcfe
6
+ metadata.gz: 724c1816c992c10d54d146fc14b3c1088cab96816cf489746477851237904e96856b49ca249129eadeccfd92f82384ab6964ba9c85a2a5763824d2d69f3a4e8e
7
+ data.tar.gz: d39a4ecb25ad1796195a2d39aa7dc8eb7b10ed5ec62d34758134c5bf67f6b113c0ca9c6e3c7fd704e7670705e0bd1ca614f15244e1e4177d1f49eddb4664d627
@@ -14,26 +14,26 @@ module RabbitMQ
14
14
  end
15
15
 
16
16
  def as_method_to_h(free=false)
17
- # TODO: raise correct error class with enough info for appropriate action
18
- raise "Wrong frame type for method frame of event: #{self[:frame_type]}" \
19
- unless self[:frame_type] == :method
17
+ raise FFI::Error::BadAmqpData,
18
+ "Wrong frame type for method frame of event: #{self[:frame_type]}" \
19
+ unless self[:frame_type] == :method
20
20
 
21
21
  payload.to_h(free).merge(channel: self[:channel])
22
22
  end
23
23
 
24
24
  def as_header_to_h(free=false)
25
- # TODO: raise correct error class with enough info for appropriate action
26
- raise "Wrong frame type for header frame of multiframe event: #{self[:frame_type]}" \
27
- unless self[:frame_type] == :header
25
+ raise FFI::Error::BadAmqpData,
26
+ "Wrong frame type for header frame of multiframe event: #{self[:frame_type]}" \
27
+ unless self[:frame_type] == :header
28
28
 
29
29
  properties = self[:payload][:properties]
30
30
  { header: properties.decoded.to_h(free), body_size: properties[:body_size] }
31
31
  end
32
32
 
33
33
  def as_body_to_s(free=false)
34
- # TODO: raise correct error class with enough info for appropriate action
35
- raise "Wrong frame type for body frame of multiframe event: #{self[:frame_type]}" \
36
- unless self[:frame_type] == :body
34
+ raise FFI::Error::BadAmqpData,
35
+ "Wrong frame type for body frame of multiframe event: #{self[:frame_type]}" \
36
+ unless self[:frame_type] == :body
37
37
 
38
38
  self[:payload][:body_fragment].to_s(free)
39
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe McIlvain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-04 00:00:00.000000000 Z
11
+ date: 2015-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  version: '0'
229
229
  requirements: []
230
230
  rubyforge_project:
231
- rubygems_version: 2.2.2
231
+ rubygems_version: 2.4.5
232
232
  signing_key:
233
233
  specification_version: 4
234
234
  summary: rabbitmq