aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDino Maric <dino.onex@gmail.com>2017-07-31 16:41:00 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2017-07-31 09:41:00 -0500
commit6c68524b69e1bfb28f0d1aa5967fd602ed1b7ed7 (patch)
tree51797a0e7c0a404a2ed255f80b014976204c4879
parent9da2c41b2fbdd7cc7e31473376e339e566900ade (diff)
downloadrails-6c68524b69e1bfb28f0d1aa5967fd602ed1b7ed7.tar.gz
rails-6c68524b69e1bfb28f0d1aa5967fd602ed1b7ed7.tar.bz2
rails-6c68524b69e1bfb28f0d1aa5967fd602ed1b7ed7.zip
Depend on Ruby >=2.2.2 (#85)
-rw-r--r--activestorage.gemspec2
-rw-r--r--lib/active_storage/service/gcs_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activestorage.gemspec b/activestorage.gemspec
index 9546b60783..eeefa03903 100644
--- a/activestorage.gemspec
+++ b/activestorage.gemspec
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
s.homepage = "https://github.com/rails/activestorage"
s.license = "MIT"
- s.required_ruby_version = ">= 2.3.0"
+ s.required_ruby_version = ">= 2.2.2"
s.add_dependency "rails", ">= 5.2.0.alpha"
diff --git a/lib/active_storage/service/gcs_service.rb b/lib/active_storage/service/gcs_service.rb
index bff2f9366e..73629f7486 100644
--- a/lib/active_storage/service/gcs_service.rb
+++ b/lib/active_storage/service/gcs_service.rb
@@ -32,7 +32,7 @@ class ActiveStorage::Service::GCSService < ActiveStorage::Service
def delete(key)
instrument :delete, key do
- file_for(key)&.delete
+ file_for(key).try(:delete)
end
end