amq-protocol 0.7.0.alpha2 → 0.7.0.alpha4
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.
- data/.gitignore +1 -0
- data/amq-protocol.gemspec +0 -1
- data/lib/amq/protocol/client.rb +1 -1
- data/lib/amq/protocol/version.rb +2 -2
- data/protocol.rb.pytemplate +1 -1
- data/spec/amq/protocol/channel_spec.rb +20 -7
- metadata +4 -7
- data/bin/jenkins.sh +0 -23
data/.gitignore
CHANGED
data/amq-protocol.gemspec
CHANGED
@@ -16,7 +16,6 @@ Gem::Specification.new do |s|
|
|
16
16
|
AMQP client: amq-protocol only handles serialization and deserialization.
|
17
17
|
If you want to write your own AMQP client, this gem can help you with that.
|
18
18
|
DESC
|
19
|
-
s.cert_chain = nil
|
20
19
|
s.email = ["bWljaGFlbEBub3ZlbWJlcmFpbi5jb20=\n", "c3Rhc3RueUAxMDFpZGVhcy5jeg==\n"].map { |i| Base64.decode64(i) }
|
21
20
|
|
22
21
|
# files
|
data/lib/amq/protocol/client.rb
CHANGED
data/lib/amq/protocol/version.rb
CHANGED
data/protocol.rb.pytemplate
CHANGED
@@ -23,7 +23,7 @@ module AMQ
|
|
23
23
|
subject do
|
24
24
|
OpenOk.decode("\x00\x00\x00\x03foo")
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
its(:channel_id) { should == 'foo' }
|
28
28
|
end
|
29
29
|
end
|
@@ -33,7 +33,7 @@ module AMQ
|
|
33
33
|
subject do
|
34
34
|
Flow.decode("\x01")
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
its(:active) { should be_true }
|
38
38
|
end
|
39
39
|
|
@@ -53,10 +53,10 @@ module AMQ
|
|
53
53
|
subject do
|
54
54
|
FlowOk.decode("\x00")
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
57
|
its(:active) { should be_false }
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
60
|
describe '.encode' do
|
61
61
|
it 'encodes the parameters as a MethodFrame' do
|
62
62
|
channel = 1
|
@@ -74,20 +74,33 @@ module AMQ
|
|
74
74
|
subject do
|
75
75
|
Close.decode("\x00\xc8\x07KTHXBAI\x00\x05\x00\x06")
|
76
76
|
end
|
77
|
-
|
77
|
+
|
78
78
|
its(:reply_code) { should == 200 }
|
79
79
|
its(:reply_text) { should == 'KTHXBAI' }
|
80
80
|
its(:class_id) { should == 5 }
|
81
81
|
its(:method_id) { should == 6 }
|
82
82
|
end
|
83
|
-
|
83
|
+
|
84
|
+
|
85
|
+
context 'with code 404 and reply_text length > 127 characters' do
|
86
|
+
subject do
|
87
|
+
raw = "\x01\x94\x80NOT_FOUND - no binding 123456789012345678901234567890123 between exchange 'amq.topic' in vhost '/' and queue 'test' in vhost '/'\x002\x002"
|
88
|
+
Close.decode(raw)
|
89
|
+
end
|
90
|
+
|
91
|
+
its(:reply_code) { should == 404 }
|
92
|
+
its(:reply_text) { should == %q{NOT_FOUND - no binding 123456789012345678901234567890123 between exchange 'amq.topic' in vhost '/' and queue 'test' in vhost '/'} }
|
93
|
+
its(:class_id) { should == 50 }
|
94
|
+
its(:method_id) { should == 50 }
|
95
|
+
end
|
96
|
+
|
84
97
|
context 'with an error code' do
|
85
98
|
it 'returns frame and lets calling code handle the issue' do
|
86
99
|
Close.decode("\x01\x38\x08NO_ROUTE\x00\x00")
|
87
100
|
end
|
88
101
|
end
|
89
102
|
end
|
90
|
-
|
103
|
+
|
91
104
|
describe '.encode' do
|
92
105
|
it 'encodes the parameters into a MethodFrame' do
|
93
106
|
channel = 1
|
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: 0.7.0.
|
4
|
+
version: 0.7.0.alpha4
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,9 +11,8 @@ authors:
|
|
11
11
|
- Mark Abramov
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
|
-
cert_chain:
|
15
|
-
date: 2011-05-
|
16
|
-
default_executable:
|
14
|
+
cert_chain: []
|
15
|
+
date: 2011-05-24 00:00:00.000000000Z
|
17
16
|
dependencies: []
|
18
17
|
description: ! " amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It
|
19
18
|
is not an\n AMQP client: amq-protocol only handles serialization and deserialization.\n
|
@@ -40,7 +39,6 @@ files:
|
|
40
39
|
- amq-protocol.gemspec
|
41
40
|
- amqp_0.9.1_changes.json
|
42
41
|
- benchmark.rb
|
43
|
-
- bin/jenkins.sh
|
44
42
|
- codegen.py
|
45
43
|
- codegen_helpers.py
|
46
44
|
- examples/00_manual_test.rb
|
@@ -67,7 +65,6 @@ files:
|
|
67
65
|
- spec/amq/protocol_spec.rb
|
68
66
|
- spec/spec_helper.rb
|
69
67
|
- tasks.rb
|
70
|
-
has_rdoc: true
|
71
68
|
homepage: http://github.com/ruby-amqp/amq-protocol
|
72
69
|
licenses: []
|
73
70
|
post_install_message:
|
@@ -88,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
85
|
version: 1.3.1
|
89
86
|
requirements: []
|
90
87
|
rubyforge_project: amq-protocol
|
91
|
-
rubygems_version: 1.
|
88
|
+
rubygems_version: 1.8.1
|
92
89
|
signing_key:
|
93
90
|
specification_version: 3
|
94
91
|
summary: AMQP 0.9.1 encoder & decoder.
|
data/bin/jenkins.sh
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
echo -e "\n\n==== Setup ===="
|
4
|
-
source /etc/profile
|
5
|
-
git fetch && git reset origin/master --hard
|
6
|
-
|
7
|
-
echo -e "\n\n==== Ruby 1.9.2 Head ===="
|
8
|
-
rvm use 1.9.2-head@ruby-amqp
|
9
|
-
gem install bundler --no-ri --no-rdoc
|
10
|
-
bundle install --path vendor/bundle/1.9.2 --without development; echo
|
11
|
-
# bundle update --without development; echo
|
12
|
-
bundle exec rspec spec
|
13
|
-
return_status=$?
|
14
|
-
|
15
|
-
echo -e "\n\n==== Ruby 1.8.7 ===="
|
16
|
-
rvm use 1.8.7@ruby-amqp
|
17
|
-
gem install bundler --no-ri --no-rdoc
|
18
|
-
bundle install --path vendor/bundle/1.8.7 --without development; echo
|
19
|
-
bundle update; echo
|
20
|
-
bundle exec rspec spec
|
21
|
-
return_status=$(expr $return_status + $?)
|
22
|
-
|
23
|
-
test $return_status -eq 0
|