Sha256: 60d97b1250355dcbf827dedf06971fbf0ec3f7060a681ebd516f8f2b3d90cfb7

Contents?: true

Size: 797 Bytes

Versions: 4

Compression:

Stored size: 797 Bytes

Contents

module Corkboard
  # Client is ...
  module Client
    extend ActiveSupport::Concern
 
    included do |base|
      base.extend(ActiveModel::Naming)
    end
 
    def strategy
      raise NotImplementedError
    end
 
    def callback_url
      [full_host, script_name, "/posts/#{strategy}/callback", query_string].join
    end
 
    def preload
      raise NotImplementedError
    end
 
    def recent
      raise NotImplementedError
    end
 
    def subscribe(*)
      raise NotImplementedError
    end
 
    def subscribe_callback
      callback_url
    end
 
    private
 
      def full_host
        # TODO...
        OmniAuth.config.full_host
      end
 
      def script_name
        # TODO...
        ''
      end
 
      def query_string
        # TODO...
        ''
      end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
corkboard-0.1.3 lib/corkboard/client.rb
corkboard-0.1.2 lib/corkboard/client.rb
corkboard-0.1.1 lib/corkboard/client.rb
corkboard-0.1.0 lib/corkboard/client.rb