dynflow 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@ require 'algebrick'
3
3
  require 'thread'
4
4
  require 'set'
5
5
  require 'active_support/core_ext/hash/indifferent_access'
6
+ require 'base64'
6
7
 
7
8
  # TODO validate in/output, also validate unknown keys
8
9
  # TODO performance testing, how many actions will it handle?
@@ -32,12 +32,14 @@ module Dynflow
32
32
  end
33
33
 
34
34
  module Event
35
+ # TODO fix the workaround
36
+ # marshal and then use base64 because not all json libs can correctly escape binary data
35
37
  def to_hash
36
- super.update event: Marshal.dump(event)
38
+ super.update event: Base64.strict_encode64(Marshal.dump(event))
37
39
  end
38
40
 
39
41
  def self.product_from_hash(hash)
40
- super(hash.merge 'event' => Marshal.load(hash.fetch('event')))
42
+ super(hash.merge 'event' => Marshal.load(Base64.strict_decode64(hash.fetch('event'))))
41
43
  end
42
44
  end
43
45
  end
@@ -1,3 +1,3 @@
1
1
  module Dynflow
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
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: 2014-03-25 00:00:00.000000000 Z
12
+ date: 2014-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport