intrigueD has quit [Remote host closed the connection]
<rgb-one>
cool, cool
<shevy>
bronson I sorta have to
<shevy>
I have a gtk module and need to scope to the right ::Gtk :(
<rgb-one>
so in that case there is no need to split the string
<shevy>
I could name it differently like MyGtk but that reads awful
moei has quit [Read error: Connection reset by peer]
Coldblackice has quit [Read error: Connection reset by peer]
<Ox0dea>
rgb-one: We did this, like, two months ago?
<bronson>
shevy: I don't get it... Why do you need Shevy::Gtk to resolve to ::Gtk
nirix_ has quit [Ping timeout: 245 seconds]
<rgb-one>
haha
<bronson>
(or whatever the owning module is named)
<rgb-one>
yea
joonty has joined #ruby
<rgb-one>
longer than 2 months
<shevy>
bronson no no... I use toplevel: module Gtk now there
<rgb-one>
about 4 or 5
<Ox0dea>
Heavens to Murgatroyd!
<Ox0dea>
Why're we doing it again?
<rgb-one>
I am just revisiting the code
tildes has quit [Read error: Connection reset by peer]
<Ox0dea>
Gotcha.
<rgb-one>
trying some new stuff out
<Ox0dea>
>> String::Hash # bronson
<ruby[bot]>
Ox0dea: # => /tmp/execpad-c00ee5d9e751/source-c00ee5d9e751:2: warning: toplevel constant Hash referenced by Strin ...check link for more (https://eval.in/516723)
moei has joined #ruby
<Ox0dea>
Is the warning not sufficient for you?
tildes has joined #ruby
<shevy>
wow
<Ox0dea>
Convoluting constant resolution for the sake of making that an error seems overkill.
<shevy>
Ox0dea remembers everything
idefine has quit [Ping timeout: 264 seconds]
<bronson>
well, the warning let me figure out what's going on.
<bronson>
but thanks to Rails autoloading, the solution was seriously hard to figure out.
Coldblackice has joined #ruby
jtperreault has quit [Ping timeout: 245 seconds]
<bronson>
and until we saw the warning in the logs, we were getting intermittent failures.
tildes has quit [Read error: Connection reset by peer]
nirix has joined #ruby
marr has quit [Ping timeout: 245 seconds]
tildes has joined #ruby
<bronson>
Ox0dea: any idea why that feature exists? What's the use case?
<shevy>
too much magic is not good :)
kaleido has joined #ruby
<bronson>
absolutely true.
<bronson>
Let's just say that when I described this bug to some interested people, their eyes bugged out.
mickey_mouse_2 has quit [Ping timeout: 250 seconds]
<bronson>
"Ruby does WHAT?"
<bronson>
And I couldn't tell them why Ruby does this.
<shevy>
if you have a toplevel File, and a File inside a namespace, then if you use File inside your inner namespace, it will first resolve to the nearest File; so you need to scope to the outer File via ::File - at the least this is how I remember things
<Ox0dea>
bronson: It's really just a byproduct of how constant resolution works.
joonty has quit [Ping timeout: 245 seconds]
konsolebox has joined #ruby
<bronson>
shevy: it's the opposite. If I define "Bronson::Hash", I'm living on borrowed time.
<bronson>
one day Ruby will interpret Bronson::Hash as ::Hash and everything will break.
marxarelli is now known as marxarelli|afk
<bronson>
Apparently I need to be damend careful to never define a class the same as a root-level one.
<shevy>
well you specified where it resides there
<shevy>
ah
<shevy>
you mean something like:
<shevy>
module Foo; class Foo
<shevy>
yeah that can be fun :)
<bronson>
shevy: no I mean module Foo; class File; end
<bronson>
Ox0dea: right, we're saying the same thing so far.
blt has quit [Ping timeout: 264 seconds]
d10n-work has quit [Quit: Connection closed for inactivity]
<shevy>
so you both essentially just agree with one another
<Ox0dea>
bronson: No. Classes are not "specialized modules" in Ruby; they *are* Modules.
yqt has quit [Ping timeout: 276 seconds]
bruce_lee has quit [Read error: Connection reset by peer]
<bronson>
ok, you're right.
<Ox0dea>
bronson: So then Hash == Object::Hash is okay now, right?
swills has joined #ruby
nettoweb has joined #ruby
<bronson>
Right, I follow. Hash == Object::Hash == (anything that inherits from object)::Hash
<Ox0dea>
Yay! <3
<bronson>
still, yuck.
<Ox0dea>
How would you fix it?
<bronson>
thinking... not sure yet. but thanks for explaining the issue.
<Ox0dea>
My pleasure. :)
juanfra has joined #ruby
shock_one has joined #ruby
william3 has joined #ruby
william3 has quit [Remote host closed the connection]
e4xit_ has joined #ruby
hogetaro has joined #ruby
Moblin has joined #ruby
mkosaki_ has joined #ruby
shock_one has quit [Ping timeout: 264 seconds]
Jardayn has quit [Quit: Leaving]
blackgoat_ has joined #ruby
Marsjan has joined #ruby
DLSteve_ has joined #ruby
benlieb has quit [Quit: benlieb]
konsolebox has quit [Ping timeout: 250 seconds]
AustinIncognito has joined #ruby
nullFxn_ has joined #ruby
shaman42 has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
rAy has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
qpls_ has joined #ruby
M-Techni1 has joined #ruby
tildes has quit [Read error: Connection reset by peer]
rAy is now known as Guest96296
tildes has joined #ruby
dexter-tzu has joined #ruby
AciD` has left #ruby ["Oh look, a shiny object !"]
s00pcan has quit [Remote host closed the connection]
j2k_ has joined #ruby
ropeney_ has joined #ruby
hfp_ has joined #ruby
Ebok has quit [*.net *.split]
DLSteve has quit [*.net *.split]
Guest56277 has quit [*.net *.split]
ropeney has quit [*.net *.split]
marsjaninzmarsa has quit [*.net *.split]
jsvgoncalves has quit [*.net *.split]
johnnyt has quit [*.net *.split]
Spleeze has quit [*.net *.split]
hfp has quit [*.net *.split]
blackgoat has quit [*.net *.split]
shaman42_ has quit [*.net *.split]
hogetaro_ has quit [*.net *.split]
amorbix has quit [*.net *.split]
nullFxn has quit [*.net *.split]
braincra- has quit [*.net *.split]
qpls has quit [*.net *.split]
armyriad has quit [*.net *.split]
M-Technic has quit [*.net *.split]
whiteline has quit [*.net *.split]
e4xit has quit [*.net *.split]
j2k has quit [*.net *.split]
bluntman has quit [*.net *.split]
AustinMatherne has quit [*.net *.split]
mkosaki has quit [*.net *.split]
e4xit_ is now known as e4xit
Marsjan is now known as marsjaninzmarsa
hfp_ is now known as hfp
braincrash has joined #ruby
SpleezeDos has joined #ruby
armyriad has joined #ruby
azure32 has quit [Remote host closed the connection]
s00pcan_ has quit [Ping timeout: 245 seconds]
dexter-tzu has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
p1k has joined #ruby
DLSteve_ has quit [Read error: Connection reset by peer]
tildes has quit [Ping timeout: 248 seconds]
jzigmund has quit [Ping timeout: 240 seconds]
ixti has quit [Quit: WeeChat 1.4]
jgt4 has quit [Ping timeout: 245 seconds]
whiteline has joined #ruby
jsvgoncalves has joined #ruby
stevemackinnon has quit [Remote host closed the connection]
dstarh has joined #ruby
amorbix has joined #ruby
bluntman has joined #ruby
s00pcan has joined #ruby
blackmesa has joined #ruby
DLSteve has joined #ruby
dstarh has quit [Read error: Connection reset by peer]
johnnyt has joined #ruby
jgt4 has joined #ruby
arescorpio has joined #ruby
konsolebox has joined #ruby
<bronson>
Ox0dea: how about, instead of printing the warning, raising a "toplevel constant Thread referenced by String::Thread" error?
<bronson>
certainly that's a backward incompatible change, only for 3.0
s00pcan_ has joined #ruby
<bronson>
I can't think of a reason anyone would intentionally use that feature.
raeoks has joined #ruby
CrazyEddy has joined #ruby
Dimik has joined #ruby
sneakerhax has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
karapetyan has joined #ruby
s00pcan_ has quit [Ping timeout: 260 seconds]
s00pcan has quit [Read error: Connection reset by peer]
joonty has joined #ruby
s00pcan has joined #ruby
s00pcan has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
Guest96296 has quit [Remote host closed the connection]
stevemackinnon has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dexter-tzu has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
hornairs has joined #ruby
nofxx has joined #ruby
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruby-lang600 has quit [Ping timeout: 252 seconds]
idefine has joined #ruby
joonty has quit [Ping timeout: 272 seconds]
raeoks has joined #ruby
CrazyEddy has quit [Ping timeout: 252 seconds]
FooMunki has quit [Quit: FooMunki]
nunchuck has quit [Ping timeout: 252 seconds]
<raz>
foo(bar, batz) ... is there a way for the method 'foo' to determine the variable names (bar and batz) that were used in it's parameters? (not the values, the names!)
<shevy>
raz hmm I think no
<shevy>
or wait
<raz>
i want to write a logger-method that will turn the above into output such as 'bar=value_of_bar batz=value_of_batz'
nunchuck has joined #ruby
<bronson>
yea, that would be handy. hope you find it.
<Ox0dea>
Another approach would be to use https://github.com/banister/binding_of_caller to get the actual values, but you'd still need to parse the call site to determine what identifiers were passed as arguments to your method.
<raz>
yea that's a bit much magic maybe...
resin has joined #ruby
<Ox0dea>
Definitely.
<raz>
sigh.. then again these fugly log lines make up like 30% of my code... { foo: foo, bar: bar, ... }
chouhoul_ has joined #ruby
<Ox0dea>
¯\_(ツ)_/¯
<raz>
it's like ruby doesn't care at all for all the love i put into my variable naming
<arup_r>
I am using SimpleDelagator as you see here https://gist.github.com/aruprakshit/8083993f15451aa56669 .. Now it works well. I want to know, if I want to send some params with GlobalGroup.new(@site, params). Is it possible?
SOLDIERz has joined #ruby
AnonRecluse13 has joined #ruby
gix has quit [Ping timeout: 240 seconds]
RegulationD has quit [Ping timeout: 260 seconds]
the_drow has joined #ruby
mic_e has joined #ruby
pdoherty has quit [Ping timeout: 264 seconds]
ayonkhan has joined #ruby
karapetyan has joined #ruby
learning has quit []
krzkrzkrz has quit [Ping timeout: 240 seconds]
gix has joined #ruby
joonty has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
znz_jp has quit [Quit: kill -QUIT $$]
karapetyan has quit [Ping timeout: 245 seconds]
mic_e has quit [Ping timeout: 248 seconds]
ejnahc has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joonty has quit [Ping timeout: 248 seconds]
seitensei has joined #ruby
<silverdust>
How can I call functions in an array [:fn1, :fn2]
<silverdust>
I have to loop through the array and pass an argument to each function
<silverdust>
like if x =
<silverdust>
_
<arup_r>
silverdust: didn't get you
<silverdust>
I tried x.each { x(5) }
<silverdust>
arup_r: I created 2 functions and kept their symbols in an array
cb_ has joined #ruby
cb_ has joined #ruby
<silverdust>
now I want to be able to loop through that array and call each function on an operad
cb_ has quit [Client Quit]
<silverdust>
*operand
cb_ has joined #ruby
cb_ has quit [Changing host]
cb_ has joined #ruby
baweaver has joined #ruby
<arup_r>
ok.. use like
<arup_r>
array.each { |f| public_send(f, 1) }
roshanavand has joined #ruby
bronson has joined #ruby
<arup_r>
assuming the place where you are iterating the array has access to `self` of which class those methods are defined
kies^ has joined #ruby
ledestin has joined #ruby
ejnahc has quit [Quit: leaving]
<arup_r>
so self is implicit in my example.. if that's not the case you need to mention the actual object
znz_jp has joined #ruby
adgtl has joined #ruby
<silverdust>
This is a simple ruby script not in any OOP concept. That returns the array of the symbols back to me
adgtl has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Ox0dea>
You can't escape the OOP in Ruby.
<arup_r>
silverdust: use `.map`
budhram has joined #ruby
roshanavand has quit [Ping timeout: 245 seconds]
bronson has quit [Ping timeout: 256 seconds]
Jet4Fire has joined #ruby
<silverdust>
what do I call in the map? still public_send?
raeoks has joined #ruby
<silverdust>
oh it works
krzkrzkrz has joined #ruby
hornairs has quit [Quit: hornairs]
<silverdust>
not exactly the way I want though
ayonkhan has quit [Ping timeout: 250 seconds]
p1k has joined #ruby
<silverdust>
I'd rather it's not a map as I need a single end result not an array of results from the functions
celly has joined #ruby
agent_white has joined #ruby
andrew_ has quit [Remote host closed the connection]
<budhram>
hello folks, any better ways to extract docstring from this code? https://goo.gl/LwzBfU
rgb-one has quit [Read error: Connection reset by peer]
<budhram>
how about extracting docstrings as methods into separate module?
azure32 has joined #ruby
<budhram>
appreciate suggestions
arup_r has quit [Remote host closed the connection]
p1k has quit [Quit: WeeChat 1.4]
dfinninger has joined #ruby
darkf_ has joined #ruby
<agent_white>
Evenin'
pawnbox has quit [Remote host closed the connection]
aces1up has joined #ruby
<aces1up>
how would i .send += to a variable that is a string?
shock_one has joined #ruby
<baweaver>
budhram: clarify that
<Ox0dea>
>> s = 'foo'; s.send :<<, 'bar'; s # aces1up
<ruby[bot]>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
ayonkhan has joined #ruby
<budhram>
let me clarify it
<aces1up>
baweaver look cool
y2mq37 has quit [Ping timeout: 260 seconds]
darkf has quit [Ping timeout: 260 seconds]
vdamewood has quit [Quit: Life beckons.]
<aces1up>
baweaver what if i have object with variable that i want to increment from string?
<baweaver>
aces1up: put your code in a gist, and clarify what it is you're doing. I have a feeling there's a much better way.
<baweaver>
?gist
<ruby[bot]>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<baweaver>
and playing 20 questions to get there does neither of us any good
<aces1up>
baweaver now sure just check the git i sent
<aces1up>
epitron sweet
<aces1up>
thats all i needed.
<baweaver>
...
<epitron>
You need more than that
<epitron>
This is a bad way to do whatever you're doing
<epitron>
But this will work and won't require eval
<epitron>
You're probably injecting a security hole
<aces1up>
I mean I can hard code a method for each col_var for incrementing it.
<aces1up>
this is a custom script no one is accessing it.
<epitron>
Ah
pawnbox has joined #ruby
<epitron>
Well, hope it works out
<aces1up>
just simple thing to do some logging to a dbase.
<epitron>
AR::Objects \o/
<aces1up>
just i have many counter variables. I want to keep it DRY and not be passing around the logging AR_obj to all my different classes, just building a singleton class that i can call from all other classes to increment various counters during processing and save at end of processing run.
Gnut has joined #ruby
<baweaver>
activerecord has update_attributes
<aces1up>
baweaver yes.. but that hits the dbase each update.
<baweaver>
transaction
<aces1up>
baweaver i just want to run all the processing, which will update the ar_obj in memory the save it to dbase at the end.
<baweaver>
like a transaction
<aces1up>
baweaver i will look up transactions have never used them b4.
<baweaver>
this is why we say we need the entire problem
<aces1up>
as i do not want to update a simple counter each time to dbase..
<aces1up>
so just use the dbase_obj as a container for all my processing counters.. then just save it at the end.
<baweaver>
well, at this point I can't really help you without seeing the actual code
wethu has quit [Quit: This computer has gone to sleep]
BTRE has quit [Ping timeout: 250 seconds]
dseitz has joined #ruby
pawnbox has quit [Remote host closed the connection]
connor_goodwolf has joined #ruby
radgeRayden has joined #ruby
infra-red has joined #ruby
SOLDIERz has quit [Ping timeout: 240 seconds]
infra-re_ has joined #ruby
blackgoat_ has quit [Ping timeout: 248 seconds]
joonty has joined #ruby
x77686d has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
avahey has quit [Quit: Connection closed for inactivity]
dionysus69 has joined #ruby
infra-red has quit [Ping timeout: 240 seconds]
adgtl has joined #ruby
joonty has quit [Ping timeout: 264 seconds]
arlek has joined #ruby
aces1up has quit []
arup_r has joined #ruby
freerobby has quit [Quit: Leaving.]
BTRE has joined #ruby
Channel6 has quit [Quit: Leaving]
peterevjan has joined #ruby
fedexo has joined #ruby
fedexo_ has joined #ruby
cb_ has quit [Remote host closed the connection]
karmatr0n has joined #ruby
radgeRayden has quit [Quit: Leaving]
infra-re_ has quit [Remote host closed the connection]
peterevjan has quit []
celly has quit [Remote host closed the connection]
karmatr0n has quit [Ping timeout: 240 seconds]
infra-red has joined #ruby
shock_one has joined #ruby
speakingcode has quit [Ping timeout: 276 seconds]
ss_much has quit [Quit: Connection closed for inactivity]
speakingcode has joined #ruby
shock_one has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
_djbkd has quit [Quit: My people need me...]
solocshaw has quit [Ping timeout: 250 seconds]
solocshaw has joined #ruby
infra-red has quit [Remote host closed the connection]
infra-red has joined #ruby
lurch_ has joined #ruby
cb_ has joined #ruby
kknight has joined #ruby
karapetyan has joined #ruby
infra-red has quit [Remote host closed the connection]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dopie has quit [Quit: Lost terminal]
mondok has joined #ruby
mhoungbo has quit [Ping timeout: 240 seconds]
budhram has quit [Ping timeout: 256 seconds]
cb_ has quit [Remote host closed the connection]
arlek has quit [Ping timeout: 256 seconds]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
joonty has joined #ruby
aryaching has joined #ruby
<x77686d>
Anybody here know what version of Ruby comes installed on OS X El Capitan?
techtomas has joined #ruby
Guest72594 has quit [Remote host closed the connection]
arthropododo has quit [Quit: Leaving]
lewis1711 has joined #ruby
joonty has quit [Ping timeout: 256 seconds]
UtkarshRay has quit [Remote host closed the connection]
devbug has quit [Read error: Connection reset by peer]
<havenwood>
x77686d: 2.0.0p645
<x77686d>
Thanks!
ta has quit [Remote host closed the connection]
arlek has joined #ruby
lewis1711 has left #ruby ["Ex-Chat"]
dexter-tzu has quit [Ping timeout: 250 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
rAy has joined #ruby
rAy is now known as Guest87085
perrier_ has joined #ruby
aphprentice_ is now known as aphprentice
saneax_AFK is now known as saneax
norc has joined #ruby
kknight has quit [Quit: Leaving]
devbug has joined #ruby
krz has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Ping timeout: 250 seconds]
krz has joined #ruby
JDiPierro has joined #ruby
Guest87085 has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
dexter-tzu has joined #ruby
x77686d has quit [Quit: x77686d]
solars has joined #ruby
JDiPierro has quit [Ping timeout: 272 seconds]
infra-red has joined #ruby
kfpratt has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
infra-re_ has joined #ruby
scepticulous has joined #ruby
yardenbar has joined #ruby
djbkd_ has joined #ruby
adgtl_ has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
infra-red has quit [Ping timeout: 276 seconds]
cb_ has joined #ruby
adgtl has quit [Ping timeout: 264 seconds]
fedexo has quit [Remote host closed the connection]
dubek has joined #ruby
azure32 has quit [Ping timeout: 240 seconds]
yarden_ has joined #ruby
yardenbar has quit [Quit: Leaving]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
yarden_ has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
yardenbar has joined #ruby
kknight has joined #ruby
azure32 has joined #ruby
karapetyan has quit [Remote host closed the connection]
cb_ has quit [Remote host closed the connection]
arlek has quit [Ping timeout: 252 seconds]
oncall-pokemon has quit [Quit: Connection closed for inactivity]
aganov has joined #ruby
mhoungbo has joined #ruby
djbkd_ has quit []
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has joined #ruby
roshanavand has joined #ruby
atomical has joined #ruby
Kryptonical has quit [Read error: Connection reset by peer]
SOLDIERz has joined #ruby
benlieb has quit [Quit: benlieb]
roshanavand has quit [Ping timeout: 276 seconds]
omninonsense is now known as [spoiler]
Kryptonical has joined #ruby
william3 has joined #ruby
bigkevmcd has joined #ruby
LoneHerm_ has joined #ruby
william3 has quit [Remote host closed the connection]
atomical_ has joined #ruby
joonty has joined #ruby
firstdayonthejob has joined #ruby
adgtl_ has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 256 seconds]
techtomas has quit [Quit: Bye]
atomical_ has quit [Client Quit]
joonty has quit [Ping timeout: 240 seconds]
anisha has joined #ruby
ur5us has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
rodfersou has joined #ruby
jas02 has joined #ruby
wald0 has joined #ruby
toadier has quit [Ping timeout: 272 seconds]
bronson has joined #ruby
aryaching has joined #ruby
symm- has joined #ruby
Gnut has quit [Ping timeout: 245 seconds]
wald0 has quit [Client Quit]
ta has joined #ruby
agent_white has quit [Quit: brb]
benlieb has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
lubekpl has joined #ruby
william3 has joined #ruby
seitensei has quit [Quit: "For a good time, try: 'curl -L http://bit.ly/10hA8iC | bash' ;)"]
stevemackinnon has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
andrew_ has joined #ruby
krz has quit [Read error: Connection reset by peer]
LoneHerm_ has quit [Remote host closed the connection]
infra-red has joined #ruby
krz has joined #ruby
Macaveli has joined #ruby
atmosx has joined #ruby
chouhoulis has joined #ruby
atmosx has quit [Client Quit]
atmosx has joined #ruby
andrew_ has quit [Ping timeout: 252 seconds]
infra-re_ has quit [Ping timeout: 240 seconds]
floror has quit [Quit: floror]
dfockler has quit [Ping timeout: 260 seconds]
shock_one has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
bhorn1|away has joined #ruby
bhorn1|away is now known as bhorn1
aryaching has quit []
shock_one has quit [Ping timeout: 250 seconds]
joonty has joined #ruby
aufi has joined #ruby
the_drow has joined #ruby
the_drow has quit [Client Quit]
Spami has joined #ruby
konsolebox has joined #ruby
resin has quit [Quit: Lost terminal]
symm- has quit [Ping timeout: 260 seconds]
blaxter has joined #ruby
karapetyan has joined #ruby
SkepBrain has joined #ruby
ropeney_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang666>
Hi guys, I'm using Ruby on Rails with rack and I'm looking for a method to upload files which will be directly written to memory not first to a tempfile
<ruby-lang666>
has anyone experience with accomplishing this?
<ddv>
ruby-lang666: #rubyonrails
<ruby-lang666>
oke thanks
rodfersou has quit [Quit: leaving]
ruby-lang666 has quit [Client Quit]
adgtl has quit [Ping timeout: 245 seconds]
blackgoat_ has quit [Quit: WeeChat 1.3]
chouhoulis has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 276 seconds]
aufi has quit [Ping timeout: 252 seconds]
Napear has quit [Quit: leaving]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
adgtl has joined #ruby
Ebok has joined #ruby
Shaboum has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ziyadb has quit [Quit: Connection closed for inactivity]
adgtl has quit [Remote host closed the connection]
gentlemanlike has quit [Ping timeout: 245 seconds]
dlitvak_ has joined #ruby
raeoks has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
Guest63222 has quit [Remote host closed the connection]
rAy has joined #ruby
rAy is now known as Guest88631
dlitvak has quit [Ping timeout: 248 seconds]
gentlemanlike has joined #ruby
roshanavand has joined #ruby
Guest88631 has quit [Ping timeout: 276 seconds]
karapetyan has quit [Remote host closed the connection]
shredding has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
roshanavand has quit [Ping timeout: 248 seconds]
blaxter has quit [Ping timeout: 240 seconds]
<adaedra>
Ruby on Rails with Rack? There's Ruby on Rails without Rack?
<shevy>
oldschool rails!
sgambino has joined #ruby
dlitvak has joined #ruby
johnmilton has joined #ruby
binaryplease has quit [Quit: WeeChat 1.4]
RegulationD has joined #ruby
allcentury has joined #ruby
dlitvak_ has quit [Ping timeout: 240 seconds]
binaryplease has joined #ruby
kith_ has quit [Quit: kith_]
aspiers_ is now known as aspiers
RegulationD has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
aufi has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
<kknight>
still it shows same older version but when i type ruby -v it gives older version
<shevy>
kknight you should find out where the two bin/ruby are at; I assume "ruby -v" finds the one at /usr/bin/ruby right? also have a look at echo $PATH
<shevy>
kknight quite a crazy path you got there! /home/ankit/.rvm/gems/ruby-2.2.1/bin: is the one with your new ruby? you can also provide the absolute path such as... "/home/ankit/.rvm/gems/ruby-2.2.1/bin/ruby -v"
Xeago has quit [Remote host closed the connection]
s00pcan has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
s00pcan has joined #ruby
s00pcan has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
s00pcan has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
rizenine has joined #ruby
mauricio has quit [Remote host closed the connection]
swills has quit [Ping timeout: 245 seconds]
kknight has quit [Ping timeout: 260 seconds]
<KHEN>
ddv you have abilities
krzkrzkrz has joined #ruby
<KHEN>
this rails takes some time to install :s
Timba-as has joined #ruby
jzigmund has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
Safi has quit [Ping timeout: 245 seconds]
s00pcan_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
mlehrer has joined #ruby
william3 has quit [Remote host closed the connection]
jzigmund has quit [Client Quit]
jzigmund has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
patchedmonkey has joined #ruby
rbennacer has joined #ruby
s00pcan__ has joined #ruby
s00pcan has quit [Read error: Connection reset by peer]
william3 has joined #ruby
mondok has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 240 seconds]
euphoriaa has joined #ruby
rbennacer has quit [Ping timeout: 252 seconds]
silicio has joined #ruby
stannard has joined #ruby
silicio has quit [Remote host closed the connection]
s00pcan has joined #ruby
celly has joined #ruby
s00pcan__ has quit [Read error: Connection reset by peer]
Shaboum has quit [Quit: WeeChat 1.4]
reassign has joined #ruby
s00pcan has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
moeabdol has joined #ruby
celly has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 245 seconds]
antoszka has left #ruby ["+++ killed by SIGSEGV +++"]
freerobby has joined #ruby
Guest40514 has quit [Remote host closed the connection]
goodcodeguy has joined #ruby
goodcodeguy has quit [Client Quit]
tvw has quit []
allcentury has quit [Ping timeout: 272 seconds]
jgpawletko has joined #ruby
tuelz has quit [Ping timeout: 264 seconds]
ramortegui has joined #ruby
jeanlinux has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
pandaant has quit [Remote host closed the connection]
atomical has joined #ruby
Pattrico has joined #ruby
floror has joined #ruby
KHEN has quit [Ping timeout: 264 seconds]
Ebok has joined #ruby
johnmilton has quit [Remote host closed the connection]
s00pcan has quit [Ping timeout: 245 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
s00pcan has joined #ruby
troulouliou_div2 has joined #ruby
dmitch has joined #ruby
saneax is now known as saneax_AFK
Ebok has quit [Client Quit]
freerobby has quit [Quit: Leaving.]
baweaver has joined #ruby
berserk_ren has quit [Ping timeout: 276 seconds]
the_drow has joined #ruby
aryaching has quit [Read error: No route to host]
JDiPierro has joined #ruby
ropeney has joined #ruby
cdg has joined #ruby
allcentury has joined #ruby
chouhoulis has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
aryaching has joined #ruby
hamed_r has quit [Read error: Connection reset by peer]
ropeney has quit [Client Quit]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<chridal>
In that Gist in Deploy.rake line 8 I want to call that exports function which really belongs to SSHKit and needs to be done in the block in Sparrow.rb line 12
M-Kodo has joined #ruby
<chridal>
When I yield that block in there shouldn't that work? Sort of like execute was being called from that context? What am I misunderstanding
mary5030 has joined #ruby
pihpah has quit [Ping timeout: 248 seconds]
pihpah has joined #ruby
reassign has joined #ruby
ready2 has quit [Ping timeout: 245 seconds]
crowell has quit [Ping timeout: 240 seconds]
RegulationD has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
crowell has joined #ruby
<ddv>
chridal: never heard of capistrano?
<ddv>
you are reinventing the wheel
<chridal>
ddv: Yea, that's how I found out about SSHKit.
x77686d has quit [Ping timeout: 250 seconds]
<chridal>
The thing about Capistrano though is that I feel like it was way too much stuff... All the plugins, the source code etc.
<chridal>
I'm deploying Docker images on EC2 hosts
the_drow has quit [Quit: This computer has gone to sleep]
<chridal>
So I wanted to create something light that I could easily customize and make my own.
<ddv>
chridal: ok
<ddv>
chridal: for Docker I tend to use my own script also
<chridal>
ddv: But how can I get that block to execute properly?
dionysus69 has quit [Ping timeout: 240 seconds]
<ddv>
:)
<chridal>
I want to be able to extract that on server call so that I won't have to write it for every single function in my Rake task
sgambino has joined #ruby
x77686d has joined #ruby
<chridal>
in my Rake file I meant.
dlitvak_ has quit [Ping timeout: 276 seconds]
karapetyan has joined #ruby
<ddv>
lol @ apeiros
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeanlinux has joined #ruby
<chridal>
:-D
RegulationD has quit [Ping timeout: 260 seconds]
<chridal>
Right now I am SSHing into all our EC2 instances and doing docker pull, docker stop and docker run manually which isn't great.
dfinninger has joined #ruby
<apeiros>
ddv: it's on my business cards: reinventer of all the wheels
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<chridal>
I just need to automate that and I prefer to not do it in shell script
valera has quit [Ping timeout: 250 seconds]
<chridal>
I was hoping that I could sort of build some niceties into it as well over time such as fetching all the EC2 instances within a group etc.
ElFerna has quit [Ping timeout: 276 seconds]
codecop has joined #ruby
<chridal>
I had a look at Centurion but that uses the Docker HTTP API which requires me to switch that over to HTTP instead of using a UNIX socket which I am not 100% comfortable with.
<chridal>
Anyhow, I need some way to execute that function within that block. Any ideas?
chouhoulis has joined #ruby
jas02 has quit [Quit: jas02]
kknight has joined #ruby
dlitvak has joined #ruby
rdark has quit [Ping timeout: 245 seconds]
moeabdol1 has joined #ruby
the_drow has joined #ruby
sdothum has joined #ruby
fmcgeough has joined #ruby
Emmanuel_Chanel has joined #ruby
chouhoulis has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 248 seconds]
kies^ has joined #ruby
dmitch has joined #ruby
chouhoulis has joined #ruby
floror has joined #ruby
cb_ has quit [Remote host closed the connection]
the_drow has quit [Quit: Leaving]
VeryBewitching has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
ready has joined #ruby
reassign has quit [Ping timeout: 240 seconds]
M-mistake has joined #ruby
xMopxShell has quit [Ping timeout: 252 seconds]
yosafbridge has quit [Ping timeout: 250 seconds]
<djellemah>
Bish: I know someone who put procs on a Queue. It wasn't for scheduling, and I don't know how many. He seemed to be quite pleased with it.
polishdub has joined #ruby
the_drow has joined #ruby
karapetyan has quit [Remote host closed the connection]
Canar has quit [Ping timeout: 240 seconds]
moeabdol2 has joined #ruby
karapetyan has joined #ruby
diego_k has quit [Ping timeout: 250 seconds]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
moeabdol1 has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
CustosLimen has quit [Ping timeout: 250 seconds]
raimumizu has quit [Ping timeout: 276 seconds]
snapcase has quit [Ping timeout: 252 seconds]
<VeryBewitching>
G'day folks.
connor_goodwolf has quit [Ping timeout: 250 seconds]
sami_ has quit [Ping timeout: 264 seconds]
Emmanuel_Chanel has quit [Max SendQ exceeded]
tommylommykins has quit [Ping timeout: 264 seconds]
Emmanuel_Chanel has joined #ruby
M-shine has quit [Quit: node-irc says goodbye]
connor_goodwolf has joined #ruby
patteh has quit [Ping timeout: 240 seconds]
edulix has quit [Ping timeout: 256 seconds]
deavidsedice has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
sjums has quit [Ping timeout: 240 seconds]
kies^ has quit [Ping timeout: 276 seconds]
dyce has quit [Ping timeout: 276 seconds]
M-mistake has quit [Quit: node-irc says goodbye]
tabakhase has quit [Ping timeout: 250 seconds]
matti has quit [Ping timeout: 240 seconds]
bhorn1 has quit [Ping timeout: 248 seconds]
oz has quit [Ping timeout: 272 seconds]
ex0ns has quit [Ping timeout: 272 seconds]
dtordable has quit [Ping timeout: 245 seconds]
eregon has quit [Ping timeout: 245 seconds]
ljames has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 245 seconds]
eregon has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
g3funk is now known as braidn
kimegede has quit [Quit: Leaving...]
thumpba has joined #ruby
Canar has joined #ruby
infra-red has quit [Remote host closed the connection]
yardenbar has quit [Ping timeout: 250 seconds]
devster31 has joined #ruby
Mr_Pancake has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
diegok has joined #ruby
decoponio has joined #ruby
droptone has joined #ruby
AnonRecluse13 has quit [Remote host closed the connection]
huyderman has quit [Remote host closed the connection]
oz has joined #ruby
reassign has joined #ruby
Roa has joined #ruby
edulix has joined #ruby
atomical_ has joined #ruby
AnonRecluse13 has joined #ruby
atomical has quit [Ping timeout: 256 seconds]
sami has joined #ruby
raimumizu has joined #ruby
floror has quit [Quit: floror]
matti has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
thumpba has quit [Ping timeout: 252 seconds]
matti has quit [Changing host]
matti has joined #ruby
dlitvak_ has joined #ruby
thumpba_ has joined #ruby
the_drow has joined #ruby
sjums has joined #ruby
celly has joined #ruby
deavid has joined #ruby
the_drow has quit [Client Quit]
snapcase has joined #ruby
ElFerna has joined #ruby
ex0ns has joined #ruby
patteh has joined #ruby
dyce has joined #ruby
xMopxShell has joined #ruby
<havenwood>
g'morn
CustosLimen has joined #ruby
aryaching_ has quit [Ping timeout: 276 seconds]
sandstrom has joined #ruby
tommylommykins has joined #ruby
dmitch has joined #ruby
I has joined #ruby
olblak has joined #ruby
cb_ has joined #ruby
cb_ has quit [Changing host]
cb_ has joined #ruby
dlitvak has quit [Ping timeout: 245 seconds]
tabakhase has joined #ruby
I is now known as Guest32200
Guest32200 has quit [Client Quit]
valera has joined #ruby
konsolebox has joined #ruby
dopie has joined #ruby
hays_ has joined #ruby
patronus has joined #ruby
baweaver has joined #ruby
yosafbridge has joined #ruby
dtordable has joined #ruby
<hays_>
someone in here recommended celluloid.. is that person still around? Having trouble with the "supervise" method and #celluloid is crickets
snapcase has quit [Remote host closed the connection]
tommylom1ykins has joined #ruby
snapcase has joined #ruby
tommylommykins has quit [Read error: Connection reset by peer]
kies^ has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kknight has quit [Ping timeout: 256 seconds]
ElFerna has quit [Ping timeout: 252 seconds]
ta has quit [Remote host closed the connection]
v0n has joined #ruby
Jardayn has joined #ruby
aufi has quit [Quit: Konversation terminated!]
baweaver has quit [Ping timeout: 250 seconds]
floror has joined #ruby
aufi has joined #ruby
aufi has quit [Client Quit]
infinity_ has joined #ruby
reassign has quit [Ping timeout: 256 seconds]
binaryplease has quit [Ping timeout: 272 seconds]
darkxploit has joined #ruby
mist has joined #ruby
idefine has quit [Remote host closed the connection]
mhoungbo has quit [Ping timeout: 272 seconds]
tvon has quit [Quit: tvon]
Gnut has joined #ruby
lapide_viridi has joined #ruby
dlitvak has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
<shevy>
havenwood did you already bootstrap some coffee into your system
M-Kodo has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
<havenwood>
shevy: no I've been under the covers but... it's time!!
sandstrom has quit [Quit: My computer has gone to sleep.]
dlitvak_ has quit [Ping timeout: 252 seconds]
floror has quit [Quit: floror]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arashb has quit [Remote host closed the connection]
Azulinho has quit [Ping timeout: 252 seconds]
<hays_>
anyone here use Celluloid and know how the supervisor API works now
<darix>
hays_: maybe look at other celluloid users like sidekiq?
Sembei has quit [Ping timeout: 245 seconds]
<hays_>
darix: they don't seem to use it... also, I can't find anything in the codebase on their github, which makes me wonder if they are deriving it from somewhere else
sandstrom has joined #ruby
M-shine has joined #ruby
pawnbox has quit [Remote host closed the connection]
celly has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
davedev24 has quit [Remote host closed the connection]
cb_ has quit [Remote host closed the connection]
jgt4 has joined #ruby
tomchapin has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dfinninger has joined #ruby
chthon has joined #ruby
ropeney has joined #ruby
dlitvak_ has joined #ruby
blackmesa has joined #ruby
kknight has joined #ruby
silicio has quit [Read error: Connection reset by peer]
<hays_>
ah hA!
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
infinity_ has quit [Quit: Leaving]
<hays_>
I found it. ok. more specific question. What is going on with this? TestServer.supervise args: [8502]
dlitvak has quit [Ping timeout: 245 seconds]
kirillzh has joined #ruby
<hays_>
specifically what is an args: ? and how does it relate to the [8502] and the supervise method
pawnbox has joined #ruby
ropeney has quit [Client Quit]
Kryptonical has joined #ruby
M-Kodo has joined #ruby
chthon is now known as giannis
blackmesa has quit [Ping timeout: 240 seconds]
hashrocket has quit [Ping timeout: 250 seconds]
c355e3b has quit [Ping timeout: 252 seconds]
zipkid has quit [Ping timeout: 252 seconds]
giannis is now known as yannis
mostlybadfly has quit [Ping timeout: 240 seconds]
gmci has quit [Ping timeout: 240 seconds]
cstrahan has quit [Ping timeout: 240 seconds]
manveru has quit [Ping timeout: 250 seconds]
Lloyd has quit [Ping timeout: 250 seconds]
frankS2 has quit [Ping timeout: 250 seconds]
jlyndon has quit [Ping timeout: 250 seconds]
cbednarski has quit [Ping timeout: 250 seconds]
babblebre has quit [Ping timeout: 240 seconds]
<hays_>
maybe this is a basic ruby question, but having trouble finding out what to look up about it
howdoi has quit [Ping timeout: 252 seconds]
Cihan has quit [Ping timeout: 252 seconds]
jmhmccr has quit [Ping timeout: 252 seconds]
ponga has quit [Ping timeout: 240 seconds]
cardoni has quit [Ping timeout: 240 seconds]
jhill_ has quit [Ping timeout: 240 seconds]
Bugboy1028 has quit [Ping timeout: 250 seconds]
craysiii has quit [Ping timeout: 250 seconds]
bove has quit [Ping timeout: 250 seconds]
twodayslate has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
duckpuppy has quit [Ping timeout: 252 seconds]
x0f has quit [Ping timeout: 252 seconds]
ckrailo has quit [Ping timeout: 240 seconds]
mrsolo has quit [Ping timeout: 240 seconds]
sushii has quit [Ping timeout: 250 seconds]
acerna has quit [Ping timeout: 250 seconds]
jokester has quit [Ping timeout: 250 seconds]
weemsledeux has joined #ruby
kellabyte has quit [Ping timeout: 240 seconds]
rfv has quit [Ping timeout: 252 seconds]
glowcoil has quit [Ping timeout: 250 seconds]
ELLIOTTCABLE has quit [Ping timeout: 250 seconds]
ruurd has quit [Ping timeout: 250 seconds]
bttf has quit [Ping timeout: 250 seconds]
braderhart has quit [Ping timeout: 240 seconds]
lancetw has quit [Ping timeout: 240 seconds]
ziyadb has quit [Ping timeout: 252 seconds]
Didac has quit [Ping timeout: 260 seconds]
Kryptonic has quit [Ping timeout: 250 seconds]
hanmac1 has quit [Ping timeout: 250 seconds]
mark4 has quit [Ping timeout: 250 seconds]
ixti has joined #ruby
<ljarvis>
hays_: it could be written like this: supervise({ args: [8502] }) # args is a hash key
evidex has quit [Remote host closed the connection]
scepticulous has quit [Ping timeout: 250 seconds]
cbednarski has joined #ruby
jlyndon has joined #ruby
zipkid has joined #ruby
cardoni has joined #ruby
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cstrahan has joined #ruby
<hays_>
ljarvis: ahh. ok.. yeah. I still get confused about when parens are needed, etc
SCHAAP137 has quit [Remote host closed the connection]
jmhmccr has joined #ruby
c355e3b has joined #ruby
ysz has joined #ruby
<ljarvis>
hays_: they're rarely needed but required in some places. It's down to personal style
<ljarvis>
I'd prefer to have them required myself, but many people love them being optional
bove has joined #ruby
twodayslate has joined #ruby
mostlybadfly has joined #ruby
manveru has joined #ruby
idefine has joined #ruby
braderhart has joined #ruby
ponga has joined #ruby
<hays_>
clearly this is a pattern I should know.. where an object can be passed in some kind of hash
glowcoil has joined #ruby
jhill_ has joined #ruby
<hays_>
as an initialization object
<ljarvis>
yeah it's quite common, especially for configuration like your example
MiracleBlue__ has joined #ruby
howdoi has joined #ruby
Cihan has joined #ruby
kellabyte has joined #ruby
sushii has joined #ruby
chouhoulis has quit [Remote host closed the connection]
ckrailo has joined #ruby
acerna has joined #ruby
<ljarvis>
it's worth mentioning that it's actually not possible to tell if the supervise method takes a hash or expects named parameters (which ruby 2+ supports)
ziyadb has joined #ruby
rdark has joined #ruby
rfv has joined #ruby
<ljarvis>
(from your example) but it's probably a hash
Lloyd has joined #ruby
x0f has joined #ruby
shredding has quit [Ping timeout: 260 seconds]
gmci has joined #ruby
ysz has quit [Ping timeout: 240 seconds]
arthropododo has joined #ruby
Jardayn has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
Bugboy1028 has joined #ruby
baweaver has quit [Remote host closed the connection]
jeanlinux has quit [Remote host closed the connection]
Jardayn_two has joined #ruby
jeanlinux has joined #ruby
tvon has joined #ruby
Jardayn has quit [Ping timeout: 276 seconds]
ElFerna has joined #ruby
<shevy>
does anyone remember, [a-z] in a regex, I think there was some shortcut for that ... :alphanumeric ? or something like that (can be upcased too, I don't mind)
duckpuppy has joined #ruby
carella_ has quit [Read error: Connection timed out]
hashrocket has joined #ruby
[Butch] has joined #ruby
LuckyABA has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
<ljarvis>
huh?
<ljarvis>
i mean.. that's not really a shortcut
jokester has joined #ruby
carella has joined #ruby
adgtl has joined #ruby
<ljarvis>
but yeah it's :alnum:
babblebre has joined #ruby
<shevy>
aha, thanks
idefine has quit [Remote host closed the connection]
<ljarvis>
which is [A-Za-z0-9] iirc
mfb2 has quit [Read error: Connection reset by peer]
<DEA7TH>
In Scala, for mutable zero-argument methods, e.g. customer.destroy, it is conventional to call them with empty brackets: customer.destroy(). is this also the case for Ruby?
TomyLobo has joined #ruby
mjc__ has joined #ruby
<havenwood>
DEA7TH: nope
<djellemah>
hays_: in other words, when calling a method the () are optional and the {} denoting a hash are also optional.
mjc__ is now known as mic_
Jardayn_two has quit [Ping timeout: 276 seconds]
mic_ is now known as mjc_
dfinninger has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
jeanlinux has joined #ruby
dfinninger has joined #ruby
jeanlinux has quit [Remote host closed the connection]
<darix>
djellemah: but the () can be required to help the parser at times
jeanlinux has joined #ruby
M-shine has quit [Quit: node-irc says goodbye]
<djellemah>
darix: meth(:arg) == (meth :arg) :-O But that's not really helping the parser...
<darix>
djellemah: more things like: foo a: b {}
DaniG2k has joined #ruby
<darix>
because the {} can be a block or a hash and so on
kimegede has joined #ruby
M-mistake has quit [Quit: node-irc says goodbye]
<darix>
already had cases where i had to use the () to make it treat my stuff in {} as a block not as a hash
codecop has quit [Remote host closed the connection]
hanmac has joined #ruby
<djellemah>
or meth :arg, other_meth 1, 2
<darix>
yeah
<darix>
we had that thing here a few weeks ago
dlitvak_ has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ICantCook has joined #ruby
mfb2 has joined #ruby
Jardayn has joined #ruby
silicio has joined #ruby
quaristice has joined #ruby
amclain has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
Lloyd has quit []
lurch_ has quit [Quit: lurch_]
jeanlinux has quit [Ping timeout: 256 seconds]
Lloyd has joined #ruby
silicio has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 276 seconds]
jeanlinux has joined #ruby
joonty has quit [Ping timeout: 248 seconds]
celly has joined #ruby
stannard has joined #ruby
rakm has joined #ruby
godzillaenlacasa has quit [Quit: ZZZZZ....]
mary5030_ has joined #ruby
jgt4 has quit [Ping timeout: 260 seconds]
mary5030 has quit [Ping timeout: 248 seconds]
arlek has joined #ruby
mary5030_ has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
Snowy has quit [Remote host closed the connection]
mary5030 has joined #ruby
<Papierkorb>
Is there a gem or template which lets you quickly set up a non-rails ruby daemon/service, comparable to the rails Application class?
maletor has joined #ruby
x77686d has quit [Quit: x77686d]
agentmeerkat has joined #ruby
<apeiros>
not sure whether it fits your bill, but rack-server-pages maybe?
<Papierkorb>
With configuration files, logger set up, initializer scripts?
DaniG2k has quit [Quit: leaving]
<Papierkorb>
apeiros: Non-web too, just a daemon for anything but HTTP
duckpuppy has quit [Ping timeout: 240 seconds]
DmitryBochkarev has joined #ruby
goodcodeguy has joined #ruby
kirillzh has joined #ruby
<djellemah>
Papierkorb: I did a plain tcp server with puma once. IIRC. brb
duckpuppy has joined #ruby
<Papierkorb>
I built that myself for one of my services, and have been wondering if there's something for that already. The thing is pretty much modeled after rails configuration-wise (Even uses the rails-y 'config' gem), but is a XMPP bot
jgt4 has joined #ruby
kknight has quit [Remote host closed the connection]
dlitvak has joined #ruby
jeanlinux has quit [Remote host closed the connection]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kknight>
yes it works fr ruby -v
kirillzh has joined #ruby
<kknight>
for .rb file runing it apply same?
ElFerna has quit [Ping timeout: 240 seconds]
<havenwood>
kknight: For an interactive Ruby REPL try: irb
kirillzh has quit [Max SendQ exceeded]
roshanavand has joined #ruby
<havenwood>
kknight: To run a line of Ruby code: ruby -e "puts 'hi'"
<havenwood>
kknight: To run a Ruby file: ruby filename.rb
benlieb has quit [Ping timeout: 256 seconds]
arthurix has joined #ruby
kirillzh has joined #ruby
<havenwood>
kknight: Since you're doing Rails, follow the rest of your guide then head to #rubyonrails land.
mdw has joined #ruby
atomical_ has quit [Ping timeout: 256 seconds]
agentmeerkat has quit [Ping timeout: 240 seconds]
joonty has joined #ruby
kirillzh has quit [Client Quit]
atomical has joined #ruby
kirillzh has joined #ruby
roshanav_ has joined #ruby
arthurix_ has quit [Ping timeout: 272 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
idefine_ has joined #ruby
treehug88 has joined #ruby
idefine has quit [Ping timeout: 252 seconds]
speakingcode has quit [Ping timeout: 264 seconds]
cats has joined #ruby
joonty has quit [Ping timeout: 245 seconds]
roshanav_ has quit [Ping timeout: 250 seconds]
firstdayonthejob has joined #ruby
benlieb has joined #ruby
mhoungbo has joined #ruby
speakingcode has joined #ruby
guardian has quit [Ping timeout: 260 seconds]
bb010g has joined #ruby
valera has quit [Ping timeout: 248 seconds]
infra-red has joined #ruby
polysics has joined #ruby
_ht has joined #ruby
benlieb has quit [Ping timeout: 260 seconds]
intrigueD has joined #ruby
benlieb has joined #ruby
dmolina has quit [Quit: Leaving.]
quakephil has joined #ruby
godzillaenlacasa has quit [Quit: ZZZZZ....]
dmolina has joined #ruby
camillo has joined #ruby
Alak has quit [Quit: Leaving.]
Alak1 has joined #ruby
<quakephil>
Hi all. Ruby newb here. I'm making a lightweight API service, and have a working prototype with sinatra+thin, but then I heard about grape. Looking at it on github, and I'm not sure what I get with grape that I don't have without it, just with sinatra. Any thoughts?
<quakephil>
Is it just more opinion/framework, or is there functionality that grape has that sinatra doesn't somehow?
<eam>
I don't know if vim has a good way of passing in the secret -- worst case you can use expect to feed it into the terminal prompt
kknight has joined #ruby
<eam>
mildly terrible
diegoviola has joined #ruby
<benlieb>
eam: my idea is actually to set it in an env var. I have an app that has all "secrets" in env vars.
<lucasb>
vim --cmd 'set key=ohhai' encfile # <-- this works for opening
sandstrom has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
codecop has joined #ruby
momomomomo has joined #ruby
cats has quit [Quit: Meow.]
<benlieb>
eam: i'm considering a method for this and future apps where I just have an encrypted file I can keep in source control with all my sensitive data, and then only have to maintain one env var. Not sure how viable it is tho
joonty has joined #ruby
<eam>
benlieb: yeah if it'll read from env that's a good solution
<benlieb>
just seems simpler
<eam>
if you don't want the plaintext on disk you can probably popen it and read into memory too
<eam>
or worst case use a fifo
yqt has quit [Ping timeout: 264 seconds]
<eam>
be aware if you put the key into argv you're essentially sharing it with all local users on the system
<eam>
env should be OK though
<eam>
(provided you're careful)
PedramT has joined #ruby
<benlieb>
lucasb: how can ruby get the file contents from that command?
infra-red has joined #ruby
<eam>
benlieb: that's just the bit that sets the key (so it's not prompted)
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dotix has quit []
<eam>
but because it puts the secret in argv it's insecure
rakm has joined #ruby
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
azure32 has joined #ruby
pawnbox has quit [Remote host closed the connection]
infra-re_ has joined #ruby
<azure32>
good morning everyone
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
jgt4 has quit [Ping timeout: 248 seconds]
<floatingpoint>
is it a bad idea to use an initialize method as a driver for a program?
tvon has quit [Quit: tvon]
joonty has quit [Ping timeout: 272 seconds]
PedramT has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
arlek has quit [Ping timeout: 256 seconds]
panzi has quit [Quit: Konversation terminated!]
infra-red has quit [Ping timeout: 276 seconds]
goodcodeguy has joined #ruby
tvon has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
pawnbox has quit [Remote host closed the connection]
imperator has left #ruby ["Leaving"]
infra-re_ has quit []
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
kirun has joined #ruby
nofxx has joined #ruby
nettoweb has quit [Ping timeout: 272 seconds]
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blt_ has quit [Quit: WeeChat 1.3]
<shevy>
what kind of program?
baweaver has quit [Remote host closed the connection]
cats has joined #ruby
<floatingpoint>
a program that makes some directories and things like that
ElFerna has joined #ruby
sneakers has joined #ruby
rodfersou has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sneakers has quit [Quit: back later]
pawnbox has quit [Remote host closed the connection]
sneakers has joined #ruby
Cohedrin has joined #ruby
Dimik has joined #ruby
ohaibbq has quit [Quit: Leaving...]
acidrainfall has joined #ruby
sneakers has quit [Client Quit]
ElFerna has quit [Ping timeout: 240 seconds]
tvon has quit [Quit: tvon]
sneakers has joined #ruby
<shevy>
I usually call other methods from within def initialize
sgambino has joined #ruby
Macaveli has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
Macaveli has quit [Client Quit]
<shevy>
main point for initialize is to handle input/ARGV given to the respective class, via .new()
ElFerna has joined #ruby
SenpaiSilver has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
Macaveli has quit [Max SendQ exceeded]
sneakers has quit [Client Quit]
SenpaiSilver has joined #ruby
Macaveli has joined #ruby
dmolina has joined #ruby
sneakers has joined #ruby
idefine_ has quit [Remote host closed the connection]
sneakers has quit [Client Quit]
sneakers has joined #ruby
arlek has joined #ruby
sgambino has quit [Client Quit]
howdoi has quit [Quit: Connection closed for inactivity]
sneakers has quit [Client Quit]
<shevy>
you can also define #new for a module :)
sneakers has joined #ruby
chouhoul_ has joined #ruby
sneakers has left #ruby [#ruby]
sgambino has joined #ruby
guardian has joined #ruby
anisha has quit [Quit: Leaving]
cdg has quit [Remote host closed the connection]
sneakers has joined #ruby
sneakers has left #ruby [#ruby]
dfinninger has quit [Remote host closed the connection]
mfb2 has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
<azure32>
floatingpoint: I second what shevy said about calling other methods from initialize
zapata has joined #ruby
<floatingpoint>
yeah
<floatingpoint>
that's essentially what i'm doing
chouhoulis has quit [Ping timeout: 250 seconds]
synthroid has joined #ruby
dfinninger has joined #ruby
<floatingpoint>
although, i also might use this code as a package, where its methods could be called from other pieces of code
idefine has joined #ruby
<shevy>
well, Foo.new is a simply way to reuse it
<shevy>
Foo.new('args','here')
dotix has quit [Remote host closed the connection]
ur5us has joined #ruby
<shevy>
you can also define [] if you want to then you can omit the new :D Foo['args','here'] ... like Dir['*.rb']
dseitz has joined #ruby
<shevy>
I think the most important point is rather how you intend to use this in the code you write, if it is easy to use, easy to remember
<azure32>
then you might want to use a module instead of a class
jud has joined #ruby
dexter-tzu has quit [Ping timeout: 272 seconds]
d10n-work has joined #ruby
<azure32>
if you want to reuse just individual methods, that is
jmdade has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has quit [Read error: Connection reset by peer]
<azure32>
floatingpoint: from my experience, its generally considered good practice to put groups of related methods you want to reuse into a module. Then you can just call include MyModule wherever you want to and then Module.method etc etc
yashinbasement has joined #ruby
papercode has quit [Remote host closed the connection]
papercode has joined #ruby
aef has quit [Ping timeout: 240 seconds]
A124 has quit [Ping timeout: 276 seconds]
idefine has joined #ruby
Snowy has joined #ruby
lurch_ has joined #ruby
mjc_ has quit [Quit: Connection closed for inactivity]
<azure32>
floatingpoint: hope that helps
mfb2 has joined #ruby
infernix has joined #ruby
Sucks has quit [Read error: Connection reset by peer]
ss_much has quit [Quit: Connection closed for inactivity]
jeanlinux has quit [Read error: No route to host]
mdw has joined #ruby
Bloomer has quit [Remote host closed the connection]
papercode has quit [Remote host closed the connection]
papercode has joined #ruby
Coldblackice has joined #ruby
papercode has quit [Client Quit]
papercode has joined #ruby
asccigcc has joined #ruby
<floatingpoint>
yeah i just talked to another dev about it too
idefine has quit [Remote host closed the connection]
<floatingpoint>
probably just going to put the methods into a parent run() function
infernix has quit [Changing host]
infernix has joined #ruby
idefine has joined #ruby
<quakephil>
I have a working prototype with sinatra+thin, but then I heard about grape. Looking at it on github, and I'm not sure what I get with grape that I don't have without it, just with sinatra. Is it just more opinion/framework, or is there functionality that grape has that sinatra doesn't somehow?
malconis has quit [Read error: Connection reset by peer]
sneakers has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has joined #ruby
bronson has joined #ruby
dotix has joined #ruby
dotix has joined #ruby
theastrowolfe has quit [Quit: Leaving]
Zai00 has joined #ruby
nettoweb has joined #ruby
kirillzh_ has joined #ruby
ss_much has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
amorbix has quit [Ping timeout: 260 seconds]
ReK2 has quit [Remote host closed the connection]
A124 has joined #ruby
dotix has quit []
rAy has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
rAy is now known as Guest3368
joonty has joined #ruby
blackgoat has joined #ruby
yqt has joined #ruby
rodfersou has quit [Quit: leaving]
yqt has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
<Synthead>
"gem" installs binaries to ~/.gem/ruby/2.3.0/bin, but bundle installs them to ~/.gem/bin. How can I get bundle to install the binaries to ~/.gem/ruby/2.3.0/bin ?
aryaching has quit []
Xeago has joined #ruby
william3 has quit [Remote host closed the connection]
solars has quit [Ping timeout: 240 seconds]
doublemalt_ has joined #ruby
joonty has quit [Ping timeout: 264 seconds]
karapetyan has quit [Ping timeout: 245 seconds]
william3 has joined #ruby
amorbix has joined #ruby
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
dfinninger has quit [Remote host closed the connection]
DoubleMalt has quit [Ping timeout: 240 seconds]
ldnunes has quit [Quit: Leaving]
karapetyan has joined #ruby
dfinninger has joined #ruby
baweaver has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
karapetyan has quit [Ping timeout: 248 seconds]
arlek has quit [Read error: Connection reset by peer]
arlek has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
melter_ has joined #ruby
mickey_mouse_3 has quit [Quit: Leaving]
einarj has joined #ruby
spider-mario has joined #ruby
piotrj has joined #ruby
<quakephil>
Synthead: I'm thinking symlink, but there must be a better solution (I'm newb here)
<Synthead>
quakephil: yeah
lxsameer has joined #ruby
azure32 has quit [Ping timeout: 240 seconds]
<quakephil>
I don't even know if bundle _should_ install to the same place as gem, although I suppose why not
<Synthead>
quakephil: I did bundle config --global bin "$HOME/.gem/ruby/2.3.0/bin" but it seems to ignore it
<Synthead>
quakephil: bundle just manages gems, right?
JJM has joined #ruby
william3 has quit [Remote host closed the connection]
treehug88 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
frem has joined #ruby
yashinbasement has quit [Ping timeout: 264 seconds]
<shevy>
hmm bundle can also install from github projects
uxp_ has quit [Read error: Connection reset by peer]
<adaedra>
yep, bitbucket too.
piotrj has quit [Remote host closed the connection]
uxp has joined #ruby
<Synthead>
but they're still gems
<shevy>
gem is like a simple lego block; bundler is like minecraft :D
<adaedra>
You finally catch up with the times? :p
<shevy>
with bundler?
solars has joined #ruby
moshee has quit [Ping timeout: 240 seconds]
Guest3368 has quit [Remote host closed the connection]
<spk>
what is your output `gem env | grep EXE`
yqt has joined #ruby
<spk>
bundle should install on the `EXECUTABLE DIRECTORY`
piotrj has joined #ruby
x77686d has quit [Quit: x77686d]
<Synthead>
spk: /home/fred/.gem/bin
agentmeerkat has quit [Ping timeout: 276 seconds]
<Synthead>
spk: hmm, nice one
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<Synthead>
spk: so if my exec dir is ~/.gem/bin, why do binaries get installed to ~/.gem/ruby/2.3.0/bin via gem?
<Synthead>
spk: it looks like USER INSTALLATION DIRECTORY is set to this path
<Synthead>
is there a way to change that?
<spk>
this is strange
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<spk>
and `bundle config` ?
ElFerna has joined #ruby
godzillaenlacasa has quit [Quit: ZZZZZ....]
sergey_makagon has joined #ruby
<Synthead>
spk: no settings have been set for bundle
william3 has joined #ruby
<spk>
ok maybe you have environment setting that force ~/.gem/bin
<spk>
but I'm not sure
atomical_ has joined #ruby
Kruppe has joined #ruby
william3 has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
william3 has joined #ruby
mary5030_ has joined #ruby
intrigueD has quit [Remote host closed the connection]
bb010g has quit [Quit: Connection closed for inactivity]
<spk>
Synthead: do you have bindir option on ~/.gemrc ?
intrigueD has joined #ruby
intrigueD has quit [Changing host]
intrigueD has joined #ruby
intrigueD has quit [Remote host closed the connection]
idefine has joined #ruby
<spk>
`gem env | grep bindir`
atomical has quit [Ping timeout: 240 seconds]
mary5030 has quit [Ping timeout: 256 seconds]
godzillaenlacasa has joined #ruby
LoneHerm_ has joined #ruby
<Synthead>
spk: ah! I didn't, but my other host that seems to work has a .gemrc
baweaver has joined #ruby
dlitvak has joined #ruby
<Synthead>
gem: "--user-install" is in there
antgel has quit [Ping timeout: 248 seconds]
<Synthead>
bleh, it didn't seem to make a difference
piotrj has quit [Remote host closed the connection]
<spk>
cool
piotrj has joined #ruby
sandstrom has joined #ruby
baweaver has quit [Remote host closed the connection]
x77686d has joined #ruby
dfinninger has quit [Remote host closed the connection]
Cohedrin has joined #ruby
<Synthead>
ah fuck, I found out that bundle had installed things to /usr/bin on my good host
<Synthead>
I really hate this shit tbh
LoneHerm_ has quit [Ping timeout: 240 seconds]
mary5030_ has quit [Remote host closed the connection]
<Synthead>
leveraging local sudo privileges silently is very, very bad
mary5030 has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
<shevy>
welcome to bundler!
laith has quit [Quit: leaving]
<eam>
chmod 0 $(which sudo)
podman has joined #ruby
decoponio has quit [Quit: Leaving...]
baweaver has joined #ruby
laith has joined #ruby
dfinninger has joined #ruby
robbyoconnor has quit [Ping timeout: 264 seconds]
dlitvak_ has joined #ruby
atomical has joined #ruby
benlieb has quit [Quit: benlieb]
amorbix has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 250 seconds]
wolffles has joined #ruby
atomical_ has quit [Ping timeout: 276 seconds]
dlitvak has quit [Ping timeout: 264 seconds]
laith has quit [Read error: Connection reset by peer]
ElFerna has joined #ruby
jgt4 has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.3]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
momomomomo has quit [Quit: momomomomo]
idefine has quit [Read error: Connection reset by peer]
treehug88 has joined #ruby
idefine has joined #ruby
dmolina has quit [Quit: Leaving.]
stannard has quit [Remote host closed the connection]
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has joined #ruby
benlieb has joined #ruby
mic_e has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mic_e has quit [Read error: Connection reset by peer]
selfadhesivefilm has quit [Remote host closed the connection]
agentmeerkat has joined #ruby
cdg has joined #ruby
<wolffles>
str.split('').uniq.map{|letter| letter:str.count(letter)}#create hash using letter
Rickmasta has joined #ruby
<wolffles>
im trying to return as a hash
dlitvak has joined #ruby
arlek has quit [Read error: Connection reset by peer]
underplank has joined #ruby
srenatus has quit [Quit: Connection closed for inactivity]
<underplank>
HI all, I need to put a float into and xml file, and its needs two decimal places. How can I tell builder / ruby to display a particular float value with two decimal places, as a float.
scripore has joined #ruby
mhoungbo has joined #ruby
joonty has joined #ruby
<wolffles>
haha nvm i got it
dlitvak_ has quit [Ping timeout: 256 seconds]
<lucasb>
but anyway, str.chars.each_with_object(Hash.new(0)) {|l, h| h[l] += 1 }