march_hare 2.21.0-java → 2.22.0-java

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: 028be0b1555a16e2fb8b74494c70ab50911fe2bc
4
- data.tar.gz: a9ea1d2d1959eec838b0c47bea9c69ebfa3716b7
3
+ metadata.gz: a889247b3117153a7ad84bd1ec2e4782e3d6a2ee
4
+ data.tar.gz: 9351d6dc9dfeae13a3d69c7cf0cfa4db2e83d4b8
5
5
  SHA512:
6
- metadata.gz: 1a28e14c1594711de0ca9909465197868a534a79fcc97911983930d533297e96becfd93335129ed95660c9156414a499f114306af4a61303f2534d1e81ef708e
7
- data.tar.gz: 1d66a5bea34d3c78914eeed8956b0b0887b118d0a51fc88ecce4d9dc757883e31b4991b13de6def6d8813c058df4838d0e433aa162ff94bcea233171d98940f0
6
+ metadata.gz: b0adce10eeff54a014a666f1df771ab98488515cd3c8b723cae40004db9e937de6df1a11c3665953e73df01542a50e388308f1ba0ba36dfc4461c26931740603
7
+ data.tar.gz: e0ab94b741fb34fc7ce7a676a0befeabb18acc88120547105ad151e17db783db1221a2bb9879d17829dad427d55b5de3a69e35b90a34af671082846bcf08c738
@@ -813,7 +813,7 @@ module MarchHare
813
813
  # Waits until all outstanding publisher confirms arrive.
814
814
  #
815
815
  # Takes an optional timeout in milliseconds. Will raise
816
- # an exception in timeout has occured.
816
+ # an exception in case a timeout has occured.
817
817
  #
818
818
  # @param [Integer] timeout Timeout in milliseconds
819
819
  # @return [Boolean] true if all confirms were positive,
@@ -43,7 +43,6 @@ module MarchHare
43
43
  :content_encoding,
44
44
  :content_type,
45
45
  :content_encoding,
46
- :headers,
47
46
  :delivery_mode,
48
47
  :priority,
49
48
  :correlation_id,
@@ -60,6 +59,10 @@ module MarchHare
60
59
  end # each
61
60
  end
62
61
 
62
+ def headers
63
+ deep_normalize_headers(@properties.headers)
64
+ end
65
+
63
66
  def persistent?
64
67
  delivery_mode == 2
65
68
  end
@@ -71,6 +74,25 @@ module MarchHare
71
74
  def redelivery?
72
75
  redeliver
73
76
  end
77
+
78
+ # Turns LongString instances into String
79
+ private
80
+ LONG_STRING_TYPE = com.rabbitmq.client.LongString
81
+ def deep_normalize_headers(value)
82
+ if value.is_a?(java.util.Map)
83
+ new_map = {}
84
+ value.each {|k,v| new_map[k] = deep_normalize_headers(v)}
85
+ new_map
86
+ elsif value.is_a?(java.util.List)
87
+ value.map {|v| deep_normalize_headers(v)}
88
+ else
89
+ if value.java_kind_of?(LONG_STRING_TYPE)
90
+ value.to_s
91
+ else
92
+ value
93
+ end
94
+ end
95
+ end
74
96
  end # Headers
75
97
 
76
98
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module MarchHare
4
- VERSION = "2.21.0"
4
+ VERSION = "2.22.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: march_hare
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.21.0
4
+ version: 2.22.0
5
5
  platform: java
6
6
  authors:
7
7
  - Theo Hultberg
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-23 00:00:00.000000000 Z
12
+ date: 2017-01-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: RabbitMQ client for JRuby built around the official RabbitMQ Java client
15
15
  email: