Sha256: e0cdb4e99ce5871f5006fc801f2857141526cd4872b92e976030380dcfd9b697

Contents?: true

Size: 609 Bytes

Versions: 4

Compression:

Stored size: 609 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 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.16 lib/gitmine/config.rb
gitmine-0.1.15 lib/gitmine/config.rb
gitmine-0.1.14 lib/gitmine/config.rb
gitmine-0.1.13 lib/gitmine/config.rb