amq-protocol 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1186376a08e72a7c0638f0722abfe51156a219a3
4
+ data.tar.gz: ea6f5b0d5e17db93da66d452770e54df709c0e77
5
+ SHA512:
6
+ metadata.gz: b1a755c018b85afbd991fbd569b32ceb49c329a7f33480c4f080f3cb79b3cd521708ba59e312a83aa3ec4ef441c592ad9348caef39314f5e73e95ea6ad9a9486
7
+ data.tar.gz: eceb36030d7404ff5530141f4a9c2f337324f85de5c58a08dfdb9c3480411b120b1988771d7949e4dc5238273ff9dd9a2364558084f5b7465fbd03d7e5a7af3e
data/ChangeLog.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## Changes between 1.6.0 and 1.7.0
2
+
3
+ ### connection.blocked Support
4
+
5
+ `connection.blocked` AMQP 0.9.1 extension is now supported
6
+ (should be available as of RabbitMQ 3.2).
7
+
8
+
1
9
  ## Changes between 1.0.0 and 1.1.0
2
10
 
3
11
  ### Performance Enhancements
data/generate.rb CHANGED
@@ -5,7 +5,7 @@ def sh(*args)
5
5
  system(*args)
6
6
  end
7
7
 
8
- extensions = ["codegen/rabbitmq-codegen/credit_extension.json"]
8
+ extensions = []
9
9
 
10
10
  spec = "codegen/rabbitmq-codegen/amqp-rabbitmq-0.9.1.json"
11
11
  unless File.exist?(spec)
@@ -510,6 +510,72 @@ module AMQ
510
510
 
511
511
  end
512
512
 
513
+ class Blocked < Protocol::Method
514
+ @name = "connection.blocked"
515
+ @method_id = 60
516
+ @index = 0x000A003C # 10, 60, 655420
517
+ @packed_indexes = [10, 60].pack(PACK_UINT16_X2).freeze
518
+
519
+ # @return
520
+ def self.decode(data)
521
+ offset = 0
522
+ length = data[offset, 1].unpack(PACK_CHAR).first
523
+ offset += 1
524
+ reason = data[offset, length]
525
+ offset += length
526
+ self.new(reason)
527
+ end
528
+
529
+ attr_reader :reason
530
+ def initialize(reason)
531
+ @reason = reason
532
+ end
533
+
534
+ def self.has_content?
535
+ false
536
+ end
537
+
538
+ # @return
539
+ # [u'reason = EMPTY_STRING']
540
+ def self.encode(reason)
541
+ channel = 0
542
+ buffer = @packed_indexes.dup
543
+ buffer << reason.to_s.bytesize.chr
544
+ buffer << reason.to_s
545
+ MethodFrame.new(buffer, channel)
546
+ end
547
+
548
+ end
549
+
550
+ class Unblocked < Protocol::Method
551
+ @name = "connection.unblocked"
552
+ @method_id = 61
553
+ @index = 0x000A003D # 10, 61, 655421
554
+ @packed_indexes = [10, 61].pack(PACK_UINT16_X2).freeze
555
+
556
+ # @return
557
+ def self.decode(data)
558
+ offset = 0
559
+ self.new()
560
+ end
561
+
562
+ def initialize()
563
+ end
564
+
565
+ def self.has_content?
566
+ false
567
+ end
568
+
569
+ # @return
570
+ # []
571
+ def self.encode()
572
+ channel = 0
573
+ buffer = @packed_indexes.dup
574
+ MethodFrame.new(buffer, channel)
575
+ end
576
+
577
+ end
578
+
513
579
  end
514
580
 
515
581
  class Channel < Protocol::Class
@@ -2037,126 +2103,6 @@ module AMQ
2037
2103
 
2038
2104
  end
2039
2105
 
2040
- class Credit < Protocol::Method
2041
- @name = "basic.credit"
2042
- @method_id = 200
2043
- @index = 0x003C00C8 # 60, 200, 3932360
2044
- @packed_indexes = [60, 200].pack(PACK_UINT16_X2).freeze
2045
-
2046
- # @return
2047
- def self.decode(data)
2048
- offset = 0
2049
- length = data[offset, 1].unpack(PACK_CHAR).first
2050
- offset += 1
2051
- consumer_tag = data[offset, length]
2052
- offset += length
2053
- credit = data[offset, 4].unpack(PACK_UINT32).first
2054
- offset += 4
2055
- bit_buffer = data[offset, 1].unpack(PACK_CHAR).first
2056
- offset += 1
2057
- drain = (bit_buffer & (1 << 0)) != 0
2058
- self.new(consumer_tag, credit, drain)
2059
- end
2060
-
2061
- attr_reader :consumer_tag, :credit, :drain
2062
- def initialize(consumer_tag, credit, drain)
2063
- @consumer_tag = consumer_tag
2064
- @credit = credit
2065
- @drain = drain
2066
- end
2067
-
2068
- def self.has_content?
2069
- false
2070
- end
2071
-
2072
- # @return
2073
- # [u'consumer_tag = EMPTY_STRING', u'credit = nil', u'drain = nil']
2074
- def self.encode(channel, consumer_tag, credit, drain)
2075
- buffer = @packed_indexes.dup
2076
- buffer << consumer_tag.to_s.bytesize.chr
2077
- buffer << consumer_tag.to_s
2078
- buffer << [credit].pack(PACK_UINT32)
2079
- bit_buffer = 0
2080
- bit_buffer = bit_buffer | (1 << 0) if drain
2081
- buffer << [bit_buffer].pack(PACK_CHAR)
2082
- MethodFrame.new(buffer, channel)
2083
- end
2084
-
2085
- end
2086
-
2087
- class CreditOk < Protocol::Method
2088
- @name = "basic.credit-ok"
2089
- @method_id = 201
2090
- @index = 0x003C00C9 # 60, 201, 3932361
2091
- @packed_indexes = [60, 201].pack(PACK_UINT16_X2).freeze
2092
-
2093
- # @return
2094
- def self.decode(data)
2095
- offset = 0
2096
- available = data[offset, 4].unpack(PACK_UINT32).first
2097
- offset += 4
2098
- self.new(available)
2099
- end
2100
-
2101
- attr_reader :available
2102
- def initialize(available)
2103
- @available = available
2104
- end
2105
-
2106
- def self.has_content?
2107
- false
2108
- end
2109
-
2110
- # @return
2111
- # [u'available = nil']
2112
- def self.encode(channel, available)
2113
- buffer = @packed_indexes.dup
2114
- buffer << [available].pack(PACK_UINT32)
2115
- MethodFrame.new(buffer, channel)
2116
- end
2117
-
2118
- end
2119
-
2120
- class CreditDrained < Protocol::Method
2121
- @name = "basic.credit-drained"
2122
- @method_id = 202
2123
- @index = 0x003C00CA # 60, 202, 3932362
2124
- @packed_indexes = [60, 202].pack(PACK_UINT16_X2).freeze
2125
-
2126
- # @return
2127
- def self.decode(data)
2128
- offset = 0
2129
- length = data[offset, 1].unpack(PACK_CHAR).first
2130
- offset += 1
2131
- consumer_tag = data[offset, length]
2132
- offset += length
2133
- credit_drained = data[offset, 4].unpack(PACK_UINT32).first
2134
- offset += 4
2135
- self.new(consumer_tag, credit_drained)
2136
- end
2137
-
2138
- attr_reader :consumer_tag, :credit_drained
2139
- def initialize(consumer_tag, credit_drained)
2140
- @consumer_tag = consumer_tag
2141
- @credit_drained = credit_drained
2142
- end
2143
-
2144
- def self.has_content?
2145
- false
2146
- end
2147
-
2148
- # @return
2149
- # [u'consumer_tag = EMPTY_STRING', u'credit_drained = nil']
2150
- def self.encode(channel, consumer_tag, credit_drained)
2151
- buffer = @packed_indexes.dup
2152
- buffer << consumer_tag.to_s.bytesize.chr
2153
- buffer << consumer_tag.to_s
2154
- buffer << [credit_drained].pack(PACK_UINT32)
2155
- MethodFrame.new(buffer, channel)
2156
- end
2157
-
2158
- end
2159
-
2160
2106
  end
2161
2107
 
2162
2108
  class Tx < Protocol::Class
@@ -1,5 +1,5 @@
1
1
  module AMQ
2
2
  module Protocol
3
- VERSION = "1.6.0"
3
+ VERSION = "1.7.0"
4
4
  end # Protocol
5
5
  end # AMQ
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amq-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
5
- prerelease:
4
+ version: 1.7.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jakub Stastny
@@ -12,16 +11,15 @@ authors:
12
11
  autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2013-05-14 00:00:00.000000000 Z
14
+ date: 2013-08-07 00:00:00.000000000 Z
16
15
  dependencies: []
17
- description: ! " amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It
18
- is not an\n AMQP client: amq-protocol only handles serialization and deserialization.\n
19
- \ If you want to write your own AMQP client, this gem can help you with that.\n"
16
+ description: |2
17
+ amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not an
18
+ AMQP client: amq-protocol only handles serialization and deserialization.
19
+ If you want to write your own AMQP client, this gem can help you with that.
20
20
  email:
21
- - !binary |-
22
- bWljaGFlbEBub3ZlbWJlcmFpbi5jb20=
23
- - !binary |-
24
- c3Rhc3RueUAxMDFpZGVhcy5jeg==
21
+ - michael@novemberain.com
22
+ - stastny@101ideas.cz
25
23
  executables: []
26
24
  extensions: []
27
25
  extra_rdoc_files:
@@ -85,27 +83,25 @@ files:
85
83
  homepage: http://github.com/ruby-amqp/amq-protocol
86
84
  licenses:
87
85
  - MIT
86
+ metadata: {}
88
87
  post_install_message:
89
88
  rdoc_options: []
90
89
  require_paths:
91
90
  - lib
92
91
  required_ruby_version: !ruby/object:Gem::Requirement
93
- none: false
94
92
  requirements:
95
- - - ! '>='
93
+ - - '>='
96
94
  - !ruby/object:Gem::Version
97
95
  version: '0'
98
96
  required_rubygems_version: !ruby/object:Gem::Requirement
99
- none: false
100
97
  requirements:
101
- - - ! '>='
98
+ - - '>='
102
99
  - !ruby/object:Gem::Version
103
100
  version: '0'
104
101
  requirements: []
105
102
  rubyforge_project: amq-protocol
106
- rubygems_version: 1.8.25
103
+ rubygems_version: 2.0.5
107
104
  signing_key:
108
- specification_version: 3
105
+ specification_version: 4
109
106
  summary: AMQP 0.9.1 encoder & decoder.
110
107
  test_files: []
111
- has_rdoc: