Sha256: 13f019e19645d15136b169baba541062e4c46d61697495328f54cffe3adeafa8

Contents?: true

Size: 648 Bytes

Versions: 6

Compression:

Stored size: 648 Bytes

Contents

module Astrails
  module Safe
    class Source < Stream

      def initialize(id, config)
        @id, @config = id, config
      end

      def filename
        @filename ||= expand(":kind-:id.:timestamp#{extension}")
      end

      # process each config key as source (with full pipe)
      def self.run(config)
        unless config
          puts "No configuration found for #{human_name}"
          return
        end

        config.each do |key, value|
          stream = [Gpg, Gzip, Local, S3].inject(new(key, value)) do |res, klass|
            klass.new(res)
          end
          stream.run
        end
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 4 rubygems

Version Path
astrails-safe-0.1.6 lib/astrails/safe/source.rb
colin-safe-0.1.6 lib/astrails/safe/source.rb
colin-safe-0.1.7 lib/astrails/safe/source.rb
colin-safe-0.1.8 lib/astrails/safe/source.rb
markmansour-safe-0.1.7 lib/astrails/safe/source.rb
ralph-safe-0.1.7 lib/astrails/safe/source.rb