Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

licenses (plural) key in gemspecs doesn't seem to be recognised? #567

Closed
dgmstuart opened this issue Nov 1, 2022 · 3 comments
Closed

licenses (plural) key in gemspecs doesn't seem to be recognised? #567

dgmstuart opened this issue Nov 1, 2022 · 3 comments

Comments

@dgmstuart
Copy link

Most gems just specify a single license, but the gemspec format also supports specifying a list of licenses:

https://guides.rubygems.org/specification-reference/#licenses=

It seems that these aren't recognised by licensed?

In particular the Ruby standard library gem stringio specifies s.licenses = ["Ruby", "BSD-2-Clause"]

https://github.com/ruby/stringio/blob/master/stringio.gemspec

...but the cached license yml doesn't seem to use this, and instead only finds license information from the README:

---
name: stringio
version: 3.0.1
type: bundler
summary: Pseudo IO on String
homepage: https://github.com/ruby/stringio
license: other
licenses:
- sources: README.md
  text: The gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).
notices: []
@jonabc
Copy link
Contributor

jonabc commented Nov 1, 2022

👋 @dgmstuart licensed is a wrapper around licensee which performs the actual license detection. Gemspec logic is handled in licensees Gemspec file matcher.

If you'd like to request different behavior for pulling license information from gemspec files you'll need to open an issue in the licensee repo. Licensed does by default use package manager file information by setting licensee's configuration option, so any change in licensee should be picked up the next time licensed updates dependency versions.

I'm going to close this because I'm not aware of anything for licensed to change for this feature request. Please feel free to reopen if you disagree.

@jonabc jonabc closed this as completed Nov 1, 2022
@dgmstuart
Copy link
Author

Ah ok, I didn't realise that was a separate project - thank you for explaining 🙏

@dgmstuart
Copy link
Author

dgmstuart commented Nov 1, 2022

For reference: it seems that the licensee project has decided not to handle multiple licenses at the moment: licensee/licensee#246
https://github.com/licensee/licensee/blob/master/lib/licensee/matchers/gemspec.rb#L37-L38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants