<GlenK>
hi all. so I'm stuck on windows for the time being and was hoping to get some direction on what ruby implementation to go with. anyone have a reccomendation?
<Spooner>
GlenK : Ruby Installer 1.9.3
jillsmitt has joined #ruby
mmokrysz has joined #ruby
<Majost>
Spooner: thanks! =)
mrsolo has quit [Quit: Leaving]
<Spooner>
GlenK : Or, if you want multiple versions, you can use pik, which is sort of like rvm.
mmokrysz has left #ruby [#ruby]
methods1 has left #ruby [#ruby]
<Spooner>
Majost : I know I didn't answer your question, but not many people use vanilla OptionsParser any more.
SeySayux has joined #ruby
<GlenK>
Spooner: k, thanks.
<Spooner>
GlenK : There isn't really a viable alternative to RubyInstaller on windows (even pik just downloads the RubyInstaller zips)
<GlenK>
Spooner: what about that iron ruby thing?
Divinite has joined #ruby
<GlenK>
and then I thought there was java something or other too...
ephemerian has quit [Quit: Leaving.]
cbuxton1 has quit [Quit: Leaving.]
<Spooner>
GlenK : Well, OK, you can get some joy from IronRuby (but that isn't too popular and I've heard it was dying). jRuby works pretty well, I grant you (Rubinius, etc, don't even think about it :D).
ken_barber has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
levity_island has quit [Quit: levity_island]
jarred_ has joined #ruby
jarred has quit [Ping timeout: 256 seconds]
jarred_ is now known as jarred
adamkitt_ has quit [Remote host closed the connection]
bluOxigen has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
ringotwo has quit [Remote host closed the connection]
<Spooner>
GlenK : Welcome to the badlands and prepare to be shunned in #ruby :D
kn330 has quit [Ping timeout: 260 seconds]
<GlenK>
Spooner: ha. ok. it's only temporary though.
ken_barber1 has quit [Remote host closed the connection]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Divinite has quit [Quit: Divinite has left :(]
tommyvyo has joined #ruby
Chryson has joined #ruby
<twock>
testing your wayward bot again, jrajav ?
<jrajav>
Oh, it's tested
<jrajav>
It's done
<jrajav>
:>
<twock>
ah, so what's it do--just evaluate ruby code and print to the channel?
<jrajav>
Pretty much
<Spooner>
jrajav : I had to laugh earlier. It sent 2 lines to IRC to tell me that a 3-line error was too long to send to IRC (and PMed me).
<jrajav>
twock: You may have noticed that it also returns the result of the evaluation
havenn has quit [Ping timeout: 240 seconds]
<Spooner>
>> raise
<al2o3cr>
stderr was too long, I PMed it to you
<al2o3cr>
exit status: 1
<jrajav>
It wraps it in an eval and prints the end result
<jrajav>
Spooner: Gotta draw the line somewhere
<twock>
just arbitrary code? what machine is it running on?
jillsmitt has joined #ruby
<jrajav>
Spooner: General IRC consensus is 3 and up is spammy
<jrajav>
twock: A minimal chroot in an arch linux vm
<jrajav>
>> RUBY_VERSION
<al2o3cr>
(String) "1.9.3"
<jrajav>
And yeah, pretty much any code you want
<jrajav>
>> puts 'Even stdout works'
<al2o3cr>
Even stdout works
<al2o3cr>
(NilClass) nil
<Spooner>
>> `rm -rf /.'
<al2o3cr>
stderr:
<al2o3cr>
-e:1:in `eval': (eval):1: unterminated string meets end of file (SyntaxError)
<al2o3cr>
from -e:1:in `<main>'
<al2o3cr>
exit status: 1
<jrajav>
Is it just me or is it suddenly really slow :|
<Spooner>
See, 4 lines - SPAM!
<jrajav>
Don't tell me someone tried to forkbomb it
<Spooner>
>> `rm -rf /.`
<al2o3cr>
stderr was too long, I PMed it to you
<al2o3cr>
exit status: 1
<Spooner>
Ah right, if the error is 4 lines, it sends it to #ruby. 3 lines get PMed :)
<jonahR>
>> p "ROFL " * 500
adeponte has quit [*.net *.split]
yakko has quit [*.net *.split]
cakehero has quit [*.net *.split]
cid404 has quit [*.net *.split]
jbpros has quit [*.net *.split]
JodaZ_ has quit [*.net *.split]
affix has quit [*.net *.split]
saispo has quit [*.net *.split]
rotor has quit [*.net *.split]
explody has quit [*.net *.split]
X-Jester has quit [*.net *.split]
srnty has quit [*.net *.split]
jkyle has quit [*.net *.split]
<al2o3cr>
stdout was too long, I PMed it to you
sepp2k has quit [Remote host closed the connection]
<jrajav>
Spooner: The reason I set the limit at 2 lines is because the exit status line makes 3. The one up there is 4 because apparently a blank line doesn't count as line
<eam>
is there an easy way to break into an irb shell dynamically while a script is running?
<eam>
something like irb_repl() if assert(debug_case)
<Spooner>
IRB.start, I think, but it tries to run a file in ARGV, so I think you need to override that by passing something to the method.
<eam>
interesting
<eam>
thanks!
<eam>
IRB.start seems to have worked
jblack has quit [Ping timeout: 244 seconds]
bluenemo has quit [Read error: Connection reset by peer]
<eam>
or not .. hm
GlenK has quit [Quit: Page closed]
<Spooner>
Works for me doing it from pry. As I say, if you are doing it in a script, I think you need IRB.start nil or something, to stop it trying to run a file in ARGV.
luckyruby has joined #ruby
<eam>
it breaks out into a irb prompt but I don't seem to be able to access anything in scope
<banisterfiend>
eam: you can't do that without a grotesque monkeypatch to IRB
<eam>
mmm
<banisterfiend>
eam: pry does it with just: binding.pry
deryl has quit [Ping timeout: 245 seconds]
deryl has joined #ruby
<eam>
pry is the answer here eh? I'll give it a shot
adeponte has joined #ruby
cakehero has joined #ruby
jkyle has joined #ruby
cid404 has joined #ruby
jbpros has joined #ruby
JodaZ_ has joined #ruby
rotor has joined #ruby
saispo has joined #ruby
explody has joined #ruby
affix has joined #ruby
X-Jester has joined #ruby
srnty has joined #ruby
cakehero has quit [Max SendQ exceeded]
rodj has quit [Quit: rodj]
JodaZ_ has quit [Quit: No Ping reply in 180 seconds.]
cakehero has joined #ruby
JodaZ has joined #ruby
affix has quit [Max SendQ exceeded]
davidcelis has joined #ruby
emmanuelux has quit [Ping timeout: 245 seconds]
jjbohn has joined #ruby
graspee has quit [Quit: leaving]
affix has joined #ruby
butblack has joined #ruby
cakehero has quit [Client Quit]
chichou_ has quit [Ping timeout: 276 seconds]
jblack has joined #ruby
luckyruby has quit [Remote host closed the connection]
cakehero has joined #ruby
chichou has joined #ruby
<allyraza>
Glenk: ruby Installer
deryl has quit [Ping timeout: 276 seconds]
axl_ has joined #ruby
opus has quit [Quit:]
mfridh has quit [Ping timeout: 268 seconds]
Russell^^ has quit [Quit: Russell^^]
<RubyPanther>
Spooner: right, the block form throws it away. But the argument form saves it into the default object without auto-vivifying
Eplemosen has quit [Quit: Leaving]
tommyvyo has quit [Quit: Computer has gone to sleep.]
MornStar has quit [Ping timeout: 240 seconds]
chimkan has joined #ruby
kenichi has joined #ruby
jarred has quit [Quit: jarred]
stephenjudkins has quit [Quit: stephenjudkins]
adeponte has quit [Remote host closed the connection]
kenichi has quit [Ping timeout: 240 seconds]
Spooner has quit [Ping timeout: 276 seconds]
tfitts has quit [Ping timeout: 240 seconds]
chichou_ has joined #ruby
tiripamwe has joined #ruby
Z_Mass has joined #ruby
coyo has quit [Read error: Connection reset by peer]
jblack has quit [Ping timeout: 248 seconds]
chichou has quit [Ping timeout: 276 seconds]
davidboy has quit [Quit: Connection closed for inactivity]
scb has joined #ruby
igotnolegs has joined #ruby
<banisterfiend>
igotnolegs: how did you lose your legs
Banistergalaxy has joined #ruby
allyraza has quit [Ping timeout: 244 seconds]
codeFiend has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
araujo has quit [Quit: Leaving]
khakimov has quit [Quit: Computer has gone to sleep.]
jonahR_ has joined #ruby
banisterfiend has quit [Ping timeout: 252 seconds]
TorpedoSkyline has joined #ruby
jonahR has quit [Ping timeout: 240 seconds]
jonahR_ is now known as jonahR
niklasb has quit [Ping timeout: 245 seconds]
voodoofish430 has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
savage- has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
butblack has quit [Quit: butblack]
chichou_ has quit [Ping timeout: 276 seconds]
chichou has joined #ruby
jblack has joined #ruby
bothra has quit [Read error: Connection reset by peer]
lledet has joined #ruby
tiripamwe has quit [Quit: Leaving]
tiripamwe has joined #ruby
maletor has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
mrdodo has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
havenn has quit [Ping timeout: 245 seconds]
jjbohn has quit [Quit: Leaving...]
Tomasso has quit [Read error: Connection reset by peer]
chichou has quit [Ping timeout: 276 seconds]
chichou has joined #ruby
randomautomator has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
adeponte has joined #ruby
jjbohn has joined #ruby
Araxia has joined #ruby
td123 has joined #ruby
beneggett has joined #ruby
chichou has quit [Ping timeout: 260 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
inteq has joined #ruby
chichou has joined #ruby
luckyruby has joined #ruby
uris has joined #ruby
deryl has joined #ruby
krz has quit [Quit: krz]
apok has joined #ruby
fbernier has joined #ruby
Clooth is now known as Clooth[afk]
Clooth[afk] is now known as Clooth
luckyruby has quit [Remote host closed the connection]
fbernier has quit [Ping timeout: 276 seconds]
deryl has quit [Quit: deryl]
yoklov has quit [Quit: computer sleeping]
deryl has joined #ruby
adeponte has quit [Remote host closed the connection]
deryl has quit [Read error: Connection reset by peer]
apok has quit [Quit: apok]
andrewhl has joined #ruby
Z_Mass has quit [Quit: Leaving]
lledet has quit [Quit: lledet]
kvirani has joined #ruby
jbpros has quit [Quit: May the Cuke be with you!]
affix has quit [Ping timeout: 260 seconds]
saispo has quit [Ping timeout: 260 seconds]
affix has joined #ruby
affix has quit [Changing host]
affix has joined #ruby
jbpros has joined #ruby
saispo has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
fbernier has joined #ruby
EricKamsky has quit [Quit: EricKamsky]
rbanffy has quit [Ping timeout: 276 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
powerplay has joined #ruby
freeayu has quit [Quit: 离开]
<powerplay>
hey everyone just a quick question, in ruby whats the convention for control flow statements....it is good practice to use case statements or if elsif statements?
ryanf has joined #ruby
rbanffy has joined #ruby
<powerplay>
if have the option of writing something in "if elsif" or "case" should i prefer one over the other or it dosent really matter??
ananthakumaran has joined #ruby
chessguy has quit [Remote host closed the connection]
<Banistergalaxy>
Didn't matter
[1]dtribble has joined #ruby
havenn has joined #ruby
Synthead has joined #ruby
<powerplay>
Thanks!
mikepack has quit [Remote host closed the connection]
dtribble has quit [Ping timeout: 276 seconds]
havenn has quit [Ping timeout: 248 seconds]
savage- has joined #ruby
bgupta has quit [Ping timeout: 252 seconds]
Juul has joined #ruby
bgupta has joined #ruby
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Boohbah>
powerplay: i would use a case statement if you have more than 3 cases
gmci has joined #ruby
tiripamwe has quit [Ping timeout: 245 seconds]
tiripamwe has joined #ruby
maxmmurphy has joined #ruby
zipace has joined #ruby
pskosinski has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
mucker has joined #ruby
richo has joined #ruby
jasonLaster has joined #ruby
<richo>
Is there a ruby variant of python's os.devnull that returns the current platforms null device?
jonahR has quit [Quit: jonahR]
lledet has joined #ruby
arkiver has joined #ruby
RichieEvan has quit [Ping timeout: 248 seconds]
rubious has joined #ruby
rippa has joined #ruby
rubious has quit [Client Quit]
haiqus has joined #ruby
luckyruby has joined #ruby
luckyruby has quit [Read error: Connection reset by peer]
luckyruby has joined #ruby
sgronblom has quit [Ping timeout: 268 seconds]
subbyyy has joined #ruby
haiqus has left #ruby [#ruby]
adeponte has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
jjbohn has quit [Quit: Leaving...]
fbernier has quit [Remote host closed the connection]
td123 has quit [Quit: WeeChat 0.3.8]
jjbohn has joined #ruby
mucker has quit [Remote host closed the connection]
kvirani has quit [Remote host closed the connection]
<powerplay>
Boohbah: thanks
jjbohn has quit [Client Quit]
kyb3r has quit []
havenn has joined #ruby
luckyruby has quit [Read error: Connection reset by peer]
arkiver has quit [Ping timeout: 276 seconds]
Banistergalaxy has joined #ruby
luckyruby has joined #ruby
ryanf has quit [Quit: leaving]
havenn has quit [Ping timeout: 252 seconds]
ringotwo has joined #ruby
shadoi has joined #ruby
Clooth is now known as Clooth[afk]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
chichou has quit [Remote host closed the connection]
noyb has joined #ruby
Clooth[afk] is now known as Clooth
gtuckerkellogg has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
justsee has joined #ruby
maxmmurphy has quit [Quit: maxmmurphy]
noyb has quit [Quit: leaving]
nobitanobi has joined #ruby
wurble has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
<richo>
nobitanobi: I never wrote any, I hacked it up at a hackathon. What I meant is that oauthproxy is a working example of a super thing oauth client, and I think I documented what it's expecting
<richo>
so you should be able to infer from that. Dunno, it may be of no help to you in that case
tiripamwe has quit [Quit: Leaving]
<nobitanobi>
richo: right…I'm just wondering how to approach a rspec testing when trying to write the Client for the Oauth. Thanks though.
<nobitanobi>
richo: I'm basically stacked on how to start with the testing.
<richo>
something like VCR would probably be easiest
<nobitanobi>
richo: yes. I have that in mind, but in order to see that the authentication is done properly, I should test the client. I'm thinking of using VCR for the later HTTP petitions...
<nobitanobi>
richo: But I might be completely wrong or making it too complicated. Trying to write a gem for the community.
<richo>
nobitanobi: seems reasonable. OAuth is pretty well defined, although in fairness, why are you reimplmenting oauth and not just using a gem that has tests?
<nobitanobi>
richo: I am actually using the Oauth gem. But since I am going to create a class "Client" that will do something like OAuth::Consumer.new(@consumer_key, @consumer_secret, {:site => "http://#{Site}"}) , I guess I need to test that.
<richo>
nobitanobi: Site should be @site most likely
<richo>
and use https with their api
<nobitanobi>
richo: ok. thanks for the recommendations. I will try to investigate how to mock that OAuth and what to do with the mock. I feel stacked :)
Banistergalaxy has quit [Ping timeout: 252 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has quit [Read error: Connection reset by peer]
havenn has joined #ruby
nobitanobi has joined #ruby
sgronblom has joined #ruby
butblack has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
nobitanobi has quit [Client Quit]
jasonLaster has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 244 seconds]
Guest74974 has joined #ruby
jrajav has quit [Quit: The best darkness is strange and surprising]
chimkan_ has joined #ruby
juarolex has joined #ruby
chimkan has quit [Ping timeout: 240 seconds]
riley526 has joined #ruby
justsee is now known as justsee|away
n_blownapart has joined #ruby
juarolex has quit [Client Quit]
insecurlex has joined #ruby
<Paradox>
is there any way to set case-insensitive with %r{}
maxmmurphy has quit [Quit: maxmmurphy]
chimkan_ has quit [Ping timeout: 248 seconds]
queequeg1 has quit [Quit: leaving]
mockra has quit [Remote host closed the connection]
Clooth[afk] is now known as Clooth
insecurlex has quit [Client Quit]
<riley526>
What's the difference between this channel and #ruby-lang?
insecurlex has joined #ruby
mockra has joined #ruby
Clooth has quit [Quit: Screw you guys, I'm going home!]
<richo>
Paradox: %r{}i
butblack has quit [Quit: butblack]
insecurlex has quit [Client Quit]
<Paradox>
derp
<Paradox>
thats obvious
<Paradox>
thanks
n_blownapart has quit [Remote host closed the connection]
<richo>
np
twock has quit [Ping timeout: 245 seconds]
<banisterfiend>
riley526: #ruby-lang is the 'official' one apparently
insecurlex has joined #ruby
<Paradox>
more users here
n_blownapart has joined #ruby
<banisterfiend>
also a greater proportion of noobs and epsilon semi-morons here ;)
lledet has left #ruby [#ruby]
<Paradox>
i fall in the second category
<riley526>
Ah, good to know :)
insecurlex has quit [Remote host closed the connection]
<n_blownapart>
hi why can't I create an instance of Temperature, x = Temperature.new, and run x.c2f(100) ? thanks: http://pastie.org/4453838
insecurlex has joined #ruby
mockra has quit [Ping timeout: 272 seconds]
<bnagy>
because they're class methods
<bnagy>
as they should be, iho
insecurlex has quit [Client Quit]
<richo>
x.class.c2f(100) would work though
<richo>
if you really just had your heart set on involving an instance, somehow
insecurlex has joined #ruby
rubious has joined #ruby
<n_blownapart>
thanks, in geezer thought richo bnagy
<richo>
... wat
gmci has joined #ruby
<banisterfiend>
bnagy: labyu
<richo>
wait, napolean_blownapart?
<richo>
That is a fucking brilliant nick.
<n_blownapart>
I'm thinking geezer thoughts, ie I'm wondering why you can use the reserve word class. richo
<n_blownapart>
thanks richo
cakehero has quit [Quit: Computer has gone to sleep.]
<richo>
Ah, I geddit now. Object#class returns an oject's class
ziprar has joined #ruby
mohits has joined #ruby
rubious has quit [Client Quit]
<riley526>
Is there a quick overview of ruby somewhere for someone coming from a Python background? I mainly just want to be able to read ruby without scratching my head all the time.
<n_blownapart>
richo you mean in the case of x.class.c2f(100)
<richo>
There's an awesome comparison thing that I was using for a while
<richo>
n_blownapart: I mean in general, but yes Temperature.new.class # => Temperature
<banisterfiend>
riley526: zenspider quickref
<banisterfiend>
riley526: goodle it :)
<banisterfiend>
google*
* richo
registers goodle.com
bglusman has quit [Remote host closed the connection]
* Paradox
registers gøøglé
<riley526>
banisterfiend: cool, I'll check it out. thanks.
<Paradox>
gewgal
zipace has quit [Ping timeout: 245 seconds]
bglusman has joined #ruby
<n_blownapart>
richo: so the word class is a special word too...a placemarker for Temperature in this case? Or is like Self ?
<richo>
class is a method on Object that returns the class of self
<bnagy>
class is just a method
<richo>
you can overload it if you really want
<richo>
but that will probably not end well
<bnagy>
in the model you've got probably a Module is better tbf
bluebie has joined #ruby
<bnagy>
cause it's pointless having an instance of that class
<n_blownapart>
its a textbook example bnagy richo . but that is cool that #class returns self. I'm reviewing a lot of ruby I once knew. thanks
<richo>
it doesn't return self
<richo>
it returns the class of self
<Paradox>
look at all the shit i've removed over the past 2 days
<n_blownapart>
richo: ie its a sort of placemarker for the class Name?
<richo>
n_blownapart: no, it returns the class of whatever object you call it on
<Paradox>
erm
<Paradox>
wrong chan
<richo>
unless it's been overloaded to return a different class. For some insane reason. Most likely because you hate all the people you think might one day debug your code
<n_blownapart>
bnagy: richo thanks I think I get it. With x.class.c2f(100) , class is substituted for the full class Name Temperature.
<richo>
not the class name
<richo>
the class itself
bglusman has quit [Remote host closed the connection]
<richo>
also, it was just an example. You really shouldn't use using instance.class.method, just call it on the class directly
<richo>
Temperature.c2f(100) is what you're after
<n_blownapart>
richo: yeah that's what the book had. I was unclear about creating an instance, but it is interesting to know I could use class. but , sorry, how are you discerning between the class itself and the class name?
ipoval has joined #ruby
<richo>
because the name is just a binding, the class is the data structure itself
<n_blownapart>
ok richo yeah I understand that. thanks very much.
noyb has quit [Quit: leaving]
noyb has joined #ruby
justsee|away is now known as justsee
mohits has quit [Read error: Connection reset by peer]
noyb has quit [Quit: leaving]
noyb has joined #ruby
adeponte has quit [Remote host closed the connection]
havenn has joined #ruby
baphled has quit [Ping timeout: 240 seconds]
tewecske has joined #ruby
jarred has joined #ruby
nari has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<apeiros_>
gioele: I think re =~ str is pretty much as fast as you can go with vanilla ruby
joesavage has joined #ruby
nobitanobi has joined #ruby
<joesavage>
What counts as a block in Ruby? I just noticed that variables created in 'if' statements, for example, don't actually appear to be in saperate blocks...
<joesavage>
separate*
rohit has joined #ruby
<apeiros_>
joesavage: { … } and do … end
<joesavage>
apeiros_: So only those things and nothing else? What about methods?
<apeiros_>
methods are not blocks
<apeiros_>
neither are procs
mekeor has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<apeiros_>
you can create methods by using a block (see define_method and define_singleton_method)
<apeiros_>
also you use a block to create a proc
<apeiros_>
but they themselves are not blocks
<joesavage>
apeiros_: Wow, this feels super weird for me since I'm primarily a C programmer. So variables created in methods can be accessed outside of that method? Surely that must be true if it isn't a block
<apeiros_>
joesavage: no. you're having a terminology confusion there ;-)
<apeiros_>
methods do create a new lexical scope
justsee has quit [Quit: Leaving...]
<apeiros_>
but scoping & blocks are two different topics
<joesavage>
apeiros_: Ah. So a C block isn't quite like a Ruby block. Ok, so what things create new lexical scopes?
<apeiros_>
the other way round actually can be made to work. since a block is also a closure, you can create a method with access to the outside lexical scope.
keppy has quit [Ping timeout: 272 seconds]
<apeiros_>
joesavage: class/module/def, I think those are the only ones. might be missing some, though (just got up)
<nobitanobi>
I am trying to create a wrapper for fetching the Yelp API which requires to use OAuth. I am trying to use rspec in order to test the client that will deal with the OAuth consumer and access token, but I fail to see how would I test that. Here is my non tested client: https://github.com/novito/rubyelp/blob/master/lib/rubyelp/oauth_client.rb
<apeiros_>
(that's for local variables notabene)
<joesavage>
apeiros_: Right, ok. So blocks themselves actually don't create a new scope?
<nobitanobi>
Anyone could point me to a way to test this client? If I want to open source the gem is not a good idea to have api keys around, so how do you do it?
<pskosinski>
How to sort hash using his keys? ^^
<pskosinski>
values *
<gioele>
apeiros_: it seems strange to me that you cannot do better. Maybe a new boolean predicate 'match?' should be introduced to let implementations take shortcuts during the checks?
<Spooner>
joesavage : The big thing is that everything in Ruby is an expression (y = if x > 5; 3; else; 2; end), not a statement, so it wouldn't make sense for if/else/end to be a separate "block" in the C sense.
<apeiros_>
joesavage: in 1.9 they do, but they also close over the current lexical scope
<pskosinski>
nobitanobi: Thanks you. :)
<apeiros_>
pskosinski: hash.sort_by(&:first)
<joesavage>
apeiros_: Darn this is confusing! Thanks for your help anyway :P
<apeiros_>
gioele: =~ already does that
<pskosinski>
apeiros_: Thanks. ^^
vectorshelve has quit [Ping timeout: 245 seconds]
gmci has joined #ruby
<Spooner>
nobitanobi : You just need to not check-in the api keys (put them in a separate file which is in .ignore, assuming you are using git).
<apeiros_>
gioele: =~ only needs to remember the current position, and that you need anyway, so it's not like you could gain anything there.
<gioele>
apeiros_: doesn't it set also various $... variables?
<apeiros_>
gioele: what can be done better is preprocessing either the search term or the searched text
justsee has joined #ruby
<apeiros_>
gioele: no, $ vars are lazy
<apeiros_>
gioele: that's why =~ is faster than match
<gioele>
apeiros_: ah lazy vars, good to know
<apeiros_>
gioele: technically they even only look like vars. they're quite an ugly hack…
<nobitanobi>
Spooner: ok that solves the keys problem. Do you know of any gem that I could look to see what/how to test this client in rspec? I'm pretty much lost.
rohit has quit [Remote host closed the connection]
<Spooner>
nobitanobi : I don't know exactly what you need it to do.
<gioele>
apeiros_: but it is nice to know that MRI does not waste time computing vars almost nobody uses, just for compatibility sake
<nobitanobi>
Spooner: Right. Basically since I want to fetch the Yelp API using Omniauth I am intending to have a client that will deal with the creation of a consumer and an access token from given some keys. That's what I basically need to test of that client.
<nobitanobi>
*using Oauth.
<Spooner>
nobitanobi : You could just mock out the external connection during testing (but that would be unit testing, not integration testing which I'm assuming it what you want). I'm not aware of a gem that makes testing of that sort easier, but it is outside my experience (someone else might know).
<nobitanobi>
Spooner: Right. I guess I will continue searching existing gems that have a OAuth client and see how they test it :)
elaptics has joined #ruby
<Spooner>
nobitanobi : yeah, probably a good plan.
joesavage has quit [Quit: Page closed]
macer1 has quit [Remote host closed the connection]
<nobitanobi>
Spooner: thanks :-)
|RicharD| has joined #ruby
<|RicharD|>
hello what kind of error is unexpected tEQ ?
<apeiros_>
|RicharD|: a syntax error
d3vic3 has quit [Ping timeout: 245 seconds]
<|RicharD|>
that mean ?
<apeiros_>
and ruby probably tells you as much. means you have an "=" somewhere where ruby doesn't expect one
<apeiros_>
tEQ --> equal token
<|RicharD|>
maybe is because i use
<|RicharD|>
& ?
<apeiros_>
|RicharD|: I'm by no means psychic
<Mon_Ouie>
Seeing your code would help
<|RicharD|>
like conditionA == 1 % conditionB == 5
<|RicharD|>
ops &*
<|RicharD|>
if conditionA == 1 & conditionB == 5
<apeiros_>
|RicharD|: no, that piece of code wouldn't cause that exception
<apeiros_>
and you can easily figure that out too by either using irb or ruby -e
<Spooner>
|RicharD| : It is &&, not &
<elaptics>
|RicharD|: if you're trying to and them together its &&
<Mon_Ouie>
Depends on what conditionA/B is
Morkel has joined #ruby
<|RicharD|>
OKi thx anyway with and
<|RicharD|>
i have fixed but i wanted know better
<apeiros_>
&& vs & seconded, but not the source of his problem
<|RicharD|>
conditionA/B are variable
d3vic3 has joined #ruby
<Mon_Ouie>
It does generate the exception actually
<apeiros_>
|RicharD|: ruby tells you the line number where it happens. it happens either there or is a follow-up error of broken syntax earlier.
<Mon_Ouie>
And that's because & doesn't have the same precedence as &&
<Spooner>
(-e:1:in `eval': (eval):1: syntax error, unexpected tEQ (SyntaxError) and it points directly at the & operator as the culprit :D).
<apeiros_>
(1 == 2) == 3 # works fine
<apeiros_>
I think that's the first time I see a syntax error due to precedence…
<|RicharD|>
yes it's strange
<|RicharD|>
I have ruby 1.9.3 if i remember well
<apeiros_>
ruby -v and RUBY_VERSION can tell you
<apeiros_>
no need to remember :-p
<Spooner>
apeiros_ : There are others: "3.is_a? Fixnum && 5.is_a? Fixnum" (SyntaxError: unexpected tCONSTANT, expecting $end) but "5.is_a? Fixnum and 5.is_a? Fixnum" is fine.
<apeiros_>
ok, but that one isn't that unexpected
<Spooner>
Although that may not have been talking about.
<apeiros_>
but yeah, nice example of another precedence induced syntax error
chessguy has joined #ruby
<apeiros_>
(those wondering, `3.is_a? Fixnum && 5.is_a? Fixnum` is seen by ruby as `3.is_a?(Fixnum && 5.is_a?) Fixnum`)
d3vic3 has quit [Ping timeout: 272 seconds]
caveat- has quit [Quit: leaving]
<Spooner>
"&&" is a lot more insecure than "and", so it is terribly clingy :P
<Spooner>
nobitanobi : I should test more things like that.
br4ndon has quit [Ping timeout: 245 seconds]
<Spooner>
Odd, since it should either use #pending, or, if it is an auto-generated file, they usually do true.should == false (at least that is what the default rspec file does in RubyMine).
<Spooner>
Oh well.
<nobitanobi>
Spooner: this is my first gem that I want to contribute to the community and I think it's worth making the tests. hehe
jjbohn has joined #ruby
<apeiros_>
man, addresses… it's so hard to make a nice API around the data supplied by our postal service :(
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
<nobitanobi>
Surprisingly enough, I have found many API wrappers without test on Github...
Abbas- is now known as Abbas5
<Spooner>
Stuff on Github isn't vetted, but gems that actually get used are :)
<nobitanobi>
Well, I guess I would do my best. Thanks a lot Spooner
blacktulip has quit [Read error: Connection reset by peer]
VegetableSpoon has joined #ruby
blacktulip has joined #ruby
kirun has joined #ruby
Abbas5 is now known as Abbas|
gioele has left #ruby [#ruby]
jonathanwallace has joined #ruby
mengu has quit [Remote host closed the connection]
ly_gs has quit [Remote host closed the connection]
uris has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
br4ndon has joined #ruby
twock has joined #ruby
flint has quit [Remote host closed the connection]
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
Speed has joined #ruby
Russell^^ has joined #ruby
imami|afk is now known as banseljaj
nobitanobi has quit [Quit: Leaving.]
bluenemo has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
Abbas| has quit [Ping timeout: 248 seconds]
graspee has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
alexwh has quit [Ping timeout: 252 seconds]
baphled has joined #ruby
alexwh has joined #ruby
lxsameer has joined #ruby
Markvilla has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
lxsameer has left #ruby [#ruby]
Axsuul has quit [Ping timeout: 272 seconds]
paradoja has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
Eldariof-ru has joined #ruby
qwerxy has joined #ruby
qwerxy has quit [Client Quit]
mike4_ has joined #ruby
dpk has joined #ruby
dpk has quit [Client Quit]
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
<shevy>
alias SetMargins set_margins
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
<shevy>
I am updating rfpdf!
<shevy>
w=@w-@rMargin-@x if w==0
<shevy>
omg
nobitanobi has joined #ruby
gmci has joined #ruby
JarJar has quit [Quit: Leaving]
Abbas5 is now known as Abbas|
wargasm has quit [Read error: Connection reset by peer]
Stalkr_ has joined #ruby
wargasm has joined #ruby
dpk has joined #ruby
sailias has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
liluo has quit [Remote host closed the connection]
shevy has joined #ruby
ipoval has joined #ruby
nobitanobi has joined #ruby
jasonLaster is now known as jasonLas
nari has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
saschagehlich has joined #ruby
yoklov has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
liluo has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
ananthakumaran has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
mikepack has quit [Remote host closed the connection]
asteve has quit [Quit: Computer has gone to sleep.]
kn330 has joined #ruby
beneggett has joined #ruby
havenn has joined #ruby
otters has quit [Ping timeout: 244 seconds]
verto|off is now known as verto
Eldariof-ru has joined #ruby
vlad_starkov has joined #ruby
vectorshelve has joined #ruby
pu22l3r has joined #ruby
dtribble has joined #ruby
Eldariof59-ru has joined #ruby
savage- has joined #ruby
mrwalker has quit [Remote host closed the connection]
<vectorshelve>
why is new_cells empty after the method http://pastie.org/4455985 please help me correct the mistake
vlad_starkov has quit [Ping timeout: 245 seconds]
hdzhdgn has quit [Quit: hdzhdgn]
<shevy>
wat
Eldariof-ru has quit [Ping timeout: 265 seconds]
<shevy>
vectorshelve, you see it is being filled up only in conditions where
<shevy>
you use
<shevy>
foo << bla
<shevy>
right?
<shevy>
but you do not check for all these conditions
<vectorshelve>
shevy: yes but when I output theres nothing in it .. and also the count of new_cells gives me zero
<shevy>
so the only way where your array can be empty, is that these conditions in your code are not checked
<shevy>
yes
<shevy>
because NONE of the methods with << is checked
<shevy>
btw, I tend to use debug statements
<shevy>
like:
<shevy>
pp 'we are here now...'
<shevy>
it is primitive but it often works
<Hanmac>
"null" oO
<vectorshelve>
shevy: actually the reason is as and how each cell in the block gets processed the state of cell changes so I dont want to update it there itself since it will affect the values of the next cels..
beneggett has quit [Quit: Computer has gone to sleep.]
<shevy>
vectorshelve wat
<Hanmac>
you forgot the case when nothing changes
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<vectorshelve>
shevy: each cell in the array of cells will have its state updated based on the number of neighbours states.. so if I updated the cell state inside the block itself it will affect the state of the cells to follow since the processing needs to happen with refernce to the initial grid pattern as it was
ChampS666 has quit [Ping timeout: 276 seconds]
<Hanmac>
vectorshelve: you not need temp_cell in your code, and you dont need new_cells
<Hanmac>
PS: and grid should have its own each method
andrewhl_ has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
<vectorshelve>
shevy: Hanmac ok this is the code http://pastie.org/4456025 it works but the issue is I dont get the o/p pattern correctly since I am updating each cell's state inside the block itself.. instead I want to keep all the cells in a temporary array and after the block is over assign it to grid something like grid.cells = new_cells
gmci has quit [Quit: Computer has gone to sleep.]
liluo has quit [Remote host closed the connection]
kyktommy has quit [Quit: kyktommy]
<shevy>
this is crazy man
<shevy>
at least you removed the amount of lines
<shevy>
I mean
<shevy>
*reduced the amount of lines
<vectorshelve>
shevy: I hope u got my point
darren has joined #ruby
liluo has joined #ruby
andrewhl has quit [Ping timeout: 276 seconds]
yoklov has quit [Quit: computer sleeping]
td123 has joined #ruby
<Hanmac>
hm you could use state abd new_state ... or that state= sets it to an different instance-var .. and when you are finish with your loop you call grid.update or that sets @state with @new_state in each cell
<vectorshelve>
shevy: this works.. but since I am updating the cell object inside the block its affecting the result of the cells which follow..since they get processed based on the state of previous cells.. so I would wanna use a temp cell array which isnt working well for me
vlad_starkov has joined #ruby
<vectorshelve>
Hanmac: i have cell attributes x,y and state and grid has array of cells..thats my design
<Hanmac>
i mean: add an new_state attribute to cell
chichou has joined #ruby
<vectorshelve>
Hanmac: shevy I have a ticker class to which I pass the grid and it applies rules on grid to produce updated grid
yoklov has joined #ruby
<shevy>
hehe
Morkel has joined #ruby
<shevy>
a long time ago I decided that, if code confuses me, it is wrong
<vectorshelve>
Hanmac: :) then it would only work for one ticker and game of life is infinite :)
<shevy>
since that day I write only dead simple code
havenn has quit [Remote host closed the connection]
<vectorshelve>
shevy: here the issue is abt implementation code simplicity will follow :)
<Hanmac>
shevy do you understand my idea with @state and @new_state?
<vectorshelve>
Hanmac: so u mean each time I call ticker it will update states by toggling state and new_state ? good one :)
zelo has joined #ruby
<vectorshelve>
Hanmac: but wouldnt it be over head since I am using an extra attribute ?
<Hanmac>
thats one of my ideas
<shevy>
Hanmac I dunno
<vectorshelve>
Hanmac: I got ur idea its seriously a good one :)
vlad_starkov has quit [Ping timeout: 245 seconds]
<shevy>
last time I did something with grid was the 2D minesweeper part
<vectorshelve>
Hanmac: I will do that will be easier..
<vectorshelve>
shevy: 5 years ago ryt ?
<vectorshelve>
Hanmac: thanks bro but before I proceed do u have any better suggestions on this ?
<vectorshelve>
Hanmac: I am still wondering why the temp array of cells isnt working well :( something wrong with me code? if so could u correct me
<shevy>
vectorshelve yeah, about
<shevy>
I wrote it so I could have ruby-gtk minesweeper
<vectorshelve>
shevy: cute and nostalgic for you
nobitanobi has joined #ruby
<Hanmac>
currently no ... because i am on a life-cd ( shevy ... my life-cd has 1.9.3 as default ruby installed XD)
<vectorshelve>
Hanmac: ok but code correction part? if I could make that temp_array working wouldnt that be good ?
<shevy>
Hanmac man install to hd!
<nobitanobi>
I'm trying to test a gem that I am creating, and when I run 'rake test' I get total:0 tests even though I have several specs defined. https://gist.github.com/3325615 — What am I missing?
patient has joined #ruby
<Hanmac>
you dont need the temp_arry
<vectorshelve>
shevy: Hanmac I am buying a samsung 40inch LED full HD :)
<vectorshelve>
Hanmac: then what do I want ?
<Hanmac>
shevy i only needed the life-cd for restoring of my system
subbyyy has quit [Quit: Leaving.]
otters has joined #ruby
maletor has joined #ruby
<vectorshelve>
Hanmac: could you correct my code please bro ?
ianbrandt has joined #ruby
<patient>
hey guys, been learning ruby lately, mainly from 'The Well-Grounded Rubyist' and now i feel like i understand a bit of how ruby works and the tools it has to offer, but am never sure when to apply them (affraid i'm not doing it "The Ruby Way")
<patient>
where should i go from here, can someone recommend some nice resources or projects i can copy from? :P
<vectorshelve>
patient: do rubymonk.com
nobitanobi has quit [Read error: Connection reset by peer]
<vectorshelve>
patient: also do learn ruby the hard way
noyb has joined #ruby
nobitanobi has joined #ruby
<patient>
vectorshelve: danke
* Hanmac
detects german user
azm has quit [Ping timeout: 240 seconds]
paval has joined #ruby
<vectorshelve>
Hanmac: you didnt respond bro :(
liluo has quit [Remote host closed the connection]
paval is now known as vegeek-ng
<Hanmac>
i only helps people that listen to what i say ... i said about update method and non-attribute state= method in Cell and an each and an update method in Grid
savage- has quit [Remote host closed the connection]
bglusman has quit [Remote host closed the connection]
IrishGringo has joined #ruby
<vectorshelve>
Hanmac: ok
vlad_starkov has joined #ruby
<vectorshelve>
Hanmac: well ur idea of @state and @new_state would encounter some issues since I will have to also keep track of which state to be used on each iteration.
graspee has joined #ruby
<Hanmac>
why do you need to track?
brdude has joined #ruby
<vectorshelve>
Hanmac: if I have state and new_state after the first iteration is over, new_state will have the updated states so on second iteration I will have to use new_state. so it will be alternate use of state and new_state on each ticker
<vectorshelve>
Hanmac: so I would have to keep track of which state has the updated values
Guest56588 has quit [Ping timeout: 244 seconds]
TorpedoSkyline has joined #ruby
<Hanmac>
grid.each do |cell| cell.state = new_state }; grid.update #wich is: grid.each(&:update)
gregfu has joined #ruby
<Hanmac>
so you iterate it twice ... first calc the new state, second apply it
bier has quit [Ping timeout: 252 seconds]
S1kx has quit [Ping timeout: 244 seconds]
<vectorshelve>
Hanmac: so wont the cell state get updated in the first iteration itself ? grid.each do |cell| cell.state = new_state } here... thats whats happening now http://pastie.org/4456025 here
<Hanmac>
what did i said? write your own state= method
quest88 has joined #ruby
<Hanmac>
use attr_reader for state not attr_accessor
<Hanmac>
"state" gets @state but "state=" sets @new_state
workmad3 has joined #ruby
otters has quit [Ping timeout: 244 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
Guest73417 has joined #ruby
bluOxigen has joined #ruby
<vectorshelve>
Hanmac: http://pastie.org/4456168 so u mean line 5 for state I would require attr_reader ryt ?
nobitanobi has quit [Read error: Connection reset by peer]
specialGuest has joined #ruby
nobitanobi has joined #ruby
u_u has joined #ruby
Markvilla has quit [Ping timeout: 244 seconds]
<vectorshelve>
Hanmac: I will have to then also modify cell initialze method and pass state as cell.state = initial_state
mk03 has joined #ruby
<Hanmac>
yeah you can
mk03 has quit [Remote host closed the connection]
gmci has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
ringotwo has quit [Remote host closed the connection]
<vectorshelve>
Hanmac: thanks bro so the first time it will be something like this http://pastie.org/4456189 ryt ? How can I reduce the no of lines here ?
Markvilla has joined #ruby
havenn has joined #ruby
<Hanmac>
Cell.new(x_axis, y_axis,data == "X") like you had
<Hanmac>
you could still use @state in the Cell class you dont need to use self.state
RegEchse has joined #ruby
bier has joined #ruby
chichou_ has joined #ruby
<Hanmac>
PS: i think find_live_neighbouring_cells could be rewitten to be faster
chichou has quit [Ping timeout: 260 seconds]
ddv has quit [Remote host closed the connection]
<vectorshelve>
Hanmac: http://pastie.org/4456226 I am getting error while creating grid.. trying to do the way u said
verto is now known as verto|off
<Hanmac>
"unkown error given"
<vectorshelve>
Hanmac: for what ?
<vectorshelve>
Hanmac: ok I changed attr_accessor :x, :y attr_reader :state and then def initialize (x, y,state) self.x = x self.y = y state = state end
<vectorshelve>
Hanmac: undefined method `update' for #<Grid:0x8e4ffcc> (NoMethodError)
<vectorshelve>
Hanmac: thanks grid.rb:26:in `each': undefined method `update' for #<Cell:0x8e9eeec @x=0, @y=0> the line 26 is def each(&block);@cells.each(&block);end
Tomasso has quit [Read error: Connection reset by peer]
ddv has quit [Changing host]
ddv has joined #ruby
icy` has quit [Ping timeout: 260 seconds]
<vectorshelve>
Hanmac: thanks.. it works error free.. but the main issue is now I dont see any patterns in the o/p expect for the empty lines as many as the height of the grid heres my grid creator and Printer Class http://pastie.org/4456328
qwerxy has joined #ruby
r0bby_ has joined #ruby
r0bby_ is now known as robbyoconnor
pu22l3r has quit [Remote host closed the connection]
blazed has quit [Ping timeout: 276 seconds]
r0bby has quit [Ping timeout: 245 seconds]
jbw has quit [Ping timeout: 276 seconds]
<vectorshelve>
Hanmac: when I made def initialize (x, y,state) @x = x @y = y @state = state end this change ie instead of state = state atleast the GridCreator class worked fine created the grid and printed the pattern well.. but the updated grid ie after passing it to Tick class.. while printing it.. I am getting no o/p except for empty lines
iori has joined #ruby
apok has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
<Hanmac>
i tihnk the best is "@state = @new_state = state" in the initialize method
nobitanobi has joined #ruby
IrishGringo has joined #ruby
apok has quit [Client Quit]
<vectorshelve>
Hanmac: but I dont have an instance variable @new_state !!
<vectorshelve>
Hanmac: what is that for ?
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
macer1 has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
<vectorshelve>
Hanmac: could you explain what it does ?
nobitanobi has quit [Read error: Connection reset by peer]
<vectorshelve>
Hanmac: it throws error for some input patterns tick.rb:13:in `block in apply_rules': undefined method `state=' for #<Cell:0x86e2cd0 @x=4, @y=3, @new_state=true, @state=true> (NoMethodError)
mrwalker has quit [Remote host closed the connection]
havenn has joined #ruby
mohits has quit [Read error: Connection reset by peer]
<vectorshelve>
Hanmac: where I am a going wrong bro /
vegeek-ng has quit [Ping timeout: 272 seconds]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
jbw has joined #ruby
vegeek-ng has joined #ruby
qwerxy has quit [Quit: offski]
<vectorshelve>
Hanmac: kindly reply
drago757 has quit [Quit: drago757]
<vectorshelve>
Hanmac: am stuck up. I would be done if you could help me with this. kindly respond
khakimov has joined #ruby
havenn has quit [Remote host closed the connection]
adelcampo has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
mrdodo_ has quit [Remote host closed the connection]
savage- has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
mrdodo_ has joined #ruby
<vlad_starkov>
ActiveRecord question: given User model and Job model. Every User has a Job with unique :job_title. If I have a collection of User models is it possible to select Jobs with explicit :job_title?
<Hanmac>
vlad_starkov you maybe gets more help in #rubyonrails
<vlad_starkov>
Hanmac: it seems nobody knows there
<Hanmac>
shevy my cube has currently 3×2TB plates inside ... and 1×2TB outside ...
<shevy>
what for man
<shevy>
your C++ code?
<shevy>
:-)
<shevy>
I try to have more ruby scripts... but they dont take much space
<mparodi>
argh!
<Hanmac>
shevy the next cube i buy has enouth space for ca >4 × 3.5''
yxhuvud has quit [Ping timeout: 248 seconds]
<mparodi>
*** extconf.rb failed ***
<mparodi>
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
<nobitanobi>
I'm basically trying to do the same in my own gem, but I get a unitialized constant when trying to access Configuration
ryanf has joined #ruby
<Spooner>
That file requires both configuration and client, so configuration.rb is already loaded before client is, so therefore Configuration is available in client.rb.
Eplemosen has joined #ruby
<nobitanobi>
That might be it then… I'm including them like this: Dir[File.dirname(__FILE__) + '/yelpi/*.rb'].each do |file| require file end
<nobitanobi>
Which might be screwing the order.
<Spooner>
Yes, you can't guarantee the order like that.
<Spooner>
Just write them out manually.
<nobitanobi>
Spooner: ok. thank you very much.
butblack has quit [Quit: butblack]
<Spooner>
Or do %w<file1 file2 file3 file4>.each {|f| require_relative "yelpi/#{f}" }
<Spooner>
OR ensure that you require the config file in your version of client, which also guarantees load order.
hadees has quit [Ping timeout: 276 seconds]
ph^ has quit [Remote host closed the connection]
<nobitanobi>
Spooner: I will just include them manually. Thank you.
ly_gs has joined #ruby
tommyvyo has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
r0bby is now known as robbyoconnor
rakunHo has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
butblack has joined #ruby
manizzle has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<nobitanobi>
yes, but if I am using the former? I am doing Client.new
Mariiii has left #ruby [#ruby]
br4ndon has joined #ruby
allyraza has quit [Quit: Leaving]
ipoval has quit [Quit: ipoval]
<Spooner>
nobitanobi : Everything loaded by require is available everywhere else. We keep things clean by using namespaces (outer modules, like Awesome).
<nobitanobi>
Spooner: never mind. I should go rest a little bit because I have been fighting with this for a while :P
<nobitanobi>
Spooner: Ok…That makes sense
nopolitica has quit [Quit: Lost terminal]
allyraza has joined #ruby
brightbeat has quit [Read error: Operation timed out]
<nobitanobi>
Spooner: I will make sure that once I finish the gem you can try it out :P
manizzle has quit [Remote host closed the connection]
manizzle has joined #ruby
savage- has joined #ruby
<mparodi>
ok, the application I wanted to install is running now
<mparodi>
what server do you use?
jeff_sebring has joined #ruby
Divinite has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]