Sha256: 9e7913313e75e7adbc5b2d06b650277cce3e736d86cbdf29b8479bfd594f7b05

Contents?: true

Size: 451 Bytes

Versions: 33

Compression:

Stored size: 451 Bytes

Contents

module Oxidized
  class RestClient
    require 'net/http'
    require 'json'
    HOST = 'localhost'
    PORT = 8888

    class << self
      def next opt={}, host=HOST, port=PORT
        web = new host, port
        web.next opt
      end
    end

    def initialize host=HOST, port=PORT
      @web = Net::HTTP.new host, port
    end

    def next opt
      data = JSON.dump opt
      @web.put '/node/next/' + opt[:name].to_s, data
    end

  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
oxidized-0.16.3 extra/rest_client.rb
oxidized-0.16.2 extra/rest_client.rb
oxidized-0.16.1 extra/rest_client.rb
oxidized-0.16.0 extra/rest_client.rb
oxidized-0.15.0 extra/rest_client.rb
oxidized-0.14.3 extra/rest_client.rb
oxidized-0.14.2 extra/rest_client.rb
oxidized-0.14.1 extra/rest_client.rb
oxidized-0.14.0 extra/rest_client.rb
oxidized-0.13.1 extra/rest_client.rb
oxidized-0.13.0 extra/rest_client.rb
oxidized-0.12.2 extra/rest_client.rb
oxidized-0.12.1 extra/rest_client.rb
oxidized-0.12.0 extra/rest_client.rb
oxidized-0.11.0 extra/rest_client.rb
oxidized-0.10.0 extra/rest_client.rb
oxidized-0.9.0 extra/rest_client.rb
oxidized-0.8.1 extra/rest_client.rb
oxidized-0.8.0 extra/rest_client.rb
oxidized-0.7.2 extra/rest_client.rb