huacnlee / rails-settings-cached

Global settings for your Rails application.
Other
1.06k stars 202 forks source link

Use Hash#dig to fetch nested defaults #133

Closed iarie closed 6 years ago

iarie commented 6 years ago

Performance should be slightly better than #fetch (https://github.com/JuanitoFatas/fast-ruby#hashdig-vs-hash-vs-hashfetch-code) And i propose to drop support of older ruby version that does not support Hash#dig (< 2.3.0)

codecov[bot] commented 6 years ago

Codecov Report

Merging #133 into master will decrease coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #133      +/-   ##
==========================================
- Coverage   97.61%   97.57%   -0.04%     
==========================================
  Files          11       11              
  Lines         335      330       -5     
==========================================
- Hits          327      322       -5     
  Misses          8        8
Impacted Files Coverage Δ
lib/rails-settings/default.rb 95.65% <100%> (-0.78%) :arrow_down:

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 36bf1b6...8c5d71b. Read the comment docs.