mirror of
https://github.com/wahyd4/ruby-sdk.git
synced 2026-08-09 12:56:21 +10:00
20 lines
482 B
Ruby
Executable File
20 lines
482 B
Ruby
Executable File
# -*- encoding: utf-8 -*-
|
|
|
|
require 'bundler/setup'
|
|
require 'qiniu'
|
|
require 'rspec'
|
|
|
|
RSpec.configure do |config|
|
|
config.before :all do
|
|
Qiniu.establish_connection! :access_key => ENV["QINIU_ACCESS_KEY"], :secret_key => ENV["QINIU_SECRET_KEY"]
|
|
end
|
|
end
|
|
|
|
def make_unique_bucket (bucket)
|
|
bucket + "-" + ENV["QINIU_ACCESS_KEY"][0, 8]
|
|
end # make_unique_bucket
|
|
|
|
def make_unique_key_in_bucket (key)
|
|
"#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}-" + key
|
|
end # make_unique_key_in_bucket
|