Skip to content

Instantly share code, notes, and snippets.

@andrijac
Last active December 16, 2015 18:59
Show Gist options
  • Save andrijac/5481620 to your computer and use it in GitHub Desktop.
Save andrijac/5481620 to your computer and use it in GitHub Desktop.
=begin
Used:
http://stackoverflow.com/questions/1274605/ruby-search-file-text-for-a-pattern-and-replace-it-with-a-given-value
http://stackoverflow.com/questions/4244611/pass-variables-to-ruby-script-via-command-line
Replace WCF https connection to http
=end
file_name = ARGV[0]
text = File.read(file_name)
text = text.gsub(/httpsTransport/, "httpTransport").gsub(/mexHttpsBinding/, "mexHttpBinding").gsub(/httpsGetEnabled=/, "httpGetEnabled=")
File.open(file_name, "w") {|file| file.puts text}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment