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 ): +```bash +brew install make cmake +``` +For Linux/Ubuntu, use the `apt-get` tool to install the dependencies: +```bash +sudo apt-get install make cmake +``` + +### Installing and Running the tool + +Note that the third command (`./script/bootstrap`) may require you to use `sudo` access for installation. Add `sudo` right before the third command, if need be, but don't use root access. + ```bash git clone https://github.com/github/choosealicense.com.git cd choosealicense.com -script/bootstrap -script/server +./script/bootstrap +./script/server ``` Open `http://localhost:4000` in your favorite browser. @@ -37,7 +54,7 @@ Licenses sit in the `/_licenses` folder. Each license has YAML front matter desc * `spdx-id` - Short identifier specified by https://spdx.org/licenses/ * `description` - A human-readable description of the license * `how` - Instructions on how to implement the license -* `using` - A list of 3 notable projects using the license with straightforward LICENSE files which serve as examples newcomers can follow and that can be detected by [licensee](https://github.com/benbalter/licensee) in the form of `project_name: license_file_url` +* `using` - A list of 3 notable projects using the license with straightforward LICENSE files which serve as examples newcomers can follow and that can be detected by [licensee](https://github.com/licensee/licensee) in the form of `project_name: license_file_url` * `permissions` - Bulleted list of permission rules * `conditions` - Bulleted list of condition rules * `limitations` - Bulleted list of limitation rules @@ -81,6 +98,7 @@ The license properties (rules) are stored as a bulleted list within the licenses #### Conditions * `include-copyright` - A copy of the license and copyright notice must be included with the software. +* `include-copyright--source` - A copy of the license and copyright notice must be included with the software in source form, but is not required for binaries. * `document-changes` - Changes made to the code must be documented. * `disclose-source` - Source code must be made available when the software is distributed. * `network-use-disclose` - Users who interact with the software via network are given the right to receive a copy of the source code. diff --git a/_data/meta.yml b/_data/meta.yml index 2a58872..61d7160 100644 --- a/_data/meta.yml +++ b/_data/meta.yml @@ -30,7 +30,7 @@ required: true - name: using - description: 'A list of 3 notable projects using the license with straightforward LICENSE files which serve as examples newcomers can follow and that can be detected by [licensee](https://github.com/benbalter/licensee) in the form of `project_name: license_file_url`' + description: 'A list of 3 notable projects using the license with straightforward LICENSE files which serve as examples newcomers can follow and that can be detected by [licensee](https://github.com/licensee/licensee) in the form of `project_name: license_file_url`' required: true # Optional fields diff --git a/_data/rules.yml b/_data/rules.yml index 3a20f10..54e4504 100644 --- a/_data/rules.yml +++ b/_data/rules.yml @@ -1,14 +1,14 @@ permissions: -- description: This software and derivatives may be used for commercial purposes. +- description: The licensed material and derivatives may be used for commercial purposes. label: Commercial use tag: commercial-use -- description: This software may be modified. +- description: The licensed material may be modified. label: Modification tag: modifications -- description: This software may be distributed. +- description: The licensed material may be distributed. label: Distribution tag: distribution -- description: This software may be used and modified in private. +- description: The licensed material may be used and modified in private. label: Private use tag: private-use - description: This license provides an express grant of patent rights from contributors. @@ -16,25 +16,28 @@ permissions: tag: patent-use conditions: -- description: A copy of the license and copyright notice must be included with the software. +- description: A copy of the license and copyright notice must be included with the licensed material. label: License and copyright notice tag: include-copyright -- description: Changes made to the code must be documented. +- description: A copy of the license and copyright notice must be included with the licensed material in source form, but is not required for binaries. + label: License and copyright notice for source + tag: include-copyright--source +- description: Changes made to the licensed material must be documented. label: State changes tag: document-changes -- description: Source code must be made available when the software is distributed. +- description: Source code must be made available when the licensed material is distributed. label: Disclose source tag: disclose-source -- description: Users who interact with the software via network are given the right to receive a copy of the source code. +- description: Users who interact with the licensed material via network are given the right to receive a copy of the source code. label: Network use is distribution tag: network-use-disclose -- description: Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used. +- description: Modifications must be released under the same license when distributing the licensed material. In some cases a similar or related license may be used. label: Same license tag: same-license -- description: Modifications of existing files must be released under the same license when distributing the software. In some cases a similar or related license may be used. +- description: Modifications of existing files must be released under the same license when distributing the licensed material. In some cases a similar or related license may be used. label: Same license (file) tag: same-license--file -- description: Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used, or this condition may not apply to works that use the software as a library. +- description: Modifications must be released under the same license when distributing the licensed material. In some cases a similar or related license may be used, or this condition may not apply to works that use the licensed material as a library. label: Same license (library) tag: same-license--library @@ -48,6 +51,6 @@ limitations: - description: This license explicitly states that it does NOT grant any rights in the patents of contributors. label: Patent use tag: patent-use -- description: The license explicitly states that it does NOT provide any warranty. +- description: This license explicitly states that it does NOT provide any warranty. label: Warranty tag: warranty diff --git a/_includes/footer.html b/_includes/footer.html index 6a16215..d3097e6 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -9,7 +9,7 @@ Creative Commons Attribution 3.0 Unported License.

- Curated with <3 by GitHub, Inc. and You! + Curated with ❤️ by GitHub, Inc. and You!
@@ -23,7 +23,7 @@ window.annotations = {{ site.data.rules | jsonify }}; {% if page.collection == "licenses" %} window.licenses = [ - {% for license in site.licenses %} + {% for license in site.licenses %} { "title": "{{ license.title | escape }}", "spdx_id": "{{ license.spdx-id | escape }}" diff --git a/_includes/sidebar.html b/_includes/sidebar.html index e51b48e..404a48c 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -1,22 +1,24 @@