Created
August 31, 2017 17:24
-
-
Save anonymous/d7fc2cefe697199acf2d9ffe9f6f4fbc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'net/http' | |
require "uri" | |
require 'rubygems' | |
require 'active_support' | |
event_data = ActiveSupport::JSON.decode(ARGV.first) | |
# Get the URI. File path to filename. | |
filepath = event_data["inputs"]["uri"] | |
# Webserver update script location. Using bin to test first. | |
base_url = "https://requestb.in/1b22bya1" | |
# add the filepath as an argument | |
full_url = "#{base_url}?filepath=#{filepath}" | |
uri = URI.parse(full_url) | |
response = Net::HTTP.get(uri) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment