diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket/list.rb b/google-cloud-storage/lib/google/cloud/storage/bucket/list.rb index 3ccc34c1d041..428300c40df0 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket/list.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket/list.rb @@ -155,6 +155,7 @@ def self.from_gapi gapi_list, service, prefix = nil, max = nil, buckets.instance_variable_set :@prefix, prefix buckets.instance_variable_set :@max, max buckets.instance_variable_set :@user_project, user_project + buckets.instance_variable_set :@soft_deleted, soft_deleted buckets end diff --git a/google-cloud-storage/lib/google/cloud/storage/project.rb b/google-cloud-storage/lib/google/cloud/storage/project.rb index 43886c6c08b1..f93ec320b1c3 100644 --- a/google-cloud-storage/lib/google/cloud/storage/project.rb +++ b/google-cloud-storage/lib/google/cloud/storage/project.rb @@ -278,7 +278,7 @@ def buckets prefix: nil, token: nil, max: nil, user_project: nil, soft_deleted: # soft_deleted: true, # generation: 1234567889 # puts bucket.name - # + # def bucket bucket_name, skip_lookup: false, generation: nil, diff --git a/google-cloud-storage/samples/acceptance/project_test.rb b/google-cloud-storage/samples/acceptance/project_test.rb index ab4c32fd2026..2f2254b11942 100644 --- a/google-cloud-storage/samples/acceptance/project_test.rb +++ b/google-cloud-storage/samples/acceptance/project_test.rb @@ -31,7 +31,7 @@ end describe "storage_soft_deleted_bucket" do - let(:storage_client) { Google::Cloud::Storage.new } + let(:storage_client) { Google::Cloud::Storage.new } let(:bucket) { fixture_bucket } let(:generation) { bucket.gapi.generation } diff --git a/google-cloud-storage/samples/storage_list_soft_deleted_buckets.rb b/google-cloud-storage/samples/storage_list_soft_deleted_buckets.rb index 1f980fa4e098..4869fb70d7fc 100644 --- a/google-cloud-storage/samples/storage_list_soft_deleted_buckets.rb +++ b/google-cloud-storage/samples/storage_list_soft_deleted_buckets.rb @@ -14,7 +14,6 @@ # [START storage_list_soft_deleted_buckets] def list_soft_deleted_buckets - require "google/cloud/storage" storage = Google::Cloud::Storage.new @@ -28,4 +27,4 @@ def list_soft_deleted_buckets end # [END storage_list_soft_deleted_buckets] -list_soft_deleted_buckets if $PROGRAM_NAME == __FILE__ \ No newline at end of file +list_soft_deleted_buckets if $PROGRAM_NAME == __FILE__