Sha256: a0284aff9c05329e04cc9901bf4bb29f14e42ae4895229510318a4d1f1adc374

Contents?: true

Size: 588 Bytes

Versions: 11

Compression:

Stored size: 588 Bytes

Contents

# encoding: UTF-8

module Spontaneous
  module Storage
    autoload :Backend, "spontaneous/storage/backend"
    autoload :Local,   "spontaneous/storage/local"
    autoload :Cloud,   "spontaneous/storage/cloud"

    extend self

    def create(config)
      case config[:provider]
      when "Local", "local"
        Spontaneous::Storage::Local.new(config[:local_root], config[:url], config[:accepts])
      else
        bucket =  config.delete(:bucket)
        accepts = config.delete(:accepts)
        Spontaneous::Storage::Cloud.new(config, bucket, accepts)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta4 lib/spontaneous/storage.rb
spontaneous-0.2.0.beta3 lib/spontaneous/storage.rb
spontaneous-0.2.0.beta2 lib/spontaneous/storage.rb
spontaneous-0.2.0.beta1 lib/spontaneous/storage.rb
spontaneous-0.2.0.alpha7 lib/spontaneous/storage.rb
spontaneous-0.2.0.alpha6 lib/spontaneous/storage.rb
spontaneous-0.2.0.alpha5 lib/spontaneous/storage.rb
spontaneous-0.2.0.alpha4 lib/spontaneous/storage.rb
spontaneous-0.2.0.alpha3 lib/spontaneous/storage.rb
spontaneous-0.2.0.alpha2 lib/spontaneous/storage.rb
spontaneous-0.2.0.alpha1 lib/spontaneous/storage.rb