joint 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -16,9 +16,15 @@ Declare the plugin and use the attachment method to make attachments.
16
16
 
17
17
  This gives you #image, #image=, #pdf, and #pdf=. The = methods take any IO that responds to read (File, Tempfile, etc). The image and pdf methods return a GridIO instance (can be found in the ruby driver).
18
18
 
19
+ Also, #image and #pdf are proxies so you can do stuff like:
20
+
21
+ doc.image.id, doc.image.size, doc.image.type, doc.image.name
22
+
23
+ If you call a method other than those in the proxy it calls it on the GridIO instance so you can still get at all the GridIO instance methods.
24
+
19
25
  == Dependencies
20
26
 
21
- * MongoMapper 0.7.2 - gem install mongo_mapper
27
+ * MongoMapper >= 0.7 - gem install mongo_mapper
22
28
  * Wand >= 0.2.1 - gem install wand
23
29
 
24
30
  == Note on Patches/Pull Requests
data/lib/joint.rb CHANGED
@@ -34,10 +34,6 @@ module Joint
34
34
  attachment_assignments[name] = file
35
35
  end
36
36
  end
37
-
38
- def grid
39
- @grid ||= Mongo::Grid.new(database)
40
- end
41
37
  end
42
38
 
43
39
  module InstanceMethods
@@ -46,7 +42,7 @@ module Joint
46
42
  end
47
43
 
48
44
  def grid
49
- self.class.grid
45
+ @grid ||= Mongo::Grid.new(database)
50
46
  end
51
47
 
52
48
  private
data/lib/joint/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Joint
2
- Version = '0.1'
2
+ Version = '0.1.1'
3
3
  end
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- version: "0.1"
8
+ - 1
9
+ version: 0.1.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - John Nunemaker