CI::Queue::Static and CI::Queue::File initialization is broken
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
CI::Queue::Static と CI::Queue::File の初期化を追跡することから始め、次に #populate と #to_a がキューリストおよび @index とどのように相互作用するかを調べます。変更する前に、設定、テストでの populate、および提案されているクラスメソッド .populate の意図された API を明確にします。完了の条件は、一般的なユースケースで不要な設定が必要なく、未投入のキューが nil メソッドエラーや Ruby の警告を発生させないことです。
索引モデルが issue の本文から書いたものです。
説明
After https://github.com/Shopify/ci-queue/pull/34, you need to initialize the File and Static queue passing the file name or the test respectively and you also need to populate the queue with the list of tests. This seems contra-intuitive.
Maybe the initialize should only take the config and the populate the list of tests and add a .populate class method (or any other name) that does what the initialize used to do.
Also those queues require a configuration object that is not needed in most of its use cases. Making it optional, or adding a high level method as .populate that creates the configuration object would be great.
cc @casperisfine @wvanbergen @tjoyal
Nitpick:
The @index instance variable is only set after you call #populate so if you don't you get a "non-method error fetch for nil" in the to_a method and a ruby warning because the instance variable is not initialized. Maybe we should try to write warning free code so we could avoid this kind of error?
- 主要言語
- Ruby
- スター
- 240
- フォーク
- 36
- 平均マージ
- 28分
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Shopify/ci-queue のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
Shopify/ci-queue の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TheOdinProject/curriculum#31423 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
oxidize-rb/rb-sys#807 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
ai-generated
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100