mirror of
https://github.com/github/choosealicense.com
synced 2024-11-05 11:18:50 +01:00
810eeb5618
and are structured grant (permissions) conditioned on (conditions) with limitations Permissions coming first combats mistaken but apparently widespread impression that licenses impose conditions, even such that without a license, there would be no conditions/work would be in the public domain. Requirements->Conditions emphasizes that they are pertinent if one wants to take advantage of permissions. Forbiddens->Limitations is more accurate: in most cases licenses don't give permission to hold licensors liable, in some cases to use licensors' trademarks or patents, but a licensee does not lose the permissions granted by the license if the licensee holds licensor liable, etc. Also emphasizes that there are limitatations on the license grant, not that the license imposes prohibitions. The most concise place to see both the rename and reorder is in _includes/license-overview.html I did not reorder the appearance of the groups of properties in license source files (.txt files in _licenses) as those orderings are not used to render anything on the webiste. Might do so later.
49 lines
1.3 KiB
Ruby
49 lines
1.3 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'licenses' do
|
|
it 'matches the number of files in the _licenses folder' do
|
|
expect(licenses.count).to eql(Dir["#{licenses_path}/*.txt"].count)
|
|
end
|
|
|
|
licenses.each do |license|
|
|
context "The #{license['title']} license" do
|
|
let(:id) { license['id'] }
|
|
|
|
it 'has an SPDX ID' do
|
|
expect(spdx_ids).to include(id)
|
|
end
|
|
|
|
it 'uses its SPDX name' do
|
|
spdx = find_spdx(id)
|
|
expect(spdx).to_not be_nil
|
|
expect(spdx[1]['name'].gsub(/ only$/, '')).to eql(license['title'])
|
|
end
|
|
|
|
context 'industry approval' do
|
|
it 'should be approved by OSI or FSF or OD' do
|
|
expect(approved_licenses).to include(id), 'See https://git.io/vzCTV.'
|
|
end
|
|
end
|
|
|
|
context 'minimum permissions' do
|
|
let(:permissions) { license['permissions'] }
|
|
it 'should allow commercial use' do
|
|
expect(permissions).to include('commercial-use')
|
|
end
|
|
|
|
it 'should allow modification' do
|
|
expect(permissions).to include('modifications')
|
|
end
|
|
|
|
it 'should allow distribution' do
|
|
expect(permissions).to include('distribution')
|
|
end
|
|
|
|
it 'should allow private use' do
|
|
expect(permissions).to include('private-use')
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|