shrine-gridfs 0.4.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/shrine/storage/gridfs.rb +2 -2
- data/shrine-gridfs.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db43a823170c12ce633f872626b8b0340b374aeb98df4e7745cce15ee8c88eb5
|
4
|
+
data.tar.gz: b0bbb49b419ad0d27e4b0d47c3b58283642e723511fd187c69ad2f01d2695f8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd973e36c531803ac2cd44643e18e1674c85111d083907290fa9d2a8fc7a24bc3063715fdfb70b3937a1eca555daa24e7661842708d73844f5d97576b8674c1e
|
7
|
+
data.tar.gz: 89bc7a9d11576dff9699fa36b174d5527c416336a95fbaab3fc3060f172aaae1ab095474efd8965ce8f959fde79a6ae6adf29a9e8153b25b443435a2e40b2d14
|
data/README.md
CHANGED
@@ -27,11 +27,11 @@ class Shrine
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def open(id, rewindable: true, **)
|
30
|
-
|
30
|
+
info = file_info(id) or raise Shrine::FileNotFound, "file #{id.inspect} not found on storage"
|
31
31
|
stream = bucket.open_download_stream(bson_id(id))
|
32
32
|
|
33
33
|
Down::ChunkedIO.new(
|
34
|
-
size:
|
34
|
+
size: info[:length],
|
35
35
|
chunks: stream.enum_for(:each),
|
36
36
|
on_close: -> { stream.close },
|
37
37
|
rewindable: rewindable,
|
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.
|
3
|
+
gem.version = "1.0.0"
|
4
4
|
|
5
5
|
gem.required_ruby_version = ">= 2.1"
|
6
6
|
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.files = Dir["README.md", "LICENSE.txt", "lib/**/*.rb", "shrine-gridfs.gemspec"]
|
14
14
|
gem.require_path = "lib"
|
15
15
|
|
16
|
-
gem.add_dependency "shrine", ">=
|
16
|
+
gem.add_dependency "shrine", ">= 3.0.0.beta3", "< 4"
|
17
17
|
gem.add_dependency "mongo", ">= 2.2.2", "< 3"
|
18
18
|
gem.add_dependency "down", "~> 4.0"
|
19
19
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shrine-gridfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.0.beta3
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '4'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 3.0.0.beta3
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '4'
|