hubot-archive / hubot-google-images

A hubot script that interacts with the Google Images API
126 stars 67 forks source link

Update the randomness to be handled on the mustachify side. #5

Closed louim closed 9 years ago

louim commented 9 years ago

According to the Mustachio code at: https://github.com/afeld/mustachio/blob/master/lib/mustachio/app.rb#L60, if we use rand instead of a number, randomness is already handled on the mustachio's side, so I don't think we need to do it on our side too.

parkr commented 9 years ago

Nice!

afeld commented 9 years ago

Note that this means it could show a different mustache to each person that gets sent the link.

technicalpickles commented 9 years ago

Ah, that's a good point. Probably should revert in that case.

louim commented 9 years ago

I see your point, my main motivation for doing this change is the ability to add more mustaches on mustachify side, without having to modify the external script each time.

afeld commented 9 years ago

Maybe a good solution would be to have /rand redirect to one of the numbers on the mustachio side?

louim commented 9 years ago

@afeld I think that would be the best option :+1:

afeld commented 9 years ago

Though I guess this script would then need to make an initial request to get the new URL, then respond back with that new Location.