-
-
Notifications
You must be signed in to change notification settings - Fork 108
Providers名前空間の切り出し #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Providers名前空間の切り出し #276
Conversation
`/events`を作りたい為、雛形hamlファイルとコントローラー 及び適切に`/events` が表示できるかのテストコードを追加した。
statiscs/providersにはDojoのイベントAPIにアクセスする為の実装がある. 直近のイベント情報を取得する際も、APIアクセスが必要となる為この資産を使いたい。 > statistics 系の資源を使いつつ、直近情報を入手する実装がやっぱり良さそう > ネームスペースが気持ち悪いと思うので、Statisticsの外に出してしまうと良いかもしれないですねぇ。 そこで名前空間をstatiscs/providersからprovidersに変更した
先程のcommitでnamespaceの変更を行った為、Statisticsの名前空間を削除した
…o.jp into add_events_pages
`providers` の名前空間を`statistics` から外した為、require_relativeのパ スを修正した
Statistics::ProvidersからProvides::に名前空間を修正した為 使用しているrakeファイルの名前空間を修正した
テストコードが`Statistics::Providers` を参照していた為、`Statistics` 名 前空間を外した
ありがとうございます! 個人的にはStatisticsとは別のネームスペースを持つか、Providersから別のネームスペースに変えたいと思ってたのですがいかがでしょうか? |
@nalabjp ありがとうございます! 個人的には また名前空間の変更のPRなのに以前の |
今回のPRでは`/events` の変更は行わない為削除した
僕が付けそうなのは |
こっちの方がしっくりきますね! 😸 今回はイベント管理サービス以外の目的でAPIを叩かないですし、また、テーブル名と同じなので「(/stats ページなどで表示されているデータから) そのファイルにどんなコードが入っているか?」も類推しやすくて良いですね! 📑👀💭 |
…b module 名前空間を切り分けるために eventservice/providers.rbにproviders.rbを変更し 大本のeventservice.rbを作成した
providersの名前空間をeventservice以下にする為テストコードの名前空間を切り分けた
名前空間を変更した為,lib/tasks/statisticsの使用しているモジュールパスを 変更した
名前空間を変更した物を修正し忘れていた為変更
名前空間を |
以下の理由より、ファイル名とディレクトリ名を
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#276 (comment)
以外はLGTMです😌
@nalabjp |
CIでコケていたのは
とありテストコードのrequireの部分が修正していなかったからだった為修正を行う |
前回のcommit時と同様に名前空間のrenameを行う coderdojo-japan@f6469ff
命名規則の修正でファイルを直接requireしている部分をeven_serviceに修正した
名前の切り分けが終了しました! |
ゴメンナサイ、見落としていたのですが、 |
|
一折切り分けがこれで完了したかと思います! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
背景
#270 で
events
を作るに辺りstatistics
とは別途イベントにAPIにアクセスし直近のイベント情報を入手する必要が出てきた。そこで、
statistics/providers
を再利用したいが、名前空間的に切り出したほうが良いと考えられる為、切り出しを行う行ったこと
lib/statistics/providers
以下のコードをlib/providers
にmvした。providers
を利用しているコードのパスを対応させた