Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Gem is misnamed causing additional work during implementation

Aperta
#114 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
api, documentation

Direzione di ricerca

Inizia da stream-chat.gemspec, lib/stream-chat.rb e dalle sezioni Installation e Getting Started della README. Confronta i due percorsi di denominazione proposti e conferma la decisione sulla compatibilità e sulla pubblicazione con i maintainer prima di modificare qualsiasi cosa. Il lavoro è completato quando il percorso selezionato è coerente nel gemspec, nell’entry point require, nella README e nel futuro piano di release.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The main file in this gem is lib/stream-chat.rb. The gemspec is named stream-chat.gemspec.

The "-ruby" part of the name is redundant in a Ruby gem name. With all that in mind, the gem should have been published under the name stream-chat. That name is not in use in Rubygems, so that is currently possible.

By not having the name of the gem not matching the name of the main file, the additional step of calling `require "stream-chat" is necessary. That's not standard or expected in the Ruby world, it would only be expected if the gem has files that should only be included under limited and specific conditions, like test harnesses.

So here are two possible paths to improve this:

Change the name of the gem:
  1. Change the name in the gemspec file to stream-chat
  2. Update the README to use the new name in the Installation section, and remove the require call in the Getting Started section
  3. Publish new versions to rubygems under the new name (and potentially also the old name)

Downside of simply renaming the gem going forward is that those using the gem under the old name would no longer receive new versions of the gem, unless it's published under both names going forward.

Remove the need for an additional require call:
  1. Add a file named lib/stream-chat-ruby.rb which calls require "stream-chat"
  2. Update the README to remove the require call in the Getting Started section
Lingua principale
Ruby
Stelle
32
Fork
23
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GetStream/stream-chat-ruby

Tutte le issue di GetStream/stream-chat-ruby

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.