katcp 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -292,7 +292,7 @@ module KATCP
292
292
  elsif byte_count == 0
293
293
  warn "writing 0 bytes to #{register_name}"
294
294
  end
295
- resp = request(:write, register_name, register_offset, data)
295
+ resp = request(:write, register_name, byte_offset, data)
296
296
  raise resp.to_s unless resp.ok?
297
297
  self
298
298
  end
data/lib/katcp/client.rb CHANGED
@@ -132,8 +132,11 @@ module KATCP
132
132
  end
133
133
 
134
134
  # Translates calls to missing methods into KATCP requests.
135
+ # Raises an exception if the response status is not OK.
135
136
  def method_missing(sym, *args)
136
- request(sym, *args)
137
+ resp = request(sym, *args)
138
+ raise resp.to_s unless resp.ok?
139
+ resp
137
140
  end
138
141
 
139
142
  # Provides terse string representation of +self+.
@@ -46,8 +46,8 @@ module KATCP
46
46
  # call-seq:
47
47
  # grep(pattern, join=' ') -> Array or Strings
48
48
  # grep(pattern, nil) -> Array of Arrays
49
- # grep(pattern, join=' ') {|line_array| ...}-> Array of Strings
50
- # grep(pattern, nil) {|line_array| ...}-> Array of ...
49
+ # grep(pattern, join=' ') {|line_array| ...} -> Array of Strings
50
+ # grep(pattern, nil) {|line_array| ...} -> Array of ...
51
51
  #
52
52
  # Greps through lines for +pattern+. If a block is given, each line will
53
53
  # be passed to the block and replaced in the returned Array by the block's
data/lib/katcp/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  #++
4
4
 
5
5
  module KATCP
6
- VERSION = "0.0.3"
6
+ VERSION = "0.0.4"
7
7
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katcp
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 23
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 0
8
- - 3
9
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
10
11
  platform: ruby
11
12
  authors:
12
13
  - David MacMahon
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-10-21 00:00:00 -07:00
18
+ date: 2011-02-22 00:00:00 -08:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 25
28
30
  segments:
29
31
  - 0
30
32
  - 5
@@ -59,7 +61,7 @@ rdoc_options:
59
61
  - -m
60
62
  - README
61
63
  - --title
62
- - Ruby/KATCP 0.0.3 Documentation
64
+ - Ruby/KATCP 0.0.4 Documentation
63
65
  require_paths:
64
66
  - lib
65
67
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -67,6 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
69
  requirements:
68
70
  - - ">="
69
71
  - !ruby/object:Gem::Version
72
+ hash: 53
70
73
  segments:
71
74
  - 1
72
75
  - 8
@@ -77,6 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
80
  requirements:
78
81
  - - ">="
79
82
  - !ruby/object:Gem::Version
83
+ hash: 3
80
84
  segments:
81
85
  - 0
82
86
  version: "0"