Sha256: 23241ea925cc2f91cc2992b690c8d74909f28feb07d8fc004d4bbd29c1017b91

Contents?: true

Size: 662 Bytes

Versions: 5

Compression:

Stored size: 662 Bytes

Contents

require 'tamashii/common'
module Tamashii
  module Agent
    class Config < Tamashii::Config
      AUTH_TYPES = [:none, :token]

      register :log_file, STDOUT
      register :use_ssl, false
      register :auth_type, :none
      register :entry_point, "/tamashii"
      register :manager_host, "localhost"
      register :manager_port, 3000

      def auth_type(type = nil)
        return @auth_type ||= :none if type.nil?
        return unless AUTH_TYPES.include?(type)
        @auth_type = type.to_sym
      end

      def log_level(level = nil)
        return Agent.logger.level if level.nil?
        Agent.logger.level = level
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tamashii-agent-0.1.11 lib/tamashii/agent/config.rb
tamashii-agent-0.1.10 lib/tamashii/agent/config.rb
tamashii-agent-0.1.9 lib/tamashii/agent/config.rb
tamashii-agent-0.1.8 lib/tamashii/agent/config.rb
tamashii-agent-0.1.7 lib/tamashii/agent/config.rb