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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog.md +85 -2
  3. data/LICENSE +1 -1
  4. data/README.md +2 -7
  5. data/lib/amq/bit_set.rb +2 -1
  6. data/lib/amq/endianness.rb +2 -0
  7. data/lib/amq/int_allocator.rb +3 -3
  8. data/lib/amq/pack.rb +33 -42
  9. data/lib/amq/protocol/channel_close.rb +24 -0
  10. data/lib/amq/protocol/client.rb +31 -40
  11. data/lib/amq/protocol/constants.rb +2 -0
  12. data/lib/amq/protocol/exceptions.rb +3 -1
  13. data/lib/amq/protocol/float_32bit.rb +2 -0
  14. data/lib/amq/protocol/frame.rb +16 -10
  15. data/lib/amq/protocol/table.rb +20 -17
  16. data/lib/amq/protocol/table_value_decoder.rb +49 -53
  17. data/lib/amq/protocol/table_value_encoder.rb +2 -1
  18. data/lib/amq/protocol/type_constants.rb +1 -0
  19. data/lib/amq/protocol/version.rb +1 -1
  20. data/lib/amq/protocol.rb +1 -0
  21. data/lib/amq/settings.rb +1 -0
  22. data/lib/amq/uri.rb +30 -17
  23. metadata +5 -45
  24. data/.github/ISSUE_TEMPLATE.md +0 -18
  25. data/.github/workflows/ci.yml +0 -31
  26. data/.gitignore +0 -18
  27. data/.gitmodules +0 -3
  28. data/.rspec +0 -1
  29. data/.travis.yml +0 -17
  30. data/Gemfile +0 -22
  31. data/Rakefile +0 -55
  32. data/amq-protocol.gemspec +0 -27
  33. data/benchmarks/int_allocator.rb +0 -34
  34. data/benchmarks/pure/body_framing_with_256k_payload.rb +0 -28
  35. data/benchmarks/pure/body_framing_with_2k_payload.rb +0 -28
  36. data/codegen/__init__.py +0 -0
  37. data/codegen/amqp_0.9.1_changes.json +0 -1
  38. data/codegen/codegen.py +0 -151
  39. data/codegen/codegen_helpers.py +0 -162
  40. data/codegen/protocol.rb.pytemplate +0 -320
  41. data/generate.rb +0 -24
  42. data/profiling/README.md +0 -9
  43. data/profiling/stackprof/body_framing_with_2k_payload.rb +0 -33
  44. data/spec/amq/bit_set_spec.rb +0 -227
  45. data/spec/amq/int_allocator_spec.rb +0 -113
  46. data/spec/amq/pack_spec.rb +0 -68
  47. data/spec/amq/protocol/basic_spec.rb +0 -325
  48. data/spec/amq/protocol/blank_body_encoding_spec.rb +0 -9
  49. data/spec/amq/protocol/channel_spec.rb +0 -127
  50. data/spec/amq/protocol/confirm_spec.rb +0 -41
  51. data/spec/amq/protocol/connection_spec.rb +0 -146
  52. data/spec/amq/protocol/constants_spec.rb +0 -10
  53. data/spec/amq/protocol/exchange_spec.rb +0 -106
  54. data/spec/amq/protocol/frame_spec.rb +0 -92
  55. data/spec/amq/protocol/method_spec.rb +0 -43
  56. data/spec/amq/protocol/queue_spec.rb +0 -126
  57. data/spec/amq/protocol/table_spec.rb +0 -259
  58. data/spec/amq/protocol/tx_spec.rb +0 -55
  59. data/spec/amq/protocol/value_decoder_spec.rb +0 -86
  60. data/spec/amq/protocol/value_encoder_spec.rb +0 -140
  61. data/spec/amq/protocol_spec.rb +0 -812
  62. data/spec/amq/settings_spec.rb +0 -22
  63. data/spec/amq/uri_parsing_spec.rb +0 -280
  64. data/spec/spec_helper.rb +0 -29
@@ -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 = String.new
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 + key
39
+ buffer << key.bytesize.chr << key
37
40
 
38
41
  case value
39
- when Hash then
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(PACK_UINT32).force_encoding(buffer.encoding) + buffer
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 = Hash.new
55
- table_length = data.unpack(PACK_UINT32).first
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
- when TYPE_BYTE then
92
+ when TYPE_BYTE
90
93
  v, offset = TableValueDecoder.decode_byte(data, offset)
91
94
  v
92
- when TYPE_SIGNED_16BIT then
95
+ when TYPE_SIGNED_16BIT
93
96
  v, offset = TableValueDecoder.decode_short(data, offset)
94
97
  v
