Consolidate app/queries/ and app/queriers/ into a single query-objects folder
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc Admin::WorkshopConcerns và entry point Admin::WorkshopsController#show, sau đó tìm AdminWorkshopAttendeeFlags trong app/queriers/. Di chuyển nó vào app/queries/ mà không thay đổi các caller của nó, rồi chạy các spec của Admin::WorkshopsController#show và dashboard. Hoàn tất khi app/queriers/ không còn tồn tại, class được resolve từ app/queries/ và cả hai khu vực test được nêu đều pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The repo has two folders for the same concept, with three different class shapes between them:
| Folder | Class | Shape | Used by |
|---|---|---|---|
app/queries/ |
DashboardQuery |
class-level methods (upcoming_events, total_upcoming_events_count) |
DashboardController |
app/queries/ |
SponsorsSearch |
ActiveModel::Model object with attr_accessor :name, :chapter |
Admin::SponsorsController |
app/queriers/ |
AdminWorkshopAttendeeFlags |
self.for_members(member_ids) → instance #to_h |
Admin::WorkshopConcerns |
queriers is not a name Rails developers recognise as an autoload convention (app/queries is), and the split isn't semantic — AdminWorkshopAttendeeFlags is the same kind of code as DashboardQuery: batched aggregate queries for controllers.
Proposed change
- Move
AdminWorkshopAttendeeFlagsfromapp/queriers/toapp/queries/and deleteapp/queriers/. - Leave the three existing call shapes alone for now — normalising
DashboardQuery/SponsorsSearchinterfaces is out of scope and needs its own discussion.
Acceptance
app/queriers/no longer exists;AdminWorkshopAttendeeFlagsresolves fromapp/queries/.- Callers unchanged (
Admin::WorkshopConcernsreferences the same class name). Admin::WorkshopsController#showand the dashboard specs pass.
- Ngôn ngữ chính
- Ruby
- Star
- 104
- Fork
- 205
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 81
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codebar/planner
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Chapter show pages allocate ~21k+ objects per render for large chapters (18% of app allocations)Đang mởperformance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
codebar/planner#2952 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Workshop show pages allocate ~7.3k objects per request with no caching (28% of app allocations)Đang mởperformance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codebar/planner
Issue tương tự
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
OSCON 2016Đang mởcontent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
rubyevents/rubyevents#2148 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
we-promise/sure#3838 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ManageIQ/manageiq-ui-classic#10341 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Obsolete link to RubyMine docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
rubocop/ruby-style-guide#984 ·