<prateekp>
adaedra: but how to mention those dependencies in gemspec
<prateekp>
?
UtkarshRay has joined #ruby
riotjones has joined #ruby
<adaedra>
I don't think they're usually are. You can add a step in the build process that fails if some library is not found (build would fail anyway).
skullcrasher_ has joined #ruby
skullcrasher_ has quit [Remote host closed the connection]
weaksauce has quit [Excess Flood]
axisys has quit [Ping timeout: 264 seconds]
<adaedra>
s/'re//
dagda1 has joined #ruby
c0m0 has joined #ruby
Oog has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
minimalism has quit [Quit: leaving]
axisys has joined #ruby
riotjones has quit [Ping timeout: 246 seconds]
beagles has joined #ruby
karapetyan has quit [Remote host closed the connection]
leafybasil has joined #ruby
nateberkopec has joined #ruby
<prateekp>
adaedra: is there a way to run some system command to run a script while installing gem
<adaedra>
I don't know the build process for compiled gems well enough, but there should be, yes.
<adaedra>
But don't use it to call yum/dnf/apt-get/aptitude/brew/pkg/whatever.
blackmesa has joined #ruby
<prateekp>
in python, there is setup.py which runs on pip install
<prateekp>
and if there is a system command to run some shell script, then it also works
Oog has quit []
Kendos-Kenlen has joined #ruby
shredding has joined #ruby
nateberkopec has quit [Ping timeout: 256 seconds]
Mon_Ouie has quit [Ping timeout: 255 seconds]
DmitryBochkarev has joined #ruby
<prateekp>
does rakefile tasks run by itself on gem install?
Spami has joined #ruby
lkba has joined #ruby
Mon_Ouie has joined #ruby
DmitryBochkarev has quit [Quit: Leaving]
solocshaw has joined #ruby
ndrei has joined #ruby
lalalaaa has joined #ruby
nateberkopec has joined #ruby
vdamewood has joined #ruby
tkuchiki has joined #ruby
northfurr has joined #ruby
<shevy>
hanmac Jyrki Alakuijala was one of those who drafted brotli originally?
<shevy>
hanmac btw since they dislike the word "bro" ... there is a "Patrick McManus" guy... look at which word his name includes!!!
<hanmac>
i dont know, maybe? i am just anoyed about that femiterrorists bullshit and that whole gender fuc
<hanmac>
as i searched for this song yesterday it did took me a while after i noticed that "beige" is not written "bäsch" or something similar ;P specially worse if you have a saxony accent ;P
devoldmx has joined #ruby
|ifei5g00d has quit [Read error: Connection reset by peer]
codecop has quit [Remote host closed the connection]
<prateekp>
on running shell command in extconf.rb file, i got undefined method `sh' for main:Object (NoMethodError)
acke has quit [Remote host closed the connection]
<asthasr>
prateekp, what syntax are you trying to use to run it?
FernandoBasso has quit [Quit: WeeChat 1.3]
<prateekp>
sh "./build.sh"
<asthasr>
try surrounding it in backticks: `sh "./build.sh"`
<prateekp>
ok
jakobhans has joined #ruby
nateberkopec has joined #ruby
ledestin has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
ruurd has quit [Quit: ZZZzzz…]
<prateekp>
asthasr : I have a doubt, i have extconf.rb and even if i do "puts hello" or something in that, that does not get output while installing gem
<prateekp>
only this message comes Building native extensions. This could take a while...
Icey has joined #ruby
karapetyan has quit [Remote host closed the connection]
k3asd` has quit [Ping timeout: 272 seconds]
<asthasr>
I haven't used extconf.rb (I haven't needed to write C extensions), but my understanding is that it is for pre-processing. You use it to generate a script which is run by someone installing your extension.
govg has quit [Ping timeout: 252 seconds]
<asthasr>
That is, it doesn't get invoked when installing (as part of the build process), but rather it is invoked as part of the packaging process.
infernix has joined #ruby
<asthasr>
Someone with more experience might chime in :)
nateberkopec has quit [Ping timeout: 255 seconds]
<prateekp>
yeah, i think the same. I wanted to place this script as part of the build process
RegulationD has joined #ruby
David27 has joined #ruby
kalusn has joined #ruby
<asthasr>
You may want to put its invocation in the Makefile itself then.
<prateekp>
but as i know, first rubygem is build and then that gem is installed. But suppose i wanted to have the script run when someone installs the gem on his system
<[k->
maybe dig into httparty's source
PhantomS_ has joined #ruby
<[k->
it is infamous for its build process that prints "when you httparty, you must party hard!" onto the terminal
Porfa has quit [Quit: Porfa]
dionysus69 has quit [Ping timeout: 256 seconds]
doddok has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
<hanmac>
prateekp: hm normally you use rake for that
Icey has quit [Ping timeout: 272 seconds]
Seich has quit [Ping timeout: 240 seconds]
<prateekp>
i checked httparty, they have some gem as dependency. But in my case my c++ extension has some dependency which it need to fetch first and then run extconf.rb to build the extension
mary5030 has quit [Remote host closed the connection]
<prateekp>
hanmac: but how to run certain rake tasks while install procedure
<prateekp>
?
<asthasr>
Maybe look at how nokogiri's install process works; they use some quite hairy external dependencies.
PhantomSpank has quit [Ping timeout: 268 seconds]
mary5030 has joined #ruby
ruurd has joined #ruby
<hanmac>
hm no you do the rake stuff before or after you run the extconf.rb script
<[k->
and go off to a road of blinding scripts
apt-get_ has joined #ruby
stamina has quit [Ping timeout: 246 seconds]
<hanmac>
that reminds me .. on the weekend i need to add new classes to rwx again
<prateekp>
hanmac: right, i want to do it before extconf.rb script
apt-get_ has quit [Remote host closed the connection]
<prateekp>
but when someone installs gem using : gem install mygem, then that rake stuff is run and the extconf.rb script is run and finally the gemspec build
simplyianm has quit [Remote host closed the connection]
sulky has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
sulky has joined #ruby
|ifei5g00d has joined #ruby
* shevy
lifts the whole channel!
|ifei5good has quit [Read error: Connection reset by peer]
nicdev_` has left #ruby ["ERC (IRC client for Emacs 25.0.50.1)"]
simplyianm has quit [Remote host closed the connection]
<Diabolik>
hi shevy
|ifei5g00d has quit [Remote host closed the connection]
<shevy>
yo Diabolik
<Diabolik>
how are you doing?
<shevy>
dunno. compiling different GCC right now
simplyianm has joined #ruby
blackmes1 has joined #ruby
acke has quit [Remote host closed the connection]
sulky has quit [Remote host closed the connection]
chipotle has joined #ruby
stan has joined #ruby
<shevy>
I do finally list which versions are not the most recent ones, like via http://shevegen.square7.ch/screenshot.png (never mind the small colour bug there, I fixed that one after the upload)
beauby has joined #ruby
_blizzy_ has joined #ruby
nanoz has quit [Ping timeout: 246 seconds]
shinnya has joined #ruby
sulky has joined #ruby
apt-get has joined #ruby
RegulationD has joined #ruby
Bellthoven has joined #ruby
beast has joined #ruby
xcesariox has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
kalusn has quit [Remote host closed the connection]
stan has quit [Ping timeout: 246 seconds]
victortyau has joined #ruby
Archyme has joined #ruby
howdoi has joined #ruby
rodrigo has joined #ruby
rodrigo is now known as spicymagpie
atomical has joined #ruby
spicymagpie has quit [Client Quit]
havenn has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
rodrigo has joined #ruby
rodrigo is now known as spicy-magpie
spicy-magpie is now known as spicymagpie
beauby has quit [Ping timeout: 246 seconds]
spicymagpie has quit [Client Quit]
simplyianm has quit [Remote host closed the connection]
blackmes1 has quit [Quit: WeeChat 1.3]
deject3d_ has joined #ruby
beauby has joined #ruby
xrlabs has joined #ruby
psy_ has quit [Ping timeout: 250 seconds]
simplyianm has joined #ruby
psy_ has joined #ruby
krz has joined #ruby
mary5030 has joined #ruby
prateekp has quit [Ping timeout: 246 seconds]
moeabdol has quit [Ping timeout: 252 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
beauby has quit [Ping timeout: 246 seconds]
Porfa has quit [Quit: Porfa]
lkba has joined #ruby
beauby has joined #ruby
jessemcgilallen has joined #ruby
simplyianm has quit [Remote host closed the connection]
bin7me has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
chipotle has quit [Quit: cheerio]
jdawgaz has joined #ruby
jamto11 has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
araujo has joined #ruby
jamesaxl|2 has joined #ruby
araujo has quit [Max SendQ exceeded]
karapetyan has joined #ruby
yes`r has quit [Ping timeout: 246 seconds]
josuebrunel1 has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
JJM has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
mfb2 has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
yes`r has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
simplyianm has joined #ruby
xrlabs has quit [Quit: This computer has gone to sleep]
Zamyatin has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
simplyianm has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
CrazyEddy has joined #ruby
simplyianm has joined #ruby
blackmesa has joined #ruby
stardiviner has joined #ruby
simplyianm has quit [Remote host closed the connection]
ksteck has joined #ruby
|ifei5g00d has joined #ruby
shredding has quit [Ping timeout: 240 seconds]
zenguy_pc has quit [Ping timeout: 244 seconds]
coetry has joined #ruby
bruno- has joined #ruby
allcentury has joined #ruby
simplyianm has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
<asthasr>
[k-, adaedra: the docs specify that SecureRandom.hex(n) will generate a number of n bytes, which means that the hex string will be of length 2n.
solocshaw has joined #ruby
<asthasr>
if you are worried about some edge case, you can always generate a slightly longer number and take a slice from the front... but I don't think that would really be an issue.
shoutsid06 has quit [Remote host closed the connection]
prestorium has joined #ruby
psy_ has quit [Ping timeout: 264 seconds]
gaboesquivel has joined #ruby
simplyianm has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
yeshacker has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simplyianm has joined #ruby
yes`r has quit [Ping timeout: 260 seconds]
michael_mbp has quit [Excess Flood]
simplyianm has quit [Remote host closed the connection]
shoutsid has joined #ruby
pcfreak30 has joined #ruby
<pcfreak30>
Is there any library to assist on syncing files locally?
coetry has quit [Ping timeout: 250 seconds]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
zenguy_pc has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ttilley has quit [Quit: Leaving...]
michael_mbp has joined #ruby
shoutsid has quit [Remote host closed the connection]
Klumben has joined #ruby
shinnya has quit [Ping timeout: 252 seconds]
skweek has quit [Ping timeout: 252 seconds]
northfurr has joined #ruby
<asthasr>
I'd just use rsync.
fastAndSlow has joined #ruby
patrick_star has quit [Ping timeout: 264 seconds]
jamesaxl|2 is now known as jamesaxl
<pcfreak30>
well i need to be able to backup conflicting directories and files, so if a directory exists it gets moved as a whole.
CrazyEddy has quit [Ping timeout: 264 seconds]
phutchins has quit [Ping timeout: 246 seconds]
seaned has quit [Quit: …was abducted by aliens.]
sepp2k has joined #ruby
|ifei5g00d has quit [Read error: Connection reset by peer]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<asthasr>
pcfreak30, I'm not sure I understand that constraint. Do you mean that if there is a tree, /a/b/c, and /a/b already exists, it gets moved elsewhere?
shoutsid has quit [Remote host closed the connection]
<asthasr>
rsync has a ton of options, I think there's probably a way to force it to do what you want
pandaant has quit [Remote host closed the connection]
skweek has joined #ruby
AccordLTN has quit [Ping timeout: 250 seconds]
fullofcaffeine has quit [Ping timeout: 272 seconds]
_whitelogger_ has joined #ruby
elektronaut has quit [Ping timeout: 240 seconds]
JStoker has quit [Ping timeout: 240 seconds]
_whitelogger has quit [Remote host closed the connection]
favadi has joined #ruby
leslie has quit [Ping timeout: 240 seconds]
CloCkWeRX has quit [Ping timeout: 246 seconds]
leslie has joined #ruby
leslie has quit [Changing host]
leslie has joined #ruby
elektronaut has joined #ruby
[spoiler] has joined #ruby
jessemcgilallen has joined #ruby
JStoker has joined #ruby
favadi has quit [Max SendQ exceeded]
dionysus69 has quit [Ping timeout: 250 seconds]
JStoker has quit [Excess Flood]
JStoker has joined #ruby
josuebrunel1 has quit [Quit: Leaving.]
devoldmx has quit [Remote host closed the connection]
skade has joined #ruby
tomphp has joined #ruby
Klumben has quit [Ping timeout: 240 seconds]
Outlastsheep has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
patrick_star has joined #ruby
<asthasr>
personally I'd probably just approach that as: if the tree exists at all (from the root), archive it; then rsync the new files over.
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenguy_pc has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
pandaant has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
shmilan has joined #ruby
CrazyEddy has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
coetry has joined #ruby
tomphp has joined #ruby
stamina has joined #ruby
tenderlo_ has joined #ruby
Azure has joined #ruby
zenguy_pc has joined #ruby
C0L0R has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tenderl__ has joined #ruby
tenderlove has quit [Ping timeout: 268 seconds]
jdawgaz has joined #ruby
tenderlove has joined #ruby
tenderlo_ has quit [Ping timeout: 256 seconds]
Bellthoven has quit []
whoami_ has joined #ruby
<pcfreak30>
how can I use Zip::File with an existing io handle
Zamyatin has quit [Ping timeout: 246 seconds]
tenderlo_ has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
tenderl__ has quit [Ping timeout: 260 seconds]
shoutsid has joined #ruby
tenderl__ has joined #ruby
tenderlove has quit [Ping timeout: 260 seconds]
shoutsid has quit [Remote host closed the connection]
deject3d_ has quit [Quit: Computer has gone to sleep.]
<shevy>
it should be easier to add more authors to gems
<shevy>
so people could do that before they retire
bonhoeffer has joined #ruby
bkulbida has joined #ruby
<mehwork>
the cheat gem lets you add new cheat sheets if you happen to know the name and do 'cheat <whatever>' but you can get a list without 404ing when you do 'cheat sheets' and the wiki itself is 404'ing to list them all. So it's only half broken at least
arup_r has quit [Ping timeout: 265 seconds]
<shevy>
actually, if the only change you need to do is to change one URL, download that gem, extract it, modify that faulty line, then republish with a slightly different name
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
ttilley has joined #ruby
Jameser has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
fullofcaffeine has joined #ruby
maletor_ has joined #ruby
tkuchiki has joined #ruby
karapetyan has quit [Remote host closed the connection]
bonhoeffer has quit [Quit: bonhoeffer]
shoutsid has joined #ruby
karapetyan has joined #ruby
ttilley has quit [Ping timeout: 250 seconds]
nerium has quit [Quit: nerium]
fullofcaffeine has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Ping timeout: 240 seconds]
poguez_ has joined #ruby
mm_ has joined #ruby
shoutsid has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 250 seconds]
shmilan has quit [Ping timeout: 246 seconds]
shoutsid has joined #ruby
ndrei has joined #ruby
leafybasil has quit []
Jameser has quit [Ping timeout: 240 seconds]
shoutsid has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 252 seconds]
shoutsid has joined #ruby
krz has quit [Ping timeout: 268 seconds]
psy_ has joined #ruby
sumark has quit [Remote host closed the connection]
krz has joined #ruby
sumark has joined #ruby
shoutsid has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 240 seconds]
pilne has left #ruby [#ruby]
bonhoeffer has joined #ruby
davedev24 has joined #ruby
bonhoeffer has quit [Client Quit]
shoutsid has joined #ruby
blackmesa has quit [Quit: WeeChat 1.3]
fastAndSlow has quit [Ping timeout: 250 seconds]
nerium has joined #ruby
deject3d_ has joined #ruby
shoutsid has quit [Remote host closed the connection]
symm- has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mm_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<doddok>
how in sequelt i ca ntake first 5 records ?
<doddok>
how in sequel i can take first 5 records ?
<apeiros>
I'd guess DB[:table].first(5)
lkba_ has joined #ruby
<doddok>
cool
mm_ has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
subscope has joined #ruby
yeshacker has quit [Ping timeout: 256 seconds]
lkba has quit [Ping timeout: 255 seconds]
blackmesa has joined #ruby
toretore has joined #ruby
ruurd has joined #ruby
Soda has joined #ruby
iateadonut has joined #ruby
yeshacker has joined #ruby
<pcfreak30>
What is the best way to get ruby 1.9.3 installed on centos 6?
blackmesa has quit [Ping timeout: 252 seconds]
kobain has joined #ruby
devoldmx has joined #ruby
<ruurd>
rvm
<ruurd>
tic toc tic toc tic toc
mm_ has quit [Read error: No route to host]
<lalalaaa>
pcfreak30: Choose OpenBSD for your Unix needs. OpenBSD -- the world's simplest and most secure Unix-like OS. Creator of the world's most used SSH implementation OpenSSH, the world's most elegant firewall PF, the world's most elegant mail server OpenSMTPD, the OpenSSL rewrite LibreSSL, and the NTP rewrite OpenNTPD. OpenBSD -- the cleanest kernel, the cleanest userland and the cleanest configuration syntax.
whoami_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fullofcaffeine has joined #ruby
bonhoeffer has joined #ruby
jakobhans has quit []
Kendos-Kenlen_ has joined #ruby
Kendos-Kenlen has quit [Ping timeout: 250 seconds]
Jardayn has joined #ruby
<pcfreak30>
lalalaaa: spam much?
<lalalaaa>
nah just thought i'd put on my preacher robe for a sec there ;)
bonhoeffer has quit [Quit: bonhoeffer]
<pcfreak30>
if i did know better i say you were a bot.
<pcfreak30>
besides i have no reason to use OpenBSD
<pcfreak30>
switching for the sake of ruby isnt even an option anyays
bonhoeffer has joined #ruby
bonhoeffer has quit [Client Quit]
josuebrunel has joined #ruby
<lalalaaa>
cool no probs
josuebrunel has quit [Max SendQ exceeded]
josuebrunel has joined #ruby
josuebrunel has quit [Max SendQ exceeded]
<lalalaaa>
personally im never gonna take the chance on hosting my million-dollar ruby apps on linux
josuebrunel has joined #ruby
josuebrunel has quit [Max SendQ exceeded]
josuebrunel has joined #ruby
josuebrunel has quit [Max SendQ exceeded]
<lalalaaa>
it's just not secure enough, plus it's a god damn mess compared to openbsd.. but that's just one man's opinion
<pcfreak30>
i never used bsd stuff
justin_pdx has joined #ruby
BrazenBraden has quit [Remote host closed the connection]
<pcfreak30>
unless you count darwin
josuebrunel has joined #ruby
josuebrunel has quit [Max SendQ exceeded]
<pcfreak30>
and i never had an issue in production with that choice
<lalalaaa>
oh yeah darwin, true true
<pcfreak30>
I rarely ever used a mac
<pcfreak30>
usually my school pcs
<mehwork>
i wonder why ruby didn't use enddef, endif enddo, etc instead of just having a bunch of end's at the bottom of things
<mehwork>
i guess that is ugly
yeshacker has quit [Read error: Connection reset by peer]
<pcfreak30>
mehwork: i like it how it is as its pretty simple. pp does it like that as the endif is an alternate syntax
<pcfreak30>
php
bonhoeffer has joined #ruby
<shevy>
mehwork lot of additional typing work for no real netgain
<shevy>
the languages that use braces can avoid that issue altogether simply by
<shevy>
function bla() {
rajat_333 has joined #ruby
<shevy>
}
NeverDie has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
<mehwork>
yeah but i mean } or end often requires a comment saying what it's ending
<toretore>
you're going to have trouble figuring out which block an end/endif/} belongs to no matter what
Contigi has joined #ruby
<mehwork>
or an editor that's smart enough to know
jessemcgilallen has quit [Quit: jessemcgilallen]
<pcfreak30>
i use rubymine
<pcfreak30>
so never really an issue
<mehwork>
proper indentation is good enough for me most of the time
<ghr>
I think if you've got that many ends inside one method you could probably do with breaking it up in to smaller chunks
l_tonz has quit [Remote host closed the connection]
sankaber has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
jun_ has quit [Remote host closed the connection]
zenguy_pc has quit [Read error: Connection reset by peer]
gambl0re has joined #ruby
ruby-lang609 has joined #ruby
coetry has quit [Ping timeout: 255 seconds]
<mfb2>
in rspec, can you declare private methods to help setup testing data?
<mfb2>
it appears as though it doesn't like something
lalalaaa has quit [Quit: leaving]
Channel6 has joined #ruby
vdamewood has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
<ishikawa91>
you can create methods in your spec files, or even put it in a spec_helper
ruby-lang609 has quit [Ping timeout: 246 seconds]
pharaoh2 has joined #ruby
otherj has quit [Quit: .]
maletor_ has joined #ruby
<pipework>
mfb2: Sure, you just need to make sure they're the hierarchy for the object you're calling them on.
<mfb2>
cool — yeah I got it now, I was inappropriately putting "do" in the def declaration… However now, I'm trying to figure out how to set up constants that can be used throughout a file
<pipework>
A constant doesn't seem like the right idea for a test.
ttilley has joined #ruby
ttilley has quit [Changing host]
ttilley has joined #ruby
<pipework>
Perhaps you can show us some code.
<mfb2>
I'm a java developer, so ruby is a little different to me… I'm attempting to use "@myvariable" to stub out an input that woudl be going to my test classes
<ishikawa91>
constants for your test data?
<ishikawa91>
you can leverage factory_girl and faker to generate fake test data
fullofcaffeine has joined #ruby
<mfb2>
at runtime, I would be dynamically sending the execution context
<pipework>
You can also use fixtures.
l_tonz has joined #ruby
kirun has joined #ruby
justin_pdx has joined #ruby
<pipework>
You can also use factory_girl and ffaker (faster faker) to generate fixtures as well.
<mfb2>
basically, I want to operate on the user's home directory, but for testing purposes, I want to ensure a local testing directory is used for i/o
<mfb2>
that way I don't actually mess around with someone's home directory, should they clone the project and start testing
Dopagod has joined #ruby
<pipework>
mfb2: Why not just setup a directory using a skeleton that copies the files over, optionally processing them with erb?
<mfb2>
so within the test, I attempted to define a property at the top of the class (e.g. @property = "mystring")
diegoaguilar has joined #ruby
naftilos76 has quit [Remote host closed the connection]
Dopagod has quit [Client Quit]
e1senhorn has joined #ruby
iateadonut has quit [Quit: Leaving.]
<mfb2>
but it appears to be nil when it's used in my "describe" blocks for rspec
<pipework>
mfb2: It will be because it's not in scope.
<pipework>
Define it in a before or a let.
Dopagod has joined #ruby
Dopagod has quit [Changing host]
Dopagod has joined #ruby
<mfb2>
So the declaration and assignment can't happen at the same time? you can provide the class property, but will need to set it manually?
diegoviola has joined #ruby
l_tonz has quit [Ping timeout: 244 seconds]
Dopagod has quit [Client Quit]
<pipework>
mfb2: CODE BRO
<mfb2>
lol, word I'll get a pastebin together, one sec
fullofcaffeine has quit [Read error: Connection reset by peer]
<pipework>
A gist would be better.
<mfb2>
uy right — I did see that in the chanserv message, my bad — I'll snag that, one sec
zenguy_pc has joined #ruby
sankaber has quit [Remote host closed the connection]
<pipework>
mfb2: Wrap line 10 with a before block.
<pipework>
before { @destination = 'testdir' }
The_Phoenix1 has quit [Quit: Leaving.]
rajat_333 has quit [Quit: Leaving]
<pipework>
Also, you might want to look at the Pathname library, it's pretty cool.
sagittarian has joined #ruby
apt-get has quit [Remote host closed the connection]
Xiti has quit [Quit: Xiti]
<mfb2>
oh curly braces, how I missed you
<mfb2>
pathname library? definitely going to check it out, sounds like it'd be real useful right about now
<mfb2>
I know my code is probably uber-n00b right now, I'm very new to this language… I'm working on super-trivial tasks to get familiar with how to work with it
<pipework>
mfb2: It's totally cool. I just like pathname because then you can deal with this nice object to query and command rather than deal with strings, then File, then whatever else.
northfurr has joined #ruby
naftilos76 has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
fullofcaffeine has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 240 seconds]
sepp2k has quit [Disconnected by services]
shoutsid has joined #ruby
sepp2k1 has joined #ruby
Dopagod has joined #ruby
jessemcgilallen has joined #ruby
sepp2k has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
ruby-lang063 has joined #ruby
fatal77 has joined #ruby
* ruby-lang063
slaps abra0 around a bit with a large fishbot
<abra0>
what
* Zarthus
throws confetti all around abra0
<abra0>
ರ_ರ
shoutsid has quit [Remote host closed the connection]
Xiti has joined #ruby
benlieb has joined #ruby
fullofcaffeine has joined #ruby
ruby-lang063 has quit [Ping timeout: 246 seconds]
sepp2k1 has quit [Quit: Leaving.]
devbug_ has joined #ruby
naftilos76 has joined #ruby
CanTonic has joined #ruby
bin7me has quit [Read error: Connection reset by peer]
rodfersou has quit [Remote host closed the connection]
Trynemjoel has quit [Ping timeout: 250 seconds]
devbug_ has quit [Remote host closed the connection]
maletor_ has quit [Quit: Computer has gone to sleep.]
leafybasil has quit [Remote host closed the connection]
cwong_on_irc has quit [Quit: Leaving.]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
devoldmx has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
Trynemjoel has joined #ruby
patdohere has joined #ruby
shinnya has quit [Ping timeout: 250 seconds]
patdohere has quit [Max SendQ exceeded]
stamina has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
patdohere has joined #ruby
karapetyan has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
hahuang65 has joined #ruby
sagittarian has quit [Ping timeout: 256 seconds]
brunto has joined #ruby
devoldmx has joined #ruby
northfurr has quit [Quit: northfurr]
Trynemjoel has quit [Ping timeout: 250 seconds]
swgillespie has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
<mfb2>
style-wise, what's the preferred naming convention?
apt-get has joined #ruby
<mfb2>
camelCaseVariables, or underscore_delimited_variables?
poguez_ has quit [Quit: Connection closed for inactivity]
<mfb2>
same question for methods
vedis has joined #ruby
pandaant has quit [Remote host closed the connection]
naftilos76 has quit [Remote host closed the connection]
<Coraline>
underscores all the way
<Coraline>
And all-caps constants
<Coraline>
CamelCase classes
Icey has quit [Client Quit]
<mfb2>
MyClassName
<mfb2>
MY_CONSTANT
<mfb2>
my_method_name()
<Coraline>
Yes
Trynemjoel has joined #ruby
<mfb2>
my_variable
* apeiros
uses PascalCase for all constants, though. not just classes & modules
<apeiros>
but SHOUT_CASE is widespread
slackr has joined #ruby
* mfb2
SHOUT_CASE TOTALLY SHOUTS
<apeiros>
there are a couple of style guides out
slackr has quit [Client Quit]
<apeiros>
but with regards to style guides: adopt one and stick to it. when in a team, choose one as a team and stick to it.
<apeiros>
it's easy to get adapted to a new style.
bkxd has quit [Ping timeout: 256 seconds]
sepp2k has quit [Read error: Connection reset by peer]
<shevy>
I use CamelPascal
vedis has left #ruby [#ruby]
buharin has joined #ruby
<buharin>
hello
<apeiros>
hi buharin
brunto has quit [Ping timeout: 252 seconds]
<buharin>
should I really need to learn javascript if I want to web dev or html 5 dev
<buharin>
or there some another langs beside
korolyov has joined #ruby
<apeiros>
there are others which are transpiled to javascript (like coffeescript f.ex.)
<apeiros>
but IMO yes, learn JS.
naftilos76 has joined #ruby
gaboesquivel has joined #ruby
AccordLTN has joined #ruby
<havenn>
buharin: ClojureScript,TypeScript, Elm, ElixirScript and even Ruby's Opal are others to consider in addition to CoffeeScript.
brunto has joined #ruby
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<buharin>
havenn, thnks for info :)
<michael_mbp>
hello
gaboesqu_ has quit [Ping timeout: 250 seconds]
makufiru has joined #ruby
<michael_mbp>
suppose an object overrides `#empty?` and I want to restore its behaviour but without simply removing it from the public API; what's the best way to handle this?
slackr has joined #ruby
<apeiros>
michael_mbp: does it override the inherited method from a superclass?
dionysus69 has joined #ruby
slackr has quit [Client Quit]
fullofcaffeine has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
<michael_mbp>
FYI in a Rails context, but yes in the sense that Object#present? calls #blank? which in turn calls respond_to?(:empty?) ? !!empty? : !self
Bellthoven has joined #ruby
<apeiros>
you can use Superclass.instance_method(:empty?) and then either define_method (redefine the method) or bind (one time use)
<havenn>
buharin: Or target a modern flavor of JavaScript like ECMAScript 6.
karapetyan has quit [Remote host closed the connection]
sankaber has quit [Remote host closed the connection]
Musashi007 has joined #ruby
<michael_mbp>
ActiveSupport::Deprecation.warn migth be worth calling.
sankaber has joined #ruby
dagda1 has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
<apeiros>
does not look like they define it on Object
doddok has quit [Quit: Leaving]
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beauby has quit [Ping timeout: 250 seconds]
naftilos76 has quit [Remote host closed the connection]
<michael_mbp>
just pry'd in, and Object does have blank?/present?
<jhass>
that's normal, AS defines it
<apeiros>
michael_mbp: you're confusing stuff
<michael_mbp>
calling those using the bind approch, re-triggeres another pry (since I'm already inside #empty?)
<apeiros>
yes, Object has *blank?*, but NO Object does not have *empty?*
dcope has left #ruby [#ruby]
<michael_mbp>
No, I got that; however, _this_ object responds to it, since it has been added :)
<apeiros>
and neither does solidus seem to add *empty?* to Object (which is what you said before)
mfb2 has quit [Quit: Leaving.]
benlieb has quit [Quit: benlieb]
<michael_mbp>
apeiros: sorry no, didn't mean Object, but this instance.
<michael_mbp>
mislead you there.
yeshacker has joined #ruby
<apeiros>
anyway, simple work around: define present?/blank? on Spree::Address
<michael_mbp>
and raise a deprecation warning on #empty? yeah?
ruurd has quit [Read error: Connection reset by peer]
<apeiros>
no idea. but I think spree has its own channel. might want to ask there.
<michael_mbp>
thanks mate.
user1138 has joined #ruby
<michael_mbp>
apologies for the confusion, but you've certainly helped.
mistermocha has joined #ruby
<apeiros>
no worries. yw.
dionysus69 has joined #ruby
kadoppe has quit [Ping timeout: 272 seconds]
michaeldeol has joined #ruby
jessemcgilallen has joined #ruby
kadoppe has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
beast has quit [Quit: Leaving]
Bellthoven has quit []
blackmes1 has quit [Quit: WeeChat 1.3]
ericjphillips has joined #ruby
wnd has quit [Excess Flood]
kalusn has joined #ruby
wnd has joined #ruby
<shevy>
how would you people judge the OS distribution of #ruby, roughly? 1/3 are macsters, the rest linux users save for the last 5% which go to BSD and windows?
justin_pdx has quit [Quit: justin_pdx]
<apeiros>
shevy: I use ruby on macs and linux - so to which camp do I count?
mikecmpbll has joined #ruby
<shevy>
windows!
<apeiros>
I see :)
<shevy>
I think you are more a mac user
DexterLB has quit [Read error: Connection reset by peer]
ngscheur1 has quit [Ping timeout: 250 seconds]
simplyianm has joined #ruby
loocash has joined #ruby
<michael_mbp>
well, I spend 99% of my time in a zsh/vim. Could be doing the same on a linux box if I _had_ to.
tenderlove has joined #ruby
fullofcaffeine has joined #ruby
<pipework>
And then 50% in the browser.
<pipework>
I'm 40% browser.
beauby has joined #ruby
<michael_mbp>
jleeeeee!
<michael_mbp>
been ages o/
dasher00 has joined #ruby
saddad has joined #ruby
simplyianm has quit [Ping timeout: 244 seconds]
DexterLB has joined #ruby
<loocash>
Hi, when I create gem with bundler and --ext option then rspec doesn't work
<ruboto>
loocash, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shadoi has joined #ruby
tomaz_b has quit [Quit: Leaving]
Bellthoven has quit []
<shevy>
cannot load such file -- aaa/aaa (
<shevy>
did you install it?
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
northfurr has quit [Quit: northfurr]
beauby has quit [Ping timeout: 244 seconds]
<loocash>
no, everything ive done is written on my gist. I mean when i create a gem with: bundle gem mygem and then run rspec everything works fine and when i create the same gem with --ext option rspec fails
dagda1_ has joined #ruby
aaeron1 has quit [Ping timeout: 246 seconds]
<loocash>
and there is no such file as aaa/aaa. there is aaa/lib/aaa.rb
karapetyan has quit [Ping timeout: 250 seconds]
<loocash>
or aaa/aaa.gemspec
northfurr has joined #ruby
deject3d_ has quit [Quit: Computer has gone to sleep.]
Rickmasta has joined #ruby
bonhoeffer has joined #ruby
<havenn>
loocash: The log shows those being created. Do a `bundle install` after `cd aaa`.
ruurd has quit [Read error: Connection reset by peer]
<fhx>
Mon_Ouie: Yes. It's the current object. if self.class is main in the top-level scope, does that mean that the top-level scope is basically a class whose superclass is Object?
<fhx>
Mon_Ouie: self.class is Object, sorry
benlieb has quit [Quit: benlieb]
diegoviola has joined #ruby
<Mon_Ouie>
The top-level scope is a scope where self is a special instance of Object. It also has somewhat special rules about where constants and methods get defined, but they're unrelated to what self is though.
atom3 has joined #ruby
<Mon_Ouie>
There's no class that represents the top-level scope
mloy_ has joined #ruby
<havenn>
I guess I should have rather shown:
<havenn>
>> class << self; remove_method :inspect end; self
<Bozza>
"/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/rbconfig.rb:213: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777"
weaksauce has joined #ruby
<Bozza>
in OS X 10.11
davedev24 has quit []
ricer2 has joined #ruby
<havenn>
Bozza: It's a warning about the permissions of your /usr/local/bin directory.
<Bozza>
is there something wrong with it?
<Bozza>
what would cause such an error?
<havenn>
It's too permissive.
sameerynho has quit [Quit: Leaving]
closed-shell has quit [Quit: AtomicIRC: The nuclear option.]
<havenn>
Bozza: El Capitan took issue with your lax permissions for the /usr/local/bin directory.
<Bozza>
translation into english please :)
David27 has joined #ruby
<Bozza>
were my permissions too weak?
user1138 has joined #ruby
<havenn>
Bozza: You have an insecure (world writable, all users can write to it, open season) /usr/local/bin directory.
<Bozza>
oh
<Bozza>
well that doesn't sound good
<Bozza>
heaven would it be caused by brew?
<Bozza>
havenn: is chmod -w ok/safe for that directory?
sagittarian has joined #ruby
mdih has joined #ruby
apt-get has quit [Remote host closed the connection]
apeiros_ is now known as apeiros
<gizmore>
how to parse something like min=5,default="foo,bar",blub=blab to {min:5,default:"foo,bar",blub:"blab"}
<gizmore>
regex? :P
<havenn>
Bozza: It seems your /usr/local permissions have been made overly lax since the Homebrew installation initially set them up.
naftilos76 has quit [Quit: Αποχώρησε]
sysanthrope has quit [Quit: No Ping reply in 180 seconds.]
mxrguspxrt has joined #ruby
ferz_ has quit [Quit: Leaving]
<Mon_Ouie>
No, regexps can't do that (because of the way the quotes work). Not without nasty workarounds anyway. You can use regexps to build a parser with some more logic when using e.g. strscan. A CSV parser like the one in stdlib can do part of, but not all of, the job
<Mon_Ouie>
gizmore: ^
korolyov has joined #ruby
sysanthrope has joined #ruby
ndrei has quit [Ping timeout: 268 seconds]
diegoviola has quit [Quit: WeeChat 1.3]
northfurr has quit [Quit: northfurr]
ndrei has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
vipulkanade has joined #ruby
vipulkanade has quit [Client Quit]
jun_ has joined #ruby
northfurr has joined #ruby
northfurr has quit [Client Quit]
<havenn>
Bozza: The easiest way for you to fix the permissions is probably to uninstall then reinstall Homebrew so the install script fixes the permissions as Homebrew intends.
freezevee has quit [Remote host closed the connection]
mxrguspxrt has quit []
stamina has quit [Ping timeout: 255 seconds]
kirun has quit [Quit: Client exiting]
apt-get has joined #ruby
sagittarian has quit [Ping timeout: 255 seconds]
mxrguspxrt has joined #ruby
riotjone_ has joined #ruby
<Bozza>
havenn: I did "sudo chmod go-w /usr/local/bin"
<Bozza>
it fixed the error
<Bozza>
not sure if that might cause some other permission errors ,, but seems ok for now
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenn>
Bozza: I suspect you still have borked permissions in /usr/local so you should probably either set permissions correctly recursively or use a script to do it for you.
l_tonz has joined #ruby
northfurr has joined #ruby
<havenn>
Bozza: Unless you just set that one directory's permissions differently than Homebrew set it up. Maybe check a: brew doctor
firstdayonthejob has quit [Ping timeout: 264 seconds]
dagda1_ has joined #ruby
gambl0re has quit [Ping timeout: 264 seconds]
gambl0re has joined #ruby
<havenn>
Bozza: For that directory that sounds correct. It won't cause errors.
riotjone_ has quit [Ping timeout: 240 seconds]
nerium has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Bozza>
Warning: The /usr/local directory is not writable.
<Bozza>
Even if this directory was writable when you installed Homebrew, other
<Bozza>
software may change permissions on this directory.
spider-mario has quit [Remote host closed the connection]
Rickmasta has joined #ruby
solocshaw has joined #ruby
gregoriokusowski has joined #ruby
<havenn>
Bozza: If you don't want to run the uninstall and install script to fix the permissions I'd suggest asking in the #machomebrew channel.
<havenn>
Bozza: The install script ^ will give you the uninstall script.
<havenn>
(When already installed.)
sanjayu has joined #ruby
<havenn>
You can read about that in the install script ^.
<Bozza>
alright installed
skweek has quit [Ping timeout: 244 seconds]
nerium has quit [Quit: nerium]
<Bozza>
brew doctor doesn't give me any error about /usr/local anymore havenn!
<Bozza>
so that is good
<havenn>
Bozza: Done. Permissions fixed as per Homebrew's preferences.
<Bozza>
Thank you!!!
<havenn>
Bozza: You're welcome!
<Bozza>
who would have thought that homebrew likes to mess with your permission
<Bozza>
s
<havenn>
Bozza: They create the directory in the first place.
p0wn3d__ has joined #ruby
_whitelogger has joined #ruby
<Bozza>
ah I will stay with brew for now :)
<Bozza>
havenn: do you use macports?
Ray` has joined #ruby
<havenn>
Bozza: I have all three of those installed because I help maintain software that supports all three.
<Bozza>
sweet
<Bozza>
do they not conflict with each other
<Bozza>
?
asi_ has quit [Quit: No Ping reply in 180 seconds.]
elektronaut has joined #ruby
epochwolf has quit [Ping timeout: 246 seconds]
JStoker has joined #ruby
EvilJStoker has joined #ruby
hostess has joined #ruby
<Bozza>
homebrew gave me the least amount of headaches
<Bozza>
so it is the winner for me
asi_ has joined #ruby
<havenn>
Bozza: Homebrew and MacPorts prefer to not be simultaneously enabled but they can be installed side-by-side with only a few warnings. I've not had any trouble with pkgsrc alongside the others.
p0wn3d__ has quit [Ping timeout: 246 seconds]
northfurr has quit [Quit: northfurr]
korolyov has quit [Read error: Connection reset by peer]
epochwolf has joined #ruby
korolyov has joined #ruby
<havenn>
Bozza: It's nice the brew gets frequent package updates and they go quickly now that they're "pouring bottles."
johnzorn_ has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
EvilJStoker has quit [Excess Flood]
EvilJStoker has joined #ruby
amoeba has quit [Quit: Leaving]
jamesaxl has quit [Ping timeout: 246 seconds]
johnzorn_ has joined #ruby
wallerdev has joined #ruby
skweek has joined #ruby
bkxd has joined #ruby
<Bozza>
does brew overwrite the default python?
<Bozza>
ahh too much brew vs macports for me
<Bozza>
my setup works for what I need it for
<Bozza>
so I should probably leave it
p0wn3d__ has joined #ruby
<Bozza>
havenn: was a pleasure chatting to you.
<Bozza>
Going to get some sleep
<havenn>
Bozza: Brew doesn't overwrite any system tools.
<havenn>
Bozza: It just provides alternatives ahead in the PATH.
<havenn>
Bozza: G'night
<Bozza>
ahh ok that is perfect!
<Bozza>
good night
<Bozza>
will be around
moeabdol has joined #ruby
solocshaw1 has joined #ruby
symm- has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw1 is now known as solocshaw
p0wn3d__ has quit [Ping timeout: 256 seconds]
benlieb has quit [Quit: benlieb]
Spami has quit [Quit: This computer has gone to sleep]
gregoriokusowski has quit [Quit: gregoriokusowski]
blackmesa has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
blackmesa has joined #ruby
moeabdol has quit [Quit: WeeChat 1.3]
ericjphillips has quit [Quit: Leaving.]
Musashi007 has quit [Client Quit]
chouhoul_ has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
mxrguspxrt has quit []
wallerdev has quit [Quit: wallerdev]
Azure has joined #ruby
nk8 has joined #ruby
ericjphillips has joined #ruby
mxrguspxrt has joined #ruby
benlieb has joined #ruby
kies^ has quit [Ping timeout: 265 seconds]
nk8 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jun_ has quit [Remote host closed the connection]
tw1sted has quit [Changing host]
tw1sted has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
jamto11 has quit [Remote host closed the connection]
dikaio has joined #ruby
alveric_ has joined #ruby
bigmac has quit [Ping timeout: 264 seconds]
moeabdol has joined #ruby
apt-get has quit [Ping timeout: 244 seconds]
nanoz has quit [Quit: <3]
riotjones has joined #ruby
alveric has quit [Ping timeout: 240 seconds]
apt-get has joined #ruby
Biohazard has joined #ruby
stardiviner has joined #ruby
prasselpikachu has joined #ruby
ksteck has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jun_ has joined #ruby
nk8 has joined #ruby
htmldrum has joined #ruby
Zamyatin has joined #ruby
maletor_ has joined #ruby
riotjones has quit [Ping timeout: 250 seconds]
yosemitesam has joined #ruby
[k- has quit [Ping timeout: 240 seconds]
mxrguspxrt has quit []
Azure has quit [Quit: Oops.]
[k- has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zamyatin has quit [Ping timeout: 250 seconds]
nk8 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]