[rb] put encoded profile back into 'zip' for ProfileHelper#as_json
this is for serialization, the base64 string is always extracted before sending over the wire
@@ -30,7 +30,7 @@ module Selenium
end
def as_json(*)
- Zipper.zip(layout_on_disk)
+ {zip: Zipper.zip(layout_on_disk)}
end
def to_json(*)
@@ -61,7 +61,7 @@ module Selenium
module ClassMethods
def from_json(json)
- data = JSON.parse(json)
+ data = JSON.parse(json).fetch('zip')
# can't use Tempfile here since it doesn't support File::BINARY mode on 1.8
# can't use Dir.mktmpdir(&blk) because of http://jira.codehaus.org/browse/JRUBY-4082
