-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Description
- I have read and understood docs/Issues.md.
Is your feature request related to a problem? Please describe.
While refactoring SSH and SCP (#3597), I wanted to declare send as an abstract method in Input:
# Methods to be implemented in subclasses
# Send data (String)
def send(_data)
raise NotImplementedError, "Subclasses might implement send"
endThis collides with unit tests using send to call a private method:
oxidized/spec/input/http_spec.rb
Line 26 in 918108d
| @http.send("get_uri", path) |
send is implemented in ssh (
oxidized/lib/oxidized/input/ssh.rb
Lines 63 to 69 in 918108d
| def send(data) | |
| if Oxidized.config.input.debug? | |
| @log.puts "sent data #{data.dump}" | |
| @log.flush | |
| end | |
| @ses.send_data data | |
| end |
expect /Press any key to continue$/ do
send ' '
""
endDescribe the solution you'd like
Naming a method send while it is a core method of ruby seems problematic to me.
Just renaming send in the models is not a good idea, as it will probably break a lot of custom models out there.
I propose following steps:
- Document the problem (this issue)
- discuss/collect opinions about this (this issue)
- If we agree on renaming send, start a transition phase
Reactions are currently unavailable