klomp 1.0.2 → 1.0.3
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/ChangeLog.md +5 -0
- data/klomp.gemspec +1 -1
- data/lib/klomp.rb +1 -1
- data/lib/klomp/frames.rb +1 -1
- data/spec/klomp/frames_spec.rb +10 -1
- metadata +2 -2
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
data/lib/klomp.rb
CHANGED
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
|
data/spec/klomp/frames_spec.rb
CHANGED
@@ -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.
|
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:
|
227
|
+
hash: 3153745006188263140
|
228
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
229
|
none: false
|
230
230
|
requirements:
|