Ruby 3 compatibility
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/100
Hướng nghiên cứu
Bắt đầu bằng cách so sánh lib/database_cleaner/cleaner.rb với các điểm truy cập xử lý tùy chọn trong database_cleaner-active_record/lib/database_cleaner/active_record/truncation.rb và database_cleaner-redis/lib/database_cleaner/redis/deletion.rb. Chạy các specs PostgreSQL, MySQL và SQLite hiện có, sau đó kiểm tra lệnh gọi strategy= được báo cáo trên Ruby 3. Hoàn thành khi các sub-gems xử lý các tùy chọn một cách nhất quán và các lỗi tương thích được bao phủ bởi các specs đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Have there been any efforts already on getting this gem ready for Ruby 3?
this kind of magic: https://github.com/DatabaseCleaner/database_cleaner/blob/master/lib/database_cleaner/cleaner.rb#L43
def strategy=(args)
strategy, *strategy_args = args
won't work in Ruby 3, I've seen quite some usage of this pattern.
Also, the redis and the active_record sub-gems use kwargs vs. options-hashes differently, see:
class Truncation < Base
def initialize(opts={})
class Deletion < Strategy
def initialize only: [], except: []
which will make it harder to upgrade the database gem family.
So probably as a first step, we should harmonize all sub-gems to use the same way of passing options around, either as a hash or using keyword arguments. From there we can tinker further.
I've tried it quickly locally and run into too many issues to push a draft PR. I might find more time on one of the next weekends though. -> hence the question, if there is already any PR/fork that started working on Ruby 3 compatibility.
As always, thanks for the gems 🙂
=> Specs are passing for Postgresql, MySQL, SQLlite locally, however, when I use
DatabaseCleaner.strategy = :deletion, { except: %i[not_you also_not_you blubb] }
in one of my projects, strategy= fails with the Ruby 3 kwargs/hash error.
- Ngôn ngữ chính
- Ruby
- Star
- 3k
- Fork
- 485
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không 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 DatabaseCleaner/database_cleaner
-
:transaction strategy: uncommitted data disappears after perform_enqueued_jobs on Rails ≥ 7.2Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
-
Cleaning of dev DBĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Cannot truncate a table referenced in a foreign key constraint (ActiveRecord::StatementInvalid)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
DatabaseCleaner/database_cleaner#717 · 5 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
DatabaseCleaner/database_cleaner#716 · 2 bình luận ·
Tất cả issue của DatabaseCleaner/database_cleaner
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
rubys/roundhouse#444 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
sclorg/s2i-ruby-container#656 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/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 82/100
yegor256/rubocop-elegant#92 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ecosyste-ms/awesome#812 ·
Maintainer thường phản hồi trong vòng 2 ngày