klomp 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Klomp Changes
2
2
  --------------------------------------------------------------------------------
3
3
 
4
+ 1.0.3 (2012/10/10)
5
+ ================================================================================
6
+
7
+ - Frame#dump_headers: stringify header keys and values
8
+
4
9
  1.0.2 (2012/10/10)
5
10
  ================================================================================
6
11
 
data/klomp.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "klomp"
5
- s.version = "1.0.2"
5
+ s.version = "1.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Nick Sieger"]
data/lib/klomp.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Klomp
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
 
4
4
  class Error < StandardError; end
5
5
 
data/lib/klomp/frames.rb CHANGED
@@ -18,7 +18,7 @@ class Klomp
18
18
 
19
19
  def dump_headers
20
20
  headers.map do |pair|
21
- pair.map {|x| x.gsub("\n","\\n").gsub(":","\\c").gsub("\\", "\\\\") }.join(':')
21
+ pair.map {|x| x.to_s.gsub("\n","\\n").gsub(":","\\c").gsub("\\", "\\\\") }.join(':')
22
22
  end.join("\n").tap {|s| s << "\n" unless s.empty? }
23
23
  end
24
24
  end
@@ -6,7 +6,6 @@ describe Klomp::Frames do
6
6
 
7
7
  context "CONNECT" do
8
8
 
9
-
10
9
  When(:connect) { Klomp::Frames::Connect.new(options).to_s }
11
10
 
12
11
  Then { connect.should == frame(:connect) }
@@ -21,6 +20,16 @@ describe Klomp::Frames do
21
20
 
22
21
  end
23
22
 
23
+ context "stringifies all header keys and values" do
24
+
25
+ Given(:headers) { { timeout:42 } }
26
+
27
+ When(:send_frame) { Klomp::Frames::Send.new("/queue/q", "", headers) }
28
+
29
+ Then { send_frame.to_s.should =~ /timeout:42/ }
30
+
31
+ end
32
+
24
33
  context "#[] is an alias for #headers" do
25
34
 
26
35
  When(:connect) { Klomp::Frames::Connect.new(options) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: klomp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -224,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
224
  version: '0'
225
225
  segments:
226
226
  - 0
227
- hash: 4534787410900240650
227
+ hash: 3153745006188263140
228
228
  required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  none: false
230
230
  requirements: