katcp 0.0.4 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/katcp/client.rb CHANGED
@@ -83,6 +83,16 @@ module KATCP
83
83
  end # Thread.new block
84
84
  end
85
85
 
86
+ # Return remote hostname
87
+ def host
88
+ @remote_host
89
+ end
90
+
91
+ # Return remote port
92
+ def port
93
+ @remote_port
94
+ end
95
+
86
96
  # TODO: Have a log_handler?
87
97
 
88
98
  # call-seq:
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": '\0'
14
- when "\n": '\n'
15
- when "\r": '\r'
16
- when "\e": '\e'
17
- when "\t": '\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': "\0"
35
- when '\n': "\n"
36
- when '\r': "\r"
37
- when '\e': "\e"
38
- when '\t': "\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
@@ -3,5 +3,5 @@
3
3
  #++
4
4
 
5
5
  module KATCP
6
- VERSION = "0.0.4"
6
+ VERSION = "0.0.7"
7
7
  end
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: 23
5
- prerelease: false
4
+ hash: 17
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
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: 2011-02-22 00:00:00 -08:00
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.4 Documentation
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.3.7
88
+ rubygems_version: 1.8.24
91
89
  signing_key:
92
90
  specification_version: 3
93
91
  summary: KATCP library for Ruby