Revert "Favor uname over user_agent"

This reverts commit 97931ceaed.
openid
Marcin Kulik 11 years ago
parent 97931ceaed
commit f86734bf50

@ -5,10 +5,10 @@ class AsciicastDecorator < ApplicationDecorator
THUMBNAIL_HEIGHT = 10
def os
if uname.present?
os_from_uname
elsif user_agent.present?
if user_agent.present?
os_from_user_agent
elsif uname.present?
os_from_uname
else
'unknown'
end

@ -86,15 +86,6 @@ describe AsciicastDecorator do
it { should == 'unknown' }
end
context 'when user_agent and uname are present' do
before do
asciicast.user_agent = 'python-requests/2.0.0 CPython/2.7.5 Linux/3.11.3-201.fc19.x86_64'
asciicast.uname = 'Some t430u 3.5.0-18-generic #29-Ubuntu SMP'
end
it { should == 'Some' }
end
end
describe '#terminal_type' do

Loading…
Cancel
Save