Sha256: 825f3f2075ecf421095a6663436742acebd8f3f332cf12586f3e594f95974a6b
Contents?: true
Size: 637 Bytes
Versions: 19
Compression:
Stored size: 637 Bytes
Contents
module GH # Adds Client info so even unauthenticated requests can use a custom request limit class CustomLimit < Wrapper attr_accessor :client_id, :client_secret def setup(backend, options) @client_id = options[:client_id] @client_secret = options[:client_secret] super end def full_url(key) return super unless client_id url = super params = url.query_values || {} unless params.include? 'client_id' params['client_id'] = client_id params['client_secret'] = client_secret end url.query_values = params url end end end
Version data entries
19 entries across 19 versions & 2 rubygems