Sha256: 48a1788ba4714f92d57c367d57ea8bc929c2d125a871d72db51721e6aa7eec0e

Contents?: true

Size: 618 Bytes

Versions: 54

Compression:

Stored size: 618 Bytes

Contents

class Ey::Core::Client
  class Real
    def authorized_channel(path)
      request(
        :path   => "/channels",
        :params => {"channel" => {"path" => path}}
      )
    end
  end # Real

  class Mock
    def authorized_channel(path)
      if task = self.data[:tasks].values.find { |t| Addressable::URI.parse(t["read_channel"]).query_values["subscription"] == path }
        response(
          :body => {"task" => task},
        )
      else
        response(status: 404, :body => {"errors" => ["Couldn't find Awsm::Task with [channel_path: #{path}]"]})
      end
    end
  end # Mock
end # Ey::Core::Client

Version data entries

54 entries across 54 versions & 3 rubygems

Version Path
ey-core-3.2.0 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.11 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.10 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.9 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.8 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.7 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.6 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.5 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.4 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.3 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.2 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.1 lib/ey-core/requests/authorized_channel.rb
ey-core-3.1.0 lib/ey-core/requests/authorized_channel.rb
ey-core-3.0.5 lib/ey-core/requests/authorized_channel.rb
ey-core-3.0.4 lib/ey-core/requests/authorized_channel.rb
ey-core-3.0.3 lib/ey-core/requests/authorized_channel.rb
ey-core-3.0.2 lib/ey-core/requests/authorized_channel.rb
ey-core-3.0.1 lib/ey-core/requests/authorized_channel.rb
ey-core-3.0.0 lib/ey-core/requests/authorized_channel.rb
ey-pro-cli-0.0.17 lib/vendor/core/ey-core/requests/authorized_channel.rb