<nofxx>
allisio, thank you, that looks nice. Found what I was thinking, it's 'blessed' , but not ruby, node.js. Good for 'charts', but kinda of double-edged sword... charts looks awful on terminal..
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
nettoweb has joined #ruby
mula has joined #ruby
<rizonz>
allisio: I fixed it
Rodya_ has joined #ruby
raul782 has quit [Ping timeout: 258 seconds]
<allisio>
rizonz: What was the fix?
antoniobeyah has quit [Quit: Connection closed for inactivity]
<rizonz>
allisio: add the second line and change the params to some other name
<rizonz>
so actually a copy of the line
<rizonz>
you can use both then
<rizonz>
and I never did any ruby
<rizonz>
it looks quite clear
<rizonz>
ok I do some puppet erbs
SeepingN has quit [Ping timeout: 260 seconds]
roamingdog has quit []
cschneid_ has joined #ruby
duderonomy has joined #ruby
djbkd has joined #ruby
mula has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
linux13337 has quit [Ping timeout: 260 seconds]
PaulCapestany has quit [Quit: .]
mula has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
PaulCapestany has joined #ruby
pawnbox has joined #ruby
Vingador has joined #ruby
ahrs_ has joined #ruby
Vingador has quit [Remote host closed the connection]
BSAlb has quit [Quit: Leaving]
hutch34 has joined #ruby
jgnagy has joined #ruby
ahrs has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
jgnagy has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
<nofxx>
rizonz, there's no lang clearer or simpler than ruby
pawnbox has joined #ruby
edliss has quit [Ping timeout: 256 seconds]
cyphase has quit [Quit: cyphase.com]
cdg has quit [Remote host closed the connection]
cyphase has joined #ruby
cahoots_ has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
<cahoots_>
hi, i'm creating a long-running process with periodic output that i spawn from a ruby script. i want to print out anything that this process sends to stdout as soon as it is sent. if i do "puts `sh script.sh`", it will wait for the script to terminate before giving me back all of the output, which is too long. any ideas?
bihi has joined #ruby
<cahoots_>
0
ramfjord has quit [Ping timeout: 258 seconds]
oliv_____ has quit [Remote host closed the connection]
<mzo>
cahoots_: Process.spawn
oliv_____ has joined #ruby
oliv_____ has quit [Remote host closed the connection]
AndBobsYourUncle has quit [Ping timeout: 240 seconds]
marxarelli|afk is now known as marxarelli
eclecticjohny has joined #ruby
eclecticjohny has quit [Client Quit]
cibs has quit [Ping timeout: 246 seconds]
JohnDoe2 has left #ruby [#ruby]
cibs has joined #ruby
eclecticjohny has joined #ruby
eclecticjohny has quit [Client Quit]
blackmes1 has quit [Ping timeout: 256 seconds]
ahrs_ has quit [Remote host closed the connection]
ahrs has joined #ruby
eclecticjohny has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
eclecticjohny has quit [Client Quit]
jhack_ has joined #ruby
edliss has joined #ruby
orangeman702 has joined #ruby
patarr has joined #ruby
JeanCarloMachado has joined #ruby
grant has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eclecticjohny has joined #ruby
orangeman702 has quit [Quit: leaving]
jhack has quit [Ping timeout: 268 seconds]
zach has joined #ruby
devn has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure|dc has joined #ruby
<devn>
Hey folks. I have an endpoint in a rails app that spawns a thread for a long-running task. I want to ensure that if that thread hasn't finished its work, it doesn't spawn another.
patarr has quit [Ping timeout: 240 seconds]
catpelts has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
marcoecc has quit [Ping timeout: 260 seconds]
pilne has quit [Quit: Quitting!]
d^sh has quit [Ping timeout: 240 seconds]
eclecticjohny has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
marcoecc has joined #ruby
d^sh has joined #ruby
govg has quit [Ping timeout: 240 seconds]
last_staff has quit [Read error: Connection reset by peer]
eclecticjohny has joined #ruby
ElDoggo has quit [Remote host closed the connection]
nadir has quit [Quit: Connection closed for inactivity]
mula has quit [Remote host closed the connection]
hotpanca_ has quit [Remote host closed the connection]
ajsharma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mula has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BabyMario has joined #ruby
charliesome has joined #ruby
nOwz has joined #ruby
sleetdrop has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cibs has quit [Ping timeout: 240 seconds]
gnufied has quit [Ping timeout: 246 seconds]
cibs has joined #ruby
whiteline has quit [Read error: Connection reset by peer]
jgnagy has joined #ruby
whiteline has joined #ruby
nOwz has quit [Ping timeout: 246 seconds]
edliss has quit [Ping timeout: 240 seconds]
milardovich has quit [Remote host closed the connection]
ichthys has joined #ruby
olspookishmagus has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby
agent_white has quit [Quit: leaving]
mula has quit [Remote host closed the connection]
mula has joined #ruby
mula has quit [Remote host closed the connection]
sneakerhax has joined #ruby
mula has joined #ruby
mula has quit [Remote host closed the connection]
mula has joined #ruby
roflmyeggo has joined #ruby
mula has quit [Remote host closed the connection]
mula has joined #ruby
mula has quit [Remote host closed the connection]
mula has joined #ruby
mula has quit [Remote host closed the connection]
mula has joined #ruby
mula has quit [Remote host closed the connection]
mula has joined #ruby
eclecticjohny has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
mula has quit [Remote host closed the connection]
eclecticjohny has joined #ruby
eclecticjohny has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
JeanCarloMachado has quit [Ping timeout: 258 seconds]
libastral has quit [Ping timeout: 240 seconds]
midacts has joined #ruby
ahrs has quit [Ping timeout: 240 seconds]
ahrs has joined #ruby
<cahoots_>
mzo, ty
libastral has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
BTRE has joined #ruby
<adam12>
Bleh. Had a tab open but it's gone. Looking for a Ruby HTTP library that does a bit of metaprogramming. So client.users gets transformed into http://thehost/users, which is then chain-able from there. Ring a bell with anybody?
dar123 has quit [Read error: Connection reset by peer]
marcoecc has quit [Ping timeout: 260 seconds]
<adam12>
And not httparty .. :)
olivi____ has quit [Remote host closed the connection]
zenspider has quit [Ping timeout: 260 seconds]
roflmyeggo has quit [Ping timeout: 268 seconds]
oliv_____ has joined #ruby
pawnbox has joined #ruby
ajsharma has joined #ruby
eclecticjohny has joined #ruby
hutch34 has joined #ruby
oliv_____ has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 268 seconds]
<allisio>
adam12: The github_api gem does that, but it's not something Faraday provides out of the box.
<adam12>
allisio: Thanks. I think this was a new and upcoming gem I found a few weeks ago. Maybe in r/reddit or awesomeruby
jasondotstar has quit [Ping timeout: 240 seconds]
<adam12>
but it's gone, so I'll stick with HTTP.rb for now.
jasondotstar has joined #ruby
charliesome has joined #ruby
ChickeNES has quit [Ping timeout: 260 seconds]
JohnDoe2 has joined #ruby
ChickeNES has joined #ruby
Rodya__ has joined #ruby
<JohnDoe2>
quick question, forgive me if this is the wrong channel to ask: I'm using sshkit to run remote commands. My local environment does not match the remote one, and I have mapped a command. The issue is that the same command is used for both local and remote in the scripts, thus wrongfully trying to execute from the wrong path on local machine. Is there any way to map commands per host?
cahoots_ has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Ping timeout: 246 seconds]
tau has quit [Remote host closed the connection]
tau has joined #ruby
HoierM has quit [Ping timeout: 240 seconds]
tau has quit [Remote host closed the connection]
Channel6 has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cahoots has joined #ruby
pawnbox has joined #ruby
cahoots has quit [Client Quit]
milardovich has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
JohnDoe2 has left #ruby [#ruby]
milardovich has quit [Ping timeout: 258 seconds]
Rodya__ has quit [Remote host closed the connection]
pawnbox has joined #ruby
pulkit4tech has joined #ruby
gnufied has joined #ruby
mula has joined #ruby
Rodya_ has joined #ruby
cschneid_ has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
cibs has quit [Ping timeout: 240 seconds]
cibs has joined #ruby
enterprisey has joined #ruby
mula has quit [Ping timeout: 256 seconds]
br0d1n has quit [Quit: Leaving]
patarr has joined #ruby
JoshS has joined #ruby
CloCkWeRX has quit [Ping timeout: 256 seconds]
patarr has quit [Ping timeout: 240 seconds]
minimalism has quit [Quit: minimalism]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
gusrub has joined #ruby
blackwind_123 has joined #ruby
roflmyeggo has joined #ruby
pawnbox has joined #ruby
CloCkWeRX has joined #ruby
pawnbox has quit [Ping timeout: 268 seconds]
gix has quit [Ping timeout: 256 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
cschneid_ has quit [Remote host closed the connection]
ElDoggo has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
gix has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
Channel6 has quit [Quit: Leaving]
BTRE has joined #ruby
<al2o3-cr>
>> [x, y = a = x, b = y].map &:__id__
<ruby[bot]>
al2o3-cr: # => undefined local variable or method `x' for main:Object (NameError) ...check link for more (https://eval.in/755464)
ElDoggo has quit [Ping timeout: 264 seconds]
<al2o3-cr>
>> x, y = a = x, b = y; [x, y = a = x, b = y].map &:__id__
<dminuoso>
depending on how the surrounding code looks, I might do an early return too
Cohedrin has joined #ruby
muelleme has joined #ruby
<dminuoso>
such as the gist is now if you reload
makufiru has left #ruby [#ruby]
_djbkd has quit [Quit: My people need me...]
<keanny479>
dminuoso, i get : undefined method `&' for "+-------+----------+-------------+":String (NoMethodError)
<dminuoso>
keanny479: Oh I thought it was an array my bad.
ta_ has quit [Remote host closed the connection]
<dminuoso>
keanny479: what are the possible contents of winner?
<keanny479>
dminuoso, float and string
edliss has joined #ruby
hutch34 has joined #ruby
neuraload has joined #ruby
nOwz has joined #ruby
<keanny479>
dminuoso: an example of winner content : [20.121918907, "Guest"]
itarato has joined #ruby
tmtwd has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 260 seconds]
<keanny479>
dminuoso: a line of ln (this is a string) : "| Guest | 5 | 20.121918907 |"
<itarato>
Hi there. I've seen this call pattern: `arr[idx]&.clone` - what does the `&` sign doing? I couldn't find any difference, neither any online reference.
pifon has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
dionysus69 has joined #ruby
muelleme has quit [Ping timeout: 240 seconds]
Guest42101 has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
<keanny479>
anyone can help me to refactor this : ln = ln.center(SPACES).green.bold if winner && ln.include?(winner[0].to_s) && ln.include?(winner[1].to_s)
last_staff has joined #ruby
__Yiota has quit [Client Quit]
Burgestrand has quit [Quit: Closing time!]
enterprisey_ has quit [Remote host closed the connection]
linocisco has joined #ruby
conta has joined #ruby
<linocisco>
hi everybody, who is using ubuntu to develop ruby? what IDE is best for ruby ?
enterprisey has joined #ruby
kassav_ has joined #ruby
kassav_ is now known as kassav
tomphp has joined #ruby
<itarato>
linocisco: Hi. If you have a large codebase and do it profesionally I believe Jetbrains Rubymine is the best without a doubt. However for small projects I like VisualCode - because of the nice plugin nd low footprint.
keanny479 has quit [Quit: Page closed]
kassav has quit [Read error: No route to host]
keanny479 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
Mortomes|Work has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tildes>
linocisco: I use sublime, vim seems popular
hotpancakes has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
keanny479 has quit [Quit: Page closed]
Rodya_ has joined #ruby
ta_ has joined #ruby
<linocisco>
itarato, thanks
aganov has joined #ruby
<linocisco>
tildes, thanks . can sublime show result of ruby output inside editor?
<linocisco>
tildes, I dont want to run ruby samplecode.rb in terminal
aufi has joined #ruby
<tildes>
linocisco: I don't know about sublime, but I'm pretty sure you can do it with vim
Rodya_ has quit [Ping timeout: 246 seconds]
sleetdrop has quit [Quit: Computer has gone to sleep.]
<itarato>
linocisco: Sublime has a build system, afaik in menu Tools/Build.
<tildes>
linocisco: ... I run stuff in the terminal :-$
<itarato>
linocisco: I think you can either find a sublime plugin that adds a ruby build option - or you can create yours - it's very simple
<itarato>
You only need the first line, something like: "cmd": ["/usr/bin/ruby", "$file"]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
__Yiota has joined #ruby
<tildes>
itarato: cool stuff, thanks :D
<itarato>
tildes: You're welcome
<linocisco>
itarato, that is more advanced beyond my knowledge.
<linocisco>
itarato, i once used atom for rails app
<itarato>
linocisco: If you're not familiar with it, I recommend - get Submilime - from menu select "install plugin manager" (which allows you to install plugins) - then in plugin manager -> install plugin -> ruby - and check if the Tools/Build System has a ruby item - select it and with CTRL-B (or such) you test the build
patarr has joined #ruby
pfedpy has joined #ruby
<linocisco>
itarato, thanks. you did explain to me in very comprehensive way. thanks alot
TomyWork has joined #ruby
<tildes>
I need to create a http multipart request, haven't done that before. I can find two seemingly unmaintained gems, multipart-post and httmultiparty, some even older blog posts with code that probably would work...
<juggler>
any ruby developers here on a Fedora platform?
<tildes>
What would you recommend as of 2017? :)
<itarato>
linocisco: No problem. I think in Atom you can simply define a JSON - so that might be more intuitive
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Clarity has joined #ruby
patarr has quit [Ping timeout: 258 seconds]
mark_66 has joined #ruby
DARPA has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
hotpancakes has joined #ruby
<linocisco>
itarato, sublinetext is found not free for continued use.
antgel has joined #ruby
tomphp has joined #ruby
<itarato>
linocisco: I'm not skilled at licences, but it's free if you don't mind its hourly popup, that's all.
<linocisco>
itarato, thanks for comment
sleetdrop has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enterprisey has quit [Quit: Leaving]
andikr has joined #ruby
uncertainty has quit [Ping timeout: 240 seconds]
flying has joined #ruby
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 268 seconds]
uncertainty has joined #ruby
xall has joined #ruby
linocisco has quit [Ping timeout: 264 seconds]
A124 has quit [Ping timeout: 240 seconds]
xen0fon has joined #ruby
djbkd has quit []
Silthias has quit [Ping timeout: 268 seconds]
<Clarity>
if I'm stubbing a specific method on any instance of a class, in Rspec, is there way to also spy on that method? Like I want any instance of a class to return certain value but I also would like to know which arguments that methods was called with
jancsi has joined #ruby
<jancsi>
hi all! I'm new to ruby. I've got an instance of a class. How can I enumerate through all the properties of this instance and print those ones that are not nil ?
<tildes>
jancsi: my_object.methods gives you an Array of all methods the object can respond to
<tildes>
jancsi: in the block you could use the object's send method, to get results for each method ...
<nofxxx>
juggler, used fedora on my early linux days... 04~08 then I found out archlinux...heh ever since
uncertainty has quit [Ping timeout: 240 seconds]
<jancsi>
tildes, if you take a look on that class, it does have some properties. I need to access them in a loop somehow.
<nofxxx>
Clarity, just add some puts... no biggie if you remove'em later heh
<jancsi>
tildes, without explicitly describing the property names
<nofxxx>
jancsi, create a def attributes
<nofxxx>
and pass all keys there... or maybe a CONSTANT
esObe_ has joined #ruby
<tildes>
jancsi: my_object.instance_variables gives you instance variables defined for that class
<tildes>
jancsi: does that list look like what you want?
<nofxxx>
there's just no point in the way you're trying to do it... are you a JS dev?
A124 has joined #ruby
<jancsi>
tildes, instance_variables returns an empty arrays
<jancsi>
nofxxx, Yes it is easy to do in JS. But it is also easy to do in C# for example.
<tildes>
jancsi: are you sure you call instance_variables on the instance of the class, and not on the class itself?
uncertainty has joined #ruby
<nofxxx>
jancsi, that's a fault, not a feature
<nofxxx>
check out how #to_json methods works... that's how you proper "inspect" , or squeeze an object
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has quit [Ping timeout: 246 seconds]
<nofxxx>
or #to_hash
<tildes>
jancsi: anyway to respond your question 10:36:23 you could do something like this: my_obj.instance_variables.each{|var| puts my_obj.instance_variable_get(var) unless my_obj.instance_variable_get(var).nil? }
<Clarity>
lol nofxxx I need test coverage %% :D
uncertainty has quit [Ping timeout: 246 seconds]
quazimodo has quit [Ping timeout: 258 seconds]
<nofxxx>
tildes, dunno which is uglier... his question or yr answer
<jancsi>
tildes, ahh, you were right, I just realized I've got an array in which I have the instances of that class... let me fix that
maattdd has joined #ruby
<nofxxx>
Clarity, userbase?
lele has quit [Ping timeout: 240 seconds]
<Clarity>
I'm just writing unit tests for a controller
<tildes>
nofxxx: what I see is someone who is new to the language itself, asking a question, and I try to give some context and explain the methods, to help someone to learn :)
tomphp has joined #ruby
uncertainty has joined #ruby
<tildes>
nofxxx: what the answer will be used for is whole another question
<nofxxx>
tildes, another reason to explain the correct way
<tildes>
nofxxx: however, whatever suggestions you have for improvement, please don't hesitate to share
<nofxxx>
already did
fivmo has joined #ruby
Burgestrand has joined #ruby
olspookishmagus has joined #ruby
aupadhye has quit [Ping timeout: 264 seconds]
<jancsi>
tildes, hm interesting... this is what inspect gaves me: #<struct Whois::Parser::Contact id=nil, type=2, name=nil, organization=nil, address=nil, city=nil, zip=nil, state=nil, country=nil, country_code=nil, phone=nil, fax=nil, email=nil, url=nil, created_on=nil, updated_on=nil>
<jancsi>
tildes, but instance_variables still an empty array
lele has joined #ruby
biubiubiu has quit [Quit: Bye]
<tildes>
nofxxx: you are talking about to_json and to_hash, but how do you know this is what jancsi is trying to achieve?
<tildes>
it could be my Thursday eyes, but I can't guess the ultimate goal based on what I actually see
tomphp has quit [Client Quit]
<tildes>
jancsi: what is your ultimate goal btw, what are you trying to achieve? :)
linocisco has joined #ruby
<jancsi>
tildes, I want to make a hash which stores only those properties of that object which is not nil
aupadhye has joined #ruby
<tildes>
jancsi: why?
<jancsi>
tildes, so in the example above the hash would only consist "type => 2"
<tildes>
this could be first time I see a ruby class inheriting something called SuperStruct
<jancsi>
tildes, I need to filter them. The hash itself will eventually be a JSON object that will be sent to a document store (CouchDB)
<tildes>
jancsi: what does to_json say?
ddffg has joined #ruby
<nofxxx>
tildes, I beg you pardon, and accuse my eyes also... I've read he created a class, so my answer fits... but it's not a third party class also (so your answer fits) hehe..it's a Struct!
tomphp has joined #ruby
<jancsi>
tildes, it gives me the same as inspect but as a string, no json format at all
<manveru>
make a mylib/spec/helper.rb with `require_relative "../lib/mylib"` and require that in your files :)
<dminuoso>
NO.
<dminuoso>
This is getting worse.
<manveru>
YES.
<dminuoso>
manveru: rspec will fucking add lib/ to the LOAD_PATH for you already.
uncertainty has joined #ruby
<manveru>
ignore me then :)
<dminuoso>
just "require mylib"
<dminuoso>
is eoungh.
<Burgestrand>
Downside is if you have dependencies, since rspec won't respect gem version restrictions specified in your gemspec.
<dminuoso>
Burgestrand: You can use bundler to take care of that
<Burgestrand>
dminuoso Exactly!
<manveru>
i don't use rspec usually, that's just how i do it in bacon which doesn't mess with my LOAD_PATH
<Burgestrand>
i.e. use bundler for development, don't check in your Gemfile.lock, and in your spec_helper.rb be content with `require 'bundler/setup'` and then do `require 'mylib'`!
<manveru>
and require_relative is still faster since it doesn't have to search the file...
pwnd_nsfw` has joined #ruby
<dminuoso>
Burgestrand: or just use "bundle exec rspec" :-)
lenwood has quit [Ping timeout: 240 seconds]
AlHafoudh has joined #ruby
<Burgestrand>
dminuoso :)
pwnd_nsfw has quit [Ping timeout: 246 seconds]
* dminuoso
has a `be' bash alias
<Burgestrand>
dminuoso I prefer a setup that doesn't allow me to make mistakes
<dminuoso>
Burgestrand: Fair enough. It's become such a habit to execute everything with "be" in front of it.
<dminuoso>
For me anyway.
<Burgestrand>
dminuoso Haha, I agree, I do it all the time, even in other languages.
marr has joined #ruby
<dminuoso>
Burgestrand: I almost feel like the rspec binstub should check whether there's a Gemfile, and then load the bundle.
<dminuoso>
That would be awesome.
<dminuoso>
rails does this
* dminuoso
thinks
ledestin has joined #ruby
gizmore has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
xenops has joined #ruby
leitz has quit [Quit: Nappy time]
TvL2386 has joined #ruby
<jancsi>
is it possible to create a hash where both keys and values are symbols?
<tobiasvl>
jancsi: yes
<jancsi>
tobiasvl, it is the form of: hash => { :symbol_one => :symbol_two } ?
lightheaded has quit [Remote host closed the connection]
Gazeth_Sonica has joined #ruby
<allisio>
Or `{one: :two}`, but that's ugly.
<Gazeth_Sonica>
hi everyone
lightheaded has joined #ruby
<tobiasvl>
jancsi: yes. should be pretty easy for you to test
<rizonz>
nofxxx: lolz, that is what woman always say... there is no-one more lovely then me... and code can be a biatch :P
lkb has quit [Client Quit]
hutch34 has quit [Ping timeout: 256 seconds]
lightheaded has quit [Remote host closed the connection]
lkb has joined #ruby
lightheaded has joined #ruby
<dunpeal>
allisio: thanks!
<allisio>
dunpeal: Sure thing.
luknerw has joined #ruby
luknerw has quit [Client Quit]
<allisio>
There *is* a way to respond to the creation of string literals pre-2.3 or so, but that way lies madness.
lkb has quit [Client Quit]
<dunpeal>
allisio: how? and was it removed?
luknerw has joined #ruby
<allisio>
dunpeal: FrozenCore. It wasn't removed, but I'm pretty sure it's impossible to redefine its methods these days.
lkb has joined #ruby
luknerw has quit [Client Quit]
<allisio>
But never mind; it was Hash literals you could respond to.
zipper has joined #ruby
lightheaded has quit [Ping timeout: 240 seconds]
<zipper>
Why does rvm advise that I import someone gpg keys?
<zipper>
*someone's
<dunpeal>
OK. Simpler question: when I run `rspec`, it finds tests under spec/foo_spec.rb, but inside that test, I'm trying to `require "lib/foo"`. It doesn't work, because lib is a sibling of spec. Is there a good, elegant fix?
<allisio>
Why is lib/ in spec/?
<dunpeal>
allisio: it's not, it's a sibling, i.e. at the same level.
<dunpeal>
i.e. I have mylib/lib and mylib/spec
inersha has joined #ruby
lkb has quit [Client Quit]
<allisio>
Right, that was a bad derp.
<allisio>
You really should just `require 'foo'` and arrange to have RSpec load your library.
<Burgestrand>
dunpeal typically you don't include `lib` in your requirement, you assume that the $LOAD_PATH is set up.
uncertainty has quit [Ping timeout: 240 seconds]
<Burgestrand>
dunpeal so when you `require "foo"` Ruby already knows to check in `lib/` first.
<inersha>
I want to create a string like this: ""{n:1}, {n:2}, {n:3} ... {n:100}". Is there a more rubyesque way of doing it than this:
luknerw has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Burgestrand>
dminuoso mentioned that RSpec does this for you already.
Qchmqs has quit [Read error: Connection reset by peer]
<inersha>
list = Array.new
<inersha>
for i in 1..200 do
<allisio>
If you're really keen, `require_relative '../lib/foo'` will get you there.
<inersha>
list << "{n:#{i}}"
<inersha>
end
luknerw has quit [Read error: Connection reset by peer]
<inersha>
list = list.join(', ')
<mnemon>
zipper: because the installation files are signed with gpg
<dunpeal>
Doesn't seem to have a standard way to document method parameters, which is pretty important
lenwood has joined #ruby
loechel has joined #ruby
JeanCarloMachado has joined #ruby
<Burgestrand>
dunpeal YARDoc has @param
tdy has joined #ruby
<Burgestrand>
dunpeal oh, btw, the setup for my spotify gem is too outdated, if you were to look at the setup I'd look at https://github.com/elabs/serial instead
<Burgestrand>
(I thought it was new enough, turns out it's in need of a touch-up :))
Pumukel has quit [Ping timeout: 256 seconds]
<Burgestrand>
dunpeal serial also happen to be documented using YARDoc and also has a rake task for generating the documentation
lightheaded has joined #ruby
alibby has quit [Ping timeout: 264 seconds]
alibby has joined #ruby
<zipper>
mnemon: You familiar with "gpg: keyserver receive failed: No route to host"? Am I having something like DNS issues
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElDoggo has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
bihi has quit [Quit: Bye!]
millerti has joined #ruby
yeticry_ has joined #ruby
milardovich has joined #ruby
Inv1s1ble_ has quit [Ping timeout: 240 seconds]
edliss has quit [Ping timeout: 260 seconds]
lenwood has quit [Ping timeout: 268 seconds]
yeticry has quit [Ping timeout: 260 seconds]
olivi____ has quit [Remote host closed the connection]
ozcanesen has joined #ruby
oliv_____ has joined #ruby
pfedpy has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has joined #ruby
oliv_____ has quit [Ping timeout: 246 seconds]
edliss has joined #ruby
ferr1 has quit [Quit: WeeChat 1.7]
cfec0b8d has joined #ruby
hotpancakes has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Gazeth_Sonica has quit [Quit: Leaving]
dhollin3 is now known as dhollinger
TomyWork has quit [Remote host closed the connection]
oliv_____ has joined #ruby
cagomez has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Ping timeout: 260 seconds]
aganov has quit [Remote host closed the connection]
quirkycoders has quit [Remote host closed the connection]
nobitanobi has joined #ruby
lenwood has joined #ruby
<cagomez>
first time using RoR on an existing codebase. when I enter `rails db` I get dropped into a psql console. what are the commands I can use to interact in this console? Is it this: https://www.postgresql.org/docs/9.0/static/app-psql.html
<nobitanobi>
hey alls. How do you call this pattern where you define a method like this: "self.[]" and then you basically call the MyClass[arg1,arg2]? I have seen it usually for classes that you command to do something, but I forgot the name of the pattern if any
<matthewd>
cagomez: Yes
<Papierkorb>
cagomez: You can also type `\help` (with a backspace) for in-shell help there
<elomatreb>
nobitanobi: Hash.[] and Array.[] create new instances from their arguments, but I don't know a name for that pattern either
<matthewd>
(sorry, should've answered in #rubyonrails instead)
<cagomez>
oh nice, thanks Papierkorb
aupadhye has quit [Quit: Leaving]
mark_66 has quit [Remote host closed the connection]
<Papierkorb>
s/backspace/backslash/
<Papierkorb>
jeez
<nobitanobi>
elomatreb: I've seen it people definining in its own classes, so instead of doing MyClass.new.execute(a,b,c), they do MyClass[a,b,c]
TomyLobo2 has joined #ruby
hutch34 has joined #ruby
<baweaver>
Normally because it's cleaner than injecting it into the Kernel so you can MyClass(a,b,c)
Derperperd has quit [Ping timeout: 240 seconds]
<baweaver>
instead it's just: class MyClass; def self.[](args) ... end; end
V1s1ble has joined #ruby
sagax has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
amclain has joined #ruby
Derperperd has joined #ruby
kinduff has joined #ruby
xall has quit [Ping timeout: 240 seconds]
username1 has joined #ruby
neuraload has quit [Quit: This computer has gone to sleep]
V1s1ble has quit [Ping timeout: 260 seconds]
olspookishmagus has quit [Remote host closed the connection]
mula has quit [Remote host closed the connection]
lightheaded has quit [Remote host closed the connection]
cagomez has quit [Read error: Connection reset by peer]
olspookishmagus has joined #ruby
lightheaded has joined #ruby
gusrub has joined #ruby
[Butch] has joined #ruby
unique has joined #ruby
kinduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millerti has joined #ruby
bkxd has joined #ruby
cagomez has joined #ruby
<unique>
Why is Ruby "very complex from inside, just like our human bodies."?
<baweaver>
that's a rather unique question
<baweaver>
also doesn't make much sense
ledestin has joined #ruby
uncertainty has quit [Ping timeout: 260 seconds]
mula has joined #ruby
<Papierkorb>
unique: Is your question from a quote you read somewhere? If yes, where? (I haven't heard of this either before)
lightheaded has quit [Ping timeout: 240 seconds]
<anekant>
why is ruby so needlessly controlling, forcing me to edit hundreds of files to change a require to require_relative?
DoubleMalt has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
<allisio>
Why is Ruby so loving, permitting me to do whatever the hell I want whencever I wish?
<anekant>
can i add . into $LOAD_PATH
<anekant>
like globally forever
kinduff has joined #ruby
<anekant>
whoever took it out is an insensitive clod.
<baweaver>
anekant: be nice.
conta has quit [Ping timeout: 260 seconds]
kinduff has quit [Client Quit]
<baweaver>
You could, though I don't believe it was ever there to begin with
teclator has quit [Remote host closed the connection]
kinduff has joined #ruby
V1s1ble has joined #ruby
V1s1ble has joined #ruby
V1s1ble has quit [Changing host]
blackwind_123 has joined #ruby
<allisio>
It was.
raul782 has quit [Remote host closed the connection]
bmurt has joined #ruby
grant has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has quit [Remote host closed the connection]
<allisio>
Better than it being at the very front, anyway.
hotpanca_ has joined #ruby
dionysus69 has joined #ruby
<allisio>
Kinda where you'd want it to be, though, if you did in fact want it in there.
<unique>
I meant, why ruby should be very complex from inside?
linux13337 has joined #ruby
<havenwood>
anekant: It's long been considered unsafe to have "." in your load path. Switch to require_relative.
dionysus69 has quit [Read error: Connection reset by peer]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hxegon>
unique: Well, there are 2 types of complexity, accidental and essential. What the ration is inside Ruby, I'm not sure, but I am sure that there is a lot of essential complexity in Ruby, and in our body. Essential complexity is basically complexity that is inherint in the problem domain, vs accidental complexity which arises from poor quality of work, external constraints etc.
Yxhvd has quit [Remote host closed the connection]
dionysus69 has joined #ruby
<hxegon>
s/inherint/inherent
<hxegon>
also s/ration/ratio
gusrub has quit [Remote host closed the connection]
sylario has joined #ruby
Yxhuvud has joined #ruby
<havenwood>
anekant: It's better to require relative to the file from which it was called rather than the working directory. Progress!
raul782 has joined #ruby
linux13337 has quit [Client Quit]
psychicist__ has quit [Ping timeout: 260 seconds]
skalfyfan has joined #ruby
BackEndCoder has quit [Excess Flood]
bmurt has quit [Ping timeout: 268 seconds]
<hxegon>
unique: also, sometimes things trade off an increase of internal complexity for some kind of external benefit, like a manual vs automatic transmission in a car. The manual may be much more simple/reliable mechanically, and yet most cars are automatic
kitikonti has joined #ruby
raul782 has quit [Remote host closed the connection]
BackEndCoder has joined #ruby
raul782 has joined #ruby
psychicist__ has joined #ruby
kitikonti has quit [Read error: Connection reset by peer]
hotpanca_ has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<allisio>
America is the only country.
Yxhuvud has quit [Read error: Connection reset by peer]
Yxhuvud has joined #ruby
gusrub has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
aufi has quit [Quit: Leaving]
polishdub has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
oliv_____ has quit [Remote host closed the connection]
kassav has quit [Quit: kassav]
d0nn1e has quit [Ping timeout: 246 seconds]
pwnd_nsfw` has joined #ruby
d0nn1e has joined #ruby
bmurt has joined #ruby
pwnd_nsfw has quit [Ping timeout: 268 seconds]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
<anekant>
one man's progress is another man's sadism
dar123 has joined #ruby
<anekant>
how can i monkey-patch to include . in the $LOAD_PATH each time ruby starts?
psychicist__ has quit [Read error: Connection reset by peer]
edliss has quit [Ping timeout: 258 seconds]
<allisio>
You're barking up the wrong tree.
<anekant>
oh well
rahul_bajaj has joined #ruby
xzhao has joined #ruby
hotpancakes has joined #ruby
<anekant>
i could fork it huh
<anekant>
you guys are all wrong on security
<anekant>
paranoid
nobitanobi has quit [Remote host closed the connection]
MrJoshua has joined #ruby
MrJoshua has quit [Client Quit]
cagomez has quit [Remote host closed the connection]
MrJoshua has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
esObe_ has quit [Remote host closed the connection]
nobitanobi has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<hxegon>
?coffee anekant
<ruby[bot]>
anekant: here's a coffee, you seem to need it: ☕
nobitanobi has joined #ruby
xall has joined #ruby
<anekant>
i had my morning weed so I'm questioning authority, sorry for being uppity
<hxegon>
S'all good anekant
dionysus69 has joined #ruby
andikr has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
hahuang61 has joined #ruby
Rodya_ has joined #ruby
jsrn_ has quit [Quit: Leaving]
jonjoe has joined #ruby
lightheaded has joined #ruby
chihhsin has quit [Quit: leaving]
Rodya_ has quit [Ping timeout: 246 seconds]
jonjoe has quit [Client Quit]
chihhsin has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
duderonomy has joined #ruby
JoshS has quit [Ping timeout: 268 seconds]
jgnagy has joined #ruby
stan has quit [Ping timeout: 240 seconds]
dopamean_ has joined #ruby
ptvttg has joined #ruby
jgnagy has quit [Ping timeout: 256 seconds]
JoshS has joined #ruby
mula has quit [Remote host closed the connection]
JoshS has quit [Max SendQ exceeded]
xen0fon has joined #ruby
oncall-pokemon has joined #ruby
allisio has quit [Quit: WeeChat 1.8-dev]
JoshS has joined #ruby
djbkd has joined #ruby
mula has joined #ruby
<apeiros>
anekant: "." in $LOAD_PATH isn't just about security. it's also brittle. it relies on the working dir. unless all your ruby apps ensure the working dir (and I doubt that), then . will break your stuff the moment you (try to) start it from elsewhere.
JoshS has quit [Max SendQ exceeded]
uncertainty has joined #ruby
Cohedrin has joined #ruby
<anekant>
yes well i was setting the working directory for loading and saving files inside the agents, which i have a lot of now
<apeiros>
anekant: then just set $LOAD_PATH to the actual directory instead of .
<apeiros>
s/set/add/
hotpancakes has quit [Remote host closed the connection]
JoshS has joined #ruby
Fin1te has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
JoshS has quit [Max SendQ exceeded]
uncertainty has quit [Ping timeout: 258 seconds]
hotpancakes has joined #ruby
itarato has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Ping timeout: 246 seconds]
sczizzo has joined #ruby
allisio has joined #ruby
DoubleMalt has quit [Ping timeout: 240 seconds]
kinduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin has joined #ruby
sczizzo has quit [Client Quit]
gregf_ has quit [Ping timeout: 260 seconds]
swills has quit [Remote host closed the connection]
rippa has joined #ruby
ianfleeton has quit [Quit: Leaving]
mula has quit [Remote host closed the connection]
swills has joined #ruby
mula has joined #ruby
senayar has quit []
grant has joined #ruby
xall has quit [Ping timeout: 268 seconds]
blackmes1 has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: WeeChat 1.5]
nobitanobi has joined #ruby
green_hat has joined #ruby
uncertainty has joined #ruby
flying has quit []
xall has joined #ruby
unique has quit [Ping timeout: 260 seconds]
hooper has joined #ruby
grant has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jaruga________ has quit [Quit: jaruga________]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
kinduff has joined #ruby
tomphp has joined #ruby
grant has joined #ruby
dn` has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
uncertainty has quit [Ping timeout: 264 seconds]
Rodya_ has joined #ruby
bkxd has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
ahrs has joined #ruby
grant has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
ptvttg has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
muelleme has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Ping timeout: 246 seconds]
ducks has quit [Ping timeout: 264 seconds]
oliv_____ has joined #ruby
ducks has joined #ruby
muelleme has quit [Ping timeout: 240 seconds]
xall has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
xall has joined #ruby
edliss has joined #ruby
pawnbox has joined #ruby
Fin1te has joined #ruby
xzhao has quit [Quit: No Ping reply in 180 seconds.]
banisterfiend has joined #ruby
xzhao has joined #ruby
edliss has quit [Ping timeout: 256 seconds]
aspiers has quit [Ping timeout: 256 seconds]
hotpanca_ has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
davidt has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
cibs has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
gizmore has joined #ruby
mula has quit [Remote host closed the connection]
bocaneri has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
cek has left #ruby [#ruby]
oliv_____ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
oliv_____ has joined #ruby
cdg has quit [Remote host closed the connection]
renchan has quit [Quit: Leaving...]
raul782 has joined #ruby
raul782 has quit [Remote host closed the connection]
milardovich has quit [Remote host closed the connection]
raul782 has joined #ruby
hotpancakes has joined #ruby
oliv_____ has quit [Ping timeout: 246 seconds]
T4nk5bb0t has joined #ruby
dionysus69 has joined #ruby
T4nk5bb0t has left #ruby [#ruby]
aspiers has joined #ruby
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
hotpancakes has quit [Client Quit]
umdstu has joined #ruby
<umdstu>
is there a best practice for communicating with a java jar daemon from inside ruby?
ElDoggo has quit [Remote host closed the connection]
marxarelli|afk is now known as marxarelli
ElDoggo has joined #ruby
ozcanesen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mula has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
ozcanesen has joined #ruby
green_hat has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
green_hat has joined #ruby
nobitanobi has quit []
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
ElDoggo has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Read error: No route to host]
bkxd has quit [Ping timeout: 258 seconds]
Rodya_ has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
ElDoggo has joined #ruby
oliv_____ has joined #ruby
xen0fon has quit [Quit: xen0fon]
ozcanesen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millerti has joined #ruby
bryanthompson has left #ruby [#ruby]
eregon_ is now known as eregon
jackjackdripper has joined #ruby
mula has joined #ruby
JeanCarloMachado has quit [Ping timeout: 256 seconds]
DARPA has quit [Ping timeout: 240 seconds]
szulak_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
edliss has joined #ruby
username1 has quit [Ping timeout: 268 seconds]
mula has quit [Remote host closed the connection]
banisterfiend has joined #ruby
nOwz has quit [Ping timeout: 260 seconds]
edliss has quit [Ping timeout: 240 seconds]
Renich has joined #ruby
lenwood has quit [Ping timeout: 260 seconds]
DARPA has joined #ruby
Renich has quit [Client Quit]
DARPA has quit [Read error: Connection reset by peer]
oliv_____ has quit [Remote host closed the connection]
Renich has joined #ruby
onkelhotte has joined #ruby
chouhoulis has quit [Remote host closed the connection]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has joined #ruby
tomphp has joined #ruby
cagomez has joined #ruby
jottr has joined #ruby
ozcanesen has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rhyselsmore has joined #ruby
<umdstu>
ty hxegon i will look into that
cdg has joined #ruby
<umdstu>
hxegon: ahh.. yea i'm not using jruby
dar123 has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackpajamas has joined #ruby
dar123 has quit [Client Quit]
kirun has joined #ruby
Paraxial has quit [Remote host closed the connection]
dar123 has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
alibby1 has joined #ruby
username1 has joined #ruby
nertzy has joined #ruby
alibby has quit [Ping timeout: 260 seconds]
alibby2 has joined #ruby
username1 has quit [Client Quit]
patarr_ has joined #ruby
cfec0b8d has quit [Ping timeout: 246 seconds]
armyriad has quit [Ping timeout: 240 seconds]
umdstu has quit [Remote host closed the connection]
armyriad has joined #ruby
alibby1 has quit [Ping timeout: 246 seconds]
bkxd has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has quit [Ping timeout: 260 seconds]
oliv_____ has joined #ruby
pwnd_nsfw has joined #ruby
aswen has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 260 seconds]
Renich has quit [Quit: Renich]
onkelhotte has quit [Ping timeout: 256 seconds]
Renich has joined #ruby
dar123 has joined #ruby
raspado has joined #ruby
patarr_ has quit [Ping timeout: 240 seconds]
xall has quit [Ping timeout: 240 seconds]
oliv_____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
codephreak has joined #ruby
akkad has quit [Excess Flood]
Renich_ has joined #ruby
patarr has joined #ruby
enterprisey has joined #ruby
<codephreak>
Hello everybody, I'm completely new to Ruby but I've experience in other programming languages. Where would you advice me to learn the language in a correct manner? :)
Renich__ has joined #ruby
pawnbox has quit [Remote host closed the connection]
<j416>
_why the lucky stiff's poignant guide to ruby is hilarious and useful
Renich has quit [Ping timeout: 240 seconds]
<hxegon>
Seconded
zeroDi has joined #ruby
millerti has joined #ruby
lxsameer has joined #ruby
Renich_ has quit [Ping timeout: 260 seconds]
<codephreak>
Alright, I'll check that out J4. Thank you very much :D
enterprisey has quit [Remote host closed the connection]
blackpajamas has quit [Quit: WeeChat 1.7]
<dgs>
what elomatreb said?
<dgs>
yeah - you're run all these code blocks when the file loads. Some of them create the methods used for testing, one of them is just a bare sleep statement that will be executed as soon as it sleeps
<dgs>
if you want it to sleep between those two tests (why?) you could either move the sleep into one of the tests
skalfyfan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dgs>
or put it in as an explicit call from your test script
skalfyfan has joined #ruby
czeq has quit [Ping timeout: 260 seconds]
raul782 has joined #ruby
maikowblue has quit [Quit: .]
milardovich has quit []
ramortegui has quit [Quit: Ex-Chat]
renchan has quit [Remote host closed the connection]
<Fin1te>
Yeah, I put the sleep inside the test and still no joy.
skalfyfan has quit [Ping timeout: 256 seconds]
<Fin1te>
I unfortunately understand what elomatreb said which makes me sad. I should have read more about rspec/serverspec.
<Fin1te>
Might be the wrong tool or I'm using it the wrong way.
<elomatreb>
I'd be interested too why you want to sleep between tests, seems strange
enterprisey has joined #ruby
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
<Fin1te>
I have a test that spins up a VM and I need to wait for the VM to be spun up before I can then run tests on that VM heh
ptx0 has joined #ruby
<baweaver>
Fin1te: before { create_files }; expect(files to be created); expect(other tasks)
sdrew has joined #ruby
<baweaver>
sleep 1 until vm_is_up
<dgs>
prob better to check if the if the vm is up rather than just sleep, no?
<baweaver>
probably
<baweaver>
but that'll at least get things running
<Fin1te>
True, but how does one do that in serverspec?
[Butch] has quit [Quit: I'm out . . .]
<dgs>
depends on what the server is . . . if it's a web server you could loop waiting til port 80 (or whatever) was open