Sha256: 2712e6d6ac809d8d40f0e7df545a816bd00aa408a2623356d6a1df43654ba20b

Contents?: true

Size: 823 Bytes

Versions: 4

Compression:

Stored size: 823 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

4 entries across 4 versions & 1 rubygems

Version Path
gitmine-0.1.9 lib/gitmine/config.rb
gitmine-0.1.8 lib/gitmine/config.rb
gitmine-0.1.7 lib/gitmine/config.rb
gitmine-0.1.6 lib/gitmine/config.rb