grip 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/README.rdoc +11 -5
  2. data/Rakefile +1 -1
  3. data/VERSION +1 -1
  4. data/grip.gemspec +2 -2
  5. metadata +2 -1
@@ -14,11 +14,17 @@ The grip gem is hosted on gemcutter.org:
14
14
  class Foo
15
15
  include MongoMapper::Document
16
16
  include Grip
17
-
17
+
18
18
  has_grid_attachment :image
19
19
  has_grid_attachment :pdf
20
20
  end
21
-
22
- @image = File.open("#{File.dirname(__FILE__)}/test/cthulhu.png",'r')
23
- @pdf = File.open("#{File.dirname(__FILE__)}/sample.pdf",'r')
24
- @foo = Foo.create(:img=>@image,:pdf=>@pdf)
21
+
22
+ image = File.open('foo.png', 'r')
23
+ pdf = File.open('foo.pdf', 'r')
24
+ foo = Foo.create(:image => image, :pdf => pdf)
25
+
26
+ foo.image # contents read from gridfs for serving from rack/metal/controller
27
+ foo.image_name # foo.jpg
28
+ foo.image_content_type # image/png
29
+ foo.image_size # File.size of the file
30
+ foo.image_path # path in grid fs foo/image/:id where :id is foo.id
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ begin
11
11
  g.description = %(GridFS attachments for MongoMapper)
12
12
  g.email = 'signalstatic@gmail.com'
13
13
  g.homepage = 'http://github.com/twoism/grip'
14
- g.authors = %w(twoism)
14
+ g.authors = %w(twoism jnunemaker)
15
15
  end
16
16
  Jeweler::GemcutterTasks.new
17
17
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -5,10 +5,10 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{grip}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["twoism"]
11
+ s.authors = ["twoism", "jnunemaker"]
12
12
  s.date = %q{2009-12-23}
13
13
  s.description = %q{GridFS attachments for MongoMapper}
14
14
  s.email = %q{signalstatic@gmail.com}
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - twoism
8
+ - jnunemaker
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []