amqp-client 1.2.1 → 2.0.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.
@@ -1,41 +0,0 @@
1
- name: "CodeQL"
2
-
3
- on:
4
- push:
5
- branches: [ main ]
6
- pull_request:
7
- # The branches below must be a subset of the branches above
8
- branches: [ main ]
9
- schedule:
10
- - cron: '23 22 * * 2'
11
-
12
- jobs:
13
- analyze:
14
- name: Analyze
15
- runs-on: ubuntu-latest
16
- permissions:
17
- actions: read
18
- contents: read
19
- security-events: write
20
-
21
- strategy:
22
- fail-fast: false
23
- matrix:
24
- language: [ 'ruby' ]
25
-
26
- steps:
27
- - name: Checkout repository
28
- uses: actions/checkout@v5
29
-
30
- # Initializes the CodeQL tools for scanning.
31
- - name: Initialize CodeQL
32
- uses: github/codeql-action/init@v3
33
- with:
34
- languages: ${{ matrix.language }}
35
- # If you wish to specify custom queries, you can do so here or in a config file.
36
- # By default, queries listed here will override any specified in a config file.
37
- # Prefix the list here with "+" to use these queries and those in the config file.
38
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
39
-
40
- - name: Perform CodeQL Analysis
41
- uses: github/codeql-action/analyze@v3
@@ -1,28 +0,0 @@
1
- name: Documentation
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- paths:
8
- - 'src/**'
9
- - 'README.md'
10
-
11
- jobs:
12
- docs:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: actions/checkout@v5
16
- - name: Setup Ruby
17
- uses: ruby/setup-ruby@v1
18
- with:
19
- ruby-version: ruby
20
- - name: Install yard
21
- run: gem install yard
22
- - name: Generate docs
23
- run: yard doc
24
- - name: Deploy docs
25
- uses: JamesIves/github-pages-deploy-action@v4.5.0
26
- with:
27
- branch: gh-pages
28
- folder: doc
@@ -1,147 +0,0 @@
1
- name: Ruby
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- pull_request:
8
- branches:
9
- - main
10
-
11
- jobs:
12
- tests:
13
- name: >-
14
- ${{ matrix.ruby }} (sudo: ${{ matrix.sudo }})
15
- runs-on: ubuntu-latest
16
- timeout-minutes: 10
17
- strategy:
18
- fail-fast: false
19
- matrix:
20
- sudo: [true]
21
- ruby:
22
- - "3.2"
23
- - "3.3"
24
- - "3.4"
25
- include:
26
- - { ruby: jruby, allow-failure: false, sudo: false }
27
- - { ruby: truffleruby, allow-failure: false, sudo: false }
28
- steps:
29
- - name: Configure dpkg to skip building man pages
30
- run: |
31
- echo 'path-exclude /usr/share/doc/*' | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
32
- echo 'path-exclude /usr/share/man/*' | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
33
- - name: Install RabbitMQ
34
- run: sudo apt-get update && sudo apt-get install -y rabbitmq-server
35
- - name: Verify RabbitMQ started correctly
36
- run: while true; do sudo rabbitmq-diagnostics status 2>/dev/null && break; echo -n .; sleep 2; done
37
- - uses: actions/checkout@v5
38
- - uses: ruby/setup-ruby@v1
39
- with:
40
- bundler-cache: true
41
- ruby-version: ${{ matrix.ruby }}
42
- - name: Run tests (excluding TLS tests) (JRuby)
43
- if: ${{ matrix.ruby == 'jruby' }}
44
- continue-on-error: ${{ matrix.allow-failure || false }}
45
- run: bundle exec rake
46
- env:
47
- JAVA_OPTS: "-Djava.net.preferIPv4Stack=true"
48
- - name: Run tests (excluding TLS tests)
49
- if: ${{ matrix.ruby != 'jruby' }}
50
- continue-on-error: ${{ matrix.allow-failure || false }}
51
- run: bundle exec rake
52
- env:
53
- RUN_SUDO_TESTS: ${{ matrix.sudo }}
54
-
55
- tls:
56
- runs-on: ubuntu-latest
57
- timeout-minutes: 10
58
- strategy:
59
- fail-fast: false
60
- matrix:
61
- ruby:
62
- - "ruby" # latest stable release
63
- - "jruby"
64
- - "truffleruby"
65
- steps:
66
- - name: Configure dpkg to skip building man pages
67
- run: |
68
- echo 'path-exclude /usr/share/doc/*' | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
69
- echo 'path-exclude /usr/share/man/*' | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc
70
- - name: Install RabbitMQ
71
- run: sudo apt-get update && sudo apt-get install -y rabbitmq-server
72
- - name: Stop RabbitMQ
73
- run: sudo systemctl stop rabbitmq-server
74
- - name: Set up Homebrew
75
- uses: Homebrew/actions/setup-homebrew@master
76
- - name: Install github.com/FiloSottile/mkcert
77
- run: brew install mkcert
78
- - name: Create local CA
79
- run: sudo CAROOT=/etc/rabbitmq $(brew --prefix)/bin/mkcert -install
80
- - name: Create certificate
81
- run: |
82
- sudo $(brew --prefix)/bin/mkcert -key-file /etc/rabbitmq/localhost-key.pem -cert-file /etc/rabbitmq/localhost.pem localhost
83
- sudo chmod +r /etc/rabbitmq/localhost-key.pem
84
- - name: Create RabbitMQ config
85
- run: |
86
- sudo tee /etc/rabbitmq/rabbitmq.conf <<'EOF'
87
- listeners.ssl.default = 5671
88
- ssl_options.cacertfile = /etc/rabbitmq/rootCA.pem
89
- ssl_options.certfile = /etc/rabbitmq/localhost.pem
90
- ssl_options.keyfile = /etc/rabbitmq/localhost-key.pem
91
- EOF
92
- - name: Start RabbitMQ
93
- run: sudo systemctl start rabbitmq-server
94
- - name: Verify RabbitMQ started correctly
95
- run: while true; do sudo rabbitmq-diagnostics status 2>/dev/null && break; echo -n .; sleep 2; done
96
- - uses: actions/checkout@v5
97
- - uses: ruby/setup-ruby@v1
98
- with:
99
- bundler-cache: true
100
- ruby-version: ${{ matrix.ruby }}
101
- - name: Run TLS tests (JRuby)
102
- if: ${{ matrix.ruby == 'jruby' }}
103
- run: bundle exec rake
104
- env:
105
- JAVA_OPTS: "-Djava.net.preferIPv4Stack=true"
106
- TEST_AMQP_HOST: "localhost"
107
- TESTOPTS: --name=/_tls$/
108
- - name: Run TLS tests
109
- if: ${{ matrix.ruby != 'jruby' }}
110
- run: bundle exec rake
111
- env:
112
- TESTOPTS: --name=/_tls$/
113
-
114
- macos:
115
- runs-on: macos-latest
116
- timeout-minutes: 10
117
- strategy:
118
- fail-fast: false
119
- matrix:
120
- ruby: # enough to test one Ruby on macOS
121
- - "ruby" # latest stable release
122
- steps:
123
- - name: Install RabbitMQ
124
- run: brew install rabbitmq
125
- - name: Start RabbitMQ
126
- run: brew services start rabbitmq
127
- - uses: actions/checkout@v5
128
- - uses: ruby/setup-ruby@v1
129
- with:
130
- bundler-cache: true
131
- ruby-version: ${{ matrix.ruby }}
132
- - name: Verify RabbitMQ started correctly
133
- run: while true; do rabbitmq-diagnostics status 2>/dev/null && break; echo -n .; sleep 2; done
134
- - name: Run tests (excluding TLS tests)
135
- run: bundle exec rake
136
-
137
- lint:
138
- runs-on: ubuntu-latest
139
- timeout-minutes: 10
140
- steps:
141
- - uses: actions/checkout@v5
142
- - uses: ruby/setup-ruby@v1
143
- with:
144
- bundler-cache: true
145
- ruby-version: ruby
146
- - name: Run RuboCop
147
- run: bundle exec rake rubocop
@@ -1,54 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- tags:
6
- - v*
7
- workflow_dispatch:
8
-
9
- jobs:
10
- release:
11
- if: github.repository == 'cloudamqp/amqp-client.rb'
12
- runs-on: ubuntu-latest
13
- permissions:
14
- id-token: write # for trusted publishing
15
- contents: write # for creating releases
16
- steps:
17
- - uses: actions/checkout@v5
18
- - uses: ruby/setup-ruby@v1
19
- with:
20
- bundler-cache: true
21
- ruby-version: ruby
22
- - uses: rubygems/configure-rubygems-credentials@v1.0.0
23
- - run: ruby -v
24
- # ensure gem can be built and installed, push to rubygems.org
25
- - run: gem build *.gemspec
26
- - run: gem install *.gem
27
- - run: gem push *.gem
28
-
29
- # create GitHub release
30
- - name: Extract release notes
31
- id: extract_release_notes
32
- run: |
33
- # Extract version from tag (remove 'v' prefix)
34
- VERSION=${GITHUB_REF#refs/tags/v}
35
- echo "version=$VERSION" >> $GITHUB_OUTPUT
36
-
37
- # Extract changelog section for this version with better handling
38
- if grep -q "## \[$VERSION\]" CHANGELOG.md; then
39
- awk "/^## \[$VERSION\]/ {flag=1; next} /^## \[/ && flag {exit} flag && /\S/ {print}" CHANGELOG.md > release_notes.md
40
- echo "Release notes extracted for version $VERSION:"
41
- cat release_notes.md
42
- else
43
- echo "No changelog entry found for version $VERSION" > release_notes.md
44
- echo "Warning: No changelog entry found for version $VERSION"
45
- fi
46
-
47
- - name: Create GitHub Release
48
- uses: softprops/action-gh-release@v2
49
- with:
50
- name: Release ${{ steps.extract_release_notes.outputs.version }}
51
- body_path: release_notes.md
52
- draft: false
53
- prerelease: false
54
- files: '*.gem'
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- Gemfile.lock
data/.rubocop.yml DELETED
@@ -1,30 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
- plugins:
3
- - rubocop-minitest
4
-
5
- AllCops:
6
- NewCops: disable
7
- TargetRubyVersion: 3.2
8
- SuggestExtensions: false
9
-
10
- Style/StringLiterals:
11
- Enabled: true
12
- EnforcedStyle: double_quotes
13
-
14
- Style/StringLiteralsInInterpolation:
15
- Enabled: true
16
- EnforcedStyle: double_quotes
17
-
18
- Layout/LineLength:
19
- Max: 130
20
-
21
- Naming/FileName:
22
- Exclude:
23
- - "lib/amqp-client.rb"
24
-
25
- Metrics/PerceivedComplexity:
26
- Exclude:
27
- - "lib/amqp/client/properties.rb"
28
-
29
- Metrics/ParameterLists:
30
- Max: 8
data/.rubocop_todo.yml DELETED
@@ -1,65 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2021-10-15 13:44:24 UTC using RuboCop version 1.19.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
12
- # URISchemes: http, https
13
- Layout/LineLength:
14
- Max: 132
15
-
16
- # Offense count: 1
17
- Lint/RescueException:
18
- Exclude:
19
- - 'lib/amqp/client/connection.rb'
20
-
21
- # Offense count: 32
22
- # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
23
- Metrics/AbcSize:
24
- Max: 175
25
-
26
- # Offense count: 1
27
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
28
- # IgnoredMethods: refine
29
- Metrics/BlockLength:
30
- Max: 40
31
-
32
- # Offense count: 3
33
- # Configuration parameters: CountBlocks.
34
- Metrics/BlockNesting:
35
- Max: 4
36
-
37
- # Offense count: 6
38
- # Configuration parameters: CountComments, CountAsOne.
39
- Metrics/ClassLength:
40
- Max: 497
41
-
42
- # Offense count: 10
43
- # Configuration parameters: IgnoredMethods.
44
- Metrics/CyclomaticComplexity:
45
- Max: 46
46
-
47
- # Offense count: 67
48
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
49
- Metrics/MethodLength:
50
- Max: 169
51
-
52
- # Offense count: 2
53
- # Configuration parameters: CountComments, CountAsOne.
54
- Metrics/ModuleLength:
55
- Max: 486
56
-
57
- # Offense count: 1
58
- # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
59
- Metrics/ParameterLists:
60
- Max: 13
61
-
62
- # Offense count: 5
63
- # Configuration parameters: IgnoredMethods.
64
- Metrics/PerceivedComplexity:
65
- Max: 23
data/.yardopts DELETED
@@ -1 +0,0 @@
1
- --no-api - LICENSE.txt CHANGELOG.md
data/CHANGELOG.md DELETED
@@ -1,115 +0,0 @@
1
- ## [Unreleased]
2
-
3
- ## [1.2.1] - 2025-09-15
4
-
5
- - Added: Convenience methods for creating exchange types: `fanout()`, `direct()`, `topic()`, and `headers()`
6
- - Added: Support for binding with high level objects (Exchange and Queue objects can now be passed as binding sources)
7
- - Fixed: Bug where a client without any connection could not be closed properly
8
-
9
- ## [1.2.0] - 2025-09-10
10
-
11
- - Fixed: `Connection#channel` wasn't thread-safe
12
- - Added: Support for heartbeats
13
-
14
- ## [1.1.7] - 2024-05-12
15
-
16
- - Support for Connection.update-secret
17
- - Allow sub-second connect_timeout
18
- - Fixed: undefinied variable if message was returned and no on_return block was set
19
-
20
- ## [1.1.6] - 2024-03-26
21
-
22
- - Fixed: Channel#wait_for_confirms now waits for all confirms, in a thread safe way
23
- - Changed: When server sends Connection.blocked the client isn't write blocked anymore, and can continue consume for instance. However, the on_blocked/unblocked callbacks should be used and manually stop publishing as the server otherwise will stop reading from the client socket.
24
-
25
- ## [1.1.5] - 2024-03-15
26
-
27
- - Fixed: Correctly reference the `UnexpectedFrameEnd` exception
28
-
29
- ## [1.1.4] - 2021-12-27
30
-
31
- - Fixed: Ruby 3.1.0 compability, StringIO have to be required manually
32
-
33
- ## [1.1.3] - 2021-11-04
34
-
35
- - Fixed: Reraise SystemcallError in connect so that reconnect works
36
- - Fixed: Keepalive support in OS X
37
- - Added: Make keepalive settings configurable (eg. amqp://?keepalive=60:10:3)
38
-
39
- ## [1.1.2] - 2021-10-15
40
-
41
- - Added: Support for JRuby and TruffleRuby
42
-
43
- ## [1.1.1] - 2021-09-15
44
-
45
- - Added: Examples in the documentation
46
- - Added: Faster Properties and Table encoding and decoding
47
-
48
- ## [1.1.0] - 2021-09-08
49
-
50
- - Fixed: Due to a race condition publishers could get stuck waiting for publish confirms
51
- - Change: Message, ReturnMessage and Properties are now classes and not structs (for performance reasons)
52
- - Added: Ruby 2.6 support
53
- - Added: RBS signatures in sig/amqp-client.rbs
54
-
55
- ## [1.0.2] - 2021-09-07
56
-
57
- - Changed: Raise ConnectionClosed and ChannelClosed correctly (previous always ChannelClosed)
58
- - Fixed: Respect Connection#blocked sent by the broker, will block all writes/requests
59
-
60
- ## [1.0.1] - 2021-09-06
61
-
62
- - The API is fully documented! <https://cloudamqp.github.io/amqp-client.rb/>
63
- - Fixed: Socket writing is now thread-safe
64
- - Change: Block while waiting for basic_cancel by default
65
- - Added: Can specify channel_max, heartbeat and frame_max as options to the Client/Connection
66
- - Added: Reuse channel 1 to declare high level queues/exchanges
67
- - Fixed: Only wait for exchange_delete confirmation if not no_wait is set
68
- - Fixed: Don't raise if Connection#close detects a closed socket (expected)
69
-
70
- ## [1.0.0] - 2021-08-27
71
-
72
- - Verify TLS certificate matches hostname
73
- - TLS thread-safety
74
- - Assemble Messages in the (single threaded) read_loop thread
75
- - Give read_loop_thread higher priority so that channel errors crop up faster
76
- - One less Thread required per Consumer
77
- - Read exactly one frame at a time, not trying to split/assemble frames over socket reads
78
- - Heafty speedup for message assembling with StringIO
79
- - Channel#queue_declare returns a struct for nicer API (still backward compatible)
80
- - AMQP::Client#publish_and_forget for fast, non confirmed publishes
81
- - Allow Properties#timestamp to be an integer (in addition to Time)
82
- - Bug fix allow Properties#expiration to be an Integer
83
- - Consistent use of named parameters
84
- - High level Exchange API
85
- - Don't try to reconnect if first connect fails
86
- - Bug fix: Close all channels when connection is closed by server
87
- - Raise error if run out of channels
88
- - Improved retry in high level client
89
- - Bug fix: Support channel_max 0
90
-
91
- ## [0.3.0] - 2021-08-20
92
-
93
- - Channel#wait_for_confirms is a smarter way of waiting for publish confirms
94
- - Default connection_name to $PROGRAM_NAME
95
-
96
- ## [0.2.3] - 2021-08-19
97
-
98
- - Improved TLS/AMQPS support
99
-
100
- ## [0.2.2] - 2021-08-19
101
-
102
- - TLS port issue fixed
103
-
104
- ## [0.2.1] - 2021-08-19
105
-
106
- - More arguments to be passed to AMQP::Client::Queue
107
- - Can require with 'amqp-client'
108
-
109
- ## [0.2.0] - 2021-08-19
110
-
111
- - Much improved and with a high level client
112
-
113
- ## [0.1.0] - 2021-04-13
114
-
115
- - Initial release
data/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- * @carlhoerberg @spuun @dentarg @baelter @walro
data/Gemfile DELETED
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in amqp-client.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
9
-
10
- gem "minitest", "~> 5.0"
11
-
12
- gem "rubocop", "~> 1.7"
13
-
14
- gem "rubocop-minitest", require: false
15
-
16
- gem "yard", require: false
17
-
18
- gem "redcarpet", require: false, platforms: :ruby