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.
Files changed (82) hide show
  1. data/CHANGELOG +3 -0
  2. data/Manifest.txt +10 -1
  3. data/Rakefile +6 -0
  4. data/bin/get-rhodes-info +4 -27
  5. data/bin/set-rhodes-sdk +4 -1
  6. data/doc/build.txt +12 -3
  7. data/doc/extensions.txt +26 -0
  8. data/installer/Rakefile +156 -0
  9. data/installer/ServiceLib.nsh +369 -0
  10. data/installer/jake.rb +478 -0
  11. data/installer/rhostudio.nsi +76 -143
  12. data/lib/extensions/digest-sha1/ext/Rakefile +58 -40
  13. data/lib/extensions/fileutils/fileutils.rb +3 -2
  14. data/lib/extensions/hmac/hmac-md5.rb +11 -0
  15. data/lib/extensions/hmac/hmac-rmd160.rb +11 -0
  16. data/lib/extensions/hmac/hmac-sha1.rb +11 -0
  17. data/lib/extensions/hmac/hmac-sha2.rb +25 -0
  18. data/lib/extensions/hmac/hmac.rb +118 -0
  19. data/lib/extensions/hmac/ruby_hmac.rb +2 -0
  20. data/lib/extensions/net-http/net/http.rb +1 -1
  21. data/lib/framework/rho/render.rb +1 -1
  22. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +1 -6
  23. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +52 -8
  24. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +8 -15
  25. data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PerformOnUiThread.java +4 -5
  26. data/platform/android/build/android.rake +3 -1
  27. data/platform/iphone/rbuild/iphone.rake +7 -7
  28. data/platform/shared/common/RhodesApp.cpp +18 -14
  29. data/platform/shared/common/RhodesApp.h +1 -0
  30. data/platform/shared/rubyext/System.cpp +3 -0
  31. data/platform/symbian/build/symbian.rake +13 -5
  32. data/platform/wp7/RhoRubyLib/net/NetRequest.cs +9 -1
  33. data/rakefile.rb +6 -0
  34. data/res/generators/templates/application/Rakefile +10 -1
  35. data/res/generators/templates/application/app/layout.erb +1 -1
  36. data/res/generators/templates/application/build.yml +2 -2
  37. data/res/generators/templates/application/public/jqmobile/{jquery.mobile.iphone.css → jquery-mobile-iphone.css} +0 -0
  38. data/res/generators/templates/application/public/js/jqmobile-patch.js +23 -20
  39. data/spec/framework_spec/app/spec/library/digest/sha1/file_spec.rb +3 -3
  40. data/spec/framework_spec/app/spec/library/net/http/http/Proxy_spec.rb +3 -2
  41. data/spec/framework_spec/app/spec/library/net/http/http/copy_spec.rb +1 -1
  42. data/spec/framework_spec/app/spec/library/net/http/http/delete_spec.rb +1 -1
  43. data/spec/framework_spec/app/spec/library/net/http/http/finish_spec.rb +1 -1
  44. data/spec/framework_spec/app/spec/library/net/http/http/fixtures/http_server.rb +18 -12
  45. data/spec/framework_spec/app/spec/library/net/http/http/get_print_spec.rb +2 -2
  46. data/spec/framework_spec/app/spec/library/net/http/http/get_response_spec.rb +2 -2
  47. data/spec/framework_spec/app/spec/library/net/http/http/get_spec.rb +3 -3
  48. data/spec/framework_spec/app/spec/library/net/http/http/head_spec.rb +1 -1
  49. data/spec/framework_spec/app/spec/library/net/http/http/initialize_spec.rb +2 -2
  50. data/spec/framework_spec/app/spec/library/net/http/http/inspect_spec.rb +4 -4
  51. data/spec/framework_spec/app/spec/library/net/http/http/lock_spec.rb +1 -1
  52. data/spec/framework_spec/app/spec/library/net/http/http/mkcol_spec.rb +1 -1
  53. data/spec/framework_spec/app/spec/library/net/http/http/move_spec.rb +1 -1
  54. data/spec/framework_spec/app/spec/library/net/http/http/new_spec.rb +7 -7
  55. data/spec/framework_spec/app/spec/library/net/http/http/newobj_spec.rb +2 -2
  56. data/spec/framework_spec/app/spec/library/net/http/http/options_spec.rb +1 -1
  57. data/spec/framework_spec/app/spec/library/net/http/http/port_spec.rb +2 -2
  58. data/spec/framework_spec/app/spec/library/net/http/http/post_form_spec.rb +1 -1
  59. data/spec/framework_spec/app/spec/library/net/http/http/post_spec.rb +1 -1
  60. data/spec/framework_spec/app/spec/library/net/http/http/propfind_spec.rb +1 -1
  61. data/spec/framework_spec/app/spec/library/net/http/http/proppatch_spec.rb +1 -1
  62. data/spec/framework_spec/app/spec/library/net/http/http/proxy_address_spec.rb +2 -2
  63. data/spec/framework_spec/app/spec/library/net/http/http/proxy_pass_spec.rb +3 -3
  64. data/spec/framework_spec/app/spec/library/net/http/http/proxy_port_spec.rb +3 -3
  65. data/spec/framework_spec/app/spec/library/net/http/http/proxy_user_spec.rb +3 -3
  66. data/spec/framework_spec/app/spec/library/net/http/http/put_spec.rb +1 -1
  67. data/spec/framework_spec/app/spec/library/net/http/http/request_spec.rb +1 -1
  68. data/spec/framework_spec/app/spec/library/net/http/http/send_request_spec.rb +1 -1
  69. data/spec/framework_spec/app/spec/library/net/http/http/set_debug_output_spec.rb +1 -1
  70. data/spec/framework_spec/app/spec/library/net/http/http/shared/request_get.rb +1 -1
  71. data/spec/framework_spec/app/spec/library/net/http/http/shared/request_head.rb +1 -1
  72. data/spec/framework_spec/app/spec/library/net/http/http/shared/request_post.rb +1 -1
  73. data/spec/framework_spec/app/spec/library/net/http/http/shared/request_put.rb +1 -1
  74. data/spec/framework_spec/app/spec/library/net/http/http/shared/started.rb +1 -1
  75. data/spec/framework_spec/app/spec/library/net/http/http/start_spec.rb +8 -8
  76. data/spec/framework_spec/app/spec/library/net/http/http/trace_spec.rb +1 -1
  77. data/spec/framework_spec/app/spec/library/net/http/http/unlock_spec.rb +1 -1
  78. data/spec/framework_spec/app/spec_runner.rb +1 -1
  79. data/spec/framework_spec/build.yml +2 -2
  80. data/spec/phone_spec/app/spec/rhom_object_spec.rb +43 -2
  81. data/version +1 -1
  82. 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('http://127.0.0.1:3454/')
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', "/", 3454
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('http://127.0.0.1:3454/'))
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', "/", 3454)
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('http://127.0.0.1:3454/')).should == "This is the index page."
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', "/", 3454).should == "This is the index page."
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", 3454)
30
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
31
31
  end
