<fdan>
i am going to change release_type to be a string
<fdan>
so in the rspec, i will have to ensure that release_type is not an array in the spec file
<havenwood>
fdan: Normally you don't test what things aren't.
<fdan>
yes can we check that they're strings atleast
<havenwood>
fdan: You can test whatever you want, but typically we use duck typing and don't care what's passed as long as it responds to the appropriate methods for your interface.
<havenwood>
fdan: I searched for "rspec not to" and it's the top link. ¯\_(ツ)_/¯
<havenwood>
Maybe try a new search engine.
<fdan>
sorry i search with not_to_be_an
<havenwood>
fdan: Two methods, #not_to and #be_an.
<havenwood>
fdan: nakilon linked you the latter.
<fdan>
i see
<havenwood>
fdan: I use Minitest, which ships with Ruby, and is less fancy.
<havenwood>
RSpec has this little English-like domain-specific language for tests.
<havenwood>
I'd recommend an RSpec tutorial if you want to get up to speed with RSpec.
<fdan>
havenwood i have one more question. I have release_type: [Rn::Monitor::SDK_RELEASE, Rn::Monitor::NODE_RELEASE]
<nakilon>
havenwood that's a cool wrapper but it's like another wheel
<fdan>
how do i update this
* havenwood
spins the wheel
<fdan>
sorry i m coming from python experience and its my day 1 in ruby
<havenwood>
fdan: How do you update it to what?
<havenwood>
I don't understand the question.
<havenwood>
nakilon: Yeah, it's not context aware like `Async do`, which is too bad.
<havenwood>
I usually wrap PStore anyways, since it's interface is clunky, so I don't mind a layer of abstraction.
<fdan>
previously release_type was an array in an .rb file, i changed it to string and hence the spec file also changes
<fdan>
i dont know what i would have to update it to?
<nakilon>
probably as a kludge I could pass a transaction object to my method so it will see the presence of context immediately in args
<havenwood>
fdan: Okay. So you're showing us an Array with two constant variables and asking how to update it to a String? What are those constants? How do you make an Array a String? Your question doesn't make sense without context.
<havenwood>
fdan: Have you shared this code and I missed it? You can't make an Array a String without deciding how you're going to represent a list as text.
<fdan>
havenwood do you mind if i can DM you the code?
<havenwood>
fdan: I feel like I'm about to go down a rabbit hole here. :P Can you say why you're making a String and show just one example of what you'd like the content of the String to be?
<havenwood>
🐇
<fdan>
hey so basically we got duplicate tickets in jira from the ruby program
<havenwood>
Feel free to share a link to a gist of the code here.
<havenwood>
Okay, you got duplicate tickets, copy.
<fdan>
yes
<havenwood>
And why are you taking a list of things and turning it into text?
<havenwood>
fdan: You can certainly make this code more elegant, but I'm trying to show there are three cases and you can have three outcomes — whatever you want them to be.
<havenwood>
You can do two on one case when, with a comma between to mean "either".
<havenwood>
If you make it work with that ^ code it'll be easy for folk here to then help you refactor it.
<havenwood>
fdan: If you want to flatten this and change your test case, go ahead, but maybe start with making the code logic work as is.
<fdan>
ok
<havenwood>
If you don't want to match one of those, remove it. Explicit is probably a safe place to start and it'll make it clear to anyone helping how to refactor.
<havenwood>
fdan: Circle back if that works for you and folk here can help make it pretty.
<fdan>
hmm sure
<fdan>
havenwood what is the difference between the gist you have given and this https://bpa.st/QUZQ
<leftylink>
2022-02-08 05:49:14 < fdan> sorry i m coming from python experience and its my day 1 in ruby
<leftylink>
so basically I think this is a lie
<leftylink>
but I'm not sure whether I should withhold help based on it being a lie, or if I should just help anyway
<fdan>
why
<fdan>
its upto you. but i have no ruby experience
<leftylink>
hey all I'm saying is I have a good memory
<leftylink>
okay yeah
<leftylink>
I think you're lying, and I have decided not to help because of it. I won't stop others from helping, but I'm simply informing others of what I have chosen to do
<leftylink>
others are of course free to make their own individual choices - I'm not the boss of them
<fdan>
i still understand how you're coming to a conclusion that i am lying
<leftylink>
that is a good point though. if I don't explain how I came to that conclusion, there are two huge disadvantages 1. accused does not get a chance to respond to the accusations, 2. others have no reason to come to the same conclusions and potentially take the same actions. given those two disadvantages, I should explain how I came to that conclusion
<leftylink>
so my reasons are 2021-08-06, 2021-08-27, 2021-08-30, and 2022-01-21. those are the days that led me to think it being day 1 is false
<fdan>
yes i agree, but still its a day 1 at ruby, i have not formally learnt ruby yet
<leftylink>
I see, so it must have been a expression I am not familiar with. I apologise. English isn't my first language, so I must have misunderstood you.
oxfuxxx has quit [Quit: Yankies Motherfh@ckers C0[k Astroboys]
infinityfye has joined #ruby
teclator has joined #ruby
keremcan has joined #ruby
keremcan has quit [Client Quit]
hanzo has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
Guest7003 has joined #ruby
Rounin has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 256 seconds]
perrierjouet has joined #ruby
exondation has joined #ruby
rando25892 has quit [Quit: enemy at the gate]
keremcan has joined #ruby
mixfix41 has quit [Ping timeout: 256 seconds]
infinity_fye has joined #ruby
infinity_fye has quit [Client Quit]
infinityfye has quit [Ping timeout: 250 seconds]
infinityfye has joined #ruby
infinity_fye has joined #ruby
dviola has joined #ruby
keremcan has quit [Quit: Client closed]
ur5us has quit [Ping timeout: 240 seconds]
infinityfye has quit [Ping timeout: 256 seconds]
infinityfye_ has joined #ruby
infinity_fye has quit [Ping timeout: 256 seconds]
infinityfye has joined #ruby
infinityfye_ has quit [Ping timeout: 240 seconds]
Aylat has joined #ruby
Aylat has quit [Changing host]
Aylat has joined #ruby
goldfish has joined #ruby
infinity_fye has joined #ruby
infinityfye has quit [Ping timeout: 240 seconds]
infinityfye has joined #ruby
infinity_fye has quit [Ping timeout: 250 seconds]
infinity_fye has joined #ruby
infinityfye has quit [Ping timeout: 250 seconds]
infinityfye_ has joined #ruby
infinity_fye has quit [Ping timeout: 250 seconds]
gr33n7007h has quit [Quit: WeeChat 3.4]
infinity_fye has joined #ruby
infinity_fye has quit [Client Quit]
infinityfye_ has quit [Ping timeout: 250 seconds]
infinityfye has joined #ruby
taupiqueur has joined #ruby
roshanavand has joined #ruby
fdan has quit [Quit: Client closed]
reset has quit [Quit: reset]
roshanavand has quit [Ping timeout: 256 seconds]
reset has joined #ruby
unyu has joined #ruby
unyu has quit [Client Quit]
quintasan has quit [Ping timeout: 256 seconds]
quintasan has joined #ruby
TomyWork has joined #ruby
duds- has quit [Remote host closed the connection]
duds- has joined #ruby
oxfuxxx has joined #ruby
Aylat has quit [Read error: Connection reset by peer]
mixfix41 has joined #ruby
gproto23 has joined #ruby
unyu has joined #ruby
roshanavand has joined #ruby
John_Ivan has joined #ruby
quintasan has quit [Ping timeout: 240 seconds]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
taupiqueur has quit [Quit: taupiqueur]
quintasan has joined #ruby
acosta has joined #ruby
fef has joined #ruby
fandre1986 has joined #ruby
Rounin has quit [Ping timeout: 250 seconds]
bluedust_ has quit [Remote host closed the connection]
fandre1986 has quit [Quit: Connection closed]
bluedust has joined #ruby
oxfuxxx has quit [Ping timeout: 250 seconds]
Guest53 has joined #ruby
infinityfye has quit [Read error: Connection reset by peer]
<adam12>
Gemdocs.org is now storing 27 GB of uncompressed docs over 4299 gems.
<adam12>
Seems like we run about 100 gems a day for releases.
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
<mooff>
nice :-)
oxfuxxx has quit [Ping timeout: 250 seconds]
unyu has quit [Ping timeout: 240 seconds]
bluedust has joined #ruby
unyu has joined #ruby
bluedust_ has quit [Ping timeout: 256 seconds]
weaksauce has quit [Ping timeout: 250 seconds]
oxfuxxx has joined #ruby
Guest27 has joined #ruby
Guest27 has quit [Client Quit]
oxfuxxx has quit [Ping timeout: 250 seconds]
oxfuxxx has joined #ruby
weaksauce has joined #ruby
goldfish has quit [Ping timeout: 240 seconds]
bluedust has quit [Remote host closed the connection]
<nakilon>
leftylink heh are those his timestamps? I don't remember nicknames, but inability to even understand my first question "what exactly should be array?" I supposed it's not 1st ruby day but rather 1st computer day, but with timestamps it makes even worse sense
mjacob has joined #ruby
<mjacob>
how do i get the Method object of some method of some object which has an overridden method 'method'?
<weaksauce>
super?
<mjacob>
weaksauce: wouldn't that work only within the overriden 'method' method?
<weaksauce>
yes
TomyWork has quit [Remote host closed the connection]
<mjacob>
i got it working with "Object.instance_method(:method).bind(controller.request).method(...)"
<mjacob>
thank you all!
<adam12>
I guess that breaks down if you actually need the original `method`.
<adam12>
But a nice solution outside of that.
<mjacob>
adam12: yes, actually, i want the method object of a method which is not called 'method'. sorry for the confusion.
<ox1eef>
instance_method(..).bind(self).call is great knowledge to have in the toolbox.
<adam12>
mjacob: Nah, it's not confusing. Just an interesting predicament.
<adam12>
I guess you could maybe alias :method to :original_method or something, then method(:original_method).. but it does kind of defeat the purpose.
<adam12>
That's if you needed method(:method) of course, which you don't :)
<adam12>
If you could rename when binding, that would be neat.