Browse files

Revert "generate a name from the server details"

This reverts commit 94a2d39.
  • Loading branch information...
1 parent 94a2d39 commit 89e2efeffaf46874c9ead2c63a49bdf3684626fe @Gibheer Gibheer committed Jul 22, 2013
Showing with 0 additions and 27 deletions.
  1. +0 −7 lib/zero/request/server.rb
  2. +0 −20 spec/unit/zero/request/server/name_spec.rb
View
7 lib/zero/request/server.rb
@@ -36,13 +36,6 @@ def initialize(environment)
# get the server software
# @return [String] the server software name
attr_reader :software
-
- # returns the full name of the server
- # @return [String] the full address to the server
- def name
- return @name if @name
- @name = protocol + '://' + hostname + ':' + port.to_s
- end
end
end
end
View
20 spec/unit/zero/request/server/name_spec.rb
@@ -1,20 +0,0 @@
-require 'spec_helper'
-
-describe Zero::Request::Server, '#name' do
- subject { Zero::Request::Server.new(env) }
- let(:hostname) { 'FooName' }
- let(:port) { '80' }
- let(:protocol) { 'http' }
- let(:result) { 'http://FooName:80' }
-
- let(:env) { EnvGenerator.get('/foo', {
- 'SERVER_NAME' => hostname,
- 'SERVER_PROTOCOL' => protocol,
- 'SERVER_PORT' => port
- }) }
-
- it "generates a name" do
- expect(subject.name).to match(result)
- end
-end
-

0 comments on commit 89e2efe

Please sign in to comment.