Skip to content

Commit

Permalink
Fix trailing slash
Browse files Browse the repository at this point in the history
  • Loading branch information
sanemat committed Dec 23, 2013
1 parent 8bbb79b commit c98c592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tachikoma/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def target_repository_user(type, fetch_url, github_account)
end

def repository_identity(url)
%r!((?:[^/]*?)/(?:[^/]*?))(?:\.git)?$!.match(url)[1]
%r!((?:[^/]*?)/(?:[^/]*?))(?:\.git|/)?$!.match(url)[1]
end

def bundler_parallel_option(bundler_version, parallel_number)
Expand Down
2 changes: 1 addition & 1 deletion spec/tachikoma/application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
end
context 'https with trail slash' do
let(:url) { 'https://github.com/example1/example2/' }
it { pending; expect(subject.repository_identity(url)).to eq identity }
it { expect(subject.repository_identity(url)).to eq identity }
end
end
end

0 comments on commit c98c592

Please sign in to comment.