rhodes 3.2.0.beta.5 → 3.2.0.beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +3 -0
- data/Manifest.txt +10 -1
- data/Rakefile +6 -0
- data/bin/get-rhodes-info +4 -27
- data/bin/set-rhodes-sdk +4 -1
- data/doc/build.txt +12 -3
- data/doc/extensions.txt +26 -0
- data/installer/Rakefile +156 -0
- data/installer/ServiceLib.nsh +369 -0
- data/installer/jake.rb +478 -0
- data/installer/rhostudio.nsi +76 -143
- data/lib/extensions/digest-sha1/ext/Rakefile +58 -40
- data/lib/extensions/fileutils/fileutils.rb +3 -2
- data/lib/extensions/hmac/hmac-md5.rb +11 -0
- data/lib/extensions/hmac/hmac-rmd160.rb +11 -0
- data/lib/extensions/hmac/hmac-sha1.rb +11 -0
- data/lib/extensions/hmac/hmac-sha2.rb +25 -0
- data/lib/extensions/hmac/hmac.rb +118 -0
- data/lib/extensions/hmac/ruby_hmac.rb +2 -0
- data/lib/extensions/net-http/net/http.rb +1 -1
- data/lib/framework/rho/render.rb +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +1 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +52 -8
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +8 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PerformOnUiThread.java +4 -5
- data/platform/android/build/android.rake +3 -1
- data/platform/iphone/rbuild/iphone.rake +7 -7
- data/platform/shared/common/RhodesApp.cpp +18 -14
- data/platform/shared/common/RhodesApp.h +1 -0
- data/platform/shared/rubyext/System.cpp +3 -0
- data/platform/symbian/build/symbian.rake +13 -5
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +9 -1
- data/rakefile.rb +6 -0
- data/res/generators/templates/application/Rakefile +10 -1
- data/res/generators/templates/application/app/layout.erb +1 -1
- data/res/generators/templates/application/build.yml +2 -2
- data/res/generators/templates/application/public/jqmobile/{jquery.mobile.iphone.css → jquery-mobile-iphone.css} +0 -0
- data/res/generators/templates/application/public/js/jqmobile-patch.js +23 -20
- data/spec/framework_spec/app/spec/library/digest/sha1/file_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/Proxy_spec.rb +3 -2
- data/spec/framework_spec/app/spec/library/net/http/http/copy_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/delete_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/finish_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/fixtures/http_server.rb +18 -12
- data/spec/framework_spec/app/spec/library/net/http/http/get_print_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/get_response_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/get_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/head_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/initialize_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/inspect_spec.rb +4 -4
- data/spec/framework_spec/app/spec/library/net/http/http/lock_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/mkcol_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/move_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/new_spec.rb +7 -7
- data/spec/framework_spec/app/spec/library/net/http/http/newobj_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/options_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/port_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/post_form_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/post_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/propfind_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/proppatch_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/proxy_address_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/proxy_pass_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/proxy_port_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/proxy_user_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/put_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/request_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/send_request_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/set_debug_output_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/request_get.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/request_head.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/request_post.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/request_put.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/started.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/start_spec.rb +8 -8
- data/spec/framework_spec/app/spec/library/net/http/http/trace_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/unlock_spec.rb +1 -1
- data/spec/framework_spec/app/spec_runner.rb +1 -1
- data/spec/framework_spec/build.yml +2 -2
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +43 -2
- data/version +1 -1
- metadata +14 -5
|
@@ -14,7 +14,7 @@ describe "Net::HTTP.get_print" do
|
|
|
14
14
|
describe "when passed URI" do
|
|
15
15
|
it "it prints the body of the specified uri to $stdout" do
|
|
16
16
|
lambda do
|
|
17
|
-
Net::HTTP.get_print URI.parse(
|
|
17
|
+
Net::HTTP.get_print URI.parse("http://127.0.0.1:#{NetHTTPSpecs.server_port}/")
|
|
18
18
|
end.should output(/This is the index page\./)
|
|
19
19
|
end
|
|
20
20
|
end
|
|
@@ -22,7 +22,7 @@ describe "Net::HTTP.get_print" do
|
|
|
22
22
|
describe "when passed host, path, port" do
|
|
23
23
|
it "it prints the body of the specified uri to $stdout" do
|
|
24
24
|
lambda do
|
|
25
|
-
Net::HTTP.get_print '127.0.0.1', "/",
|
|
25
|
+
Net::HTTP.get_print '127.0.0.1', "/", NetHTTPSpecs.server_port
|
|
26
26
|
end.should output(/This is the index page\./)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -13,7 +13,7 @@ describe "Net::HTTP.get_response" do
|
|
|
13
13
|
|
|
14
14
|
describe "when passed URI" do
|
|
15
15
|
it "returns the response for the specified uri" do
|
|
16
|
-
res = Net::HTTP.get_response(URI.parse(
|
|
16
|
+
res = Net::HTTP.get_response(URI.parse("http://127.0.0.1:#{NetHTTPSpecs.server_port}/"))
|
|
17
17
|
res.content_type.should == "text/plain"
|
|
18
18
|
res.body.should == "This is the index page."
|
|
19
19
|
end
|
|
@@ -21,7 +21,7 @@ describe "Net::HTTP.get_response" do
|
|
|
21
21
|
|
|
22
22
|
describe "when passed host, path, port" do
|
|
23
23
|
it "returns the response for the specified host-path-combination" do
|
|
24
|
-
res = Net::HTTP.get_response('127.0.0.1', "/",
|
|
24
|
+
res = Net::HTTP.get_response('127.0.0.1', "/", NetHTTPSpecs.server_port)
|
|
25
25
|
res.content_type.should == "text/plain"
|
|
26
26
|
res.body.should == "This is the index page."
|
|
27
27
|
end
|
|
@@ -13,13 +13,13 @@ describe "Net::HTTP.get when passed URI" do
|
|
|
13
13
|
|
|
14
14
|
describe "when passed URI" do
|
|
15
15
|
it "returns the body of the specified uri" do
|
|
16
|
-
Net::HTTP.get(URI.parse(
|
|
16
|
+
Net::HTTP.get(URI.parse("http://127.0.0.1:#{NetHTTPSpecs.server_port}/")).should == "This is the index page."
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
describe "when passed host, path, port" do
|
|
21
21
|
it "returns the body of the specified host-path-combination" do
|
|
22
|
-
Net::HTTP.get('127.0.0.1', "/",
|
|
22
|
+
Net::HTTP.get('127.0.0.1', "/", NetHTTPSpecs.server_port).should == "This is the index page."
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ describe "Net::HTTP.get when passed URI" do
|
|
|
27
27
|
describe "when passed path in version 1.1 mode" do
|
|
28
28
|
before(:each) do
|
|
29
29
|
Net::HTTP.version_1_1
|
|
30
|
-
@http = Net::HTTP.start("127.0.0.1",
|
|
30
|
+
@http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
after(:each) do
|
|
@@ -28,7 +28,7 @@ describe "Net::HTTP#initialize" do
|
|
|
28
28
|
describe "when passed address, port" do
|
|
29
29
|
before(:each) do
|
|
30
30
|
@net = Net::HTTP.allocate
|
|
31
|
-
@net.send(:initialize, "127.0.0.1",
|
|
31
|
+
@net.send(:initialize, "127.0.0.1", NetHTTPSpecs.server_port)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
it "sets the new Net::HTTP instance's address to the passed address" do
|
|
@@ -36,7 +36,7 @@ describe "Net::HTTP#initialize" do
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
it "sets the new Net::HTTP instance's port to the passed port" do
|
|
39
|
-
@net.port.should eql(
|
|
39
|
+
@net.port.should eql(NetHTTPSpecs.server_port)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
it "does not start the new Net::HTTP instance" do
|
|
@@ -12,15 +12,15 @@ describe "Net::HTTP#inspect" do
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
before(:each) do
|
|
15
|
-
@net = Net::HTTP.new("127.0.0.1",
|
|
15
|
+
@net = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
it "returns a String representation of self" do
|
|
19
|
-
net = Net::HTTP.new("127.0.0.1",
|
|
19
|
+
net = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port)
|
|
20
20
|
net.inspect.should be_kind_of(String)
|
|
21
|
-
net.inspect.should == "#<Net::HTTP 127.0.0.1
|
|
21
|
+
net.inspect.should == "#<Net::HTTP 127.0.0.1:#{NetHTTPSpecs.server_port} open=false>"
|
|
22
22
|
|
|
23
23
|
net.start
|
|
24
|
-
net.inspect.should == "#<Net::HTTP 127.0.0.1
|
|
24
|
+
net.inspect.should == "#<Net::HTTP 127.0.0.1:#{NetHTTPSpecs.server_port} open=true>"
|
|
25
25
|
end
|
|
26
26
|
end
|
|
@@ -27,7 +27,7 @@ describe "Net::HTTP.new" do
|
|
|
27
27
|
|
|
28
28
|
describe "when passed address, port" do
|
|
29
29
|
before(:each) do
|
|
30
|
-
@http = Net::HTTP.new("127.0.0.1",
|
|
30
|
+
@http = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
it "returns a Net::HTTP instance" do
|
|
@@ -40,7 +40,7 @@ describe "Net::HTTP.new" do
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
it "sets the new Net::HTTP instance's port to the passed port" do
|
|
43
|
-
@http.port.should eql(
|
|
43
|
+
@http.port.should eql(NetHTTPSpecs.server_port)
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
it "does not start the new Net::HTTP instance" do
|
|
@@ -50,32 +50,32 @@ describe "Net::HTTP.new" do
|
|
|
50
50
|
|
|
51
51
|
describe "when passed address, port, *proxy_options" do
|
|
52
52
|
it "returns a Net::HTTP instance" do
|
|
53
|
-
http = Net::HTTP.new("127.0.0.1",
|
|
53
|
+
http = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port, "127.0.0.1")
|
|
54
54
|
http.proxy?.should be_true
|
|
55
55
|
http.instance_of?(Net::HTTP).should be_false
|
|
56
56
|
http.should be_kind_of(Net::HTTP)
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
it "correctly sets the passed Proxy options" do
|
|
60
|
-
http = Net::HTTP.new("127.0.0.1",
|
|
60
|
+
http = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port, "127.0.0.1")
|
|
61
61
|
http.proxy_address.should == "127.0.0.1"
|
|
62
62
|
http.proxy_port.should eql(80)
|
|
63
63
|
http.proxy_user.should be_nil
|
|
64
64
|
http.proxy_pass.should be_nil
|
|
65
65
|
|
|
66
|
-
http = Net::HTTP.new("127.0.0.1",
|
|
66
|
+
http = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port, "127.0.0.1", 1234)
|
|
67
67
|
http.proxy_address.should == "127.0.0.1"
|
|
68
68
|
http.proxy_port.should eql(1234)
|
|
69
69
|
http.proxy_user.should be_nil
|
|
70
70
|
http.proxy_pass.should be_nil
|
|
71
71
|
|
|
72
|
-
http = Net::HTTP.new("127.0.0.1",
|
|
72
|
+
http = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port, "127.0.0.1", 1234, "rubyspec")
|
|
73
73
|
http.proxy_address.should == "127.0.0.1"
|
|
74
74
|
http.proxy_port.should eql(1234)
|
|
75
75
|
http.proxy_user.should == "rubyspec"
|
|
76
76
|
http.proxy_pass.should be_nil
|
|
77
77
|
|
|
78
|
-
http = Net::HTTP.new("127.0.0.1",
|
|
78
|
+
http = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port, "127.0.0.1", 1234, "rubyspec", "rocks")
|
|
79
79
|
http.proxy_address.should == "127.0.0.1"
|
|
80
80
|
http.proxy_port.should eql(1234)
|
|
81
81
|
http.proxy_user.should == "rubyspec"
|
|
@@ -26,7 +26,7 @@ describe "Net::HTTP.newobj" do
|
|
|
26
26
|
|
|
27
27
|
describe "when passed address, port" do
|
|
28
28
|
before(:each) do
|
|
29
|
-
@net = Net::HTTP.newobj("127.0.0.1",
|
|
29
|
+
@net = Net::HTTP.newobj("127.0.0.1", NetHTTPSpecs.server_port)
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
it "returns a new Net::HTTP instance" do
|
|
@@ -38,7 +38,7 @@ describe "Net::HTTP.newobj" do
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
it "sets the new Net::HTTP instance's port to the passed port" do
|
|
41
|
-
@net.port.should eql(
|
|
41
|
+
@net.port.should eql(NetHTTPSpecs.server_port)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
it "does not start the new Net::HTTP instance" do
|
|
@@ -12,7 +12,7 @@ describe "Net::HTTP#options" do
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
before(:each) do
|
|
15
|
-
@http = Net::HTTP.start("127.0.0.1",
|
|
15
|
+
@http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
it "sends an options request to the passed path and returns the response" do
|
|
@@ -3,7 +3,7 @@ require 'net/http'
|
|
|
3
3
|
|
|
4
4
|
describe "Net::HTTP#port" do
|
|
5
5
|
it "returns the current port number" do
|
|
6
|
-
net = Net::HTTP.new("127.0.0.1",
|
|
7
|
-
net.port.should eql(
|
|
6
|
+
net = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port)
|
|
7
|
+
net.port.should eql(NetHTTPSpecs.server_port)
|
|
8
8
|
end
|
|
9
9
|
end
|
|
@@ -12,7 +12,7 @@ describe "Net::HTTP.post_form when passed URI" do
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
it "POSTs the passed form data to the given uri" do
|
|
15
|
-
uri = URI.parse(
|
|
15
|
+
uri = URI.parse("http://127.0.0.1:#{NetHTTPSpecs.server_port}/request/body")
|
|
16
16
|
data = { :test => :data }
|
|
17
17
|
|
|
18
18
|
res = Net::HTTP.post_form(uri, data)
|
|
@@ -12,7 +12,7 @@ describe "Net::HTTP#propfind" do
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
before(:each) do
|
|
15
|
-
@http = Net::HTTP.start("127.0.0.1",
|
|
15
|
+
@http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
it "sends an propfind request to the passed path and returns the response" do
|
|
@@ -12,7 +12,7 @@ describe "Net::HTTP#proppatch" do
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
before(:each) do
|
|
15
|
-
@http = Net::HTTP.start("127.0.0.1",
|
|
15
|
+
@http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
it "sends an proppatch request to the passed path and returns the response" do
|
|
@@ -18,14 +18,14 @@ end
|
|
|
18
18
|
describe "Net::HTTP#proxy_address" do
|
|
19
19
|
describe "when self is no proxy class instance" do
|
|
20
20
|
it "returns nil" do
|
|
21
|
-
Net::HTTP.new("127.0.0.1",
|
|
21
|
+
Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port).proxy_address.should be_nil
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
describe "when self is a proxy class instance" do
|
|
26
26
|
it "returns the password for self's proxy connection" do
|
|
27
27
|
http_with_proxy = Net::HTTP.Proxy("127.0.0.1", 1234, "rspec", "rocks")
|
|
28
|
-
http_with_proxy.new("127.0.0.1",
|
|
28
|
+
http_with_proxy.new("127.0.0.1", NetHTTPSpecs.server_port).proxy_address.should == "127.0.0.1"
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
end
|
|
@@ -22,18 +22,18 @@ end
|
|
|
22
22
|
describe "Net::HTTP#proxy_pass" do
|
|
23
23
|
describe "when self is no proxy class instance" do
|
|
24
24
|
it "returns nil" do
|
|
25
|
-
Net::HTTP.new("127.0.0.1",
|
|
25
|
+
Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port).proxy_pass.should be_nil
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
describe "when self is a proxy class instance" do
|
|
30
30
|
it "returns nil if no password was set for self's proxy connection" do
|
|
31
|
-
Net::HTTP.Proxy("127.0.0.1").new("127.0.0.1",
|
|
31
|
+
Net::HTTP.Proxy("127.0.0.1").new("127.0.0.1", NetHTTPSpecs.server_port).proxy_pass.should be_nil
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
it "returns the password for self's proxy connection" do
|
|
35
35
|
http_with_proxy = Net::HTTP.Proxy("127.0.0.1", 1234, "rspec", "rocks")
|
|
36
|
-
http_with_proxy.new("127.0.0.1",
|
|
36
|
+
http_with_proxy.new("127.0.0.1", NetHTTPSpecs.server_port).proxy_pass.should == "rocks"
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -22,18 +22,18 @@ end
|
|
|
22
22
|
describe "Net::HTTP#proxy_port" do
|
|
23
23
|
describe "when self is no proxy class instance" do
|
|
24
24
|
it "returns nil" do
|
|
25
|
-
Net::HTTP.new("127.0.0.1",
|
|
25
|
+
Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port).proxy_port.should be_nil
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
describe "when self is a proxy class instance" do
|
|
30
30
|
it "returns 80 if no port was set for self's proxy connection" do
|
|
31
|
-
Net::HTTP.Proxy("127.0.0.1").new("127.0.0.1",
|
|
31
|
+
Net::HTTP.Proxy("127.0.0.1").new("127.0.0.1", NetHTTPSpecs.server_port).proxy_port.should eql(80)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
it "returns the port for self's proxy connection" do
|
|
35
35
|
http_with_proxy = Net::HTTP.Proxy("127.0.0.1", 1234, "rspec", "rocks")
|
|
36
|
-
http_with_proxy.new("127.0.0.1",
|
|
36
|
+
http_with_proxy.new("127.0.0.1", NetHTTPSpecs.server_port).proxy_port.should eql(1234)
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -22,18 +22,18 @@ end
|
|
|
22
22
|
describe "Net::HTTP#proxy_user" do
|
|
23
23
|
describe "when self is no proxy class instance" do
|
|
24
24
|
it "returns nil" do
|
|
25
|
-
Net::HTTP.new("127.0.0.1",
|
|
25
|
+
Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port).proxy_user.should be_nil
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
describe "when self is a proxy class instance" do
|
|
30
30
|
it "returns nil if no username was set for self's proxy connection" do
|
|
31
|
-
Net::HTTP.Proxy("127.0.0.1").new("127.0.0.1",
|
|
31
|
+
Net::HTTP.Proxy("127.0.0.1").new("127.0.0.1", NetHTTPSpecs.server_port).proxy_user.should be_nil
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
it "returns the username for self's proxy connection" do
|
|
35
35
|
http_with_proxy = Net::HTTP.Proxy("127.0.0.1", 1234, "rspec", "rocks")
|
|
36
|
-
http_with_proxy.new("127.0.0.1",
|
|
36
|
+
http_with_proxy.new("127.0.0.1", NetHTTPSpecs.server_port).proxy_user.should == "rspec"
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -13,7 +13,7 @@ describe "Net::HTTP#set_debug_output when passed io" do
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
before(:each) do
|
|
16
|
-
@http = Net::HTTP.new("127.0.0.1",
|
|
16
|
+
@http = Net::HTTP.new("127.0.0.1", NetHTTPSpecs.server_port)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "sets the passed io as output stream for debugging" do
|