markbates / markbates/configatron
has_key give an error if the value is set.
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 593
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
if I have a value set for a
configatron.init do |init|
init.defaults.configure_from_hash (config: {file: './config.yml'})
end
configatron.init.defaults.config.file.has_key?(:exist)
When the value exists gives an error
block in initialize': undefined method `has_key?' for "./config.yml":String (NoMethodError)
from gems/ruby-2.3.1/gems/configatron-4.5.1/lib/configatron/store.rb:151:in `do_lookup'
from gems/ruby-2.3.1/gems/configatron-4.5.1/lib/configatron/store.rb:126:in `method_missing'
from gems/ruby-2.3.1/gems/configatron-4.5.1/lib/configatron/root_store.rb:54:in `method_missing'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the configatron.init example, then inspect lib/configatron/store.rb around do_lookup and method_missing, along with lib/configatron/root_store.rb around method_missing. Determine the expected behavior of has_key? when config.file resolves to a string, and verify that the reported NoMethodError is addressed with a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100