Sha256: 01a5ad235a7cefda281efc339a57d75196bf5f0f66d54de849296212c1789450
Contents?: true
Size: 1.56 KB
Versions: 9
Compression:
Stored size: 1.56 KB
Contents
module Pickpocket class Configuration attr_accessor :home_folder, :authorization_token_file, :oauth_token_file, :library_file, :consumer_key, :pocket_homepage, :pocket_oauth_authorize_url, :pocket_oauth_request_url, :pocket_retrieve_url, :pocket_send_url, :pocket_user_authorize_url def initialize # Files @home_folder = File.join(Dir.home, '.pickpocket') @authorization_token_file = File.join(@home_folder, 'authorization_token') @oauth_token_file = File.join(@home_folder, 'oauth_token') @library_file = File.join(@home_folder, 'library_file') # Pocket @consumer_key = ENV.fetch('POCKET_CONSUMER_KEY', '58132-f824d5fbf935681e22e86a3c') @pocket_homepage = 'https://getpocket.com' @pocket_oauth_authorize_url = 'https://getpocket.com/v3/oauth/authorize' @pocket_oauth_request_url = 'https://getpocket.com/v3/oauth/request' @pocket_retrieve_url = 'https://getpocket.com/v3/get' @pocket_send_url = 'https://getpocket.com/v3/send' @pocket_user_authorize_url = 'https://getpocket.com/auth/authorize' end end class << self attr_writer :configuration end def self.config @configuration ||= Configuration.new end def self.reset @configuration = Configuration.new end def self.configure yield(config) end end
Version data entries
9 entries across 9 versions & 1 rubygems