couchrest_model/lib/couchrest.rb

19 lines
534 B
Ruby
Raw Normal View History

2008-08-03 21:51:17 +02:00
require "rubygems"
require 'json'
require 'rest_client'
require File.dirname(__FILE__) + '/couch_rest'
require File.dirname(__FILE__) + '/database'
require File.dirname(__FILE__) + '/pager'
require File.dirname(__FILE__) + '/file_manager'
2008-09-08 00:28:20 +02:00
require File.dirname(__FILE__) + '/streamer'
2008-03-18 19:37:10 +01:00
2008-09-10 23:37:30 +02:00
# this has to come after the JSON gem
2008-03-18 19:37:10 +01:00
2008-09-10 23:37:30 +02:00
# this date format sorts lexicographically
# and is compatible with Javascript's new Date(time_string) constructor
class Time
def to_json(options = nil)
%("#{strftime("%Y/%m/%d %H:%M:%S %z")}")
end
end