Sha256: 4335759d1f6e4d329135304601de065fe7278303f4d8d18b8de792dee0e7cc08

Contents?: true

Size: 261 Bytes

Versions: 7

Compression:

Stored size: 261 Bytes

Contents

require "json"

module Dboard
  class Publisher
    def self.publish(source, data)
      Api::Client.post("/sources/#{source}", body: { data: data.to_json }, timeout: 10000)
    rescue SocketError => ex
      puts "SocketError: #{ex.message}"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dboard-3.0.1 lib/publisher.rb
dboard-3.0.0 lib/publisher.rb
dboard-2.0.3 lib/publisher.rb
dboard-2.0.2 lib/publisher.rb
dboard-2.0.1 lib/publisher.rb
dboard-2.0.0 lib/publisher.rb
dboard-1.1.1 lib/publisher.rb