mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 12:50:24 +01:00
Merge pull request #564 from github/project_url
Document project_url field
This commit is contained in:
commit
5f83952a41
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
15
spec/license_fields_spec.rb
Normal file
15
spec/license_fields_spec.rb
Normal 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
|
Loading…
x
Reference in New Issue
Block a user