95
- when TYPE_SIGNED_64BIT then
98
+ when TYPE_SIGNED_64BIT
96
99
  v, offset = TableValueDecoder.decode_long(data, offset)
97
100
  v
98
- when TYPE_32BIT_FLOAT then
101
+ when TYPE_32BIT_FLOAT
99
102
  v, offset = TableValueDecoder.decode_32bit_float(data, offset)
100
103
  v
101
- when TYPE_64BIT_FLOAT then
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 # self.decode
118
+ end
116
119
 
117
120
 
118
121
  def self.length(data)
119
- data.unpack(PACK_UINT32).first
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 # self.hash_size(value)
134
+ end
132
135
 
133
136
 
134
137
  def self.decode_table_key(data, offset)
135
- key_length = data.slice(offset, 1).unpack(PACK_CHAR).first
138
+ key_length = data.getbyte(offset)
136
139
  offset += 1
137
- key = data.slice(offset, key_length)
140
+ key = data.byteslice(offset, key_length)
138
141
  offset += key_length
139
142
 
140
143
  [key, offset]
141
- end # self.decode_table_key(data, offset)
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.slice(initial_offset, 4).unpack(PACK_UINT32).first
32
+ array_length = data.byteslice(initial_offset, 4).unpack1(PACK_UINT32_BE)
25
33
 
26
- ary = Array.new
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 then
65
+ when TYPE_BYTE
58
66
  v, offset = decode_byte(data, offset)
59
67
  v
60
- when TYPE_SIGNED_16BIT then
68
+ when TYPE_SIGNED_16BIT
61
69
  v, offset = decode_short(data, offset)
62
70
  v
63
- when TYPE_SIGNED_64BIT then
71
+ when TYPE_SIGNED_64BIT
64
72
  v, offset = decode_long(data, offset)
65
73
  v
66
- when TYPE_32BIT_FLOAT then
74
+ when TYPE_32BIT_FLOAT
67
75
  v, offset = decode_32bit_float(data, offset)
68
76
  v
69
- when TYPE_64BIT_FLOAT then
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 = TableValueDecoder.decode_array(data, offset)
83
+ v, offset = decode_array(data, offset)
76
84
  v
77
85
  else
78
- raise ArgumentError.new("unsupported type in a table value: #{type.inspect}, do not know how to decode!")
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 # self.decode_array(data, initial_offset)
94
+ end
87
95
 
88
96
 
89
97
  def self.decode_string(data, offset)
90
- length = data.slice(offset, 4).unpack(PACK_UINT32).first
98
+ length = data.byteslice(offset, 4).unpack1(PACK_UINT32_BE)
91
99
  offset += 4
92
- v = data.slice(offset, length)
100
+ v = data.byteslice(offset, length)
93
101
  offset += length
94
102
 
95
103
  [v, offset]
96
- end # self.decode_string(data, offset)
104
+ end
97
105
 
98
106
 
99
107
  def self.decode_integer(data, offset)
100
- v = data.slice(offset, 4).unpack(PACK_UINT32).first
108
+ v = data.byteslice(offset, 4).unpack1(PACK_UINT32_BE)
101
109
  offset += 4
102
110
 
103
111
  [v, offset]
104
- end # self.decode_integer(data, offset)
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
- offset += 8
112
- [v, offset]
113
- end
114
- else
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.slice(offset, 5).unpack(PACK_UCHAR_UINT32)
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 # self.decode_big_decimal(data, offset)
128
+ end
132
129
 
133
130
 
134
131
  def self.decode_time(data, offset)
135
- timestamp = data.slice(offset, 8).unpack(PACK_UINT64_BE).last
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 # self.decode_time(data, offset)
137
+ end
141
138
 
142
139
 
143
140
  def self.decode_boolean(data, offset)
144
- integer = data.slice(offset, 2).unpack(PACK_CHAR).first # 0 or 1
141
+ byte = data.getbyte(offset)
145
142
  offset += 1
146
- [(integer == 1), offset]
147
- end # self.decode_boolean(data, offset)
143
+ [(byte == 1), offset]
144
+ end
148
145
 
149
146
 
150
147
  def self.decode_32bit_float(data, offset)
151
- v = data.slice(offset, 4).unpack(PACK_32BIT_FLOAT).first
148
+ v = data.byteslice(offset, 4).unpack1(PACK_FLOAT32)
152
149
  offset += 4
153
150
 
154
151
  [v, offset]
155
- end # self.decode_32bit_float(data, offset)
152
+ end
156
153
 
157
154
 
158
155
  def self.decode_64bit_float(data, offset)
159
- v = data.slice(offset, 8).unpack(PACK_64BIT_FLOAT).first
156
+ v = data.byteslice(offset, 8).unpack1(PACK_FLOAT64)
160
157
  offset += 8
161
158
 
162
159
  [v, offset]
163
- end # self.decode_64bit_float(data, offset)
160
+ end
164
161
 
165
162
 
166
163
  def self.decode_value_type(data, offset)
167
- [data.slice(offset, 1), offset + 1]
168
- end # self.decode_value_type(data, offset)
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.slice(offset, 4).unpack(PACK_UINT32).first
174
- v = Table.decode(data.slice(offset, length + 4))
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 # self.decode_hash(data, offset)
174
+ end
179
175
 
180
176
 
181
177
  # Decodes/Converts a byte value from the data at the provided offset.
182
178
  #
183
- # @param [Array] data - A big-endian ordered array of bytes.
184
- # @param [Fixnum] offset - The offset which bytes the byte is consumed.
185
- # @return [Array] - The Fixnum value and new offset pair.
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.slice(offset, 1).unpack(PACK_CHAR).first, offset += 1]
183
+ [data.getbyte(offset), offset + 1]
188
184
  end
189
185
 
190
186
 
191
187
  def self.decode_short(data, offset)
192
- v = AMQ::Hacks.unpack_int16_big_endian(data.slice(offset, 2)).first
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.new("Unsupported value #{value.inspect} of type #{value.class.name}")
75
+ raise ArgumentError, "Unsupported value #{value.inspect} of type #{value.class.name}"
75
76
  end # if
76
77
  end # case
77
78
 
@@ -1,4 +1,5 @@
1
1
  # encoding: binary
2
+ # frozen_string_literal: true
2
3
 
3
4
  module AMQ
4
5
  module Protocol
@@ -1,5 +1,5 @@
1
1
  module AMQ
2
2
  module Protocol
3
- VERSION = "2.3.3"
3
+ VERSION = "2.8.0"
4
4
  end # Protocol
5
5
  end # AMQ
data/lib/amq/protocol.rb CHANGED
@@ -2,3 +2,4 @@
2
2
 
3
3
  require "amq/protocol/version"
4
4
  require "amq/protocol/client"
5
+ require "amq/protocol/channel_close"
data/lib/amq/settings.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "amq/protocol/client"
4
5
  require "amq/uri"
data/lib/amq/uri.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  # encoding: utf-8
2
2
 
3
- require "cgi"
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
- raise ArgumentError.new("Connection URI must use amqp or amqps schema (example: amqp://bus.megacorp.internal:5766), learn more at http://bit.ly/ks8MXK") unless %w{amqp amqps}.include?(uri.scheme)
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
- raise ArgumentError.new("#{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") if $1.index('/')
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 = CGI::parse(uri.query)
47
-
48
- normalized_query_params = Hash[query_params.map { |param, value| [param, value.one? ? value.first : value] }]
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] = normalized_query_params["heartbeat"].to_i
51
- opts[:connection_timeout] = normalized_query_params["connection_timeout"].to_i
52
- opts[:channel_max] = normalized_query_params["channel_max"].to_i
53
- opts[:auth_mechanism] = normalized_query_params["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 normalized_query_params[tls_option] && uri.scheme == "amqp"
57
- raise ArgumentError.new("The option '#{tls_option}' can only be used in URIs that use amqps schema")
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] = normalized_query_params[tls_option]
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 normalized_query_params[tls_option] && uri.scheme == "amqp"
65
- raise ArgumentError.new("The option '#{tls_option}' can only be used in URIs that use amqps schema")
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(normalized_query_params[tls_option])
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 CGI.parse.
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.3.3
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: 2025-02-17 00:00:00.000000000 Z
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
- - profiling/README.md
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: '2.2'
57
+ version: '3.0'
98
58
  required_rubygems_version: !ruby/object:Gem::Requirement
99
59
  requirements:
100
60
  - - ">="
@@ -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.
@@ -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
@@ -1,18 +0,0 @@
1
- /*.gem
2
- /.rvmrc
3
- /.ruby-version
4
- tmp
5
- *.pyc
6
- *.iml
7
- .idea
8
- /vendor/bundle
9
- /vendor/amq-*
10
- /coverage
11
- Gemfile.lock
12
- .rbx/*
13
- .Apple*
14
- .bundle/*
15
- bin/*
16
- *.bundle
17
- Makefile
18
- profiling/dumps/*
data/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "codegen/rabbitmq-codegen"]
2
- path = codegen/rabbitmq-codegen
3
- url = git://github.com/rabbitmq/rabbitmq-codegen.git
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