Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Write json-files as json into the document

  • Loading branch information...
commit 886b46cd2cc4c7be0af915c9158c85355614455b 1 parent eb84d42
@nikuph nikuph authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/soca/pusher.rb
View
6 lib/soca/pusher.rb
@@ -147,7 +147,11 @@ def map_file(path, hash)
while !parts.empty?
part = parts.shift
if parts.empty?
- current_hash[part] = file_data
+ if part =~ /.json$/
+ current_hash[part.gsub(/.json$/, '')] = JSON.parse(file_data)
+ else
+ current_hash[part] = file_data
+ end
else
current_hash[part] ||= {}
current_hash = current_hash[part]
Please sign in to comment.
Something went wrong with that request. Please try again.