Skip to content

Commit 1ffb514

Browse files
committed
General gsub to catch all instances of JS objects
1 parent cffc601 commit 1ffb514

File tree

1 file changed

+1
-2
lines changed
  • lib/puppet/provider/mongodb_replset

1 file changed

+1
-2
lines changed

lib/puppet/provider/mongodb_replset/mongo.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ def self.mongo_command(command, host=nil, retries=4)
266266
end
267267

268268
# Dirty hack to remove JavaScript objects
269-
output.gsub!(/ISODate\((.+?)\)/, '\1 ')
270-
output.gsub!(/Timestamp\((.+?)\)/, '[\1]')
269+
output.gsub!(/\w+\((.+?)\)/, '\1')
271270

272271
#Hack to avoid non-json empty sets
273272
output = "{}" if output == "null\n"

0 commit comments

Comments
 (0)