Sha256: 16d9e2a3a056bb77d6e66f5e1a0b717f04bb8c8528af84778177dbfeb76bdfdf

Contents?: true

Size: 628 Bytes

Versions: 27

Compression:

Stored size: 628 Bytes

Contents

# encoding: UTF-8

module Vines
  class Stream
    class Server
      class Outbound
        class FinalFeatures < State
          def initialize(stream, success=Server::Ready)
            super
          end

          def node(node)
            raise StreamErrors::NotAuthorized unless empty_features?(node)
            stream.router << stream
            advance
            stream.notify_connected
          end

          private

          def empty_features?(node)
            node.name == 'features' && namespace(node) == NAMESPACES[:stream] && node.elements.empty?
          end
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 4 rubygems

Version Path
diaspora-vines-0.2.0.develop.4 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.2.0.develop.3 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.2.0.develop.2 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.2.0.develop.1 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.1.28 lib/vines/stream/server/outbound/final_features.rb
lygneo-vines-0.1.5 lib/vines/stream/server/outbound/final_features.rb
lygneo-vines-0.1.1 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.1.27 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.1.26 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.1.25 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.1.24 lib/vines/stream/server/outbound/final_features.rb
vines-0.4.10 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.1.22 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.1.21 lib/vines/stream/server/outbound/final_features.rb
diaspora-vines-0.1.2 lib/vines/stream/server/outbound/final_features.rb
vines-0.4.9 lib/vines/stream/server/outbound/final_features.rb
vines-0.4.8 lib/vines/stream/server/outbound/final_features.rb
vines-0.4.7 lib/vines/stream/server/outbound/final_features.rb
vines-0.4.6 lib/vines/stream/server/outbound/final_features.rb
vinesmod-0.4.5.2 lib/vines/stream/server/outbound/final_features.rb