Missing `#uuid_v4` and `#uuid_v7` methods

Đang mở
#37 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
backend, security

Hướng nghiên cứu

Bắt đầu bằng cách đọc API SecureRandom xung quanh phương thức uuid hiện có và so sánh hành vi được thể hiện cho các phiên bản 0.3.2 và 0.4.1. Xác minh rằng SecureRandom.uuid_v7 và bí danh uuid_v4 của nó khả dụng trong 0.4.1 và tạo ra các giá trị UUID như trong các ví dụ; thêm coverage tập trung cho cả hai phương thức.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

#36 added back #alphanumeric keyword arg for characters. But #uuid_v7 (and the #uuid_v4 alias) are still missing:

With ruby 3.2.6 and securerandom 0.3.2:

$ rbenv shell 3.2.6
$ gem install securerandom -v0.3.2
Fetching securerandom-0.3.2.gem
Successfully installed securerandom-0.3.2
Parsing documentation for securerandom-0.3.2
Installing ri documentation for securerandom-0.3.2
Done installing documentation for securerandom after 0 seconds
1 gem installed
$ ruby -rsecurerandom -e "puts SecureRandom.uuid_v7; puts SecureRandom.uuid_v4"
0193e518-54a6-7e66-ab61-99adfce68788
fb00fada-2414-4f60-8c54-97d30f22f536

With ruby 3.2.6 and securerandom 0.4.1:

$ rbenv shell 3.2.6
$ gem install securerandom -v0.4.1
Fetching securerandom-0.4.1.gem
Successfully installed securerandom-0.4.1
Parsing documentation for securerandom-0.4.1
Installing ri documentation for securerandom-0.4.1
Done installing documentation for securerandom after 0 seconds
1 gem installed
$ ruby -rsecurerandom -e "puts SecureRandom.uuid_v7"
-e:1:in `<main>': undefined method `uuid_v7' for SecureRandom:Module (NoMethodError)

puts SecureRandom.uuid_v7
                 ^^^^^^^^
Did you mean?  uuid
$ ruby -rsecurerandom -e "puts SecureRandom.uuid_v4"
-e:1:in `<main>': undefined method `uuid_v4' for SecureRandom:Module (NoMethodError)

puts SecureRandom.uuid_v4
                 ^^^^^^^^
Did you mean?  uuid
Ngôn ngữ chính
Ruby
Star
76
Fork
17
Merge trung bình
42 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ruby/securerandom

Tất cả issue của ruby/securerandom

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.