namespace under Mongoid

This commit is contained in:
ahoward 2012-07-24 21:09:51 -06:00
parent 0252373954
commit 3e71a3a54b
3 changed files with 471 additions and 466 deletions

View File

@ -1,5 +1,5 @@
This.name = This.name =
"GridFs" "Mongoid::GridFs"
This.synopsis = This.synopsis =
"a mongoid 3/moped compatible implementation of the grid_fs specification" "a mongoid 3/moped compatible implementation of the grid_fs specification"

View File

@ -1,7 +1,8 @@
## ##
# #
module Mongoid
class GridFS class GridFS
const_set :Version, '1.2.0' const_set :Version, '1.2.1'
class << GridFS class << GridFS
def version def version
@ -51,9 +52,11 @@
require "digest/md5" require "digest/md5"
require "cgi" require "cgi"
end end
end
## ##
# #
module Mongoid
class GridFS class GridFS
class << GridFS class << GridFS
attr_accessor :namespace attr_accessor :namespace
@ -485,8 +488,6 @@
end end
end end
##
#
GridFs = GridFS GridFs = GridFS
GridFS.init! GridFS.init!
end

View File

@ -1,8 +1,12 @@
require_relative 'helper' require_relative 'helper'
Testing GridFs do Testing Mongoid::GridFs do
## ##
# #
GridFS =
GridFs =
Mongoid::GridFS
prepare do prepare do
GridFS::File.destroy_all GridFS::File.destroy_all
GridFS::Chunk.destroy_all GridFS::Chunk.destroy_all