aws-flow 1.0.3 → 1.0.4

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.
@@ -29,7 +29,11 @@ module AWS
29
29
  return nil if source.nil?
30
30
  output = YAML.load source
31
31
  if output.is_a? Exception
32
- backtrace = YAML.load_stream(source).find {|x| ! x.is_a? Exception}
32
+ documents = YAML.load_stream(source)
33
+ if YAML::ENGINE.yamler == 'syck'
34
+ documents = documents.documents
35
+ end
36
+ backtrace = documents.find {|x| ! x.is_a? Exception}
33
37
  output.set_backtrace(backtrace.to_a)
34
38
  end
35
39
  output
@@ -16,7 +16,7 @@
16
16
  module AWS
17
17
  module Flow
18
18
  def self.version
19
- "1.0.3"
19
+ "1.0.4"
20
20
  end
21
21
  end
22
22
  end
@@ -303,23 +303,36 @@ describe AsyncDecider do
303
303
  end
304
304
  describe YAMLDataConverter do
305
305
  let(:converter) {YAMLDataConverter.new}
306
- describe "ensures that x == load(dump(x)) is true" do
307
- {
308
- Fixnum => 5,
309
- String => "Hello World",
310
- Hash => {:test => "good"},
311
- Array => ["Hello", "World", 5],
312
- Symbol => :test,
313
- NilClass => nil
314
- }.each_pair do |klass, exemplar|
315
- it "tests #{klass}" do
316
- 1.upto(10).each do |i|
317
- converted_exemplar = exemplar
318
- i.times {converted_exemplar = converter.dump converted_exemplar}
319
- i.times {converted_exemplar = converter.load converted_exemplar}
320
- converted_exemplar.should == exemplar
306
+ %w{syck psych}.each do |engine|
307
+ describe "ensures that x == load(dump(x)) is true using #{engine}" do
308
+ before :all do
309
+ YAML::ENGINE.yamler = engine
310
+ end
311
+
312
+ {
313
+ Fixnum => 5,
314
+ String => "Hello World",
315
+ Hash => {:test => "good"},
316
+ Array => ["Hello", "World", 5],
317
+ Symbol => :test,
318
+ NilClass => nil,
319
+ }.each_pair do |klass, exemplar|
320
+ it "tests #{klass}" do
321
+ 1.upto(10).each do |i|
322
+ converted_exemplar = exemplar
323
+ i.times {converted_exemplar = converter.dump converted_exemplar}
324
+ i.times {converted_exemplar = converter.load converted_exemplar}
325
+ converted_exemplar.should == exemplar
326
+ end
321
327
  end
322
328
  end
329
+
330
+ it 'loads exception backtraces correctly' do
331
+ exemplar = Exception.new('exception')
332
+ exemplar.set_backtrace(caller)
333
+ converted_exemplar = converter.load(converter.dump(exemplar))
334
+ converted_exemplar.should == exemplar
335
+ end
323
336
  end
324
337
  end
325
338
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: