Skip to content

Commit 2d6374c

Browse files
committed
[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
1 parent f5e7b8e commit 2d6374c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rb/lib/selenium/webdriver/common/profile_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def self.included(base)
3030
end
3131

3232
def as_json(*)
33-
Zipper.zip(layout_on_disk)
33+
{zip: Zipper.zip(layout_on_disk)}
3434
end
3535

3636
def to_json(*)
@@ -61,7 +61,7 @@ def verify_model(model)
6161

6262
module ClassMethods
6363
def from_json(json)
64-
data = JSON.parse(json)
64+
data = JSON.parse(json).fetch('zip')
6565

6666
# can't use Tempfile here since it doesn't support File::BINARY mode on 1.8
6767
# can't use Dir.mktmpdir(&blk) because of http://jira.codehaus.org/browse/JRUBY-4082

0 commit comments

Comments
 (0)