katcp 0.0.4 → 0.0.7
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/lib/katcp/client.rb +10 -0
- data/lib/katcp/util.rb +14 -14
- data/lib/katcp/version.rb +1 -1
- metadata +7 -9
data/lib/katcp/client.rb
CHANGED
data/lib/katcp/util.rb
CHANGED
@@ -8,13 +8,13 @@ class String
|
|
8
8
|
def katcp_escape!
|
9
9
|
empty? ? self[0..-1] = '\@' : self.gsub!(/[\\ \0\n\r\e\t]/) do |s|
|
10
10
|
case s
|
11
|
-
when "\\"
|
12
|
-
when " "
|
13
|
-
when "\0"
|
14
|
-
when "\n"
|
15
|
-
when "\r"
|
16
|
-
when "\e"
|
17
|
-
when "\t"
|
11
|
+
when "\\"; '\\\\'
|
12
|
+
when " " ; '\_'
|
13
|
+
when "\0"; '\0'
|
14
|
+
when "\n"; '\n'
|
15
|
+
when "\r"; '\r'
|
16
|
+
when "\e"; '\e'
|
17
|
+
when "\t"; '\t'
|
18
18
|
end
|
19
19
|
end
|
20
20
|
self
|
@@ -29,13 +29,13 @@ class String
|
|
29
29
|
def katcp_unescape!
|
30
30
|
self == '\@' ? self[0..-1] = '' : self.gsub!(/\\[\\_0nret]/) do |s|
|
31
31
|
case s
|
32
|
-
when '\\\\'
|
33
|
-
when '\_'
|
34
|
-
when '\0'
|
35
|
-
when '\n'
|
36
|
-
when '\r'
|
37
|
-
when '\e'
|
38
|
-
when '\t'
|
32
|
+
when '\\\\'; "\\"
|
33
|
+
when '\_'; " "
|
34
|
+
when '\0'; "\0"
|
35
|
+
when '\n'; "\n"
|
36
|
+
when '\r'; "\r"
|
37
|
+
when '\e'; "\e"
|
38
|
+
when '\t'; "\t"
|
39
39
|
end
|
40
40
|
end
|
41
41
|
self
|
data/lib/katcp/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David MacMahon
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2012-09-06 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: narray
|
@@ -52,7 +51,6 @@ files:
|
|
52
51
|
- lib/katcp/util.rb
|
53
52
|
- lib/katcp/version.rb
|
54
53
|
- examples/listdev.rb
|
55
|
-
has_rdoc: true
|
56
54
|
homepage: http://rb-katcp.rubyforge.org/
|
57
55
|
licenses: []
|
58
56
|
|
@@ -61,7 +59,7 @@ rdoc_options:
|
|
61
59
|
- -m
|
62
60
|
- README
|
63
61
|
- --title
|
64
|
-
- Ruby/KATCP 0.0.
|
62
|
+
- Ruby/KATCP 0.0.7 Documentation
|
65
63
|
require_paths:
|
66
64
|
- lib
|
67
65
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -87,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
85
|
requirements: []
|
88
86
|
|
89
87
|
rubyforge_project: rb-katcp
|
90
|
-
rubygems_version: 1.
|
88
|
+
rubygems_version: 1.8.24
|
91
89
|
signing_key:
|
92
90
|
specification_version: 3
|
93
91
|
summary: KATCP library for Ruby
|