bunny 0.7.10 → 0.7.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 072792fbee28a7ddb863068d4d50082734814fcf
4
- data.tar.gz: a7c720f93a3b196be83350f0694a15191ecf8148
3
+ metadata.gz: 730835b43c635e1c2bed1e7bc9b45a729c27a4f2
4
+ data.tar.gz: 66fa00bed722634a61b0344783c67ab0f448fc41
5
5
  SHA512:
6
- metadata.gz: 20d9da18623a97f363ee15ed57f26b433e4a9328769e2e8993c4c53f33a63e256438f66487c74581ce284dac2729e22dddd787446b605ad965bc40e9382569f7
7
- data.tar.gz: 8d91cc821840d51811767541b5637246bbc098a71923cd52c3773044519dd5fb000a12532ca4761435e0415e76089d2cf09cad37ccd82ed9038450cd9fe4a1bf
6
+ metadata.gz: 5313afeff12e6166479615e17779bfb08962a9d71c1d0e1f13a6ff552f325232954ed31ef37f10c8c7f93d462cc7ec86b7bba7d113b61410b954f155dbba37e2
7
+ data.tar.gz: 1bccb496d6204b99d707f684b8d068bb4f277e2dd887e0b6355cf90d60e6bdd8900bfc2aaf5fc036e2896a44acbc208601554b5e1898c6a0a098db66b8072091
@@ -1,15 +1,20 @@
1
- # https://github.com/travis-ci/travis-ci/wiki/.travis.yml-options
1
+ language: ruby
2
2
  bundler_args: --without development
3
+ cache: bundler
4
+ before_script: "./bin/ci/before_build"
3
5
  script: "bundle exec rspec spec"
6
+ dist: trusty
4
7
  rvm:
5
- - 1.8.7
6
- - ree
7
- - 1.9.2
8
- - 1.9.3
9
- - rbx-2.0
8
+ - "2.4.1"
9
+ - "2.3.4"
10
+ - "2.2.7"
10
11
  notifications:
11
- recipients:
12
- - celldee@gmail.com
13
- - jakub@rabbitmq.com
12
+ email:
14
13
  - skaes@railsexpress.de
15
- - eric@5stops.com
14
+ services:
15
+ - rabbitmq
16
+ branches:
17
+ only:
18
+ - 0.7.x-stable
19
+ env:
20
+ - CI=true
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ = Version 0.7.11
2
+
3
+ * support boolean values in message headers
4
+
1
5
  = Version 0.7.10
2
6
 
3
7
  * handle messages larger than frame_max correctly
data/Gemfile CHANGED
@@ -35,7 +35,7 @@ group :development do
35
35
  end
36
36
 
37
37
  group :test do
38
- gem "rspec", "~> 2.6.0"
38
+ gem "rspec", "~> 3.6.0"
39
39
  end
40
40
 
41
41
  gemspec
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $ctl = ENV["BUNNY_RABBITMQCTL"] || ENV["RABBITMQCTL"] || "sudo rabbitmqctl"
4
+ $plugins = ENV["BUNNY_RABBITMQ_PLUGINS"] || ENV["RABBITMQ_PLUGINS"] || "sudo rabbitmq-plugins"
5
+
6
+ def rabbit_control(args)
7
+ command = "#{$ctl} #{args}"
8
+ system command
9
+ end
10
+
11
+ def rabbit_plugins(args)
12
+ command = "#{$plugins} #{args}"
13
+ system command
14
+ end
15
+
16
+
17
+ # guest:guest has full access to /
18
+
19
+ rabbit_control 'add_vhost /'
20
+ rabbit_control 'add_user guest guest'
21
+ rabbit_control 'set_permissions -p / guest ".*" ".*" ".*"'
22
+
23
+
24
+ # bunny_gem:bunny_password has full access to bunny_testbed
25
+
26
+ rabbit_control 'add_vhost bunny_testbed'
27
+ rabbit_control 'add_user bunny_gem bunny_password'
28
+ rabbit_control 'set_permissions -p bunny_testbed bunny_gem ".*" ".*" ".*"'
29
+
30
+
31
+ # guest:guest has full access to bunny_testbed
32
+
33
+ rabbit_control 'set_permissions -p bunny_testbed guest ".*" ".*" ".*"'
34
+
35
+
36
+ # bunny_reader:reader_password has read access to bunny_testbed
37
+
38
+ rabbit_control 'add_user bunny_reader reader_password'
39
+ rabbit_control 'set_permissions -p bunny_testbed bunny_reader "^---$" "^---$" ".*"'
40
+
41
+ # requires RabbitMQ 3.0+
42
+ # rabbit_plugins 'enable rabbitmq_management'
43
+
44
+ # Reduce retention policy for faster publishing of stats
45
+ rabbit_control "eval 'supervisor2:terminate_child(rabbit_mgmt_sup_sup, rabbit_mgmt_sup), application:set_env(rabbitmq_management, sample_retention_policies, [{global, [{605, 1}]}, {basic, [{605, 1}]}, {detailed, [{10, 1}]}]), rabbit_mgmt_sup_sup:start_child().'"
46
+ rabbit_control "eval 'supervisor2:terminate_child(rabbit_mgmt_agent_sup_sup, rabbit_mgmt_agent_sup), application:set_env(rabbitmq_management_agent, sample_retention_policies, [{global, [{605, 1}]}, {basic, [{605, 1}]}, {detailed, [{10, 1}]}]), rabbit_mgmt_agent_sup_sup:start_child().'"
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Bunny
4
- VERSION = "0.7.10"
4
+ VERSION = "0.7.11"
5
5
  end
