1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 04:40:09 +01: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 * `project` - The repository name
* `description` - The description of the repository * `description` - The description of the repository
* `year` - The current year * `year` - The current year
* `project_url` - The repository URL or other project website
## License properties ## License properties

View File

@ -21,3 +21,6 @@
- name: year - name: year
description: The current 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