Closed jinuman closed 3 years ago
Hi Kim,
Happy to hear that you like it!
Oh my 🤭 I've been blind, since invocation
is invokation
in Swedish. I just haven't thought of it. Thank you for noticing and letting me know!
I can absolutely rename it to invocation
and deprecate the old members, but while we're having this conversation, perhaps we can find an even better name? I never liked invoke
and invocation
anyways and think it's just too technical. I used execute
/execution
in the early days, but didn't like that either.
I'm wondering if call
and calls
would be better? At least it's shorter. If you like call
, perhaps we should go with that?
Sounds wonderful. I didn't know that was the word used in Swedish 😅 Thank you for your kindness reply.
In my opinion, it'd be good to decide more easy and standard word to make this great solution more popular 😁
Sooner or later in my convenient time, I can rename and create PR if you are busy. Then, we can consider more after PR.
Perhaps I can do the following later tonight, and send a link for you to look at?
invokation*
and create an invocation*
alternative. This can be merged and versioned right away.call/calls
alternatives in a new feature branch and deprecate invocation*
.Perhaps it's easier to discuss the call
semantic once we have it in place?
I really appreciate your feedback!
Thanks! Either would be good for me.
Hi again! I went with the call
name, which gives the following changes:
AnyInvokation
→ AnyCall
MockInvokation
→ MockCall
Mock
registeredInvokations
→ registeredCalls
Mockable
hasInvoked(_)
→ hasCalled(_)
Mockable
hasInvoked(_, numberOfTimes:)
→ hasCalled(_, times:)
Mockable
invoke
→ call
Mockable
invokations(of:)
→ calls(to:)
Mockable
resetInvokations
→ resetCalls
Mockable
resetInvokations(for:)
→ resetCalls(to:)
The old parts are still around, but deprecated. I didn't create invocation
functions, since adding things and deprecating them at the same time seemed like a waste :)
I think this is a LOT better, but I'd love to hear what you think before creating a 0.9
. You can check it out in master
.
Hi. Thanks for your working.
It looks like you changed Argument label as well. I'm not English-speaking native person but it sounds little unfamilliar for me so in my little opinion, I don't think argument label should be changed. Please let me know if I'm wrong.
So what I suggest is just rollback only argument label.
calls(to:)
-> calls(for:)
resetCalled(to:)
-> resetCalls(for:)
hasCalled(_, times:)
-> hasCalled(_, numberOfTimes: )
Other than that, It looks good to me. 👏👏
I think that both to
and for
are correct, but they're semantically different. to
implies that you will get/reset calls that have been made TO a function. for
implements that you will get/reset calls FOR a certain reference.
I will give this some more thought.
I agree with the times
though. Rolling back that one. 👍
Okay! to:
will be great. Thanks for explanation 👍
Perfect! I'll merge and create a new minor version.
@jinuman I have released this as 0.9. Thank you for pointing this out! 🥳
Hi. First of all, I really appreciate what you've done.
Would you mind if I change the name of
invokation
toinvocation
orexecution
?Because I googled the word
invokation
and it means nothing in real language.If there was no intention and it was only a mistake of you, I'd be happy to create PR.