rabbitcage 0.1.1 → 0.1.2

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -41,7 +41,7 @@ class RabbitCage
41
41
  when AMQP::Protocol::Connection::Open
42
42
  @vhost = frame.payload.virtual_host
43
43
  when AMQP::Protocol::Connection::StartOk
44
- length = frame.payload.response[10].unpack('c').first
44
+ length = frame.payload.response[10].class == String ? frame.payload.response[10].unpack('c').first : frame.payload.response[10]
45
45
  @user = frame.payload.response[11..10+length]
46
46
  end
47
47
 
@@ -51,7 +51,7 @@ class RabbitCage
51
51
  resp = AMQP::Protocol::Channel::Close.new(:reply_code => 403,
52
52
  :reply_text => "ACCESS_REFUSED - access to '#{frame.payload.queue || frame.payload.exchange rescue 'the server'}' in vhost '#{@vhost}' refused for user '#{@user}' by rabbitcage",
53
53
  :method_id => 10,
54
- :class_id => 50,
54
+ :class_id => 50
55
55
  ).to_frame
56
56
  resp.channel = frame.channel
57
57
  self.send_data resp.to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbitcage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Sander