beanstalkd / beanstalkd/beaneater

ENV for the URL :: not working?

Open
#76 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
201
Forks
45
PR merge metrics
No merged PRs in 30d

Description

When I try to call Beaneater.new with teh env variable set I get this:

> ArgumentError: wrong number of arguments (given 0, expected 1)
/path/vendor/bundle/ruby/2.5.0/gems/beaneater-1.0.0/lib/beaneater.rb:24:in `initialize'

I assume that's not intended. When I adjusted both of these:

> /path/vendor/bundle/ruby/2.5.0/gems/beaneater-1.0.0/lib/beaneater/connection.rb: def initialize(address)
/path/vendor/bundle/ruby/2.5.0/gems/beaneater-1.0.0/lib/beaneater.rb: def initialize(address)

To be address = nil it works. However, I don't know how we want to solve that problem. At the moment I'm solving it like this:

> Beaneater.new(ENV['BEANSTALKD_URL'])

Which I doubt is the intended behavior. I'm assuming no one uses this ENV at this point as it seems to not work.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect lib/beaneater.rb and lib/beaneater/connection.rb, focusing on the initialize methods and how BEANSTALKD_URL is used when no address is passed. Reproduce the environment-based call and verify that Beaneater.new uses the environment URL while an explicitly supplied address still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.