Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Proposal: adding a funding link to gemspec #7566

Closed
gjtorikian opened this issue Jan 12, 2020 · 1 comment
Closed

Proposal: adding a funding link to gemspec #7566

gjtorikian opened this issue Jan 12, 2020 · 1 comment

Comments

@gjtorikian
Copy link

gjtorikian commented Jan 12, 2020

馃憢 Hello there! Long time RubyGems user, first time contributor. 馃樃

My current problem is that, as a Ruby open source developer, I would like to ensure that my projects are receiving funding, so that I can continue to make them available.

I noticed that late last year, npm discouraged the use of asking for funding in a post-install message, in favor of adding a funding option.

I would like to propose adding a similar option here, and, if it sounds good, would be more than happy to open a PR to implement ASAP.

Format

I imagine this proposal to add a new key, funding, to the Gem specification:

Gem::Specification.new do |gem|
  gem.name          = 'commonmarker'
  gem.funding       = 'https://github.com/sponsors/gjtorikian/'
  
  # ...
end

funding must be a URI, much like homepage.

Usage

After bundle update or bundle install (or really, wherever post_install_message is also shown), the following message should be printed:

4 gems are looking for funding
  run `bundle fund` for details

fund would be a new command. When a user types bundle fund, the following information should be shown as a bulleted list.

$ bundle fund
  * $GEM_NAME ($GEM_VERSION)
	Funding: <$FUNDING_URL>
  * commonmarker (0.20.2)
	Funding:  https://github.com/sponsors/gjtorikian/

As well, bundle info should also show this information:

$ bundle info commonmarker

  * commonmarker (0.20.2)
	Summary: CommonMark parser and renderer. Written in C, wrapped in Ruby.
	Homepage: https://github.com/gjtorikian/commonmarker
	Path: /Users/gjtorikian/Development/commonmarker
	Funding:  https://github.com/sponsors/gjtorikian/

(Of course, RubyGems.org should also prominently display this information, but that's a different PR for a different repo!)

What do you think?


I will abide by the code of conduct.

@gjtorikian
Copy link
Author

Opening as an RFC question instead, which I just discovered: rubygems/rfcs#22

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

No branches or pull requests

1 participant