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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 4986c5f02d23d23bb5b40c9c9d6bab5bdc3ed10506fd3ef5d171a8176e5f75fb
4
- data.tar.gz: b09a2c063f78e9711feec2a9a026e7198ae31623af96e609dc0683d7969e9b7f
2
+ SHA1:
3
+ metadata.gz: '0846af73d2a421712ff8e555dc2570115e8f7261'
4
+ data.tar.gz: b3a033fa950c7a55203c179e24aed2d72c40b3f2
5
5
  SHA512:
6
- metadata.gz: 93df569fa078dddc0dd0ca60a74e15b929f633bc3614b4fcec608814e8578fc29ef5398803a0b3d02a9cfc4e436aff4125f8f59644fa4e014913f5be2e9eb7b3
7
- data.tar.gz: 41a66f59ba0195a7ecac244ff687a87562005eb801d0d3651e08148dcfee6b3f598b91fd410a0c3ad11be84561c9f295f540e2c17e036a0882ec8828aebe3383
6
+ metadata.gz: 56d4630870e6dc0ee182828d30b4a0ac3f3f8c7f5e1b2df044931791091e82f66dd15eb14827914a5501600a30eb736d16aebf0980b438922c84a463bd62febc
7
+ data.tar.gz: ae223fef4115d4292d97eb7c19ff29c310fae3bffc63f9bb8e239281a629af571805a9e86eda02a332c91a15a3e8bd28bf92106a8ad3f546c4f5bc69a6a0f444
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.19.1 (2018-07-20)
2
+
3
+ * Bring back support for Ruby 2.3 (@janko)
4
+
1
5
  ## 2.19.0 (2019-07-18)
2
6
 
3
7
  * `pretty_location` – Allow specifying a different identifier from `id` (@00dav00)
@@ -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 Dir.empty?(pathname) && pathname != directory
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)
@@ -8,7 +8,7 @@ class Shrine
8
8
  module VERSION
9
9
  MAJOR = 2
10
10
  MINOR = 19
11
- TINY = 0
11
+ TINY = 1
12
12
  PRE = nil
13
13
 
14
14
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
data/shrine.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |gem|
4
4
  gem.name = "shrine"
5
5
  gem.version = Shrine.version
6
6
 
7
- gem.required_ruby_version = ">= 2.4"
7
+ gem.required_ruby_version = ">= 2.3"
8
8
 
9
9
  gem.summary = "Toolkit for file attachments in Ruby applications"
10
10
  gem.description = <<-END
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.0
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-18 00:00:00.000000000 Z
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.4'
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
- rubygems_version: 3.0.3
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