Merge branch 'master' into dot-header

This commit is contained in:
Ben Balter 2018-01-02 10:44:49 -05:00 committed by GitHub
commit 19f939853e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View File

@ -12,7 +12,8 @@ module Licensee
class GitHubProject < Licensee::Projects::Project
# If there's any trailing data (e.g. `.git`) this pattern will ignore it:
# we're going to use the API rather than clone the repo.
GITHUB_REPO_PATTERN = %r{https://github.com/([^\/]+\/[^\/\.]+).*}
GITHUB_REPO_PATTERN =
%r{https://github.com/([^\/]+\/([^\/]+(?=\.git)|[^\/]+)).*}
class RepoNotFound < StandardError; end

View File

@ -61,12 +61,4 @@ RSpec.describe 'command line invocation' do
expect(stdout).to match('License: MIT License')
end
end
context 'when given a repo URL' do
let(:arguments) { 'https://github.com/benbalter/licensee' }
it "detects the file's license" do
expect(stdout).to match('License: MIT License')
end
end
end