mm-files 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/Rakefile +1 -1
- data/lib/mm-files.rb +2 -2
- data/lib/mm-files/file.rb +1 -1
- data/lib/mm-files/files.rb +1 -1
- metadata +6 -6
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= mm-files
|
2
2
|
|
3
|
-
* http://github.com
|
3
|
+
* http://github.com/dcu/mm-files
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
@@ -45,4 +45,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
45
45
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
46
46
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
47
47
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
48
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
48
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ $hoe = Hoe.spec 'mm-files' do
|
|
14
14
|
self.developer 'David Cuadrado', 'krawek@gmail.com'
|
15
15
|
# self.post_install_message = 'PostInstall.txt'
|
16
16
|
self.rubyforge_name = "mm-plugins"
|
17
|
-
self.extra_deps = [['
|
17
|
+
self.extra_deps = [['mongo_mapper','>= 0.5.0']]
|
18
18
|
|
19
19
|
end
|
20
20
|
|
data/lib/mm-files.rb
CHANGED
@@ -2,10 +2,10 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
2
2
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
3
|
|
4
4
|
module MmFiles
|
5
|
-
VERSION = '0.0.
|
5
|
+
VERSION = '0.0.3'
|
6
6
|
end
|
7
7
|
|
8
|
-
require '
|
8
|
+
require 'mongo_mapper'
|
9
9
|
require 'mongo/gridfs'
|
10
10
|
require 'mm-files/file'
|
11
11
|
require 'mm-files/files'
|
data/lib/mm-files/file.rb
CHANGED
data/lib/mm-files/files.rb
CHANGED
@@ -8,7 +8,7 @@ module MongoMapper
|
|
8
8
|
|
9
9
|
def put_file(filename, data, metadata = {})
|
10
10
|
if !new?
|
11
|
-
|
11
|
+
GridFS::GridStore.open(self.class.database, filename, "w",
|
12
12
|
:root => self.collection.name,
|
13
13
|
:metadata => metadata.deep_merge({:_id => self.id})) do |f|
|
14
14
|
f << data
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mm-files
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cuadrado
|
@@ -9,18 +9,18 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-10-07 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: mongo_mapper
|
17
17
|
type: :runtime
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.
|
23
|
+
version: 0.5.0
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hoe
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.3.
|
33
|
+
version: 2.3.3
|
34
34
|
version:
|
35
35
|
description: FIX (describe your package)
|
36
36
|
email:
|
@@ -55,7 +55,7 @@ files:
|
|
55
55
|
- test/test_helper.rb
|
56
56
|
- test/test_mm-files.rb
|
57
57
|
has_rdoc: true
|
58
|
-
homepage: http://github.com
|
58
|
+
homepage: http://github.com/dcu/mm-files
|
59
59
|
licenses: []
|
60
60
|
|
61
61
|
post_install_message:
|