anchor.diff:    isConnected: -> @client?.getState() is "CONNECTED"
   
     subscribe: (channel, callback) -> 
  -    @subscriptions.push(@client.subscribe channel, callback)
  -
  +    subscription = new Sync.Faye.Subscription(@client, channel, callback)
  +    @subscriptions.push(subscription)
  +    subscription
   
     unsubscribeAll: ->
       subscription.cancel() for subscription in @subscriptions
       @subscriptions = []
   
   
  +class Sync.Faye.Subscription
  +  constructor: (@client, channel, callback) ->
  +    @fayeSub = @client.subscribe channel, callback
  +    
  +  cancel: ->
  +    @fayeSub.cancel()
  +    
  +    
   class Sync.Pusher
   
     subscriptions: []
  
positive.code:     selectorEnd: null
      refetch: false
  
    # attributes
    #
    #   name - The String name of the partial without leading underscore
  
negative.code:   isConnected: -> @client?.connection.state is "connected"
  
    subscribe: (channel, callback) -> 
      subscription = new Sync.Pusher.Subscription(@client, channel, callback)
      @channels.push(channel)
      @subscriptions.push(subscription)
      subscription
  
    unsubscribeAll: ->
      subscription.cancel() for subscription in @subscriptions
      @subscriptions = []
  
  
      
  class Sync.Pusher.Subscription
    constructor: (@client, channel, callback) ->
      @pusherSub = channel
      
      channel = @client.subscribe(channel)
      channel.bind 'sync', callback
      
    cancel: ->
      @client.unsubscribe(@pusherSub) if @client.channel(@pusherSub)?
  
  
  class Sync.View
  