Sha256: 2126199d211beadda17da7b00ee40b915ec3ed6d2c1b09bc8859a3a79d2cb860

Contents?: true

Size: 575 Bytes

Versions: 1

Compression:

Stored size: 575 Bytes

Contents

require 'yaml'

module Neverdone
  VERSION = '0.1.1'
  CONSUMER_KEY = 'rubiojr'
  CONSUMER_SECRET = 'c4f8a1e0f09c27ec'

  class Config < Hash

    def save
      File.open "#{ENV['HOME']}/.neverdone.conf", 'w' do |f|
        f.puts self.to_yaml
      end
    end

    def self.load
      if File.exist?("#{ENV['HOME']}/.neverdone.conf")
        c = Config.new.merge YAML.load_file("#{ENV['HOME']}/.neverdone.conf")
      else
        c = Config.new
      end
      c[:user_store_url] = 'https://www.evernote.com/edam/user' if not c[:user_store_url]
      c
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
neverdone-0.1.1 lib/neverdone.rb