diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..e28c56f
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,22 @@
+name: Build and Test
+
+on: [push, pull_request]
+
+jobs:
+ test:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: 2.7.1
+
+ - name: Install dependencies
+ run: ./script/bootstrap
+
+ - name: Run tests
+ run: ./script/cibuild
diff --git a/.rubocop.yml b/.rubocop.yml
index 4b122f8..7457108 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,5 +1,6 @@
AllCops:
- TargetRubyVersion: 2.5
+ NewCops: enable
+ TargetRubyVersion: 2.7
Exclude:
- _site/**/*
- vendor/**/*
@@ -7,7 +8,7 @@ AllCops:
Metrics/BlockLength:
Enabled: false
-Metrics/LineLength:
+Layout/LineLength:
Enabled: false
Metrics/MethodLength:
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 2caf39f..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-#bootstrap and build
-before_script: "./script/bootstrap"
-script: "./script/cibuild"
-
-#environment
-language: ruby
-rvm:
- - 2.5.3
-
-addons:
- apt:
- packages:
- - libcurl4-openssl-dev
-
-before_install:
- - gem update --system
-
-branches:
- only:
- - gh-pages
- - /.*/
-
-notifications:
- email: false
-
-env:
- global:
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
-
-sudo: false
-cache: bundler
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4ad2b89..078d658 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -21,8 +21,8 @@ Choosealicense.com is intended to demystify license choices, not present or cata
* [List of OSI approved licenses](https://opensource.org/licenses/alphabetical)
* [GNU's list of free licenses](https://www.gnu.org/licenses/license-list.en.html) (*note: the license must be listed in one of the three "free" categories*)
* [Open Definition's list of conformant licenses](https://opendefinition.org/licenses/) (non-code)
-3. A [GitHub code search](https://github.com/search?q=MIT+filename%3ALICENSE&type=Code) must reveal at least *1,000* public repositories using the license.
-4. 3 notable projects using the license must be identified. These must have straightforward LICENSE files which serve as examples newcomers can follow and that could be detected by [licensee](https://github.com/benbalter/licensee) if it knew about the license.
+3. The license must be used in at least *1,000* public repositories. This may be documented, for example, with a [GitHub code search](https://github.com/search?q=MIT+filename%3ALICENSE&type=Code).
+4. 3 notable projects using the license must be identified. These must have straightforward LICENSE files which serve as examples newcomers can follow and that could be detected by [licensee](https://github.com/licensee/licensee) if it knew about the license.
If your proposed license meets the above criteria, here's a few other things to keep in mind as you propose the license's addition:
diff --git a/Gemfile b/Gemfile
index 6677662..afe5a46 100644
--- a/Gemfile
+++ b/Gemfile
@@ -16,7 +16,7 @@ end
group :test do
gem 'html-proofer', '~> 3.0'
- gem 'licensee'
+ gem 'licensee', git: 'https://github.com/licensee/licensee.git', branch: 'master'
gem 'rake'
gem 'rspec'
gem 'rubocop'
diff --git a/README.md b/README.md
index 7b6b860..841d9d6 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
**[ChooseALicense.com](https://choosealicense.com)** aims to provide **accurate**, **non-judgmental**, and **understandable** information about popular **open source licenses** in order to **help people make informed decisions** about the projects they start, maintain, contribute to, and use.
-[![Build Status](https://travis-ci.org/github/choosealicense.com.svg?branch=gh-pages)](https://travis-ci.org/github/choosealicense.com)
+[![](https://github.com/github/choosealicense.com/workflows/Build%20and%20Test/badge.svg)](https://github.com/github/choosealicense.com/actions?query=workflow%3ABuild%20and%20Test)
-We catalog [select](CONTRIBUTING.md#adding-a-license) open source licenses with a [Jekyll collection](https://jekyllrb.com/docs/collections/) (in `_licenses`). The catalog is used to render [ChooseALicense.com](https://choosealicense.com) and is regularly vendored into [Licensee](https://github.com/benbalter/licensee), which GitHub uses to provide a [license chooser and license detection](https://help.github.com/articles/adding-a-license-to-a-repository/), a [licenses API](https://developer.github.com/v3/licenses/), and to [display license descriptions and metadata](https://github.com/blog/2335-open-source-license-descriptions-and-metadata).
+We catalog [select](CONTRIBUTING.md#adding-a-license) open source licenses with a [Jekyll collection](https://jekyllrb.com/docs/collections/) (in `_licenses`). The catalog is used to render [ChooseALicense.com](https://choosealicense.com) and is regularly vendored into [Licensee](https://github.com/licensee/licensee), which GitHub uses to provide a [license chooser and license detection](https://help.github.com/articles/adding-a-license-to-a-repository/), a [licenses API](https://developer.github.com/v3/licenses/), and to [display license descriptions and metadata](https://github.com/blog/2335-open-source-license-descriptions-and-metadata).
## Goals
@@ -14,11 +14,28 @@ We catalog [select](CONTRIBUTING.md#adding-a-license) open source licenses with
## Run It On Your Machine
+### Managing Dependencies
+
+It may be the case that your system doesn't have the required dependencies. You will need `cmake` and `make` installed on your computer.
+
+For MacOS, use Homebrew to update your dependencies (install Homebrew from
Make a pull request to suggest this license for a project that is not licensed. Please be polite: see if a license has already been suggested, try to suggest a license fitting for the project's community, and keep your communication with project maintainers friendly.
{{ page.how | markdownify | remove: '
' | remove: '
' }}{{ page.note | markdownify | remove: '
' | remove: '
' }} @@ -24,15 +26,15 @@ {% endif %} {% assign xgpl = false %} {% if page.spdx-id contains 'GPL' %}{% assign xgpl = true %}{% endif %} -Add {{ page.spdx-id }}{% if xgpl %}-or-later{% endif %}
{% if xgpl %} (or {{ page.spdx-id }}-only
to disallow future versions){% endif %} to your project's package description, if applicable (e.g., Node.js, Ruby, and Rust). This will ensure the license is displayed in package directories.
Add {{ page.spdx-id }}{% if xgpl %}-or-later{% endif %}
{% if xgpl %} (or {{ page.spdx-id }}-only
to disallow future versions){% endif %} to your project's package description, if applicable (e.g., Node.js, Ruby, and Rust). This will ensure the license is displayed in package directories.
If you would like your project to adopt the GPL-3.0's cure provision, add the text of the GPL Cooperation Commitment to a file named COMMITMENT
in the same directory as your {{ page.spdx-id }} license file.
If you would like your project to adopt the GPL-3.0's cure provision, add the text of the GPL Cooperation Commitment to a file named COMMITMENT
in the same directory as your {{ page.spdx-id }} license file.
{{ page.nickname }} @@ -13,9 +13,9 @@
{{ page.description }}
- +{{ content | replace:"<", "<" | replace:">", ">" }}- +
Open source licenses grant to the public permissions to do things with licensed works copyright or other "intellectual property" laws might otherwise disallow.
+Open source licenses grant to the public permissions to do things with licensed works which copyright or other "intellectual property" laws might otherwise disallow.
Most open source licenses' grants of permissions are subject to compliance with conditions.
-Most open source licenses also have limitations that usually disclaim warranty and liability and sometimes expressly exclude patent or trademark from licenses' grants.
+Most open source licenses also have limitations that usually disclaim warranty and liability, and sometimes expressly exclude patents or trademarks from licenses' grants.
- The MIT License is short and to the point. It lets people do almost anything they want with your project, including to make and distribute closed source versions. + The MIT License is short and to the point. It lets people do almost anything they want with your project, like making and distributing closed source versions.
{% include using-sentence.html license-id="mit" %} @@ -44,7 +44,7 @@ permalink: /
- The GNU GPLv3 also lets people do almost anything they want with your project, except to distribute closed source versions. + The GNU GPLv3 also lets people do almost anything they want with your project, except distributing closed source versions.
{% include using-sentence.html license-id="gpl-3.0" %} diff --git a/licenses.html b/licenses.html index 4a2bf68..62cd60c 100644 --- a/licenses.html +++ b/licenses.html @@ -5,8 +5,8 @@ class: license-types title: Licenses --- -
Open source licenses grant permission to everyone to use, modify, and share licensed software for any purpose, subject to conditions preserving the provenance and openness of the software. The following licenses are arranged from one with the strongest of these conditions (GNU AGPLv3) to one with no conditions (Unlicense). Notice that the popular licenses featured on the home page (GNU GPLv3 and MIT) fall within this spectrum.
-If you were looking for a reference table of all of the licenses on choosealicense.com, see the appendix.
+Open source licenses grant permission for anybody to use, modify, and share licensed software for any purpose, subject to conditions preserving the provenance and openness of the software. The following licenses are sorted by the number of conditions, from most (GNU AGPLv3) to none (Unlicense). Notice that the popular licenses featured on the home page (GNU GPLv3 and MIT) fall within this spectrum.
+If you're looking for a reference table of every license on choosealicense.com, see the appendix.
{% include license-overview.html license-id="agpl-3.0" %} {% include license-overview.html license-id="gpl-3.0" %} @@ -14,6 +14,7 @@ title: Licenses {% include license-overview.html license-id="mpl-2.0" %} {% include license-overview.html license-id="apache-2.0" %} {% include license-overview.html license-id="mit" %} +{% include license-overview.html license-id="bsl-1.0" %} {% include license-overview.html license-id="unlicense" %} The above licenses represent the entire spectrum of open source licenses, from highly protective to unconditional. One of these should work for most new open source projects. Many other open source licenses exist, including older versions of and close substitutes for some of the above. See the resources listed on our about page if you'd like to read more. diff --git a/no-permission.md b/no-permission.md index f4a1c23..b17682b 100644 --- a/no-permission.md +++ b/no-permission.md @@ -12,9 +12,9 @@ When you make a creative work (which includes code), the work is under exclusive Even in the absence of a license file, you may grant some rights in cases where you publish your source code to a site that requires accepting terms of service. For example, if you publish your source code in a public repository on GitHub, you have accepted the [Terms of Service](https://help.github.com/articles/github-terms-of-service), by which you allow others to view and fork your repository. Others may not need your permission if [limitations and exceptions to copyright](https://en.wikipedia.org/wiki/Limitations_and_exceptions_to_copyright) apply to their particular situation. Neither site terms nor jurisdiction-specific copyright limitations are sufficient for the kinds of collaboration that people usually seek on a public code host, such as experimentation, modification, and sharing as fostered by an open source license. -You don't have to do anything to not offer a license. You may however wish to add a copyright notice and statement that you are not offering any license in a prominent place (e.g., your project's README) so that [users](#for-users) don't assume you made an oversight. If you're going to accept others' contributions to your non-licensed project, you may wish to explore with your lawyer adding a contributor agreement to your project so that you maintain copyright permission from contributors, even though you're not granting the same. +You don't have to do anything to *not* offer a license. You may, however, wish to add a copyright notice and statement that you are not offering any license in a prominent place (e.g., your project's README) so that [users](#for-users) don't assume you made an oversight. If you're going to accept others' contributions to your non-licensed project, you may wish to explore adding a contributor agreement to your project with your lawyer so that you maintain copyright permission from contributors, even though you're not granting the same. -Disallowing use of your code might not be what you intend by "no license." An [open-source license](/) allows reuse of your code while retaining copyright. If your goal is to completely opt-out of copyright restrictions, try a [public domain dedication](/licenses/#unlicense). +Disallowing use of your code might not be what you intend by "no license." An [open source license](/) allows reuse of your code while retaining copyright. If your goal is to completely opt-out of copyright restrictions, try a [public domain dedication](/licenses/#unlicense) instead. ## For users diff --git a/non-software.md b/non-software.md index ac245df..3c312b8 100644 --- a/non-software.md +++ b/non-software.md @@ -4,7 +4,7 @@ layout: default permalink: /non-software/ --- -Open source software licenses can be used for non-software works, and often are the best choice. This is particularly the case when the works in question can be edited and versioned as source, e.g., [open source hardware](https://www.oshwa.org/definition/) designs. Choose an [open source license](/licenses/). +Open source software licenses can be also used for non-software works and are often the best choice, especially when the works in question can be edited and versioned as source (e.g., [open source hardware](https://www.oshwa.org/definition/) designs). [Choose an open source license here.](/licenses/) ### Data, media, etc. @@ -12,7 +12,7 @@ Open source software licenses can be used for non-software works, and often are ### Documentation -Any open source software license or open license for media (see [above](#data-media-etc)) is applicable to software documentation. If you use different licenses for your software and its documentation, you may wish to take care that source code examples in the documentation are also licensed under the software license. +Any open source software license or open license for media (see [above](#data-media-etc)) also applies to software documentation. If you use different licenses for your software and its documentation, be sure to specify that source code examples in the documentation are also licensed under the software license. ### Fonts @@ -20,4 +20,4 @@ The [SIL Open Font License 1.1](/licenses/ofl-1.1/) keeps fonts open but allows ### Mixed Projects -If your project contains a mix of software and other material, you can include multiple licenses, as long as you are explicit about which license applies to what parts of the project. See [the license notice for this site](https://github.com/github/choosealicense.com#license) as an example. +If your project contains a mix of software and other material, you can include multiple licenses, as long as you are explicit about which license applies to each part of the project. See [the license notice for this site](https://github.com/github/choosealicense.com#license) as an example. diff --git a/spec/ci_ruby_version_spec.rb b/spec/ci_ruby_version_spec.rb index 6809848..472edce 100644 --- a/spec/ci_ruby_version_spec.rb +++ b/spec/ci_ruby_version_spec.rb @@ -9,9 +9,9 @@ describe 'ruby version' do pages_versions = JSON.parse(open('https://pages.github.com/versions.json').read) pages_ruby_version = pages_versions['ruby'] - ci_config_file = '.travis.yml' + ci_config_file = '.github/workflows/test.yml' ci_config = YAML.load_file(ci_config_file) - ci_ruby_version = ci_config['rvm'][0] + ci_ruby_version = ci_config['jobs']['test']['steps'][1]['with']['ruby-version'] context "in #{ci_config_file} and pages ruby version" do it 'match' do diff --git a/spec/license_meta_spec.rb b/spec/license_meta_spec.rb index 09bf62c..858acfb 100644 --- a/spec/license_meta_spec.rb +++ b/spec/license_meta_spec.rb @@ -27,19 +27,13 @@ describe 'license meta' do 'agpl-3.0', 'artistic-2.0', 'bsd-3-clause-clear', - 'bsl-1.0', - 'cc0-1.0', - 'cc-by-4.0', - 'cc-by-sa-4.0', 'eupl-1.1', 'lgpl-2.1', 'lgpl-3.0', 'lppl-1.3c', 'ms-pl', 'ms-rl', - 'ofl-1.1', - 'wtfpl', - 'zlib' + 'wtfpl' ] skip 'added before 3 using examples required' if legacy.include?(license['slug']) expect(examples.length).to eq(3) @@ -56,7 +50,7 @@ describe 'license meta' do 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') + example_url.gsub!(%r{\Ahttps://github.com/([\w-]+/[\w.-]+)/blob/(\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/') @@ -64,7 +58,7 @@ describe 'license meta' do end it "is a #{slug} license" do - skip 'NCSA and PostgreSQL licenses hard to detect' if %(ncsa postgresql).include?(slug) + skip 'hard to detect licenses' if %(ncsa postgresql vim).include?(slug) && detected.key == 'other' expect(detected.key).to eq(slug) end end diff --git a/spec/license_shown_spec.rb b/spec/license_shown_spec.rb index 8ef6725..c9e199b 100644 --- a/spec/license_shown_spec.rb +++ b/spec/license_shown_spec.rb @@ -10,18 +10,20 @@ describe 'shown licenses' do apache-2.0 bsd-2-clause bsd-3-clause + bsl-1.0 + cc0-1.0 epl-2.0 gpl-2.0 gpl-3.0 lgpl-2.1 - lgpl-3.0 mit mpl-2.0 unlicense ].freeze it 'has the expected number of shown licenses' do - expect(shown_licenses.count).to eql(12) + expect(shown_licenses.count).to eql(13) + expect(SHOWN_LICENSES.count).to eql(shown_licenses.count) end shown_licenses.each do |license| diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 192d00e..60a2012 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -7,8 +7,8 @@ require 'open-uri' module SpecHelper class << self - attr_accessor :config, :licenses, :site, :spdx - attr_accessor :osi_approved_licenses, :fsf_approved_licenses, :od_approved_licenses + attr_accessor :config, :licenses, :site, :spdx, + :osi_approved_licenses, :fsf_approved_licenses, :od_approved_licenses end end @@ -105,7 +105,7 @@ def fsf_approved_licenses object = JSON.parse(OpenURI.open_uri(url).read) licenses = {} object['licenses'].each_value do |meta| - next unless (meta.include? 'identifiers') && (meta['identifiers'].include? 'spdx') && (meta.include? 'tags') && (meta['tags'].include? 'libre') + next unless meta.dig('identifiers', 'spdx') && (meta.include? 'tags') && (meta['tags'].include? 'libre') meta['identifiers']['spdx'].each do |identifier| licenses[identifier.downcase] = meta['name']