32
32
 
33
33
  after(:each) do
@@ -12,7 +12,7 @@ describe "Net::HTTP#head" do
12
12
  end
13
13
 
14
14
  before(:each) do
15
- @http = Net::HTTP.start("127.0.0.1", 3454)
15
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
16
16
  end
17
17
 
18
18
  it "sends a HEAD request to the passed path and returns the response" 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", 3454)
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(3454)
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", 3454)
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", 3454)
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:3454 open=false>"
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:3454 open=true>"
24
+ net.inspect.should == "#<Net::HTTP 127.0.0.1:#{NetHTTPSpecs.server_port} open=true>"
25
25
  end
26
26
  end
@@ -12,7 +12,7 @@ describe "Net::HTTP#lock" do
12
12
  end
13
13
 
14
14
  before(:each) do
15
- @http = Net::HTTP.start("127.0.0.1", 3454)
15
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
16
16
  end
17
17
 
18
18
  it "sends a LOCK request to the passed path and returns the response" do
@@ -12,7 +12,7 @@ describe "Net::HTTP#mkcol" do
12
12
  end
13
13
 
14
14
  before(:each) do
15
- @http = Net::HTTP.start("127.0.0.1", 3454)
15
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
16
16
  end
17
17
 
18
18
  it "sends a MKCOL request to the passed path and returns the response" do
