pedrofurtado / qrcode_pix_ruby

Ruby gem for QRCode generation of Pix (Pagamento Instantâneo Brasileiro - Banco Central do Brasil)
https://rubygems.org/gems/qrcode_pix_ruby
MIT License
43 stars 7 forks source link

Add rjust to force 4 digit crc-16 #27

Closed everestcw closed 1 year ago

everestcw commented 2 years ago

We've noticed that in some cases when the Hex value of the CRC-16 starts with a 0 the conversion to string removes the zeros on the start. With this, we fix this problem. I've also added a taste to simulate that scenario.

mergeable[bot] commented 2 years ago

Thanks for creating a pull request! A maintainer will review your changes shortly.

pedrofurtado commented 2 years ago

Fala Caio, @everestcw , tudo joia? 👋

Obrigado pela contribuição 🎉

codecov-commenter commented 2 years ago

Codecov Report

Merging #27 (45ef3ce) into master (143c21c) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #27   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          209       215    +6     
=========================================
+ Hits           209       215    +6     
Impacted Files Coverage Δ
lib/qrcode_pix_ruby/payload.rb 100.00% <100.00%> (ø)
spec/qrcode_pix_ruby_spec.rb 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

everestcw commented 2 years ago

@everestcw Caio, poderia por gentileza atualizar sua branch com a master e gerar uma entrada em CHANGELOG.md? Apos isso, acredito que o CI fique ok ✅

Fala, Pedro. Fiz os ajustes que você pediu. 👍

pedrofurtado commented 2 years ago

@everestcw o CI falhou, provável q a alteração tenha quebrado algo no comportamento. Vale dar uma zoiadinha belê, rodar a suíte localmente qq coisa 🤝