Sha256: 7ba501901fd1dd8fc748a0279e1de2748276339706ef93b5046291cdc999466b

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 KB

Contents

# encoding: utf-8

require_relative '../connection'

module GoodData
  module Rest
    module Connections
      # Implementation of GoodData::Rest::Connection using https://rubygems.org/gems/rest-client
      class DummyConnection < GoodData::Rest::Connection
        def initialize(opts = {})
          super
        end

        # Connect using username and password
        def connect(username, password)
        end

        # Disconnect
        def disconnect
        end

        # HTTP DELETE
        #
        # @param uri [String] Target URI
        def delete(uri, options = {})
          puts "DELETE #{uri}"
        end

        # HTTP GET
        #
        # @param uri [String] Target URI
        def get(uri, options = {})
          puts "GET #{uri}"
        end

        # HTTP PUT
        #
        # @param uri [String] Target URI
        def put(uri, data, options = {})
          puts "PUT #{uri}"
        end

        # HTTP POST
        #
        # @param uri [String] Target URI
        def post(uri, data, options = {})
          puts "POST #{uri}"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gooddata-0.6.10 lib/gooddata/rest/connections/dummy_connection.rb
gooddata-0.6.9 lib/gooddata/rest/connections/dummy_connection.rb
gooddata-0.6.8 lib/gooddata/rest/connections/dummy_connection.rb