licensed/README.md

116 строки
5.2 KiB
Markdown
Исходник Обычный вид История

2018-02-20 18:20:41 +03:00
# Licensed
2022-12-11 23:39:19 +03:00
Licensed caches the licenses of dependencies and checks their status, and is available as a Ruby gem.
2018-02-20 18:20:41 +03:00
Licensed is **not** a complete open source license compliance solution. Please understand the important [disclaimer](#disclaimer) below to make appropriate use of Licensed.
## Current Status
2019-09-14 05:37:33 +03:00
![Build status](https://github.com/github/licensed/workflows/Test/badge.svg)
2018-03-29 08:44:53 +03:00
Licensed is currently in **low maintenance mode**. At this point, we're only looking to maintain this repository for security fixes.
2018-02-20 18:20:41 +03:00
2022-12-11 23:39:19 +03:00
## Licensed v4 - **Removed support for non-Ruby environments**
Licensed v4 no longer provides a self-contained executable build of licensed. Please see [the deprecation notice](https://github.com/github/licensed/issues/585) for more context.
## Licensed v3
Licensed v3 includes a breaking change if both of the following are true:
1. a project uses bundler to manage ruby dependencies
2. a project uses the self-contained executable build of licensed
All other usages of licensed should not encounter any major changes migrating from the latest 2.x build to 3.0.
See [CHANGELOG.md](./CHANGELOG.md) for more details on what's changed.
See the [v3 migration documentation](./docs/migrations/v3.md) for more info on migrating to v3.
2019-02-09 21:01:31 +03:00
## Licensed v2
2019-02-09 10:33:08 +03:00
2019-02-09 21:01:31 +03:00
Licensed v2 includes many internal changes intended to make licensed more extensible and easier to update in the future. While not too much has changed externally, v2 is incompatible with configuration files and cached records from previous versions. Fortunately, migrating is easy using the `licensed migrate` command.
2019-02-09 10:33:08 +03:00
2019-10-02 05:38:53 +03:00
See [CHANGELOG.md](./CHANGELOG.md) for more details on what's changed.
See the [v2 migration documentation](./docs/migrations/v2.md) for more info on migrating to v2, or run `licensed help migrate`.
2019-02-09 10:33:08 +03:00
2018-02-20 18:20:41 +03:00
## Installation
2019-11-06 23:18:01 +03:00
### Dependencies
Licensed uses the `libgit2` bindings for Ruby provided by `rugged`. `rugged` requires `cmake` and `pkg-config` which you may need to install before you can install Licensed.
2020-05-29 04:48:22 +03:00
2021-08-08 21:24:13 +03:00
```bash
# Ubuntu
sudo apt-get install cmake pkg-config
2020-05-29 04:48:22 +03:00
2021-08-08 21:24:13 +03:00
# macOS
brew install cmake pkg-config
```
2019-11-06 23:18:01 +03:00
2023-02-26 23:43:28 +03:00
### With Gemfile
2018-02-20 18:20:41 +03:00
Add this line to your application's Gemfile:
```ruby
gem 'licensed', :group => 'development'
```
And then execute:
```bash
2021-08-08 21:24:13 +03:00
$> bundle
2018-02-20 18:20:41 +03:00
```
2023-02-26 23:43:28 +03:00
### With Homebrew (on macOS)
2022-12-12 09:11:52 +03:00
```bash
brew install licensed
```
2018-02-20 18:20:41 +03:00
## Usage
See [getting started](./docs/getting_started.md) for guidance using Licensed as part of your developer workflow.
2021-08-08 21:24:13 +03:00
### Available commands
See the [commands documentation](./docs/commands) for documentation on available commands, or run `licensed -h` to see all of the current available commands.
### Configuration options
A configuration file is required for most commands. See the [configuration file documentation](./docs/configuration.md) for more details on the configuration format and available configuration options.
### Available dependency sources
2022-05-27 13:13:33 +03:00
Licensed can enumerate dependency for many languages, package managers, and frameworks. See the [sources documentation](./docs/sources) for the list of currently available sources. Sources can be explicitly enabled and disabled as a [configuration option](./docs/configuration/dependency_source_enumerators.md).
2019-01-28 07:11:48 +03:00
2018-02-20 18:20:41 +03:00
## Development
2018-05-21 22:27:25 +03:00
To get started after checking out the repo, run
2021-08-08 21:24:13 +03:00
2018-05-21 22:27:25 +03:00
1. `script/bootstrap` to install dependencies
2. `script/setup` to setup test fixtures.
- `script/setup -f` will force a clean test fixture environment
2021-08-08 21:24:13 +03:00
3. `script/cibuild` to run the tests
2018-05-21 22:27:25 +03:00
You can also run `script/console` for an interactive prompt that will allow you to experiment.
2018-02-20 18:20:41 +03:00
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
2021-08-08 21:24:13 +03:00
### Adding a new source
2018-02-20 18:20:41 +03:00
2021-08-08 21:24:13 +03:00
See the [documentation on adding new sources](./docs/adding_a_new_source.md) for detailed information on what's required to add a new dependency source enumerator.
2019-01-28 07:11:48 +03:00
2018-02-20 18:20:41 +03:00
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/github/licensed. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org/) code of conduct. See [CONTRIBUTING](CONTRIBUTING.md) for more details.
## Disclaimer
Licensed is **not** a complete open source license compliance solution. Like any bug, licensing issues are far cheaper to fix if found early. Licensed is intended to provide automation around documenting the licenses of dependencies and whether they are configured to be allowed by a user of licensed, in other words, to surface the most obvious licensing issues early.
Licensed is not a substitute for human review of each dependency for licensing or any other issues. It is not the goal of Licensed or GitHub, Inc. to provide legal advice about licensing or any other issues. If you have any questions regarding licensing compliance for your code or any other legal issues relating to it, its up to you to do further research or consult with a professional.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).