Sha256: 0e1af048896855c0fcb1e52d925de253b50f05ab357d0cc5c8879a90a9dc89d9
Contents?: true
Size: 723 Bytes
Versions: 3
Compression:
Stored size: 723 Bytes
Contents
# frozen_string_literal: true module SiteMaps::Adapters class AwsSdk < Adapter def write(url, raw_data, **options) location = Location.new(config.directory, url) local_storage.write(location, raw_data) s3_storage.upload(location, **options) end def read(url) location = Location.new(config.directory, url) s3_storage.read(location) end def delete(url) location = Location.new(config.directory, url) s3_storage.delete(location) end private def local_storage @local_storage ||= SiteMaps::Adapters::FileSystem::Storage.new end def s3_storage @s3_storage ||= SiteMaps::Adapters::AwsSdk::Storage.new(config) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
site_maps-0.0.1.beta3 | lib/site_maps/adapters/aws_sdk.rb |
site_maps-0.0.1.beta2 | lib/site_maps/adapters/aws_sdk.rb |
site_maps-0.0.1.beta1 | lib/site_maps/adapters/aws_sdk.rb |