rubysspi 1.3 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ == 1.3.1
2
+ * Update tests/test_patched_net_http.rb to recognize a redirect as success.
3
+
1
4
  == 1.3
2
5
  * Updated library to work with either "Negotiate" or "NTLM" authorization schemes. Arguments to Win32::SSPI.get_initial_token have changed
3
6
  but that should only impact code directly using the library. Net::HTTP support still works the same.
@@ -20,4 +23,4 @@
20
23
  * Added test to "test_patched_net_http.rb" to ensure net/http has been patched first.
21
24
  * Removed Win32 platform restriction on gem (though it will still only run in Win32 environments, real or emulated).
22
25
  * CHANGELOG begun
23
-
26
+
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.3"
9
+ s.version = "1.3.1"
10
10
  s.author = "Justin Bailey"
11
11
  s.email = "jgbailey @nospam@ gmail.com"
12
12
  s.homepage = "http://rubyforge.org/projects/rubysspi/"
@@ -9,29 +9,29 @@
9
9
  # modify this program under the same terms of ruby itself ---
10
10
  # Ruby Distribution License or GNU General Public License.
11
11
  #
12
-
13
- require 'test/unit'
14
- require 'net/http'
15
-
16
- # Intended to test 'patched' version of Net::HTTP. Notice lack of requires at the top.
17
- class PatchedRubyTest < Test::Unit::TestCase
18
- def setup
19
- assert ENV["http_proxy"], "http_proxy must be set before running tests."
20
- end
21
-
22
- def test_net_http
23
-
24
- assert_nothing_raised "net/http does not appear to be patched" do
25
- assert Net::HTTP.sspi?, "sspi? patch applied but did not return true."
26
- end
27
-
28
- assert ENV["http_proxy"], "http_proxy environment variable must be set."
29
- proxy = URI.parse(ENV["http_proxy"])
30
- assert proxy.host && proxy.port, "Could not parse http_proxy (#{ENV["http_proxy"]}). http_proxy should be a URL with a port (e.g. http://proxy.corp.com:8080)."
31
-
32
- Net::HTTP.Proxy(proxy.host, proxy.port).start("www.google.com") do |http|
33
- resp = http.get("/")
34
- assert resp.code.to_i == 200, "Did not get response from Google as expected."
35
- end
36
- end
37
- end
12
+
13
+ require 'test/unit'
14
+ require 'net/http'
15
+
16
+ # Intended to test 'patched' version of Net::HTTP. Notice lack of requires at the top.
17
+ class PatchedRubyTest < Test::Unit::TestCase
18
+ def setup
19
+ assert ENV["http_proxy"], "http_proxy must be set before running tests."
20
+ end
21
+
22
+ def test_net_http
23
+
24
+ assert_nothing_raised "net/http does not appear to be patched" do
25
+ assert Net::HTTP.sspi?, "sspi? patch applied but did not return true."
26
+ end
27
+
28
+ assert ENV["http_proxy"], "http_proxy environment variable must be set."
29
+ proxy = URI.parse(ENV["http_proxy"])
30
+ assert proxy.host && proxy.port, "Could not parse http_proxy (#{ENV["http_proxy"]}). http_proxy should be a URL with a port (e.g. http://proxy.corp.com:8080)."
31
+
32
+ Net::HTTP.Proxy(proxy.host, proxy.port).start("www.google.com") do |http|
33
+ resp = http.get("/")
34
+ assert(resp.code.to_i == 200 || resp.code.to_i == 302, "Did not get response from Google as expected.")
35
+ end
36
+ end
37
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubysspi
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.3"
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Bailey
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-08 00:00:00 -08:00
12
+ date: 2009-01-28 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -26,8 +26,8 @@ extra_rdoc_files:
26
26
  files:
27
27
  - lib/win32
28
28
  - lib/win32/sspi
29
- - lib/win32/sspi.rb
30
29
  - lib/win32/sspi/http_proxy_patch.rb
30
+ - lib/win32/sspi.rb
31
31
  - test/test_gem_list.rb
32
32
  - test/test_net_http.rb
33
33
  - test/test_patched_net_http.rb
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  requirements: []
65
65
 
66
66
  rubyforge_project: http://rubyforge.org/projects/rubysspi/
67
- rubygems_version: 1.2.0
67
+ rubygems_version: 1.3.1
68
68
  signing_key:
69
69
  specification_version: 2
70
70
  summary: A library which implements Ruby bindings to the Win32 SSPI library. Also includes a module to add Negotiate authentication support to Net::HTTP.