ryanb / letter_opener

Preview mail in the browser instead of sending.
MIT License
3.71k stars 236 forks source link

Fix Ruby 3.3 bundled gem warning #208

Closed m-nakamura145 closed 8 months ago

m-nakamura145 commented 9 months ago

Ruby 3.3 has been released. In Ruby 3.3, the nkf gem has become a bundled gem, and it generates the following warning. To avoid this, I have added the nkf gem to the letter_opener.gemspec.

Before

~/work/letter_opener master
❯ ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]

~/work/letter_opener master
❯ bundle exec rake
/Users/m_nakamura145/work/letter_opener/lib/letter_opener/message.rb:5: warning: kconv is found in nkf, which will no longer be part of the default gems since Ruby 3.4.0. Add nkf to your Gemfile or gemspec.

Randomized with seed 23448
....................................................................

Finished in 0.21931 seconds (files took 0.2301 seconds to load)
68 examples, 0 failures

Randomized with seed 23448

After

~/work/letter_opener master*
❯ bundle exec rake

Randomized with seed 31635
....................................................................

Finished in 0.22516 seconds (files took 0.2494 seconds to load)
68 examples, 0 failures

Randomized with seed 31635
nashby commented 8 months ago

@m-nakamura145 hey, thanks for the PR! Since we use kconv in the gem itself, doesn't it mean we should add nkf to gemspec and not Gemfile?

m-nakamura145 commented 8 months ago

@nashby Thank you! Fixed! a9d44a0