grip 0.6.6 → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@ Create a MongoMapper model and `include MongoMapper::Grip::HasAttachment` and ca
33
33
 
34
34
  class Doc
35
35
  include MongoMapper::Document
36
- include MongoMapper::Grip::HasAttachment
36
+ include Grip::HasAttachment
37
37
  has_grid_attachment :image, :variants => {:thumb => {:width=>50,:height=>50}}
38
38
  end
39
39
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.6
1
+ 0.6.7
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{grip}
8
- s.version = "0.6.6"
8
+ s.version = "0.6.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["twoism", "jnunemaker"]
12
- s.date = %q{2010-01-15}
12
+ s.date = %q{2010-01-21}
13
13
  s.description = %q{GridFS attachments for MongoMapper}
14
14
  s.email = %q{signalstatic@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -25,7 +25,7 @@ module Grip
25
25
  def file=new_file
26
26
  raise InvalidFile unless (new_file.is_a?(File) || new_file.is_a?(Tempfile))
27
27
 
28
- self.file_name = File.basename(new_file.path)
28
+ self.file_name = new_file.is_a?(Tempfile) ? new_file.original_filename : File.basename(new_file.path)
29
29
  self.file_size = File.size(new_file.path)
30
30
  self.content_type = MIME::Types.type_for(new_file.path)
31
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - twoism
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-01-15 00:00:00 -05:00
13
+ date: 2010-01-21 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency