Sha256: 1b792d152d4c35545de3e1cd17a3b5571a945e1f4be7ba35490e0808e5ee370a

Contents?: true

Size: 847 Bytes

Versions: 3

Compression:

Stored size: 847 Bytes

Contents

class Gitmine
  class Config
    CONFIG_FILE = './.gitmine.yml'

    class << self
      def config
        @@config ||= new
      end

      def redmine_host
        config['host']
      end

      def redmine_api_key
        config['api_key']
      end

      def github
        config['github']
      end

      def hudson_host
        (config['hudson'] || {})['host']
      end

      def hudson_username
        (config['hudson'] || {})['username']
      end

      def hudson_password
        (config['hudson'] || {})['password']
      end

      def statuses
        config['statuses']
      end

      def status_reviewed
        config['statuses']['reviewed']
      end
    end

    def initialize
      path = CONFIG_FILE
      @config = YAML.load_file(path)
    end

    def [](key)
      @config[key]
    end

  end # Class Config
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gitmine-0.1.12 lib/gitmine/config.rb
gitmine-0.1.11 lib/gitmine/config.rb
gitmine-0.1.10 lib/gitmine/config.rb