shrine 2.19.0 → 2.19.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of shrine might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -0
- data/lib/shrine/storage/file_system.rb +12 -1
- data/lib/shrine/version.rb +1 -1
- data/shrine.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: '0846af73d2a421712ff8e555dc2570115e8f7261'
|
4
|
+
data.tar.gz: b3a033fa950c7a55203c179e24aed2d72c40b3f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56d4630870e6dc0ee182828d30b4a0ac3f3f8c7f5e1b2df044931791091e82f66dd15eb14827914a5501600a30eb736d16aebf0980b438922c84a463bd62febc
|
7
|
+
data.tar.gz: ae223fef4115d4292d97eb7c19ff29c310fae3bffc63f9bb8e239281a629af571805a9e86eda02a332c91a15a3e8bd28bf92106a8ad3f546c4f5bc69a6a0f444
|
data/CHANGELOG.md
CHANGED
@@ -153,7 +153,7 @@ class Shrine
|
|
153
153
|
# Cleans all empty subdirectories up the hierarchy.
|
154
154
|
def clean(path)
|
155
155
|
path.dirname.ascend do |pathname|
|
156
|
-
if
|
156
|
+
if dir_empty?(pathname) && pathname != directory
|
157
157
|
pathname.rmdir
|
158
158
|
else
|
159
159
|
break
|
@@ -188,6 +188,17 @@ class Shrine
|
|
188
188
|
.each { |path| yield path if path.file? }
|
189
189
|
end
|
190
190
|
|
191
|
+
if RUBY_VERSION >= "2.4"
|
192
|
+
def dir_empty?(path)
|
193
|
+
Dir.empty?(path)
|
194
|
+
end
|
195
|
+
else
|
196
|
+
def dir_empty?(path)
|
197
|
+
Dir.foreach(path) { |x| return false unless [".", ".."].include?(x) }
|
198
|
+
true
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
191
202
|
def deprecated_download(id, **options)
|
192
203
|
Shrine.deprecation("Shrine::Storage::FileSystem#download is deprecated and will be removed in Shrine 3.")
|
193
204
|
tempfile = Tempfile.new(["shrine-filesystem", File.extname(id)], binmode: true)
|
data/lib/shrine/version.rb
CHANGED
data/shrine.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shrine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.19.
|
4
|
+
version: 2.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: down
|
@@ -559,14 +559,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
559
559
|
requirements:
|
560
560
|
- - ">="
|
561
561
|
- !ruby/object:Gem::Version
|
562
|
-
version: '2.
|
562
|
+
version: '2.3'
|
563
563
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
564
564
|
requirements:
|
565
565
|
- - ">="
|
566
566
|
- !ruby/object:Gem::Version
|
567
567
|
version: '0'
|
568
568
|
requirements: []
|
569
|
-
|
569
|
+
rubyforge_project:
|
570
|
+
rubygems_version: 2.5.2.3
|
570
571
|
signing_key:
|
571
572
|
specification_version: 4
|
572
573
|
summary: Toolkit for file attachments in Ruby applications
|