Sha256: 888f61132be4b0b48e6a889f0ecf5567eff0e20a91aabee5b376915797cc6c47

Contents?: true

Size: 783 Bytes

Versions: 2

Compression:

Stored size: 783 Bytes

Contents

require 'gitwakatime/version'
require 'gitwakatime/actions'
require 'gitwakatime/commit'
require 'gitwakatime/mapper'
require 'gitwakatime/query'
require 'gitwakatime/timer'
require 'gitwakatime/log'
require 'gitwakatime/commited_file'
require 'gitwakatime/cli'
# Silence is golden
module GitWakaTime
  class Configuration
    attr_accessor :api_key, :log_level, :root, :project

    def initialize
      self.api_key = nil
      self.log_level = :info
    end

    def load_config_yaml
      yaml = YAML.load_file(File.join(Dir.home, '.wakatime.yml'))
      self.api_key = yaml[:api_key]
      self.log_level = yaml[:log_level]
    end
  end

  def self.config
    @configuration ||=  Configuration.new
  end

  def self.configure
    yield(configuration) if block_given?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gitwakatime-0.0.3 lib/gitwakatime.rb
gitwakatime-0.0.2 lib/gitwakatime.rb