GoogleCloudPlatform / GoogleCloudPlatform/ruby-docs-samples

bookshelf: missing Gemfile.lock, missing updates

オープン
#1,613 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
samples
主要言語
Ruby
スター
235
フォーク
210
PR マージ指標
30日以内にマージされた PR はありません

説明

Multiple errors recurring on getting-started/bookshelf nightly tests, which reports argument and nomethod errors on dependencies

```
An error occurred while loading ./spec/features/book_management_spec.rb.
Failure/Error: require File.expand_path("../../config/environment", __FILE__)

ArgumentError:
wrong number of arguments (given 3, expected 2)
# ./config/environment.rb:18:in `'
# ./spec/spec_helper.rb:17:in `'
# ./spec/features/book_management_spec.rb:14:in `'

An error occurred while loading ./spec/models/book_spec.rb.
Failure/Error: require File.expand_path("../../config/environment", __FILE__)

NoMethodError:
undefined method `operations' for #

MiddlewareStackProxy.new(@operations + other.operations, @delete_operations + other.delete_operations)
^^^^^^^^^^^
# ./config/environment.rb:18:in `'
# ./spec/spec_helper.rb:17:in `'
# ./spec/models/book_spec.rb:14:in `'
No examples found.
```

It looks like dependabot isn't updating this sample. There's no committed Gemfile.lock, that is being updated in other samples.

It's stuck with a very out dated version of Rails which isn't supported on the current Ruby Oldest (https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html)

This sample would need to be updated to latest Rails versions and manually updated if any updates required for mulitple major version updates.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず getting-started/bookshelf/config/environment.rb と依存関係の設定を確認し、その後 spec/features/book_management_spec.rb と spec/models/book_spec.rb にある失敗している spec を実行します。サンプルの Rails 依存関係を更新して、その Gemfile.lock を commit し、その後 nightly テストで読み込みエラーが報告されなくなったことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rails, ruby
領域
backend, testing
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。