Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> Ruby

Tin Tức Ruby – Quý 3 2021: Cập Nhật & Xu Hướng Chính

Quarterly briefings của Honeybadger cập nhật bạn những phát triển quan trọng nhất trong cộng đồng lập trình. Chúng tôi curate tin tức để bạn tập trung vào điều thực sự quan trọng.

  • Events: Conferences và meetups. Sắp tới và vừa hoàn thành.
  • Security: Báo cáo lỗ hổng gần đây
  • Projects: Tin tức về major community projects
  • Trending Topics: Tóm tắt big topics mọi người bàn luận
  • Standout Content: Nội dung không fit các section khác, nhưng quá cool để bỏ qua.

Events

RubyConf 2021 vào 8 - 10 tháng 11

RubyConf là gathering lớn nhất và lâu đời nhất của Ruby enthusiasts, practitioners, và companies. Năm nay ở Denver, in-person! Cũng có option virtual (rẻ hơn).

  • 7 tháng 6: Call for proposals mở và đã đóng
  • 7 tháng 6: Đăng ký RubyConf mở!

Security

  • 16 tháng 8: better_errors trước 2.8.0 không implement CSRF protection cho internal requests. Cũng không enforce đúng header "Content-Type" cho requests này, cho phép cross-origin "simple request" được thực hiện không có CORS protection

Projects

Ruby

Ngôn ngữ Ruby bản thân.

  • 7 tháng 7: Ruby 3.0.2 released. Fix 3 CVEs.

Rails

Rails (Ruby on Rails) là open-source framework phổ biến hóa Ruby cho web development.

  • 15 tháng 9: Rails 7.0 Alpha 1 Release!

Rails 7 (12)

Rails 7 chính thức Alpha, mang đến những thay đổi exciting: cách làm JavaScript mới, approach tuyệt vời cho at-work encryption với Active Record, SQL query origin logging, asynchronous query loading, exclusive autoloading qua Zeitwerk, và nhiều hơn.

  • Previewing Rails 7 upcoming changes

    • Stefan Weinert
    • Stefan walk through một số upcoming changes trong Rails 7.
  • Adding support for cross-cluster associations to Rails 7

    • Eileen M. Uchitelle
    • Github team extracted internal functionality disable joining queries khi association cross multiple databases.
  • Rails 7 adds change tracking methods for belongs_to associations

    • Swaathi Kakarla
    • Dùng ActiveRecord query database changes.
  • Starting with Rails 7, retry failed jobs indefinitely

    • Alkesh Ghorpade
    • Rails 7 có ActiveJob upgrade cho phép specify jobs retry until succeed, indefinitely.

Testing (6)

Testing code essential cho production apps at scale, và Ruby community rất enthusiastic về testing.

  • Making Rails run just a few tests faster

    • Jorge Manrubia
    • Rails parallel testing có significant overhead do database setup và fixture loading. Jorge opened PR trong Rails disable parallel testing by default.
  • Understanding Factory Bot syntax by coding your own Factory Bot

    • Jason Swett
    • Jason demystifies Factory Bot bằng cách tạo implementation riêng từ đầu.

Javascript, Hotwire, và Rails (5)

Recent Rails releases và releases sắp tới thay đổi cách Rails interact với Javascript.

  • Modern web apps without JavaScript bundling or transpiling

    • David Heinemeier Hansson
    • Không còn cần transpiling step turn ES6 thành gì đó run trong browser. Nó run fine, no changes needed.
  • Using Hotwire with Rails for a SPA like experience

    • Mike Wilson
    • Mike giải thích dùng Hotwire và Turbo frames cho navigation.
  • Using Hotwire with Rails

    • Renata Marques
    • Hotwire là cách build modern web apps không cần nhiều JavaScript bằng cách gửi HTML over the wire. Bài này Renata giới thiệu Hotwire và walk through simple example.

Standout Content

  • Sorbet Compiler: An experimental, ahead-of-time compiler for Ruby

    • The Sorbet Team
    • Stripe exposes code cho ahead-of-time Ruby compiler, lên tới 170% faster than default.
  • Tutorial: How to Send Email in a Ruby App

    • Aydrian Howard
    • Quick walkthrough thêm email functionality vào Ruby app.
  • Under the hood of the includes method in Rails

    • Paweł Dąbrowski
    • Hiểu ActiveRecord implement includes