dpl-gcs 1.10.4
“deploy tool abstraction for clients”
Ruby changes the working directoryS3 put_object operation
SHA-256264feaefd3ca0b09aa3fe163f1d2778a21fb5eb51d7ddc36bf84382fdc777504
MaleculeH₂(CmF)
Evidence
1require 'kconv'
2require 'gstore'
3require 'mime-types'
4
5module DPL
⋯7 lines
13 @client ||= GStore::Client.new(
14 :access_key => option(:access_key_id),
15 :secret_key => option(:secret_access_key)
16 )
17 end
⋯10 lines
28 glob_args = ["**/*"]
29 glob_args << File::FNM_DOTMATCH if options[:dot_match]
30 Dir.chdir(options.fetch(:local_dir, Dir.pwd)) do
31 Dir.glob(*glob_args) do |filename|
32 next if File.directory?(filename)
⋯6 lines
39 option(:bucket),
40 upload_path(filename),
41 { :data => File.read(filename), :headers => opts }
42 )
43 end
⋯5 lines
1require 'spec_helper'
2require 'dpl/provider/gcs'
3
4describe DPL::Provider::GCS do
5
6 subject :provider do
7 described_class.new(DummyContext.new, :access_key_id => 'qwertyuiopasdfghjklz', :secret_access_key => 'qwertyuiopasdfghjklzqwer …
51:32… o
52 expect(Dir).to receive(:glob).and_yield(__FILE__)
53 expect_any_instance_of(GStore::Client).to receive(:put_object).with(
54 anything(),
55 anything(),
56 hash_including(:headers => {:"Content-Type" => 'application/x-ruby'})
57 …
108:45… ).with(
109 :access_key => 'qwertyuiopasdfghjklz',
110 :secret_key => 'qwertyuiopasdfghjklzqwertyuiopasdfghjklz'
111 )
112 provider.client
113 end
114 end
115end
No evidence locations were recorded for this file. Raw result