asir 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2012-03-13 Kurt A. Stephens <ks.github@kurtstephens.com>
2
+
3
+ * v1.2.6: New Version: additional functionality.
4
+ * PayloadIO::UnexpectedResponse has #expected, #received attributes.
5
+
1
6
  2012-03-12 Kurt A. Stephens <ks.github@kurtstephens.com>
2
7
 
3
8
  * v1.2.5: New Version: bin/asir.
@@ -9,7 +9,9 @@ module ASIR
9
9
  # * Blank line.
10
10
  # * Footer.
11
11
  module PayloadIO
12
- class UnexpectedResponse < Error; end
12
+ class UnexpectedResponse < Error;
13
+ attr_accessor :expected, :received
14
+ end
13
15
 
14
16
  HEADER = "# asir_payload_size: "
15
17
  FOOTER = "\n# asir_payload_end"
@@ -40,7 +42,10 @@ module ASIR
40
42
  end
41
43
  unless match = regexp.match(line)
42
44
  _log { "_read_line_and_expect! #{stream} #{regexp.inspect} !~ #{line.inspect}" }
43
- raise UnexpectedResponse, "expected #{regexp.inspect}, received #{line.inspect}"
45
+ exc = UnexpectedResponse.new("expected #{regexp.inspect}, received #{line.inspect}")
46
+ exc.expected = regexp
47
+ exc.received = line
48
+ raise exc
44
49
  end
45
50
  match
46
51
  end
@@ -1,3 +1,3 @@
1
1
  module ASIR
2
- VERSION = "1.2.5"
2
+ VERSION = "1.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asir
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-13 00:00:00.000000000 Z
12
+ date: 2013-03-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: uuid
@@ -270,7 +270,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
270
270
  version: '0'
271
271
  segments:
272
272
  - 0
273
- hash: 1538140158003957969
273
+ hash: -2818264757772260278
274
274
  required_rubygems_version: !ruby/object:Gem::Requirement
275
275
  none: false
276
276
  requirements:
@@ -279,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  version: '0'
280
280
  segments:
281
281
  - 0
282
- hash: 1538140158003957969
282
+ hash: -2818264757772260278
283
283
  requirements: []
284
284
  rubyforge_project:
285
285
  rubygems_version: 1.8.25