grip 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +11 -5
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/grip.gemspec +2 -2
- metadata +2 -1
data/README.rdoc
CHANGED
@@ -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
|
-
|
23
|
-
|
24
|
-
|
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.
|
1
|
+
0.4.1
|
data/grip.gemspec
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{grip}
|
8
|
-
s.version = "0.4.
|
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}
|