amq-protocol 2.3.2 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +18 -0
- data/.github/workflows/ci.yml +31 -0
- data/ChangeLog.md +13 -2
- data/Gemfile +2 -0
- data/codegen/protocol.rb.pytemplate +2 -1
- data/lib/amq/protocol/client.rb +16 -15
- data/lib/amq/protocol/version.rb +1 -1
- data/lib/amq/uri.rb +1 -1
- data/spec/amq/protocol/table_spec.rb +0 -1
- data/spec/amq/uri_parsing_spec.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49d61c5e0d929d97678b8c9f5b01c147c74f874a70481c7c24de865331ad8278
|
4
|
+
data.tar.gz: efaeca2672afb7b1cd8eceb809bd8be9fcbfbecceb2e1893187b6fc9dcd2d5ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12444b7175daf2d75f021e91eccb8782ebd11ec60855229bf82fa3e29792ba1ca8c96283723b8b5ffeaaf16ef6586b0b74948f605fb3526bed4146cff4030b0a
|
7
|
+
data.tar.gz: 7d8c26b0e7a501515c1a130410c66d54ad7811c4e7cee15b02d894a8f46feacdc08f8456672e13b35df1f1ca738223c49721e545829c088079e28f96ebada1d8
|
@@ -0,0 +1,18 @@
|
|
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.
|
@@ -0,0 +1,31 @@
|
|
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/ChangeLog.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
|
-
## Changes between 2.3.2 and 2.3.3 (
|
1
|
+
## Changes between 2.3.2 and 2.3.3 (February 17, 2025)
|
2
|
+
|
3
|
+
### Improved Compatibility with Ruby 3.4
|
4
|
+
|
5
|
+
Contribiuted by @BenTalagan.
|
6
|
+
|
7
|
+
GitHub issue: [#79](https://github.com/ruby-amqp/amq-protocol/pull/79)
|
8
|
+
|
9
|
+
### Support Binary-Encoded Frozen Strings for Payloads
|
10
|
+
|
11
|
+
Contribiuted by @djrodgerspryor.
|
12
|
+
|
13
|
+
GitHub issue: [#78](https://github.com/ruby-amqp/amq-protocol/pull/78)
|
2
14
|
|
3
|
-
No changes yet.
|
4
15
|
|
5
16
|
## Changes between 2.3.1 and 2.3.2 (July 10th, 2020)
|
6
17
|
|
data/Gemfile
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
+
|
5
6
|
group :development do
|
6
7
|
# excludes Windows, Rubinius and JRuby
|
7
8
|
gem "ruby-prof", :platforms => [:mri_19, :mri_20, :mri_21]
|
@@ -13,6 +14,7 @@ group :test do
|
|
13
14
|
gem "rspec", ">= 3.8.0"
|
14
15
|
gem "rspec-its"
|
15
16
|
gem "simplecov"
|
17
|
+
gem 'bigdecimal'
|
16
18
|
end
|
17
19
|
|
18
20
|
group :development, :test do
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
# encoding: binary
|
3
|
+
# frozen_string_literal: true
|
3
4
|
|
4
5
|
# THIS IS AN AUTOGENERATED FILE, DO NOT MODIFY
|
5
6
|
# IT DIRECTLY ! FOR CHANGES, PLEASE UPDATE FILES
|
@@ -142,7 +143,7 @@ module AMQ
|
|
142
143
|
% for f in klass.fields:
|
143
144
|
# <% i = klass.fields.index(f) %>1 << ${15 - i}
|
144
145
|
def self.encode_${f.ruby_name}(value)
|
145
|
-
buffer = ''
|
146
|
+
buffer = +''
|
146
147
|
% for line in helpers.genSingleEncode(spec, "value", f.domain):
|
147
148
|
${line}
|
148
149
|
% endfor
|
data/lib/amq/protocol/client.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# encoding: binary
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
# THIS IS AN AUTOGENERATED FILE, DO NOT MODIFY
|
4
5
|
# IT DIRECTLY ! FOR CHANGES, PLEASE UPDATE FILES
|
@@ -174,7 +175,7 @@ module AMQ
|
|
174
175
|
|
175
176
|
# Otherwise String#slice on 1.9 will operate with code points,
|
176
177
|
# and we need bytes. MK.
|
177
|
-
body.force_encoding("ASCII-8BIT") if RUBY_VERSION.to_f >= 1.9
|
178
|
+
body.force_encoding("ASCII-8BIT") if RUBY_VERSION.to_f >= 1.9 && body.encoding != Encoding::BINARY
|
178
179
|
|
179
180
|
array = Array.new
|
180
181
|
while body && !body.empty?
|
@@ -1389,7 +1390,7 @@ module AMQ
|
|
1389
1390
|
|
1390
1391
|
# 1 << 15
|
1391
1392
|
def self.encode_content_type(value)
|
1392
|
-
buffer = ''
|
1393
|
+
buffer = +''
|
1393
1394
|
buffer << value.to_s.bytesize.chr
|
1394
1395
|
buffer << value.to_s
|
1395
1396
|
[0, 0x8000, buffer]
|
@@ -1397,7 +1398,7 @@ module AMQ
|
|
1397
1398
|
|
1398
1399
|
# 1 << 14
|
1399
1400
|
def self.encode_content_encoding(value)
|
1400
|
-
buffer = ''
|
1401
|
+
buffer = +''
|
1401
1402
|
buffer << value.to_s.bytesize.chr
|
1402
1403
|
buffer << value.to_s
|
1403
1404
|
[1, 0x4000, buffer]
|
@@ -1405,28 +1406,28 @@ module AMQ
|
|
1405
1406
|
|
1406
1407
|
# 1 << 13
|
1407
1408
|
def self.encode_headers(value)
|
1408
|
-
buffer = ''
|
1409
|
+
buffer = +''
|
1409
1410
|
buffer << AMQ::Protocol::Table.encode(value)
|
1410
1411
|
[2, 0x2000, buffer]
|
1411
1412
|
end
|
1412
1413
|
|
1413
1414
|
# 1 << 12
|
1414
1415
|
def self.encode_delivery_mode(value)
|
1415
|
-
buffer = ''
|
1416
|
+
buffer = +''
|
1416
1417
|
buffer << [value].pack(PACK_CHAR)
|
1417
1418
|
[3, 0x1000, buffer]
|
1418
1419
|
end
|
1419
1420
|
|
1420
1421
|
# 1 << 11
|
1421
1422
|
def self.encode_priority(value)
|
1422
|
-
buffer = ''
|
1423
|
+
buffer = +''
|
1423
1424
|
buffer << [value].pack(PACK_CHAR)
|
1424
1425
|
[4, 0x0800, buffer]
|
1425
1426
|
end
|
1426
1427
|
|
1427
1428
|
# 1 << 10
|
1428
1429
|
def self.encode_correlation_id(value)
|
1429
|
-
buffer = ''
|
1430
|
+
buffer = +''
|
1430
1431
|
buffer << value.to_s.bytesize.chr
|
1431
1432
|
buffer << value.to_s
|
1432
1433
|
[5, 0x0400, buffer]
|
@@ -1434,7 +1435,7 @@ module AMQ
|
|
1434
1435
|
|
1435
1436
|
# 1 << 9
|
1436
1437
|
def self.encode_reply_to(value)
|
1437
|
-
buffer = ''
|
1438
|
+
buffer = +''
|
1438
1439
|
buffer << value.to_s.bytesize.chr
|
1439
1440
|
buffer << value.to_s
|
1440
1441
|
[6, 0x0200, buffer]
|
@@ -1442,7 +1443,7 @@ module AMQ
|
|
1442
1443
|
|
1443
1444
|
# 1 << 8
|
1444
1445
|
def self.encode_expiration(value)
|
1445
|
-
buffer = ''
|
1446
|
+
buffer = +''
|
1446
1447
|
buffer << value.to_s.bytesize.chr
|
1447
1448
|
buffer << value.to_s
|
1448
1449
|
[7, 0x0100, buffer]
|
@@ -1450,7 +1451,7 @@ module AMQ
|
|
1450
1451
|
|
1451
1452
|
# 1 << 7
|
1452
1453
|
def self.encode_message_id(value)
|
1453
|
-
buffer = ''
|
1454
|
+
buffer = +''
|
1454
1455
|
buffer << value.to_s.bytesize.chr
|
1455
1456
|
buffer << value.to_s
|
1456
1457
|
[8, 0x0080, buffer]
|
@@ -1458,14 +1459,14 @@ module AMQ
|
|
1458
1459
|
|
1459
1460
|
# 1 << 6
|
1460
1461
|
def self.encode_timestamp(value)
|
1461
|
-
buffer = ''
|
1462
|
+
buffer = +''
|
1462
1463
|
buffer << AMQ::Pack.pack_uint64_big_endian(value)
|
1463
1464
|
[9, 0x0040, buffer]
|
1464
1465
|
end
|
1465
1466
|
|
1466
1467
|
# 1 << 5
|
1467
1468
|
def self.encode_type(value)
|
1468
|
-
buffer = ''
|
1469
|
+
buffer = +''
|
1469
1470
|
buffer << value.to_s.bytesize.chr
|
1470
1471
|
buffer << value.to_s
|
1471
1472
|
[10, 0x0020, buffer]
|
@@ -1473,7 +1474,7 @@ module AMQ
|
|
1473
1474
|
|
1474
1475
|
# 1 << 4
|
1475
1476
|
def self.encode_user_id(value)
|
1476
|
-
buffer = ''
|
1477
|
+
buffer = +''
|
1477
1478
|
buffer << value.to_s.bytesize.chr
|
1478
1479
|
buffer << value.to_s
|
1479
1480
|
[11, 0x0010, buffer]
|
@@ -1481,7 +1482,7 @@ module AMQ
|
|
1481
1482
|
|
1482
1483
|
# 1 << 3
|
1483
1484
|
def self.encode_app_id(value)
|
1484
|
-
buffer = ''
|
1485
|
+
buffer = +''
|
1485
1486
|
buffer << value.to_s.bytesize.chr
|
1486
1487
|
buffer << value.to_s
|
1487
1488
|
[12, 0x0008, buffer]
|
@@ -1489,7 +1490,7 @@ module AMQ
|
|
1489
1490
|
|
1490
1491
|
# 1 << 2
|
1491
1492
|
def self.encode_cluster_id(value)
|
1492
|
-
buffer = ''
|
1493
|
+
buffer = +''
|
1493
1494
|
buffer << value.to_s.bytesize.chr
|
1494
1495
|
buffer << value.to_s
|
1495
1496
|
[13, 0x0004, buffer]
|
data/lib/amq/protocol/version.rb
CHANGED
data/lib/amq/uri.rb
CHANGED
@@ -34,7 +34,7 @@ module AMQ
|
|
34
34
|
opts[:scheme] = uri.scheme
|
35
35
|
opts[:user] = ::CGI::unescape(uri.user) if uri.user
|
36
36
|
opts[:pass] = ::CGI::unescape(uri.password) if uri.password
|
37
|
-
opts[:host] = uri.host if uri.host
|
37
|
+
opts[:host] = uri.host if uri.host and uri.host != ""
|
38
38
|
opts[:port] = uri.port || AMQP_DEFAULT_PORTS[uri.scheme]
|
39
39
|
opts[:ssl] = uri.scheme.to_s.downcase =~ /amqps/i # TODO: rename to tls
|
40
40
|
if uri.path =~ %r{^/(.*)}
|
@@ -30,7 +30,7 @@ RSpec.describe AMQ::URI do
|
|
30
30
|
let(:uri) { "amqp://" }
|
31
31
|
|
32
32
|
# Note that according to the ABNF, the host component may not be absent, but it may be zero-length.
|
33
|
-
it "falls back to
|
33
|
+
it "falls back to a blank value" do
|
34
34
|
expect(subject[:host]).to be_nil
|
35
35
|
end
|
36
36
|
end
|
metadata
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amq-protocol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Stastny
|
8
8
|
- Michael S. Klishin
|
9
9
|
- Theo Hultberg
|
10
10
|
- Mark Abramov
|
11
|
-
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date:
|
13
|
+
date: 2025-02-17 00:00:00.000000000 Z
|
15
14
|
dependencies: []
|
16
15
|
description: |2
|
17
16
|
amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not a
|
@@ -23,6 +22,8 @@ extensions: []
|
|
23
22
|
extra_rdoc_files:
|
24
23
|
- README.md
|
25
24
|
files:
|
25
|
+
- ".github/ISSUE_TEMPLATE.md"
|
26
|
+
- ".github/workflows/ci.yml"
|
26
27
|
- ".gitignore"
|
27
28
|
- ".gitmodules"
|
28
29
|
- ".rspec"
|
@@ -86,7 +87,6 @@ homepage: http://github.com/ruby-amqp/amq-protocol
|
|
86
87
|
licenses:
|
87
88
|
- MIT
|
88
89
|
metadata: {}
|
89
|
-
post_install_message:
|
90
90
|
rdoc_options: []
|
91
91
|
require_paths:
|
92
92
|
- lib
|
@@ -101,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
|
-
rubygems_version: 3.
|
105
|
-
signing_key:
|
104
|
+
rubygems_version: 3.6.2
|
106
105
|
specification_version: 4
|
107
106
|
summary: AMQP 0.9.1 encoding & decoding library.
|
108
107
|
test_files: []
|