amq-protocol 2.3.3 → 2.8.0
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 +4 -4
- data/ChangeLog.md +85 -2
- data/LICENSE +1 -1
- data/README.md +2 -7
- data/lib/amq/bit_set.rb +2 -1
- data/lib/amq/endianness.rb +2 -0
- data/lib/amq/int_allocator.rb +3 -3
- data/lib/amq/pack.rb +33 -42
- data/lib/amq/protocol/channel_close.rb +24 -0
- data/lib/amq/protocol/client.rb +31 -40
- data/lib/amq/protocol/constants.rb +2 -0
- data/lib/amq/protocol/exceptions.rb +3 -1
- data/lib/amq/protocol/float_32bit.rb +2 -0
- data/lib/amq/protocol/frame.rb +16 -10
- data/lib/amq/protocol/table.rb +20 -17
- data/lib/amq/protocol/table_value_decoder.rb +49 -53
- data/lib/amq/protocol/table_value_encoder.rb +2 -1
- data/lib/amq/protocol/type_constants.rb +1 -0
- data/lib/amq/protocol/version.rb +1 -1
- data/lib/amq/protocol.rb +1 -0
- data/lib/amq/settings.rb +1 -0
- data/lib/amq/uri.rb +30 -17
- metadata +5 -45
- data/.github/ISSUE_TEMPLATE.md +0 -18
- data/.github/workflows/ci.yml +0 -31
- data/.gitignore +0 -18
- data/.gitmodules +0 -3
- data/.rspec +0 -1
- data/.travis.yml +0 -17
- data/Gemfile +0 -22
- data/Rakefile +0 -55
- data/amq-protocol.gemspec +0 -27
- data/benchmarks/int_allocator.rb +0 -34
- data/benchmarks/pure/body_framing_with_256k_payload.rb +0 -28
- data/benchmarks/pure/body_framing_with_2k_payload.rb +0 -28
- data/codegen/__init__.py +0 -0
- data/codegen/amqp_0.9.1_changes.json +0 -1
- data/codegen/codegen.py +0 -151
- data/codegen/codegen_helpers.py +0 -162
- data/codegen/protocol.rb.pytemplate +0 -320
- data/generate.rb +0 -24
- data/profiling/README.md +0 -9
- data/profiling/stackprof/body_framing_with_2k_payload.rb +0 -33
- data/spec/amq/bit_set_spec.rb +0 -227
- data/spec/amq/int_allocator_spec.rb +0 -113
- data/spec/amq/pack_spec.rb +0 -68
- data/spec/amq/protocol/basic_spec.rb +0 -325
- data/spec/amq/protocol/blank_body_encoding_spec.rb +0 -9
- data/spec/amq/protocol/channel_spec.rb +0 -127
- data/spec/amq/protocol/confirm_spec.rb +0 -41
- data/spec/amq/protocol/connection_spec.rb +0 -146
- data/spec/amq/protocol/constants_spec.rb +0 -10
- data/spec/amq/protocol/exchange_spec.rb +0 -106
- data/spec/amq/protocol/frame_spec.rb +0 -92
- data/spec/amq/protocol/method_spec.rb +0 -43
- data/spec/amq/protocol/queue_spec.rb +0 -126
- data/spec/amq/protocol/table_spec.rb +0 -259
- data/spec/amq/protocol/tx_spec.rb +0 -55
- data/spec/amq/protocol/value_decoder_spec.rb +0 -86
- data/spec/amq/protocol/value_encoder_spec.rb +0 -140
- data/spec/amq/protocol_spec.rb +0 -812
- data/spec/amq/settings_spec.rb +0 -22
- data/spec/amq/uri_parsing_spec.rb +0 -280
- data/spec/spec_helper.rb +0 -29
data/lib/amq/protocol/table.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# encoding: binary
|
|
2
|
+
# frozen_string_literal: true
|
|
2
3
|
|
|
3
4
|
require "amq/protocol/type_constants"
|
|
4
5
|
require "amq/protocol/table_value_encoder"
|
|
@@ -14,6 +15,8 @@ module AMQ
|
|
|
14
15
|
|
|
15
16
|
include TypeConstants
|
|
16
17
|
|
|
18
|
+
# Pack format string
|
|
19
|
+
PACK_UINT32_BE = 'N'.freeze
|
|
17
20
|
|
|
18
21
|
#
|
|
19
22
|
# API
|
|
@@ -27,16 +30,16 @@ module AMQ
|
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
def self.encode(table)
|
|
30
|
-
buffer =
|
|
33
|
+
buffer = +''
|
|
31
34
|
|
|
32
35
|
table ||= {}
|
|
33
36
|
|
|
34
37
|
table.each do |key, value|
|
|
35
38
|
key = key.to_s # it can be a symbol as well
|
|
36
|
-
buffer << key.bytesize.chr
|
|
39
|
+
buffer << key.bytesize.chr << key
|
|
37
40
|
|
|
38
41
|
case value
|
|
39
|
-
when Hash
|
|
42
|
+
when Hash
|
|
40
43
|
buffer << TYPE_HASH
|
|
41
44
|
buffer << self.encode(value)
|
|
42
45
|
else
|
|
@@ -44,15 +47,15 @@ module AMQ
|
|
|
44
47
|
end
|
|
45
48
|
end
|
|
46
49
|
|
|
47
|
-
[buffer.bytesize].pack(
|
|
50
|
+
[buffer.bytesize].pack(PACK_UINT32_BE) << buffer
|
|
48
51
|
end
|
|
49
52
|
|
|
50
53
|
|
|
51
54
|
|
|
52
55
|
|
|
53
56
|
def self.decode(data)
|
|
54
|
-
table =
|
|
55
|
-
table_length = data.
|
|
57
|
+
table = {}
|
|
58
|
+
table_length = data.unpack1(PACK_UINT32_BE)
|
|
56
59
|
|
|
57
60
|
return table if table_length.zero?
|
|
58
61
|
|
|
@@ -86,19 +89,19 @@ module AMQ
|
|
|
86
89
|
when TYPE_BOOLEAN
|
|
87
90
|
v, offset = TableValueDecoder.decode_boolean(data, offset)
|
|
88
91
|
v
|
|
89
|
-
|
|
92
|
+
when TYPE_BYTE
|
|
90
93
|
v, offset = TableValueDecoder.decode_byte(data, offset)
|
|
91
94
|
v
|
|
92
|
-
when TYPE_SIGNED_16BIT
|
|
95
|
+
when TYPE_SIGNED_16BIT
|
|
93
96
|
v, offset = TableValueDecoder.decode_short(data, offset)
|
|
94
97
|
v
|
|
95
|
-
when TYPE_SIGNED_64BIT
|
|
98
|
+
when TYPE_SIGNED_64BIT
|
|
96
99
|
v, offset = TableValueDecoder.decode_long(data, offset)
|
|
97
100
|
v
|
|
98
|
-
when TYPE_32BIT_FLOAT
|
|
101
|
+
when TYPE_32BIT_FLOAT
|
|
99
102
|
v, offset = TableValueDecoder.decode_32bit_float(data, offset)
|
|
100
103
|
v
|
|
101
|
-
when TYPE_64BIT_FLOAT
|
|
104
|
+
when TYPE_64BIT_FLOAT
|
|
102
105
|
v, offset = TableValueDecoder.decode_64bit_float(data, offset)
|
|
103
106
|
v
|
|
104
107
|
when TYPE_VOID
|
|
@@ -112,11 +115,11 @@ module AMQ
|
|
|
112
115
|
end
|
|
113
116
|
|
|
114
117
|
table
|
|
115
|
-
end
|
|
118
|
+
end
|
|
116
119
|
|
|
117
120
|
|
|
118
121
|
def self.length(data)
|
|
119
|
-
data.
|
|
122
|
+
data.unpack1(PACK_UINT32_BE)
|
|
120
123
|
end
|
|
121
124
|
|
|
122
125
|
|
|
@@ -128,17 +131,17 @@ module AMQ
|
|
|
128
131
|
end
|
|
129
132
|
|
|
130
133
|
acc
|
|
131
|
-
end
|
|
134
|
+
end
|
|
132
135
|
|
|
133
136
|
|
|
134
137
|
def self.decode_table_key(data, offset)
|
|
135
|
-
key_length = data.
|
|
138
|
+
key_length = data.getbyte(offset)
|
|
136
139
|
offset += 1
|
|
137
|
-
key = data.
|
|
140
|
+
key = data.byteslice(offset, key_length)
|
|
138
141
|
offset += key_length
|
|
139
142
|
|
|
140
143
|
[key, offset]
|
|
141
|
-
end
|
|
144
|
+
end
|
|
142
145
|
|
|
143
146
|
|
|
144
147
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# encoding: binary
|
|
2
|
+
# frozen_string_literal: true
|
|
2
3
|
|
|
3
|
-
require "amq/endianness"
|
|
4
4
|
require "amq/protocol/type_constants"
|
|
5
5
|
require "amq/protocol/float_32bit"
|
|
6
6
|
|
|
@@ -15,15 +15,23 @@ module AMQ
|
|
|
15
15
|
|
|
16
16
|
include TypeConstants
|
|
17
17
|
|
|
18
|
+
# Pack format strings use explicit endianness (available as of Ruby 1.9.3)
|
|
19
|
+
PACK_UINT32_BE = 'N'.freeze
|
|
20
|
+
PACK_INT64_BE = 'q>'.freeze
|
|
21
|
+
PACK_INT16_BE = 's>'.freeze
|
|
22
|
+
PACK_UINT64_BE = 'Q>'.freeze
|
|
23
|
+
PACK_FLOAT32 = 'f'.freeze # single precision float (native endian, matches encoder)
|
|
24
|
+
PACK_FLOAT64 = 'G'.freeze # big-endian double precision float
|
|
25
|
+
PACK_UCHAR_UINT32 = 'CN'.freeze
|
|
18
26
|
|
|
19
27
|
#
|
|
20
28
|
# API
|
|
21
29
|
#
|
|
22
30
|
|
|
23
31
|
def self.decode_array(data, initial_offset)
|
|
24
|
-
array_length = data.
|
|
32
|
+
array_length = data.byteslice(initial_offset, 4).unpack1(PACK_UINT32_BE)
|
|
25
33
|
|
|
26
|
-
ary =
|
|
34
|
+
ary = []
|
|
27
35
|
offset = initial_offset + 4
|
|
28
36
|
|
|
29
37
|
while offset <= (initial_offset + array_length)
|
|
@@ -54,28 +62,28 @@ module AMQ
|
|
|
54
62
|
when TYPE_BOOLEAN
|
|
55
63
|
v, offset = decode_boolean(data, offset)
|
|
56
64
|
v
|
|
57
|
-
when TYPE_BYTE
|
|
65
|
+
when TYPE_BYTE
|
|
58
66
|
v, offset = decode_byte(data, offset)
|
|
59
67
|
v
|
|
60
|
-
when TYPE_SIGNED_16BIT
|
|
68
|
+
when TYPE_SIGNED_16BIT
|
|
61
69
|
v, offset = decode_short(data, offset)
|
|
62
70
|
v
|
|
63
|
-
when TYPE_SIGNED_64BIT
|
|
71
|
+
when TYPE_SIGNED_64BIT
|
|
64
72
|
v, offset = decode_long(data, offset)
|
|
65
73
|
v
|
|
66
|
-
when TYPE_32BIT_FLOAT
|
|
74
|
+
when TYPE_32BIT_FLOAT
|
|
67
75
|
v, offset = decode_32bit_float(data, offset)
|
|
68
76
|
v
|
|
69
|
-
when TYPE_64BIT_FLOAT
|
|
77
|
+
when TYPE_64BIT_FLOAT
|
|
70
78
|
v, offset = decode_64bit_float(data, offset)
|
|
71
79
|
v
|
|
72
80
|
when TYPE_VOID
|
|
73
81
|
nil
|
|
74
82
|
when TYPE_ARRAY
|
|
75
|
-
v, offset =
|
|
83
|
+
v, offset = decode_array(data, offset)
|
|
76
84
|
v
|
|
77
85
|
else
|
|
78
|
-
raise ArgumentError
|
|
86
|
+
raise ArgumentError, "unsupported type in a table value: #{type.inspect}, do not know how to decode!"
|
|
79
87
|
end
|
|
80
88
|
|
|
81
89
|
ary << i
|
|
@@ -83,113 +91,101 @@ module AMQ
|
|
|
83
91
|
|
|
84
92
|
|
|
85
93
|
[ary, initial_offset + array_length + 4]
|
|
86
|
-
end
|
|
94
|
+
end
|
|
87
95
|
|
|
88
96
|
|
|
89
97
|
def self.decode_string(data, offset)
|
|
90
|
-
length = data.
|
|
98
|
+
length = data.byteslice(offset, 4).unpack1(PACK_UINT32_BE)
|
|
91
99
|
offset += 4
|
|
92
|
-
v = data.
|
|
100
|
+
v = data.byteslice(offset, length)
|
|
93
101
|
offset += length
|
|
94
102
|
|
|
95
103
|
[v, offset]
|
|
96
|
-
end
|
|
104
|
+
end
|
|
97
105
|
|
|
98
106
|
|
|
99
107
|
def self.decode_integer(data, offset)
|
|
100
|
-
v = data.
|
|
108
|
+
v = data.byteslice(offset, 4).unpack1(PACK_UINT32_BE)
|
|
101
109
|
offset += 4
|
|
102
110
|
|
|
103
111
|
[v, offset]
|
|
104
|
-
end
|
|
105
|
-
|
|
112
|
+
end
|
|
106
113
|
|
|
107
|
-
if AMQ::Endianness.big_endian?
|
|
108
|
-
def self.decode_long(data, offset)
|
|
109
|
-
v = data.slice(offset, 8).unpack(PACK_INT64)
|
|
110
114
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
def self.decode_long(data, offset)
|
|
116
|
-
slice = data.slice(offset, 8).bytes.to_a.reverse.map(&:chr).join
|
|
117
|
-
v = slice.unpack(PACK_INT64).first
|
|
118
|
-
|
|
119
|
-
offset += 8
|
|
120
|
-
[v, offset]
|
|
121
|
-
end
|
|
115
|
+
def self.decode_long(data, offset)
|
|
116
|
+
v = data.byteslice(offset, 8).unpack1(PACK_INT64_BE)
|
|
117
|
+
offset += 8
|
|
118
|
+
[v, offset]
|
|
122
119
|
end
|
|
123
120
|
|
|
124
121
|
|
|
125
122
|
def self.decode_big_decimal(data, offset)
|
|
126
|
-
decimals, raw = data.
|
|
123
|
+
decimals, raw = data.byteslice(offset, 5).unpack(PACK_UCHAR_UINT32)
|
|
127
124
|
offset += 5
|
|
128
125
|
v = BigDecimal(raw.to_s) * (BigDecimal(TEN) ** -decimals)
|
|
129
126
|
|
|
130
127
|
[v, offset]
|
|
131
|
-
end
|
|
128
|
+
end
|
|
132
129
|
|
|
133
130
|
|
|
134
131
|
def self.decode_time(data, offset)
|
|
135
|
-
timestamp = data.
|
|
132
|
+
timestamp = data.byteslice(offset, 8).unpack1(PACK_UINT64_BE)
|
|
136
133
|
v = Time.at(timestamp)
|
|
137
134
|
offset += 8
|
|
138
135
|
|
|
139
136
|
[v, offset]
|
|
140
|
-
end
|
|
137
|
+
end
|
|
141
138
|
|
|
142
139
|
|
|
143
140
|
def self.decode_boolean(data, offset)
|
|
144
|
-
|
|
141
|
+
byte = data.getbyte(offset)
|
|
145
142
|
offset += 1
|
|
146
|
-
[(
|
|
147
|
-
end
|
|
143
|
+
[(byte == 1), offset]
|
|
144
|
+
end
|
|
148
145
|
|
|
149
146
|
|
|
150
147
|
def self.decode_32bit_float(data, offset)
|
|
151
|
-
v = data.
|
|
148
|
+
v = data.byteslice(offset, 4).unpack1(PACK_FLOAT32)
|
|
152
149
|
offset += 4
|
|
153
150
|
|
|
154
151
|
[v, offset]
|
|
155
|
-
end
|
|
152
|
+
end
|
|
156
153
|
|
|
157
154
|
|
|
158
155
|
def self.decode_64bit_float(data, offset)
|
|
159
|
-
v = data.
|
|
156
|
+
v = data.byteslice(offset, 8).unpack1(PACK_FLOAT64)
|
|
160
157
|
offset += 8
|
|
161
158
|
|
|
162
159
|
[v, offset]
|
|
163
|
-
end
|
|
160
|
+
end
|
|
164
161
|
|
|
165
162
|
|
|
166
163
|
def self.decode_value_type(data, offset)
|
|
167
|
-
[data.
|
|
168
|
-
end
|
|
169
|
-
|
|
164
|
+
[data.byteslice(offset, 1), offset + 1]
|
|
165
|
+
end
|
|
170
166
|
|
|
171
167
|
|
|
172
168
|
def self.decode_hash(data, offset)
|
|
173
|
-
length = data.
|
|
174
|
-
v = Table.decode(data.
|
|
169
|
+
length = data.byteslice(offset, 4).unpack1(PACK_UINT32_BE)
|
|
170
|
+
v = Table.decode(data.byteslice(offset, length + 4))
|
|
175
171
|
offset += 4 + length
|
|
176
172
|
|
|
177
173
|
[v, offset]
|
|
178
|
-
end
|
|
174
|
+
end
|
|
179
175
|
|
|
180
176
|
|
|
181
177
|
# Decodes/Converts a byte value from the data at the provided offset.
|
|
182
178
|
#
|
|
183
|
-
# @param [
|
|
184
|
-
# @param [
|
|
185
|
-
# @return [Array] - The
|
|
179
|
+
# @param [String] data - Binary data string
|
|
180
|
+
# @param [Integer] offset - The offset from which to read the byte
|
|
181
|
+
# @return [Array] - The Integer value and new offset pair
|
|
186
182
|
def self.decode_byte(data, offset)
|
|
187
|
-
[data.
|
|
183
|
+
[data.getbyte(offset), offset + 1]
|
|
188
184
|
end
|
|
189
185
|
|
|
190
186
|
|
|
191
187
|
def self.decode_short(data, offset)
|
|
192
|
-
v =
|
|
188
|
+
v = data.byteslice(offset, 2).unpack1(PACK_INT16_BE)
|
|
193
189
|
offset += 2
|
|
194
190
|
[v, offset]
|
|
195
191
|
end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# encoding: binary
|
|
2
|
+
# frozen_string_literal: true
|
|
2
3
|
|
|
3
4
|
require "amq/protocol/type_constants"
|
|
4
5
|
require "date"
|
|
@@ -71,7 +72,7 @@ module AMQ
|
|
|
71
72
|
accumulator << [0, value.to_i].pack(PACK_UCHAR_UINT32)
|
|
72
73
|
end
|
|
73
74
|
else
|
|
74
|
-
raise ArgumentError
|
|
75
|
+
raise ArgumentError, "Unsupported value #{value.inspect} of type #{value.class.name}"
|
|
75
76
|
end # if
|
|
76
77
|
end # case
|
|
77
78
|
|
data/lib/amq/protocol/version.rb
CHANGED
data/lib/amq/protocol.rb
CHANGED
data/lib/amq/settings.rb
CHANGED
data/lib/amq/uri.rb
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
if RUBY_VERSION < "3.5"
|
|
4
|
+
require "cgi/util"
|
|
5
|
+
else
|
|
6
|
+
require "cgi/escape"
|
|
7
|
+
end
|
|
4
8
|
require "uri"
|
|
5
9
|
|
|
6
10
|
module AMQ
|
|
@@ -27,7 +31,9 @@ module AMQ
|
|
|
27
31
|
|
|
28
32
|
def self.parse(connection_string)
|
|
29
33
|
uri = ::URI.parse(connection_string)
|
|
30
|
-
|
|
34
|
+
unless %w{amqp amqps}.include?(uri.scheme)
|
|
35
|
+
raise ArgumentError, "Connection URI must use amqp or amqps schema (example: amqp://bus.megacorp.internal:5766), learn more at http://bit.ly/ks8MXK"
|
|
36
|
+
end
|
|
31
37
|
|
|
32
38
|
opts = DEFAULTS.dup
|
|
33
39
|
|
|
@@ -38,33 +44,40 @@ module AMQ
|
|
|
38
44
|
opts[:port] = uri.port || AMQP_DEFAULT_PORTS[uri.scheme]
|
|
39
45
|
opts[:ssl] = uri.scheme.to_s.downcase =~ /amqps/i # TODO: rename to tls
|
|
40
46
|
if uri.path =~ %r{^/(.*)}
|
|
41
|
-
|
|
47
|
+
if $1.index('/')
|
|
48
|
+
raise ArgumentError, "#{uri} has multiple-segment path; please percent-encode any slashes in the vhost name (e.g. /production => %2Fproduction). Learn more at http://bit.ly/amqp-gem-and-connection-uris"
|
|
49
|
+
end
|
|
42
50
|
opts[:vhost] = ::CGI::unescape($1)
|
|
43
51
|
end
|
|
44
52
|
|
|
45
53
|
if uri.query
|
|
46
|
-
query_params =
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
query_params = Hash.new { |hash, key| hash[key] = [] }
|
|
55
|
+
::URI.decode_www_form(uri.query).each do |key, value|
|
|
56
|
+
query_params[key] << value
|
|
57
|
+
end
|
|
58
|
+
query_params.each do |key, value|
|
|
59
|
+
query_params[key] = value.one? ? value.first : value
|
|
60
|
+
end
|
|
61
|
+
query_params.default = nil
|
|
49
62
|
|
|
50
|
-
opts[:heartbeat] =
|
|
51
|
-
opts[:connection_timeout] =
|
|
52
|
-
opts[:channel_max] =
|
|
53
|
-
opts[:auth_mechanism] =
|
|
63
|
+
opts[:heartbeat] = query_params["heartbeat"].to_i
|
|
64
|
+
opts[:connection_timeout] = query_params["connection_timeout"].to_i
|
|
65
|
+
opts[:channel_max] = query_params["channel_max"].to_i
|
|
66
|
+
opts[:auth_mechanism] = query_params["auth_mechanism"]
|
|
54
67
|
|
|
55
68
|
%w(cacertfile certfile keyfile).each do |tls_option|
|
|
56
|
-
if
|
|
57
|
-
raise ArgumentError
|
|
69
|
+
if query_params[tls_option] && uri.scheme == "amqp"
|
|
70
|
+
raise ArgumentError, "The option '#{tls_option}' can only be used in URIs that use amqps schema"
|
|
58
71
|
else
|
|
59
|
-
opts[tls_option.to_sym] =
|
|
72
|
+
opts[tls_option.to_sym] = query_params[tls_option]
|
|
60
73
|
end
|
|
61
74
|
end
|
|
62
75
|
|
|
63
76
|
%w(verify fail_if_no_peer_cert).each do |tls_option|
|
|
64
|
-
if
|
|
65
|
-
raise ArgumentError
|
|
77
|
+
if query_params[tls_option] && uri.scheme == "amqp"
|
|
78
|
+
raise ArgumentError, "The option '#{tls_option}' can only be used in URIs that use amqps schema"
|
|
66
79
|
else
|
|
67
|
-
opts[tls_option.to_sym] = as_boolean(
|
|
80
|
+
opts[tls_option.to_sym] = as_boolean(query_params[tls_option])
|
|
68
81
|
end
|
|
69
82
|
end
|
|
70
83
|
end
|
|
@@ -80,7 +93,7 @@ module AMQ
|
|
|
80
93
|
# Implementation
|
|
81
94
|
#
|
|
82
95
|
|
|
83
|
-
# Normalizes values returned by
|
|
96
|
+
# Normalizes values returned by URI.decode_www_form.
|
|
84
97
|
# @private
|
|
85
98
|
def self.as_boolean(val)
|
|
86
99
|
case val
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: amq-protocol
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jakub Stastny
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
- Mark Abramov
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2026-04-26 00:00:00.000000000 Z
|
|
14
14
|
dependencies: []
|
|
15
15
|
description: |2
|
|
16
16
|
amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not a
|
|
@@ -22,32 +22,15 @@ extensions: []
|
|
|
22
22
|
extra_rdoc_files:
|
|
23
23
|
- README.md
|
|
24
24
|
files:
|
|
25
|
-
- ".github/ISSUE_TEMPLATE.md"
|
|
26
|
-
- ".github/workflows/ci.yml"
|
|
27
|
-
- ".gitignore"
|
|
28
|
-
- ".gitmodules"
|
|
29
|
-
- ".rspec"
|
|
30
|
-
- ".travis.yml"
|
|
31
25
|
- ChangeLog.md
|
|
32
|
-
- Gemfile
|
|
33
26
|
- LICENSE
|
|
34
27
|
- README.md
|
|
35
|
-
- Rakefile
|
|
36
|
-
- amq-protocol.gemspec
|
|
37
|
-
- benchmarks/int_allocator.rb
|
|
38
|
-
- benchmarks/pure/body_framing_with_256k_payload.rb
|
|
39
|
-
- benchmarks/pure/body_framing_with_2k_payload.rb
|
|
40
|
-
- codegen/__init__.py
|
|
41
|
-
- codegen/amqp_0.9.1_changes.json
|
|
42
|
-
- codegen/codegen.py
|
|
43
|
-
- codegen/codegen_helpers.py
|
|
44
|
-
- codegen/protocol.rb.pytemplate
|
|
45
|
-
- generate.rb
|
|
46
28
|
- lib/amq/bit_set.rb
|
|
47
29
|
- lib/amq/endianness.rb
|
|
48
30
|
- lib/amq/int_allocator.rb
|
|
49
31
|
- lib/amq/pack.rb
|
|
50
32
|
- lib/amq/protocol.rb
|
|
33
|
+
- lib/amq/protocol/channel_close.rb
|
|
51
34
|
- lib/amq/protocol/client.rb
|
|
52
35
|
- lib/amq/protocol/constants.rb
|
|
53
36
|
- lib/amq/protocol/exceptions.rb
|
|
@@ -60,30 +43,7 @@ files:
|
|
|
60
43
|
- lib/amq/protocol/version.rb
|
|
61
44
|
- lib/amq/settings.rb
|
|
62
45
|
- lib/amq/uri.rb
|
|
63
|
-
|
|
64
|
-
- profiling/stackprof/body_framing_with_2k_payload.rb
|
|
65
|
-
- spec/amq/bit_set_spec.rb
|
|
66
|
-
- spec/amq/int_allocator_spec.rb
|
|
67
|
-
- spec/amq/pack_spec.rb
|
|
68
|
-
- spec/amq/protocol/basic_spec.rb
|
|
69
|
-
- spec/amq/protocol/blank_body_encoding_spec.rb
|
|
70
|
-
- spec/amq/protocol/channel_spec.rb
|
|
71
|
-
- spec/amq/protocol/confirm_spec.rb
|
|
72
|
-
- spec/amq/protocol/connection_spec.rb
|
|
73
|
-
- spec/amq/protocol/constants_spec.rb
|
|
74
|
-
- spec/amq/protocol/exchange_spec.rb
|
|
75
|
-
- spec/amq/protocol/frame_spec.rb
|
|
76
|
-
- spec/amq/protocol/method_spec.rb
|
|
77
|
-
- spec/amq/protocol/queue_spec.rb
|
|
78
|
-
- spec/amq/protocol/table_spec.rb
|
|
79
|
-
- spec/amq/protocol/tx_spec.rb
|
|
80
|
-
- spec/amq/protocol/value_decoder_spec.rb
|
|
81
|
-
- spec/amq/protocol/value_encoder_spec.rb
|
|
82
|
-
- spec/amq/protocol_spec.rb
|
|
83
|
-
- spec/amq/settings_spec.rb
|
|
84
|
-
- spec/amq/uri_parsing_spec.rb
|
|
85
|
-
- spec/spec_helper.rb
|
|
86
|
-
homepage: http://github.com/ruby-amqp/amq-protocol
|
|
46
|
+
homepage: https://github.com/ruby-amqp/amq-protocol
|
|
87
47
|
licenses:
|
|
88
48
|
- MIT
|
|
89
49
|
metadata: {}
|
|
@@ -94,7 +54,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
94
54
|
requirements:
|
|
95
55
|
- - ">="
|
|
96
56
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: '
|
|
57
|
+
version: '3.0'
|
|
98
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
59
|
requirements:
|
|
100
60
|
- - ">="
|
data/.github/ISSUE_TEMPLATE.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
## Does This Really Belong to GitHub issues?
|
|
2
|
-
|
|
3
|
-
If you find a bug you understand well, poor default, incorrect or unclear piece of documentation,
|
|
4
|
-
or missing feature, please [file an
|
|
5
|
-
issue](http://github.com/ruby-amqp/bunny/issues) on GitHub.
|
|
6
|
-
|
|
7
|
-
Please use [Bunny's mailing list](http://groups.google.com/group/ruby-amqp) for questions,
|
|
8
|
-
investigations, and discussions. GitHub issues should be used for specific, well understood, actionable
|
|
9
|
-
maintainers and contributors can work on.
|
|
10
|
-
|
|
11
|
-
When filing an issue, please specify
|
|
12
|
-
|
|
13
|
-
* Which Bunny and RabbitMQ versions are used
|
|
14
|
-
* Recent RabbitMQ log file contents
|
|
15
|
-
* Full exception stack traces
|
|
16
|
-
* Steps to reproduce or a failing test case
|
|
17
|
-
|
|
18
|
-
This would greatly help the maintainers help you.
|
data/.github/workflows/ci.yml
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- "main"
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- "main"
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
test:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
|
|
15
|
-
strategy:
|
|
16
|
-
matrix:
|
|
17
|
-
ruby-version:
|
|
18
|
-
- "3.4.2"
|
|
19
|
-
- "3.3.7"
|
|
20
|
-
- "3.2.7"
|
|
21
|
-
|
|
22
|
-
steps:
|
|
23
|
-
- uses: actions/checkout@v4
|
|
24
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
25
|
-
uses: ruby/setup-ruby@v1
|
|
26
|
-
with:
|
|
27
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
28
|
-
- name: Install dependencies
|
|
29
|
-
run: bundle install
|
|
30
|
-
- name: Run tests
|
|
31
|
-
run: bundle exec rspec -c
|
data/.gitignore
DELETED
data/.gitmodules
DELETED
data/.rspec
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--require spec_helper
|
data/.travis.yml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
dist: bionic
|
|
2
|
-
language: ruby
|
|
3
|
-
bundler_args: --without development
|
|
4
|
-
cache: bundler
|
|
5
|
-
script: "bundle exec rspec spec"
|
|
6
|
-
rvm:
|
|
7
|
-
- ruby-head
|
|
8
|
-
- "2.6.3"
|
|
9
|
-
- "2.5.5"
|
|
10
|
-
- "2.4.5"
|
|
11
|
-
- "2.3.8"
|
|
12
|
-
notifications:
|
|
13
|
-
recipients:
|
|
14
|
-
- michael@rabbitmq.com
|
|
15
|
-
matrix:
|
|
16
|
-
allow_failures:
|
|
17
|
-
- rvm: ruby-head
|
data/Gemfile
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
source "https://rubygems.org"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
group :development do
|
|
7
|
-
# excludes Windows, Rubinius and JRuby
|
|
8
|
-
gem "ruby-prof", :platforms => [:mri_19, :mri_20, :mri_21]
|
|
9
|
-
|
|
10
|
-
gem "rake"
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
group :test do
|
|
14
|
-
gem "rspec", ">= 3.8.0"
|
|
15
|
-
gem "rspec-its"
|
|
16
|
-
gem "simplecov"
|
|
17
|
-
gem 'bigdecimal'
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
group :development, :test do
|
|
21
|
-
gem "byebug"
|
|
22
|
-
end
|