Sha256: ff6e471b87caf219ad88865b62bc01f7cd7227b49cd0a9c57c47c4366fdf951a

Contents?: true

Size: 1.11 KB

Versions: 3

Compression:

Stored size: 1.11 KB

Contents

module Filbunke
  class Repository

    attr_accessor :name, 
                  :host, 
                  :port, 
                  :local_path, 
                  :file_umask, 
                  :directory_umask, 
                  :user, 
                  :pass, 
                  :hadoop_binary, 
                  :run_every,
                  :hydra_concurrency

    def initialize(repository_config)
      @name = repository_config["filbunke_server_repository"]
      @host = repository_config["filbunke_server_host"]
      @port = repository_config["filbunke_server_port"]
      @local_path = repository_config["local_path"]
      @file_umask = repository_config["file_umask"].to_i
      @directory_umask = repository_config["directory_umask"].to_i
      @user = repository_config["file_url_username"]
      @pass = repository_config["file_url_password"]
      @hadoop_binary = repository_config["hadoop_binary"]
      @run_every = repository_config.fetch("run_every", 10).to_i
      @hydra_concurrency = repository_config.fetch("hydra_concurrency", 100).to_i
    end

  end

  class ConfigurationError < StandardError
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
filbunke-2.0.9 lib/filbunke/repository.rb
filbunke-2.0.8 lib/filbunke/repository.rb
filbunke-2.0.6 lib/filbunke/repository.rb