Sha256: 230a89f04e0b8f5f6f44bd2d116fd745b6ee2db211d2d9a64d94543274b1621d
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
module SoundcloudAuth class Error < StandardError; end def self.config(environment=RAILS_ENV) @config ||= {} @config[environment] ||= YAML.load(File.open(RAILS_ROOT + '/config/soundcloud_auth.yml').read)[environment] end def self.base_url config['base_url'] || 'http://api.soundcloud.com' end def self.path_prefix URI.parse(base_url).path end def self.oauth_callback? config.key?('oauth_callback') end def self.oauth_callback config['oauth_callback'] end def self.remember_for (config['remember_for'] || 14).to_i end def self.consumer options = { :site => SoundcloudAuth.base_url, :request_token_path => "/oauth/request_token", :access_token_path => "/oauth/access_token", :authorize_path => "/oauth/authorize" } OAuth::Consumer.new( config['key'], config['secret'], options ) end end require 'soundcloud_auth/controller_extensions' require 'soundcloud_auth/dispatcher/oauth' module SoundcloudAuth module Dispatcher class Error < StandardError; end class Unauthorized < Error; end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
soundcloud-auth-0.1.1 | lib/soundcloud_auth.rb |