Sha256: 8a3beb7399ba0be852b7adc9794b4038cf2608b4081819d4039d15ea86627baa

Contents?: true

Size: 775 Bytes

Versions: 4

Compression:

Stored size: 775 Bytes

Contents

if ENV['CI'] == 'true'
  require 'simplecov'
  require 'codecov'
  SimpleCov.formatter = SimpleCov::Formatter::Codecov
  SimpleCov.start do
    add_filter '/spec/'
  end
end

require 'rspec'
require 's3repo'

require 'webmock'
WebMock.enable!

require 'vcr'
VCR.configure do |c|
  c.cassette_library_dir = 'spec/fixtures/cassettes'
  c.hook_into :webmock
  c.configure_rspec_metadata!
  c.before_record do |i|
    i.request.headers.delete 'Authorization'
  end
end

require 'climate_control'
AUTH_OPTS = {
  S3_BUCKET: 'amylum',
  AWS_REGION: 'us-east-1',
  AWS_SECRET_ACCESS_KEY: 'accesskey',
  AWS_ACCESS_KEY_ID: 'sekritkey'
}.freeze
def with_auth(&block)
  opts = AUTH_OPTS.dup.map { |k, v| [k, ENV.fetch("REAL_#{k}", v)] }
  ClimateControl.modify(Hash[opts], &block)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
s3repo-2.0.3 spec/spec_helper.rb
s3repo-2.0.2 spec/spec_helper.rb
s3repo-2.0.1 spec/spec_helper.rb
s3repo-2.0.0 spec/spec_helper.rb