diff options
author | George Claghorn <george.claghorn@gmail.com> | 2017-11-29 09:25:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-29 09:25:27 -0500 |
commit | 5211c0dd8cc84d9458713ca55a4a8afe12f7df40 (patch) | |
tree | f234e3a0228bfc006ef1529f14e91c063e7b1efa | |
parent | f4c08d14995ba9d5caf0f209d3a95308f93bec6a (diff) | |
parent | 9d65ac30fde3977d4773ff6052f31b99a5084f0f (diff) | |
download | rails-5211c0dd8cc84d9458713ca55a4a8afe12f7df40.tar.gz rails-5211c0dd8cc84d9458713ca55a4a8afe12f7df40.tar.bz2 rails-5211c0dd8cc84d9458713ca55a4a8afe12f7df40.zip |
Merge pull request #31272 from y-yagi/use_credentials_instead_of_keyfile_in_gcs
Use `credentials` instead of `keyfile` in GCS sevice
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 36 | ||||
-rw-r--r-- | activestorage/lib/active_storage/service/gcs_service.rb | 2 | ||||
-rw-r--r-- | activestorage/test/service/configurations.example.yml | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/storage.yml.tt | 2 |
5 files changed, 23 insertions, 21 deletions
@@ -92,7 +92,7 @@ end # Active Storage group :storage do gem "aws-sdk-s3", require: false - gem "google-cloud-storage", "~> 1.3", require: false + gem "google-cloud-storage", "~> 1.8", require: false gem "azure-storage", require: false gem "mini_magick" diff --git a/Gemfile.lock b/Gemfile.lock index 70c4097798..1453bddb34 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -118,8 +118,8 @@ GEM activerecord-jdbcsqlite3-adapter (1.3.24) activerecord-jdbc-adapter (~> 1.3.24) jdbc-sqlite3 (>= 3.7.2, < 3.9) - addressable (2.5.1) - public_suffix (~> 2.0, >= 2.0.2) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) amq-protocol (2.2.0) archive-zip (0.7.0) io-like (~> 0.3.0) @@ -209,7 +209,7 @@ GEM daemons (1.2.4) dalli (2.7.6) dante (0.2.0) - declarative (0.0.9) + declarative (0.0.10) declarative-option (0.1.0) delayed_job (4.1.3) activesupport (>= 3.0, < 5.2) @@ -252,25 +252,25 @@ GEM ffi (1.9.18-x86-mingw32) globalid (0.4.1) activesupport (>= 4.2.0) - google-api-client (0.13.1) + google-api-client (0.17.3) addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.5) + googleauth (>= 0.5, < 0.7.0) httpclient (>= 2.8.1, < 3.0) mime-types (~> 3.0) representable (~> 3.0) retriable (>= 2.0, < 4.0) - google-cloud-core (1.0.0) + google-cloud-core (1.1.0) google-cloud-env (~> 1.0) - googleauth (~> 0.5.1) google-cloud-env (1.0.1) faraday (~> 0.11) - google-cloud-storage (1.4.0) + google-cloud-storage (1.9.0) digest-crc (~> 0.4) - google-api-client (~> 0.13.0) - google-cloud-core (~> 1.0) - googleauth (0.5.3) + google-api-client (~> 0.17.0) + google-cloud-core (~> 1.1) + googleauth (~> 0.6.2) + googleauth (0.6.2) faraday (~> 0.12) - jwt (~> 1.4) + jwt (>= 1.4, < 3.0) logging (~> 2.0) memoist (~> 0.12) multi_json (~> 1.11) @@ -289,7 +289,7 @@ GEM jmespath (1.3.1) json (2.1.0) json (2.1.0-java) - jwt (1.5.6) + jwt (2.1.0) kindlerb (1.2.0) mustache nokogiri @@ -329,7 +329,7 @@ GEM msgpack (1.1.0-java) msgpack (1.1.0-x64-mingw32) msgpack (1.1.0-x86-mingw32) - multi_json (1.12.1) + multi_json (1.12.2) multipart-post (2.0.0) mustache (1.0.5) mustermann (1.0.0) @@ -354,7 +354,7 @@ GEM pg (0.19.0-x86-mingw32) powerpack (0.1.1) psych (2.2.4) - public_suffix (2.0.5) + public_suffix (3.0.1) puma (3.9.1) puma (3.9.1-java) que (0.14.0) @@ -429,10 +429,10 @@ GEM rack-protection (>= 1.5.0) redis (>= 3.3.4, < 5) sigdump (0.2.4) - signet (0.7.3) + signet (0.8.1) addressable (~> 2.3) faraday (~> 0.9) - jwt (~> 1.5) + jwt (>= 1.5, < 3.0) multi_json (~> 1.10) sinatra (2.0.0) mustermann (~> 1.0) @@ -517,7 +517,7 @@ DEPENDENCIES dalli (>= 2.2.1) delayed_job delayed_job_active_record - google-cloud-storage (~> 1.3) + google-cloud-storage (~> 1.8) hiredis json (>= 2.0.0) kindlerb (~> 1.2.0) diff --git a/activestorage/lib/active_storage/service/gcs_service.rb b/activestorage/lib/active_storage/service/gcs_service.rb index be6ddf32a0..fd9916634a 100644 --- a/activestorage/lib/active_storage/service/gcs_service.rb +++ b/activestorage/lib/active_storage/service/gcs_service.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +gem "google-cloud-storage", "~> 1.8" + require "google/cloud/storage" require "active_support/core_ext/object/to_query" diff --git a/activestorage/test/service/configurations.example.yml b/activestorage/test/service/configurations.example.yml index 56ed37be5d..43cc013bc8 100644 --- a/activestorage/test/service/configurations.example.yml +++ b/activestorage/test/service/configurations.example.yml @@ -7,7 +7,7 @@ # # gcs: # service: GCS -# keyfile: { +# credentials: { # type: "service_account", # project_id: "", # private_key_id: "", diff --git a/railties/lib/rails/generators/rails/app/templates/config/storage.yml.tt b/railties/lib/rails/generators/rails/app/templates/config/storage.yml.tt index 9bada4b66d..1c0cde0b09 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/storage.yml.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/storage.yml.tt @@ -18,7 +18,7 @@ local: # google: # service: GCS # project: your_project -# keyfile: <%%= Rails.root.join("path/to/gcs.keyfile") %> +# credentials: <%%= Rails.root.join("path/to/gcs.keyfile") %> # bucket: your_own_bucket # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) |