Sha256: 244b929bf588d008eca8b2e3708206e7a791a3c1d2a25fac7083fb24a50ab975

Contents?: true

Size: 329 Bytes

Versions: 4

Compression:

Stored size: 329 Bytes

Contents

require 'net/http'
require 'uri'
require 'rubygems'
require 'active_support'

module GitWebhook
  class Notifier

    def initialize(data_hash)
      @data_hash = data_hash
    end

    def notify(url)
      Net::HTTP.post_form(URI.parse(url), { :payload => @data_hash.to_json })
      puts @data_hash.to_yaml
    end

  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
lucasmundim-git-webhook-0.0.1 lib/git-webhook/notifier.rb
lucasmundim-git-webhook-0.0.2 lib/git-webhook/notifier.rb
stupid-git-webhook-0.0.1 lib/git-webhook/notifier.rb
git-webhook-0.0.1 lib/git-webhook/notifier.rb