0
0
Fork 0

Revert "generate a name from the server details"

This reverts commit 94a2d399eb.
This commit is contained in:
Gibheer 2013-07-22 15:35:34 +02:00
parent 94a2d399eb
commit 89e2efeffa
2 changed files with 0 additions and 27 deletions

View File

@ -36,13 +36,6 @@ module Zero
# 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 File

@ -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