Skip to content

Commit

Permalink
ObjectId -> ObjectId, and bumped mongo dependency to 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbeedle committed Sep 26, 2010
1 parent dca11d4 commit 98010f7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ This version is currently based off of mongo-0.20.1.

As of mongo-0.19.1, there have been significant changes to GridFS. I do
not plan to support versions of the mongo driver prior to 0.19. There are
some compatibility issues with mongo-0.19 vs. mongo-0.20 (Mongo::ObjectID
vs. BSON::ObjectID). For now, I am choosing to support mongo-0.20.
some compatibility issues with mongo-0.19 vs. mongo-0.20 (Mongo::ObjectId
vs. BSON::ObjectId). For now, I am choosing to support mongo-0.20.

== Installation

Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ begin
gem.homepage = "http://github.com/skinandbones/rack-gridfs"
gem.authors = ["Blake Carlson"]
gem.rubyforge_project = "rack-gridfs"

gem.add_dependency('rack')
gem.add_dependency('mongo', '>= 1.0.1')
gem.add_dependency('mongo', '>= 1.0.8')

gem.add_development_dependency('mocha', '0.9.4')
gem.add_development_dependency('rack-test')
gem.add_development_dependency('shoulda')
Expand Down
2 changes: 1 addition & 1 deletion lib/rack/gridfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def gridfs_request(id)
grid = Mongo::GridFileSystem.new(db)
file = grid.open(id, 'r')
[200, {'Content-Type' => file.content_type}, [file.read]]
rescue Mongo::GridError, BSON::InvalidObjectID
rescue Mongo::GridError, BSON::InvalidObjectId
[404, {'Content-Type' => 'text/plain'}, ['File not found.']]
rescue Mongo::GridFileNotFound
[404, {'Content-Type' => 'text/plain'}, ['File not found.']]
Expand Down
6 changes: 3 additions & 3 deletions rack-gridfs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,22 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<rack>, [">= 0"])
s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
s.add_runtime_dependency(%q<mongo>, [">= 1.0.4"])
s.add_runtime_dependency(%q<mongo>, [">= 1.0.8"])
s.add_development_dependency(%q<mocha>, ["= 0.9.4"])
s.add_development_dependency(%q<rack-test>, [">= 0"])
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
else
s.add_dependency(%q<rack>, [">= 0"])
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
s.add_dependency(%q<mongo>, [">= 1.0.4"])
s.add_dependency(%q<mongo>, [">= 1.0.8"])
s.add_dependency(%q<mocha>, ["= 0.9.4"])
s.add_dependency(%q<rack-test>, [">= 0"])
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
end
else
s.add_dependency(%q<rack>, [">= 0"])
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
s.add_dependency(%q<mongo>, [">= 1.0.4"])
s.add_dependency(%q<mongo>, [">= 1.0.8"])
s.add_dependency(%q<mocha>, ["= 0.9.4"])
s.add_dependency(%q<rack-test>, [">= 0"])
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
Expand Down

0 comments on commit 98010f7

Please sign in to comment.