shrine-gridfs 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shrine/storage/gridfs.rb +1 -1
- data/shrine-gridfs.gemspec +2 -2
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8400f6c26ba70f76d11964c5050f6b3c12dfe996
|
4
|
+
data.tar.gz: d1c65a66f5df7fb0c28299d3537d063ff0dca866
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f21a39f94f699de24d51ff7ce6094cc4634d95cdf599a762c720af072834e830abf4f175c202786718f4b156cc8d77e42d3d775bc1e78742b68b1feb89c30a11
|
7
|
+
data.tar.gz: 5ac97a6f1b7c1698420592844cc78104e70ddbff8d2c6a2b41891fa27bffecba39425a9ea68b8bb9b1b6879333f7973e2b70c1f09269ee8ba9a237beaa1282e8
|
@@ -16,7 +16,7 @@ class Shrine
|
|
16
16
|
|
17
17
|
def upload(io, id, metadata = {})
|
18
18
|
filename = metadata["filename"] || id
|
19
|
-
file = Mongo::Grid::File.new(io
|
19
|
+
file = Mongo::Grid::File.new(io, filename: filename, metadata: metadata)
|
20
20
|
result = bucket.insert_one(file)
|
21
21
|
id.replace(result.to_s + File.extname(id))
|
22
22
|
end
|
data/shrine-gridfs.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "shrine-gridfs"
|
3
|
-
gem.version = "0.1.
|
3
|
+
gem.version = "0.1.2"
|
4
4
|
|
5
5
|
gem.required_ruby_version = ">= 2.1"
|
6
6
|
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.require_path = "lib"
|
15
15
|
|
16
16
|
gem.add_dependency "shrine", "~> 1.1"
|
17
|
-
gem.add_dependency "mongo", ">= 2.2"
|
17
|
+
gem.add_dependency "mongo", ">= 2.2.2", "< 3"
|
18
18
|
|
19
19
|
gem.add_development_dependency "rake"
|
20
20
|
gem.add_development_dependency "minitest"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shrine-gridfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shrine
|
@@ -30,14 +30,20 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.2.2
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '3'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
43
|
+
version: 2.2.2
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '3'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: rake
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -111,9 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
117
|
version: '0'
|
112
118
|
requirements: []
|
113
119
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.5.1
|
115
121
|
signing_key:
|
116
122
|
specification_version: 4
|
117
123
|
summary: Provides Mongo GridFS storage for Shrine.
|
118
124
|
test_files: []
|
119
|
-
has_rdoc:
|