@@ -128,7 +128,7 @@ module Qrack
128
128
  when 108 # 'l'
129
129
  table.read(:longlong)
130
130
  when 116 # 't'
131
- table.read(:octet)
131
+ table.read(:octet) == 1
132
132
  end
133
133
  end
134
134
 
@@ -210,6 +210,12 @@ module Qrack
210
210
  when Hash
211
211
  table.write(:octet, 70) # 'F'
212
212
  table.write(:table, value)
213
+ when TrueClass
214
+ table.write(:octet, 116) # 't'
215
+ table.write(:octet, 1)
216
+ when FalseClass
217
+ table.write(:octet, 116) # 't'
218
+ table.write(:octet, 0)
213
219
  end
214
220
 
215
221
  table
@@ -7,7 +7,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), %w[.. .. lib bunny]))
7
7
  describe Bunny do
8
8
 
9
9
  it "should raise an error if the wrong user name or password is used" do
10
- b = Bunny.new(:user => 'wrong')
10
+ b = Bunny.new(:spec => "0.8", :user => 'wrong')
11
11
  lambda { b.start}.should raise_error(Bunny::ProtocolError)
12
12
  end
13
13
 
@@ -22,4 +22,3 @@ describe Bunny do
22
22
  end
23
23
 
24
24
  end
25
-
@@ -104,6 +104,16 @@ describe 'Queue' do
104
104
  msg.should == lg_msg
105
105
  end
106
106
 
107
+ it "should be able to send and receive messages where body length is an exact multiple of frame_max minus framing bytes" do
108
+ limit = @b.frame_max-8
109
+ q = @b.queue('test1')
110
+ lg_msg = 'a' * (5*limit)
111
+ expect_deprecation_warning_for_publishing_on_queue(q)
112
+ q.publish(lg_msg)
113
+ msg = q.pop[:payload]
114
+ msg.should == lg_msg
115
+ end
116
+
107
117
  it "should be able call a block when popping a message" do
108
118
  q = @b.queue('test1')
109
119
  expect_deprecation_warning_for_publishing_on_queue(q)
@@ -100,6 +100,15 @@ describe 'Queue' do
100
100
  msg.should == lg_msg
101
101
  end
102
102
 
103
+ it "should be able to send and receive messages where body length is an exact multiple of frame_max minus framing bytes" do
104
+ limit = @b.frame_max-8
105
+ q = @b.queue('test1')
106
+ lg_msg = 'a' * (5*limit)
107
+ @default_exchange.publish(lg_msg, :key => 'test1')
108
+ msg = q.pop[:payload]
109
+ msg.should == lg_msg
110
+ end
111
+
103
112
  it "should be able call a block when popping a message" do
104
113
  q = @b.queue('test1')
105
114
  @default_exchange.publish('This is another test message', :key => 'test1')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Duncan
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-07-15 00:00:00.000000000 Z
15
+ date: 2017-07-19 00:00:00.000000000 Z
16
16
  dependencies: []
17
17
  description: A synchronous Ruby AMQP client that enables interaction with AMQP-compliant
18
18
  brokers.
@@ -36,6 +36,7 @@ files:
36
36
  - LICENSE
37
37
  - README.textile
38
38
  - Rakefile
39
+ - bin/ci/before_build
39
40
  - bunny.gemspec
40
41
  - examples/simple_08.rb
41
42
  - examples/simple_09.rb
@@ -97,8 +98,8 @@ files:
97
98
  homepage: http://github.com/ruby-amqp/bunny
98
99
  licenses: []
99
100
  metadata: {}
100
- post_install_message: "[\e[32mVersion 0.7.10\e[0m] handle messages larger than frame_max
101
- correctly\n"
101
+ post_install_message: "[\e[32mVersion 0.7.11\e[0m] support boolean values in message
102
+ headers\n"
102
103
  rdoc_options:
103
104
  - "--main"
104
105
  - README.rdoc
@@ -116,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  version: '0'
117
118
  requirements: []
118
119
  rubyforge_project: bunny-amqp
119
- rubygems_version: 2.4.8
120
+ rubygems_version: 2.6.12
120
121
  signing_key:
121
122
  specification_version: 4
122
123
  summary: Synchronous Ruby AMQP 0.9.1 client