Commit cd5ae4f3 by Toby Lawrence Committed by GitHub

Merge branch 'master' into test/upgrade-to-mongodb-30

parents dca1d8d3 7584dfbd
...@@ -88,8 +88,8 @@ require 'yajl/json_gem' ...@@ -88,8 +88,8 @@ require 'yajl/json_gem'
# Note that BSON was moved from Moped::BSON::ObjectId to BSON::ObjectId # Note that BSON was moved from Moped::BSON::ObjectId to BSON::ObjectId
module BSON module BSON
class ObjectId class ObjectId
def to_json def as_json(options = {})
self.to_s.to_json self.to_s
end end
end end
end end
...@@ -100,8 +100,8 @@ class Time ...@@ -100,8 +100,8 @@ class Time
# object. # object.
# Note that this was done to prevent milliseconds from showing up in the JSON response thus breaking # Note that this was done to prevent milliseconds from showing up in the JSON response thus breaking
# API compatibility for downstream clients. # API compatibility for downstream clients.
def to_json(*) def as_json(options = {})
'"' + utc().strftime("%Y-%m-%dT%H:%M:%SZ") + '"' utc().strftime("%Y-%m-%dT%H:%M:%SZ")
end end
end end
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
# More conversation at https://github.com/edx/cs_comments_service/pull/146 # More conversation at https://github.com/edx/cs_comments_service/pull/146
# -Nov 18th, 2015 # -Nov 18th, 2015
puts "Loading config.ru."
require "rack-timeout" require "rack-timeout"
use Rack::Timeout # Call as early as possible so rack-timeout runs before other middleware. use Rack::Timeout # Call as early as possible so rack-timeout runs before other middleware.
Rack::Timeout.timeout = 20 Rack::Timeout.timeout = 20
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment