rubysspi 1.0.5-i386-mswin32 → 1.0.6-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'rake/testtask'
6
6
  spec = Gem::Specification.new do |s|
7
7
  s.name = "rubysspi"
8
8
  s.summary = "A library which implements Ruby bindings to the Win32 SSPI library. Also includes a module to add Negotiate authentication support to Net::HTTP."
9
- s.version = "1.0.5"
9
+ s.version = "1.0.6"
10
10
  s.author = "Justin Bailey"
11
11
  s.email = "jgbailey @nospam@ gmail.com"
12
12
  s.homepage = "http://rubyforge.org/projects/rubysspi/"
@@ -26,7 +26,7 @@ EOS
26
26
  s.files = FileList["lib/**/*", "test/*", "*.txt", "Rakefile", "spa.rb"].to_a
27
27
 
28
28
  s.bindir = "bin"
29
- s.executables = ["apply_sspi_patch.rb"]
29
+ s.executables = ["apply_sspi_patch"]
30
30
 
31
31
  s.require_path = "lib"
32
32
  s.autorequire = "rubysspi"
File without changes
File without changes
@@ -0,0 +1,27 @@
1
+ # This file provides a trace of the HTTP request/response sequence between the local computer and the proxy. Useful
2
+ # for debugging problems with the library. Outputs trace to standard output.
3
+
4
+ # Magic constant will ensure that, if the SSPI patch has been applied, it won't break these tests
5
+ DISABLE_RUBY_SSPI_PATCH = true
6
+
7
+ require 'net/http'
8
+ require 'pathname'
9
+ $: << (File.dirname(__FILE__) << "/../lib")
10
+ require 'rubysspi'
11
+
12
+ raise "http_proxy environment variable must be set." unless ENV["http_proxy"]
13
+ proxy = URI.parse(ENV["http_proxy"])
14
+ raise "Could not parse http_proxy (#{ENV["http_proxy"]}). http_proxy should be a URL with a port (e.g. http://proxy.corp.com:8080)." unless proxy.host && proxy.port
15
+
16
+ conn = Net::HTTP.Proxy(proxy.host, proxy.port).new("www.google.com")
17
+ conn.set_debug_output $stdout
18
+ conn.start() do |http|
19
+ nego_auth = SSPI::NegotiateAuth.new
20
+ sr = http.request_get "/", { "Proxy-Authorization" => "Negotiate " + nego_auth.get_initial_token }
21
+ resp = http.get "/", { "Proxy-Authorization" => "Negotiate " + nego_auth.complete_authentication(sr["Proxy-Authenticate"].split(" ").last.strip) }
22
+ # Google redirects to country of origins domain if not US.
23
+ raise "Response code not as expected: #{resp.inspect}" unless resp.code.to_i == 200 || resp.code.to_i == 302
24
+ resp = http.get "/foobar.html"
25
+ # Some proxy servers don't return 404 but 407.
26
+ raise "Response code not as expected: #{resp.inspect}" unless resp.code.to_i == 404 || resp.code.to_i == 407
27
+ end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: rubysspi
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.5
7
- date: 2006-12-01 00:00:00 -08:00
6
+ version: 1.0.6
7
+ date: 2007-02-05 00:00:00 -08:00
8
8
  summary: A library which implements Ruby bindings to the Win32 SSPI library. Also includes a module to add Negotiate authentication support to Net::HTTP.
9
9
  require_paths:
10
10
  - lib
@@ -32,10 +32,11 @@ files:
32
32
  - lib/rubysspi
33
33
  - lib/rubysspi.rb
34
34
  - lib/rubysspi/proxy_auth.rb
35
- - test/ruby_sspi_test.rb
36
35
  - test/test_gem_list.rb
37
36
  - test/test_net_http.rb
38
37
  - test/test_patched_net_http.rb
38
+ - test/test_ruby_sspi.rb
39
+ - test/trace_proxy.rb
39
40
  - README.txt
40
41
  - Rakefile
41
42
  - spa.rb
@@ -50,7 +51,7 @@ rdoc_options:
50
51
  extra_rdoc_files:
51
52
  - README.txt
52
53
  executables:
53
- - apply_sspi_patch.rb
54
+ - apply_sspi_patch
54
55
  extensions: []
55
56
 
56
57
  requirements: []