amq-protocol 0.7.0.alpha5 → 0.7.0.alpha6

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.
@@ -45,8 +45,8 @@ module AMQ
45
45
  buffer << TYPE_INTEGER
46
46
  buffer << [value].pack(PACK_UINT32)
47
47
  when Float then
48
- buffer << TYPE_32BIT_FLOAT
49
- buffer << [value].pack(PACK_32BIT_FLOAT)
48
+ buffer << TYPE_64BIT_FLOAT
49
+ buffer << [value].pack(PACK_64BIT_FLOAT)
50
50
  when TrueClass, FalseClass then
51
51
  value = value ? 1 : 0
52
52
  buffer << TYPE_INTEGER
@@ -1,5 +1,5 @@
1
1
  module AMQ
2
2
  module Protocol
3
- VERSION = "0.7.0.alpha5"
3
+ VERSION = "0.7.0.alpha6"
4
4
  end # Protocol
5
5
  end # AMQ
@@ -17,7 +17,7 @@ module AMQ
17
17
  {
18
18
  {} => "\000\000\000\000",
19
19
  {"test" => 1} => "\000\000\000\n\004testI\000\000\000\001",
20
- {"float" => 1.0} => "\000\000\000\v\005floatf\000\000\200?",
20
+ {"float" => 1.87} => "\000\000\000\017\005floatd\354Q\270\036\205\353\375?",
21
21
  {"test" => "string"} => "\000\000\000\020\004testS\000\000\000\006string",
22
22
  {"test" => {}} => "\000\000\000\n\004testF\000\000\000\000",
23
23
  {"test" => bigdecimal_1} => "\000\000\000\v\004testD\000\000\000\000\001",
@@ -28,7 +28,7 @@ module AMQ
28
28
  {
29
29
  {} => "\x00\x00\x00\x00",
30
30
  {"test" => 1} => "\x00\x00\x00\n\x04testI\x00\x00\x00\x01",
31
- {"float" => 1.0} => "\000\000\000\v\005floatf\000\000\200?",
31
+ {"float" => 1.92} => "\x00\x00\x00\x0F\x05floatd\xB8\x1E\x85\xEBQ\xB8\xFE?",
32
32
  {"test" => "string"} => "\x00\x00\x00\x10\x04testS\x00\x00\x00\x06string",
33
33
  {"test" => {}} => "\x00\x00\x00\n\x04testF\x00\x00\x00\x00",
34
34
  {"test" => bigdecimal_1} => "\x00\x00\x00\v\x04testD\x00\x00\x00\x00\x01",
@@ -53,7 +53,7 @@ module AMQ
53
53
  end
54
54
 
55
55
  it "should return \"\x00\x00\x00\n\x04testI\x00\x00\x00\x01\" for { :coordinates => { :latitude => 59.35, :longitude => 18.066667 } }" do
56
- Table.encode(:coordinates => { :latitude => 59.35, :longitude => 18.066667 }).should eql("\x00\x00\x00.\vcoordinatesF\x00\x00\x00\x1D\blatitudefffmB\tlongitudef\x89\x88\x90A")
56
+ Table.encode(:coordinates => { :latitude => 59.35, :longitude => 18.066667 }).should eql("\000\000\0006\vcoordinatesF\000\000\000%\blatituded\315\314\314\314\314\254M@\tlongituded\361\270\250\026\021\0212@")
57
57
  end
58
58
 
59
59
  DATA.each do |data, encoded|
@@ -68,6 +68,10 @@ module AMQ
68
68
  it "should return #{data.inspect} for #{encoded.inspect}" do
69
69
  Table.decode(encoded).should eql(data)
70
70
  end
71
+
72
+ it "is capable of decoding what it encodes" do
73
+ Table.decode(Table.encode(data)).should == data
74
+ end
71
75
  end
72
76
  end
73
77
  end
metadata CHANGED
@@ -1,17 +1,10 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: amq-protocol
3
- version: !ruby/object:Gem::Version
4
- hash: -3702664410
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.0.alpha6
5
5
  prerelease: 6
6
- segments:
7
- - 0
8
- - 7
9
- - 0
10
- - alpha
11
- - 5
12
- version: 0.7.0.alpha5
13
6
  platform: ruby
14
- authors:
7
+ authors:
15
8
  - Jakub Stastny
16
9
  - Michael S. Klishin
17
10
  - Theo Hultberg
@@ -19,21 +12,19 @@ authors:
19
12
  autorequire:
20
13
  bindir: bin
21
14
  cert_chain: []
22
-
23
- date: 2011-05-29 00:00:00 Z
15
+ date: 2011-05-29 00:00:00.000000000Z
24
16
  dependencies: []
25
-
26
- description: " amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not an\n AMQP client: amq-protocol only handles serialization and deserialization.\n If you want to write your own AMQP client, this gem can help you with that.\n"
27
- email:
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"
20
+ email:
28
21
  - michael@novemberain.com
29
22
  - stastny@101ideas.cz
30
23
  executables: []
31
-
32
24
  extensions: []
33
-
34
- extra_rdoc_files:
25
+ extra_rdoc_files:
35
26
  - README.textile
36
- files:
27
+ files:
37
28
  - .gitignore
38
29
  - .gitmodules
39
30
  - .rspec
@@ -76,38 +67,26 @@ files:
76
67
  - tasks.rb
77
68
  homepage: http://github.com/ruby-amqp/amq-protocol
78
69
  licenses: []
79
-
80
70
  post_install_message:
81
71
  rdoc_options: []
82
-
83
- require_paths:
72
+ require_paths:
84
73
  - lib
85
- required_ruby_version: !ruby/object:Gem::Requirement
74
+ required_ruby_version: !ruby/object:Gem::Requirement
86
75
  none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- hash: 3
91
- segments:
92
- - 0
93
- version: "0"
94
- required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
95
81
  none: false
96
- requirements:
97
- - - ">"
98
- - !ruby/object:Gem::Version
99
- hash: 25
100
- segments:
101
- - 1
102
- - 3
103
- - 1
82
+ requirements:
83
+ - - ! '>'
84
+ - !ruby/object:Gem::Version
104
85
  version: 1.3.1
105
86
  requirements: []
106
-
107
87
  rubyforge_project: amq-protocol
108
88
  rubygems_version: 1.8.4
109
89
  signing_key:
110
90
  specification_version: 3
111
91
  summary: AMQP 0.9.1 encoder & decoder.
112
92
  test_files: []
113
-