mirror of https://github.com/licensee/licensee.git
Merge pull request #255 from benbalter/dot-repo
allow repos to have . in name
This commit is contained in:
commit
6f69f10c89
|
@ -12,7 +12,8 @@ module Licensee
|
||||||
class GitHubProject < Licensee::Projects::Project
|
class GitHubProject < Licensee::Projects::Project
|
||||||
# If there's any trailing data (e.g. `.git`) this pattern will ignore it:
|
# 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.
|
# 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
|
class RepoNotFound < StandardError; end
|
||||||
|
|
||||||
|
|
|
@ -61,12 +61,4 @@ RSpec.describe 'command line invocation' do
|
||||||
expect(stdout).to match('License: MIT License')
|
expect(stdout).to match('License: MIT License')
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
Loading…
Reference in New Issue