1
0
mirror of https://github.com/github/choosealicense.com synced 2024-06-25 21:23:03 +02:00

Merge pull request #564 from github/project_url

Document project_url field
This commit is contained in:
Mike Linksvayer 2018-01-02 16:06:32 -08:00 committed by GitHub
commit 5f83952a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View File

@ -69,6 +69,7 @@ The licenses on choosealicense.com are regularly imported to GitHub.com to be us
* `project` - The repository name
* `description` - The description of the repository
* `year` - The current year
* `project_url` - The repository URL or other project website
## License properties

View File

@ -21,3 +21,6 @@
- name: year
description: The current year
- name: project_url
description: The repository URL or other project website

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
require 'spec_helper'
describe 'license fillable fields' do
licenses.each do |license|
context "The #{license['title']} license" do
it 'should only contain supported fillable fields' do
matches = license['content'][1, 1000].scan(/\s+\[([a-z_]+)\]/)
extra_fields = matches.flatten - (fields.map { |f| f['name'] })
expect(extra_fields).to be_empty
end
end
end
end