shrine-sql 1.0.1 → 1.0.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/sql.rb +5 -4
- data/shrine-sql.gemspec +2 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a06900bbeeb193fb4d4f3caddb0cf1172bb4a3e6
|
4
|
+
data.tar.gz: 9cdab646843393e949f0311e5916f43ba3007d21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eae09d3e1728865e97d8c8d95e310b217d9a9066b39edb9f1fdef854b93ca3550878b6a52452106c5e4848cc636d99b36ae6775209bfb55a6a35743de4ed2f4
|
7
|
+
data.tar.gz: bc984d9d45c0e40983b9c004855592bbab7f293ce9e04e9d7cd168c1fc8366ffb3ef4819c8970227fd8a889e426e8a105c7f2d6efe6a06eb7f51ab8333977e3f
|
data/lib/shrine/storage/sql.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require "shrine"
|
2
|
+
require "down"
|
2
3
|
require "sequel"
|
4
|
+
|
3
5
|
require "stringio"
|
4
6
|
require "json"
|
5
7
|
|
@@ -19,13 +21,12 @@ class Shrine
|
|
19
21
|
end
|
20
22
|
|
21
23
|
def download(id)
|
22
|
-
|
23
|
-
File.write(tempfile.path, content(id))
|
24
|
-
tempfile
|
24
|
+
Down.copy_to_tempfile(id, open(id))
|
25
25
|
end
|
26
26
|
|
27
27
|
def stream(id)
|
28
|
-
|
28
|
+
content = content(id)
|
29
|
+
yield content, content.size
|
29
30
|
end
|
30
31
|
|
31
32
|
def open(id)
|
data/shrine-sql.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "shrine-sql"
|
3
|
-
gem.version = "1.0.
|
3
|
+
gem.version = "1.0.2"
|
4
4
|
|
5
5
|
gem.required_ruby_version = ">= 2.1"
|
6
6
|
|
@@ -15,6 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
|
16
16
|
gem.add_dependency "shrine", "~> 1.1"
|
17
17
|
gem.add_dependency "sequel"
|
18
|
+
gem.add_dependency "down", ">= 1.0.3"
|
18
19
|
|
19
20
|
gem.add_development_dependency "sqlite3"
|
20
21
|
gem.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shrine-sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.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-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shrine
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: down
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.0.3
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.0.3
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: sqlite3
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -111,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
125
|
version: '0'
|
112
126
|
requirements: []
|
113
127
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.5.1
|
115
129
|
signing_key:
|
116
130
|
specification_version: 4
|
117
131
|
summary: Provides SQL database storage for Shrine.
|