mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 12:50:24 +01:00
Merge branch 'gh-pages' into patch-1
This commit is contained in:
commit
f589670554
1
Gemfile
1
Gemfile
@ -16,6 +16,7 @@ end
|
||||
|
||||
group :test do
|
||||
gem 'html-proofer', '~> 3.0'
|
||||
gem 'licensee'
|
||||
gem 'nokogiri'
|
||||
gem 'rake'
|
||||
gem 'rspec'
|
||||
|
@ -12,7 +12,7 @@ note: The Apereo Foundation recommends taking the additional step of adding a bo
|
||||
using:
|
||||
- Sakai: https://github.com/sakaiproject/sakai/blob/master/LICENSE
|
||||
- OAE: https://github.com/oaeproject/Hilary/blob/master/LICENSE
|
||||
- Opencast: https://bitbucket.org/opencast-community/opencast/src/905077ba5e6483f8c49869a1fc13bf9268790a79/LICENSE?at=develop
|
||||
- Opencast: https://bitbucket.org/opencast-community/opencast/src/905077ba5e6483f8c49869a1fc13bf9268790a79/LICENSE
|
||||
|
||||
permissions:
|
||||
- commercial-use
|
||||
|
@ -13,8 +13,9 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
|
||||
note: The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the license.
|
||||
|
||||
using:
|
||||
- Linux: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/COPYING
|
||||
- WordPress: https://github.com/WordPress/WordPress/blob/master/license.txt
|
||||
- AliSQL: https://github.com/alibaba/AliSQL/blob/master/COPYING
|
||||
- Discourse: https://github.com/discourse/discourse/blob/master/LICENSE.txt
|
||||
- Joomla!: https://github.com/joomla/joomla-cms/blob/staging/LICENSE.txt
|
||||
|
||||
permissions:
|
||||
- commercial-use
|
||||
|
@ -14,9 +14,9 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
|
||||
note: The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the license.
|
||||
|
||||
using:
|
||||
- Ansible: https://github.com/ansible/ansible/blob/devel/COPYING
|
||||
- Bash: https://git.savannah.gnu.org/cgit/bash.git/tree/COPYING
|
||||
- GIMP: https://git.gnome.org/browse/gimp/tree/COPYING
|
||||
- Privacy Badger: https://github.com/EFForg/privacybadgerfirefox/blob/master/LICENSE
|
||||
|
||||
permissions:
|
||||
- commercial-use
|
||||
|
@ -8,7 +8,7 @@ description: A permissive license lets people do anything with your code with pr
|
||||
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.
|
||||
|
||||
using:
|
||||
- documentation.js: https://github.com/documentationjs/documentation/blob/master/LICENSE
|
||||
- Helix: https://github.com/tildeio/helix/blob/master/LICENSE
|
||||
- Node.js semver: https://github.com/npm/node-semver/blob/master/LICENSE
|
||||
- OpenStreetMap iD: https://github.com/openstreetmap/iD/blob/master/LICENSE.md
|
||||
|
||||
|
@ -10,9 +10,9 @@ description: A short and simple permissive license with conditions only requirin
|
||||
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.
|
||||
|
||||
using:
|
||||
- jQuery: https://github.com/jquery/jquery/blob/master/LICENSE.txt
|
||||
- Babel: https://github.com/babel/babel/blob/master/LICENSE
|
||||
- .NET Core: https://github.com/dotnet/corefx/blob/master/LICENSE.TXT
|
||||
- Rails: https://github.com/rails/rails/blob/master/activerecord/MIT-LICENSE
|
||||
- Rails: https://github.com/rails/rails/blob/master/MIT-LICENSE
|
||||
|
||||
permissions:
|
||||
- commercial-use
|
||||
|
@ -1,5 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'licensee'
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'license meta' do
|
||||
@ -19,6 +20,8 @@ describe 'license meta' do
|
||||
expect(missing).to be_empty
|
||||
end
|
||||
|
||||
examples = raw_fields['using'] || []
|
||||
|
||||
it 'using contains 3 examples' do
|
||||
legacy = [
|
||||
'afl-3.0',
|
||||
@ -32,7 +35,6 @@ describe 'license meta' do
|
||||
'cc-by-4.0',
|
||||
'cc-by-sa-4.0',
|
||||
'eupl-1.1',
|
||||
'gpl-2.0',
|
||||
'lgpl-2.1',
|
||||
'lgpl-3.0',
|
||||
'lppl-1.3c',
|
||||
@ -43,9 +45,45 @@ describe 'license meta' do
|
||||
'zlib'
|
||||
]
|
||||
skip 'added before 3 using examples required' if legacy.include?(license['slug'])
|
||||
examples = raw_fields['using'] || []
|
||||
expect(examples.length).to eq(3)
|
||||
end
|
||||
|
||||
context 'licensee detects using examples' do
|
||||
module Licensee
|
||||
class License
|
||||
class << self
|
||||
def license_dir
|
||||
dir = ::File.dirname(__FILE__)
|
||||
::File.expand_path '../_licenses', dir
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
slug = license['slug']
|
||||
|
||||
examples.each do |example|
|
||||
example_url = example.values[0]
|
||||
|
||||
context "the #{example_url} URL" do
|
||||
let(:content) { open(example_url).read }
|
||||
let(:detected) { Licensee::ProjectFiles::LicenseFile.new(content, 'LICENSE').license }
|
||||
|
||||
if example_url.start_with?('https://github.com/')
|
||||
example_url.gsub!(%r{\Ahttps://github.com/([\w-]+/[\w-]+)/blob/([\w-]+/\S+)\z}, 'https://raw.githubusercontent.com/\1/\2')
|
||||
elsif example_url.start_with?('https://git.savannah.gnu.org/', 'https://git.gnome.org/')
|
||||
example_url.gsub!(%r{/tree/}, '/plain/')
|
||||
elsif example_url.start_with?('https://bitbucket.org/')
|
||||
example_url.gsub!(%r{/src/}, '/raw/')
|
||||
end
|
||||
|
||||
it "is a #{slug} license" do
|
||||
skip 'NCSA and PostgreSQL licenses hard to detect' if %(ncsa postgresql).include?(slug)
|
||||
expect(detected.key).to eq(slug)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,7 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'jekyll'
|
||||
require 'open-uri'
|
||||
require 'json'
|
||||
require 'open-uri'
|
||||
require 'nokogiri'
|
||||
|
Loading…
x
Reference in New Issue
Block a user