Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Gem is misnamed causing additional work during implementation

未关闭
#114 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
28/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
停滞
技术栈
ruby
领域
api, documentation

调研方向

从 stream-chat.gemspec、lib/stream-chat.rb 以及 README 的 Installation 和 Getting Started 部分开始。比较两种提议的命名路径,并在进行任何更改前与维护者确认兼容性和发布决策。完成的标准是,所选路径在 gemspec、require 入口、README 和未来的 release 计划中保持一致。

由索引模型根据 Issue 内容生成。

描述

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
主要语言
Ruby
星标
32
派生
23
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GetStream/stream-chat-ruby 的其他 Issue

查看 GetStream/stream-chat-ruby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。