Sha256: 772af0a7cbe051d6ddaefeddcd849e0d8af8bb65ddf22eb37fda2f0fb4bfa6fa
Contents?: true
Size: 724 Bytes
Versions: 6
Compression:
Stored size: 724 Bytes
Contents
if !defined?(::CarrierWave::Uploader::Base) raise "Error: `CarrierWave::Uploader::Base` is not defined.\n\n"\ "Please `require 'carrierwave'` - or another library that defines this class." end module SitemapGenerator # Class for uploading sitemaps to a remote server using the CarrierWave gem. class WaveAdapter < ::CarrierWave::Uploader::Base attr_accessor :store_dir # Call with a SitemapLocation and string data def write(location, raw_data) SitemapGenerator::FileAdapter.new.write(location, raw_data) directory = File.dirname(location.path_in_public) if directory != '.' self.store_dir = directory end store!(open(location.path, 'rb')) end end end
Version data entries
6 entries across 6 versions & 1 rubygems