Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use keyword arguments in all maskers consistently #91

Merged
merged 1 commit into from
Feb 1, 2020

Conversation

skalee
Copy link
Contributor

@skalee skalee commented Feb 1, 2020

Implicit conversions between hashes and keyword arguments is deprecated in modern Rubies, and will not work in Ruby 3.0. Maskers should be parametrized with keyword arguments, not Ruby 1.9-style options hashes, and this very change fixes that.

This change resolves all Ruby 2.7 warnings (see #79), except for those coming from external libraries (e.g. Rails).

See: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

Implicit conversions between hashes and keyword arguments is deprecated
in modern Rubies, and will not work in Ruby 3.0.  Maskers should be
parametrized with keyword arguments, not Ruby 1.9-style options hashes,
and this very commit fixes that.

This commit resolves all Ruby 2.7 warnings, except for those coming from
external libraries (e.g. Rails).

See: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
@codecov
Copy link

codecov bot commented Feb 1, 2020

Codecov Report

Merging #91 into master will increase coverage by 37.06%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #91       +/-   ##
===========================================
+ Coverage   62.34%   99.41%   +37.06%     
===========================================
  Files          26       24        -2     
  Lines         563      340      -223     
===========================================
- Hits          351      338       -13     
+ Misses        212        2      -210
Impacted Files Coverage Δ
lib/attr_masker/maskers/simple.rb 100% <100%> (ø) ⬆️
lib/attr_masker/attribute.rb 100% <100%> (ø) ⬆️
lib/attr_masker/model.rb 94.73% <0%> (-0.27%) ⬇️
spec/spec_helper.rb
spec/features/shared_examples.rb

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 967c860...4e311af. Read the comment docs.

@skalee skalee merged commit ce89716 into master Feb 1, 2020
@skalee skalee deleted the keywords-and-hashes branch February 1, 2020 15:59
@skalee skalee mentioned this pull request Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant