From 42d48fcff7506acb603c1ec228ec874f8adbe34c Mon Sep 17 00:00:00 2001 From: Jacob Danner Date: Sun, 20 May 2012 13:13:43 -0700 Subject: [PATCH 1/9] replaced list with standard ruby --- .gitignore | 1 + vim-bundle.rb | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 .gitignore create mode 100755 vim-bundle.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c2d52b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/* diff --git a/vim-bundle.rb b/vim-bundle.rb new file mode 100755 index 0000000..502821e --- /dev/null +++ b/vim-bundle.rb @@ -0,0 +1,83 @@ +# ! /usr/bin/ruby + +bundle_path = File.expand_path "~/.vim/bundle" + +def usage + puts "usage: vim-bundle " + puts "" + puts " \033[36mlist \033[0m- list all bundles currently installed" + puts " \033[36minstall / \033[0m- installs plugin from github. If no user is specified vim-scripts is used" + puts " \033[36mupdate / \033[0m- updates plugin. If no user is specified vim-scripts is used" +end + +if ARGV.first == "list" + Dir.entries("#{bundle_path}").sort.each {|dir| puts "#{dir}"} +elsif ARGV.first == "--help" || ARGV.first == "-h" || ARGV.first == "help" + usage +elsif ARGV.size > 1 + command = ARGV.first + unless command == "install" || command == "update" + puts "Invalid command" + usage + exit + end + + split = ARGV[1].split("/") + + if ARGV[2] + branch = ARGV[2] + else + branch = "master" + end + + if split.size > 1 + plugin_name = split[1] + download_url = "https://github.com/#{ARGV[1]}/tarball/#{branch}" + else + plugin_name = ARGV[1] + download_url = "https://github.com/vim-scripts/#{ARGV[1]}/tarball/#{branch}" + end + + plugin_path = bundle_path + "/" + plugin_name + if command == "update" + old_plugin_path = plugin_path + plugin_path += "-new" + end + plugin_tar = plugin_path + ".tar" + + if File.exists? File.expand_path(plugin_path) + puts "Plugin exists #{plugin_path}" + exit + end + + http_status_code = `curl -sL -w "%{http_code} %{url_effective}\\n" "#{download_url}" -o /dev/null | awk '{ print $1 }'`.strip.to_i + if http_status_code == 404 + puts "Download failed with status #{http_status_code} for URL:" + puts download_url + exit() + end + + puts ">> Downloading from #{download_url}" + `wget -q -O #{plugin_tar} #{download_url}` + + unless File.exists?(File.expand_path(plugin_tar)) + puts plugin_tar + puts "\033[31mFailed to download tar" + exit + end + + puts ">> Decompressing plugin to #{plugin_path}" + `mkdir #{plugin_path} && tar -C #{plugin_path} -xzvf #{plugin_tar} --strip-components=1 && rm #{plugin_tar}` + + if command == "update" + puts ">> Removing old plugin" + `rm -r #{old_plugin_path}` + puts ">> Moving new plugin" + `mv #{plugin_path} #{old_plugin_path}` + puts "\033[32m#{plugin_name} is now updated!" + else + puts "\033[32m#{plugin_name} is now installed!" + end +else + usage +end From e2881c36fc1c50d55aaa3d6578de1043b7e20b43 Mon Sep 17 00:00:00 2001 From: Jacob Danner Date: Mon, 21 May 2012 12:17:51 -0700 Subject: [PATCH 2/9] submitting unfinished copy to test on different OS and verify proxy details --- vim-bundle.rb | 113 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 101 insertions(+), 12 deletions(-) diff --git a/vim-bundle.rb b/vim-bundle.rb index 502821e..e47294a 100755 --- a/vim-bundle.rb +++ b/vim-bundle.rb @@ -1,15 +1,86 @@ # ! /usr/bin/ruby -bundle_path = File.expand_path "~/.vim/bundle" +require 'net/http' +require 'net/https' +require 'uri' +require 'open-uri' +require 'zlib' + + +http_proxy_env = "http_proxy" + +proxy_uri=nil +proxy_user=nil +proxy_pass=nil +proxy_host=nil +proxy_port=nil + +if RUBY_PLATFORM.downcase.include?("mswin") + # This is the default on a gvim install on windows + bundle_path = File.expand_path "~/vimfiles/bundle" + + require 'win32/registry' + Win32::Registry::HKEY_CURRENT_USER.open( + "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\") do |reg| + proxy_uri = reg.read("ProxyServer") + end +else + bundle_path = File.expand_path "~/.vim/bundle" +end + +# if the env var for proxy has been set use that, +# otherwise use windows registry +if(ENV.has_key? http_proxy_env) + proxy_uri = ENV[http_proxy_env] +# proxy_user, proxy_pass = uri.userinfo.split(/:/) if proxy_uri.userinfo +# proxy_host = proxy_uri.host if proxy_uri.host +# proxy_port = proxy_uri.port if proxy_uri.port +end def usage - puts "usage: vim-bundle " + puts "Usage: vim-bundle " puts "" puts " \033[36mlist \033[0m- list all bundles currently installed" - puts " \033[36minstall / \033[0m- installs plugin from github. If no user is specified vim-scripts is used" - puts " \033[36mupdate / \033[0m- updates plugin. If no user is specified vim-scripts is used" + puts " \033[36minstall / " + puts " \033[0m installs plugin from github. If no user is specified vim-scripts is used" + puts " \033[36mupdate / " + puts " \033[0m updates plugin. If no user is specified vim-scripts is used" +end + +# from the ruby-doc std-lib example +def fetch(uri_str, proxy_uri = nil, limit = 10) + # You should choose a better exception. + raise ArgumentError, 'too many HTTP redirects' if limit == 0 + + puts "proxy_uri -> #{proxy_uri}" + # use proxy if it exists + if(proxy_uri) + + p_uri = URI.parse(proxy_uri) + puts "P_URI -> #{p_uri}" + p_user = nil + p_pass = nil + p_user, p_pass = p_uri.userinfo.split(/:/) if p_uri.userinfo + response = Net::HTTP::Proxy(p_uri.host, p_uri.port, p_user, p_pass).get_response(URI(uri_str)) + else + response= Net::HTTP.get_response(URI(uri_str)) + end + #http_access.use_ssl true + #response = http_access.get_response(URI(uri_str)) + + case response + when Net::HTTPSuccess then + response + when Net::HTTPRedirection then + location = response['location'] + warn "redirected to #{location}" + fetch(location, proxy_uri, limit - 1) + else + response + end end + if ARGV.first == "list" Dir.entries("#{bundle_path}").sort.each {|dir| puts "#{dir}"} elsif ARGV.first == "--help" || ARGV.first == "-h" || ARGV.first == "help" @@ -17,7 +88,7 @@ def usage elsif ARGV.size > 1 command = ARGV.first unless command == "install" || command == "update" - puts "Invalid command" + puts "Invalid command -> #{command}" usage exit end @@ -50,15 +121,23 @@ def usage exit end - http_status_code = `curl -sL -w "%{http_code} %{url_effective}\\n" "#{download_url}" -o /dev/null | awk '{ print $1 }'`.strip.to_i - if http_status_code == 404 - puts "Download failed with status #{http_status_code} for URL:" + puts "#{download_url}" + res = fetch(download_url, proxy_uri) + puts "#{res}" + if res.code != 200 + puts "Download failed with status #{res.code} for URL:" puts download_url exit() end puts ">> Downloading from #{download_url}" - `wget -q -O #{plugin_tar} #{download_url}` + open(download_url) do |f| + File.open(plugin_tar,"wb") do |file| + file.puts f.read + end + end + +# `wget -q -O #{plugin_tar} #{download_url}` unless File.exists?(File.expand_path(plugin_tar)) puts plugin_tar @@ -67,13 +146,23 @@ def usage end puts ">> Decompressing plugin to #{plugin_path}" - `mkdir #{plugin_path} && tar -C #{plugin_path} -xzvf #{plugin_tar} --strip-components=1 && rm #{plugin_tar}` + if( Dir.mkdir(plugin_path) != 0 ) + puts "could not create #{plugin_path}" + end + + + File.delete(plugin_tar) +# `mkdir #{plugin_path} && +# ##tar -C #{plugin_path} -xzvf #{plugin_tar} +# #--strip-components=1 && +# #rm #{plugin_tar}` if command == "update" puts ">> Removing old plugin" - `rm -r #{old_plugin_path}` + File.new(old_plugin_path).delete("*") + Dir.delete old_plugin_path puts ">> Moving new plugin" - `mv #{plugin_path} #{old_plugin_path}` + File.rename plugin_path old_plugin_path puts "\033[32m#{plugin_name} is now updated!" else puts "\033[32m#{plugin_name} is now installed!" From 06e3b482ac58d860c87d440279a80650c4a4ea05 Mon Sep 17 00:00:00 2001 From: Jacob Danner Date: Wed, 23 May 2012 19:46:44 -0700 Subject: [PATCH 3/9] checkpoint update to move to diff pc --- vim-bundle.rb | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/vim-bundle.rb b/vim-bundle.rb index e47294a..c12e120 100755 --- a/vim-bundle.rb +++ b/vim-bundle.rb @@ -6,15 +6,10 @@ require 'open-uri' require 'zlib' - http_proxy_env = "http_proxy" -proxy_uri=nil -proxy_user=nil -proxy_pass=nil -proxy_host=nil -proxy_port=nil - +# try a simple check, unfortunately this does not always work +# for example RailsInstaller platform is mingw32 if RUBY_PLATFORM.downcase.include?("mswin") # This is the default on a gvim install on windows bundle_path = File.expand_path "~/vimfiles/bundle" @@ -32,9 +27,6 @@ # otherwise use windows registry if(ENV.has_key? http_proxy_env) proxy_uri = ENV[http_proxy_env] -# proxy_user, proxy_pass = uri.userinfo.split(/:/) if proxy_uri.userinfo -# proxy_host = proxy_uri.host if proxy_uri.host -# proxy_port = proxy_uri.port if proxy_uri.port end def usage @@ -52,21 +44,30 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) # You should choose a better exception. raise ArgumentError, 'too many HTTP redirects' if limit == 0 - puts "proxy_uri -> #{proxy_uri}" + dl_uri = URI.parse(uri_str) + #dl_http = Net::HTTP.new() + p_user = nil + p_pass = nil + p_uri = nil + + puts "proxy_uri -> #{proxy_uri}" if proxy_uri # use proxy if it exists if(proxy_uri) - p_uri = URI.parse(proxy_uri) - puts "P_URI -> #{p_uri}" - p_user = nil - p_pass = nil p_user, p_pass = p_uri.userinfo.split(/:/) if p_uri.userinfo - response = Net::HTTP::Proxy(p_uri.host, p_uri.port, p_user, p_pass).get_response(URI(uri_str)) - else - response= Net::HTTP.get_response(URI(uri_str)) + #http_req = Net::HTTP::Proxy(p_uri.host, p_uri.port, p_user, p_pass).new(dl_uri) + #response = http_req.get_response(URI(uri_str), {:use_ssl => true}) +# else + # http_req = Net::HTTP.new(dl_uri) + #response= Net::HTTP.get_response(URI(uri_str), {:use_ssl => true}) end - #http_access.use_ssl true - #response = http_access.get_response(URI(uri_str)) + + response = Net::HTTP::Proxy(p_uri.host, p_uri.port, p_user, p_pass).get_response(dl_uri, :use_ssl => dl_uri.scheme == 'https') + + + #http_req.use_ssl = true + #http_req.verify_mode = OpenSSL::SSL::VERIFY_NONE + #response = http_req.get_response(dl_uri.request_uri, :use_ssl => uri.scheme == 'https') case response when Net::HTTPSuccess then @@ -76,7 +77,7 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) warn "redirected to #{location}" fetch(location, proxy_uri, limit - 1) else - response + response.error! end end From 104a28fdd879e183b6257bf70af944620c2d722f Mon Sep 17 00:00:00 2001 From: Jacob Danner Date: Wed, 23 May 2012 20:40:16 -0700 Subject: [PATCH 4/9] testing on linux, removed the fetch while I figure out how to use the net/http lib --- vim-bundle.rb | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/vim-bundle.rb b/vim-bundle.rb index c12e120..536eaf1 100755 --- a/vim-bundle.rb +++ b/vim-bundle.rb @@ -5,6 +5,7 @@ require 'uri' require 'open-uri' require 'zlib' +require 'fileutils' http_proxy_env = "http_proxy" @@ -122,11 +123,14 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) exit end - puts "#{download_url}" - res = fetch(download_url, proxy_uri) - puts "#{res}" - if res.code != 200 - puts "Download failed with status #{res.code} for URL:" + #puts "#{download_url}" + #res = fetch(download_url, proxy_uri) + #puts "#{res}" + + res_code = `curl -sL -w "%{http_code} %{url_effective}\\n" "#{download_url}" -o /dev/null | awk '{ print $1 }'`.strip.to_i + #if res.code != 200 + if res_code != 200 + puts "Download failed with status #{res_code} for URL:" puts download_url exit() end @@ -151,20 +155,15 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) puts "could not create #{plugin_path}" end - File.delete(plugin_tar) -# `mkdir #{plugin_path} && -# ##tar -C #{plugin_path} -xzvf #{plugin_tar} -# #--strip-components=1 && -# #rm #{plugin_tar}` - if command == "update" - puts ">> Removing old plugin" - File.new(old_plugin_path).delete("*") - Dir.delete old_plugin_path - puts ">> Moving new plugin" - File.rename plugin_path old_plugin_path - puts "\033[32m#{plugin_name} is now updated!" + if File.exists? old_plugin_path + puts ">> Removing old plugin" + FileUtils.rm_rf old_plugin_path + puts ">> Moving new plugin" + File.rename plugin_path old_plugin_path + puts "\033[32m#{plugin_name} is now updated!" + end else puts "\033[32m#{plugin_name} is now installed!" end From 8fc0dd2cc6306bf94ccc871caceffbfba7df7657 Mon Sep 17 00:00:00 2001 From: Jacob Danner Date: Thu, 24 May 2012 08:33:48 -0700 Subject: [PATCH 5/9] argh, rb, http call using a proxy --- vim-bundle.rb | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/vim-bundle.rb b/vim-bundle.rb index 536eaf1..079d495 100755 --- a/vim-bundle.rb +++ b/vim-bundle.rb @@ -63,7 +63,9 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) #response= Net::HTTP.get_response(URI(uri_str), {:use_ssl => true}) end - response = Net::HTTP::Proxy(p_uri.host, p_uri.port, p_user, p_pass).get_response(dl_uri, :use_ssl => dl_uri.scheme == 'https') + response = Net::HTTP::Proxy(p_uri.host, + p_uri.port, p_user, p_pass).get_response(dl_uri, + :use_ssl => dl_uri.scheme == 'https') #http_req.use_ssl = true @@ -126,6 +128,32 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) #puts "#{download_url}" #res = fetch(download_url, proxy_uri) #puts "#{res}" +def simple_fetch(download_url) + puts "Download URL #{download_url}" + response = nil +# Net::HTTP.start(download_url) {|http| +# response = http.head(download_url) #head +# } + dl_uri = URI.parse(download_url) + response = Net::HTTP.get_response(download_url, #dl_uri, + :use_ssl => true)#dl_uri.scheme == "https") + puts response + case response + when Net::HTTPSuccess then + response + when Net::HTTPRedirection then + location = response['location'] + warn "redirected to #{location}" + simple_fetch(location, limit - 1) + else + response.error! + end + +end + + # TODO: make this support ENV["http_proxy] + # TODO: make this support redirects + #res_code = simple_fetch(download_url).code res_code = `curl -sL -w "%{http_code} %{url_effective}\\n" "#{download_url}" -o /dev/null | awk '{ print $1 }'`.strip.to_i #if res.code != 200 From 8bd5342e935fd259837148f2cd49ddf08df6e315 Mon Sep 17 00:00:00 2001 From: Jacob Danner Date: Sat, 26 May 2012 13:54:38 -0700 Subject: [PATCH 6/9] use open-uri library for getting file content --- vim-bundle.rb | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/vim-bundle.rb b/vim-bundle.rb index c12e120..40ef1c0 100755 --- a/vim-bundle.rb +++ b/vim-bundle.rb @@ -122,15 +122,9 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) exit end - puts "#{download_url}" - res = fetch(download_url, proxy_uri) - puts "#{res}" - if res.code != 200 - puts "Download failed with status #{res.code} for URL:" - puts download_url - exit() - end - + # use open-uri to download tar, this API + # knows how to work with https, redirection + # and proxy information puts ">> Downloading from #{download_url}" open(download_url) do |f| File.open(plugin_tar,"wb") do |file| @@ -138,8 +132,6 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) end end -# `wget -q -O #{plugin_tar} #{download_url}` - unless File.exists?(File.expand_path(plugin_tar)) puts plugin_tar puts "\033[31mFailed to download tar" From 2f9700f3167b970800bdbb37df17e5225898fc68 Mon Sep 17 00:00:00 2001 From: Jacob Danner Date: Sat, 26 May 2012 15:00:04 -0700 Subject: [PATCH 7/9] working copy! no more hardcoded shell commands, should be a pure ruby implementation of the script --- vim-bundle.rb | 94 +++++++++++++-------------------------------------- 1 file changed, 24 insertions(+), 70 deletions(-) diff --git a/vim-bundle.rb b/vim-bundle.rb index 40ef1c0..f13349a 100755 --- a/vim-bundle.rb +++ b/vim-bundle.rb @@ -4,84 +4,38 @@ require 'net/https' require 'uri' require 'open-uri' +require 'openssl' +# simple workaround for SSL error +OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE require 'zlib' +require 'fileutils' + +bundle_path = File.expand_path "~/.vim/bundle" -http_proxy_env = "http_proxy" # try a simple check, unfortunately this does not always work # for example RailsInstaller platform is mingw32 if RUBY_PLATFORM.downcase.include?("mswin") # This is the default on a gvim install on windows bundle_path = File.expand_path "~/vimfiles/bundle" - require 'win32/registry' Win32::Registry::HKEY_CURRENT_USER.open( "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\") do |reg| proxy_uri = reg.read("ProxyServer") - end -else - bundle_path = File.expand_path "~/.vim/bundle" -end - -# if the env var for proxy has been set use that, -# otherwise use windows registry -if(ENV.has_key? http_proxy_env) - proxy_uri = ENV[http_proxy_env] + end end def usage puts "Usage: vim-bundle " puts "" - puts " \033[36mlist \033[0m- list all bundles currently installed" - puts " \033[36minstall / " - puts " \033[0m installs plugin from github. If no user is specified vim-scripts is used" - puts " \033[36mupdate / " - puts " \033[0m updates plugin. If no user is specified vim-scripts is used" + puts " list - list all bundles currently installed" + puts " install / " + puts " installs plugin from github. If no user is specified vim-scripts is used" + puts " update / " + puts " updates plugin. If no user is specified vim-scripts is used" end -# from the ruby-doc std-lib example -def fetch(uri_str, proxy_uri = nil, limit = 10) - # You should choose a better exception. - raise ArgumentError, 'too many HTTP redirects' if limit == 0 - - dl_uri = URI.parse(uri_str) - #dl_http = Net::HTTP.new() - p_user = nil - p_pass = nil - p_uri = nil - - puts "proxy_uri -> #{proxy_uri}" if proxy_uri - # use proxy if it exists - if(proxy_uri) - p_uri = URI.parse(proxy_uri) - p_user, p_pass = p_uri.userinfo.split(/:/) if p_uri.userinfo - #http_req = Net::HTTP::Proxy(p_uri.host, p_uri.port, p_user, p_pass).new(dl_uri) - #response = http_req.get_response(URI(uri_str), {:use_ssl => true}) -# else - # http_req = Net::HTTP.new(dl_uri) - #response= Net::HTTP.get_response(URI(uri_str), {:use_ssl => true}) - end - - response = Net::HTTP::Proxy(p_uri.host, p_uri.port, p_user, p_pass).get_response(dl_uri, :use_ssl => dl_uri.scheme == 'https') - - - #http_req.use_ssl = true - #http_req.verify_mode = OpenSSL::SSL::VERIFY_NONE - #response = http_req.get_response(dl_uri.request_uri, :use_ssl => uri.scheme == 'https') - - case response - when Net::HTTPSuccess then - response - when Net::HTTPRedirection then - location = response['location'] - warn "redirected to #{location}" - fetch(location, proxy_uri, limit - 1) - else - response.error! - end -end - - +# TODO: convert this to use OptionParser if ARGV.first == "list" Dir.entries("#{bundle_path}").sort.each {|dir| puts "#{dir}"} elsif ARGV.first == "--help" || ARGV.first == "-h" || ARGV.first == "help" @@ -122,9 +76,13 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) exit end + + # create dir to download to if it does not exist + FileUtils.mkdir_p(File.dirname(File.expand_path(plugin_tar))) # use open-uri to download tar, this API # knows how to work with https, redirection # and proxy information + puts ">> Downloading from #{download_url}" open(download_url) do |f| File.open(plugin_tar,"wb") do |file| @@ -134,7 +92,7 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) unless File.exists?(File.expand_path(plugin_tar)) puts plugin_tar - puts "\033[31mFailed to download tar" + puts " Failed to download tar" exit end @@ -143,22 +101,18 @@ def fetch(uri_str, proxy_uri = nil, limit = 10) puts "could not create #{plugin_path}" end - + puts ">> Deleting plugin tarball #{plugin_tar}" File.delete(plugin_tar) -# `mkdir #{plugin_path} && -# ##tar -C #{plugin_path} -xzvf #{plugin_tar} -# #--strip-components=1 && -# #rm #{plugin_tar}` if command == "update" puts ">> Removing old plugin" - File.new(old_plugin_path).delete("*") - Dir.delete old_plugin_path + FileUtils.rmdir old_plugin_path, :verbose=> true puts ">> Moving new plugin" - File.rename plugin_path old_plugin_path - puts "\033[32m#{plugin_name} is now updated!" + #File.rename plugin_path old_plugin_path + FileUtils.mv plugin_path old_plugin_path + puts " #{plugin_name} is now updated!" else - puts "\033[32m#{plugin_name} is now installed!" + puts " #{plugin_name} is now installed!" end else usage From 7889010015191e8480b4bd1406e7d1642ce5d3ab Mon Sep 17 00:00:00 2001 From: Jacob Danner Date: Sat, 26 May 2012 15:11:32 -0700 Subject: [PATCH 8/9] removing win32/registry import, default to environment http_proxy via openuri api --- vim-bundle.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vim-bundle.rb b/vim-bundle.rb index d391ba6..dadb2b8 100755 --- a/vim-bundle.rb +++ b/vim-bundle.rb @@ -17,11 +17,11 @@ if RUBY_PLATFORM.downcase.include?("mswin") # This is the default on a gvim install on windows bundle_path = File.expand_path "~/vimfiles/bundle" - require 'win32/registry' - Win32::Registry::HKEY_CURRENT_USER.open( - "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\") do |reg| - proxy_uri = reg.read("ProxyServer") - end + #require 'win32/registry' + #Win32::Registry::HKEY_CURRENT_USER.open( + # "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\") do |reg| + # proxy_uri = reg.read("ProxyServer") + #end end def usage From af208a5f9712afad6d4ff59e93e1a67217094b1e Mon Sep 17 00:00:00 2001 From: Jacob Danner Date: Sat, 26 May 2012 15:12:44 -0700 Subject: [PATCH 9/9] minor cleanup before pull request --- .gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1c2d52b..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.idea/*