@@ -12,7 +12,7 @@ describe "Net::HTTP#head" do
12
12
  end
13
13
 
14
14
  before(:each) do
15
- @http = Net::HTTP.start("127.0.0.1", 3454)
15
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
16
16
  end
17
17
 
18
18
  it "sends a MOVE request to the passed path and returns the response" do
@@ -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", 3454)
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(3454)
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", 3454, "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", 3454, "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", 3454, "127.0.0.1", 1234)
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", 3454, "127.0.0.1", 1234, "rubyspec")
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", 3454, "127.0.0.1", 1234, "rubyspec", "rocks")
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", 3454)
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(3454)
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", 3454)
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", 3454)
7
- net.port.should eql(3454)
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('http://127.0.0.1:3454/request/body')
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#post" do
12
12
  end
13
13
 
14
14
  before(:each) do
15
- @http = Net::HTTP.start("127.0.0.1", 3454)
15
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
16
16
  end
17
17
 
18
18
  it "sends an post request to the passed path and returns the response" do
@@ -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", 3454)
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", 3454)
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", 3454).proxy_address.should be_nil
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", 3454).proxy_address.should == "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", 3454).proxy_pass.should be_nil
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", 3454).proxy_pass.should be_nil
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", 3454).proxy_pass.should == "rocks"
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", 3454).proxy_port.should be_nil
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", 3454).proxy_port.should eql(80)
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", 3454).proxy_port.should eql(1234)
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", 3454).proxy_user.should be_nil
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", 3454).proxy_user.should be_nil
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", 3454).proxy_user.should == "rspec"
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
@@ -12,7 +12,7 @@ describe "Net::HTTP#put" do
12
12
  end
13
13
 
14
14
  before(:each) do
15
- @http = Net::HTTP.start("127.0.0.1", 3454)
15
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
16
16
  end
17
17
 
18
18
  it "sends an put request to the passed path and returns the response" do
@@ -12,7 +12,7 @@ describe "Net::HTTP#request" do
12
12
  end
13
13
 
14
14
  before(:each) do
15
- @http = Net::HTTP.start("127.0.0.1", 3454)
15
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
16
16
  end
17
17
 
18
18
  describe "when passed request_object" do
@@ -12,7 +12,7 @@ describe "Net::HTTP#send_request" do
12
12
  end
13
13
 
14
14
  before(:each) do
15
- @http = Net::HTTP.start("127.0.0.1", 3454)
15
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
16
16
  end
17
17
 
18
18
  # TODO: Does only work with GET and POST requests
@@ -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", 3454)
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
@@ -8,7 +8,7 @@ describe :net_ftp_request_get, :shared => true do
8
8
  end
9
9
 
10
10
  before(:each) do
11
- @http = Net::HTTP.start("127.0.0.1", 3454)
11
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
12
12
  end
13
13
 
14
14
  describe "when passed no block" do
@@ -8,7 +8,7 @@ describe :net_ftp_request_head, :shared => true do
8
8
  end
9
9
 
10
10
  before(:each) do
11
- @http = Net::HTTP.start("127.0.0.1", 3454)
11
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
12
12
  end
13
13
 
14
14
  describe "when passed no block" do
@@ -8,7 +8,7 @@ describe :net_ftp_request_post, :shared => true do
8
8
  end
9
9
 
10
10
  before(:each) do
11
- @http = Net::HTTP.start("127.0.0.1", 3454)
11
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
12
12
  end
13
13
 
14
14
  describe "when passed no block" do
@@ -8,7 +8,7 @@ describe :net_ftp_request_put, :shared => true do
8
8
  end
9
9
 
10
10
  before(:each) do
11
- @http = Net::HTTP.start("127.0.0.1", 3454)
11
+ @http = Net::HTTP.start("127.0.0.1", NetHTTPSpecs.server_port)
12
12
  end
13
13
 
14
14
  describe "when passed no block" do