From 2a95a3514fc40eb6b216f112731b16439d48c518 Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Thu, 29 Nov 2012 18:25:50 +0400 Subject: [PATCH] Reverted old changes to App.github_url_to_file method (spec fixed too) --- app/models/app.rb | 1 - spec/models/app_spec.rb | 5 ----- 2 files changed, 0 insertions(+), 6 deletions(-) diff --git a/app/models/app.rb b/app/models/app.rb index a7f6f96..33fa274 100644 --- a/app/models/app.rb +++ b/app/models/app.rb @@ -125,7 +125,6 @@ class App end def github_url_to_file(file) - file = "/#{file}" unless file.start_with? '/' "#{github_url}/blob/#{repo_branch + file}" end diff --git a/spec/models/app_spec.rb b/spec/models/app_spec.rb index 2357ce1..76f7933 100644 --- a/spec/models/app_spec.rb +++ b/spec/models/app_spec.rb @@ -98,11 +98,6 @@ describe App do app = Fabricate(:app, :github_repo => "errbit/errbit") app.github_url_to_file('/path/to/file').should == "https://github.com/errbit/errbit/blob/master/path/to/file" end - - it 'resolves to full path to file without leading root symbol' do - app = Fabricate(:app, :github_repo => "errbit/errbit") - app.github_url_to_file('path/to/file').should == "https://github.com/errbit/errbit/blob/master/path/to/file" - end end context '#github_repo?' do -- libgit2 0.21.2