<dfwqdfui2342>
Was wondering if ruby had a real time function/method that could display the array of time i have deppending on the location the user chooses
jbrhbr has quit [Ping timeout: 256 seconds]
gizmore has joined #ruby
<underplank>
dfwqdfui2342: you mean if the location is San Francisco, you pass that in somehow and it works out that its PST, and gives you timezone adjusted time for that location?
nerium has joined #ruby
<cmrussell>
@shevy i have one more question
ElFerna has joined #ruby
<cmrussell>
i got the script to work without using the map method...i couldnt figure that one out
<camus>
I would like to 1) loop through and interpolate the email address in the "url" with a list of email addresses I have, and 2) store the json response in a file, and append each subsequent response until i've queried all email addresses
St1gma_ has joined #ruby
imperator has left #ruby ["Leaving"]
imperator has quit [Quit: Leaving]
gix has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 246 seconds]
<camus>
Was thinking perhaps some type of method that writes to a file with the response or parsed_json, but I am unsure about the syntax, and then for the list of email addresses to populate a portion of the url (where it says email=) maybe another file.. or an array in the above gist that get's iterated through? maybe i could use concatenation to restructure the
<camus>
url w/ from the array until the loop is finished?/
sdothum has joined #ruby
<gizmore>
hi camus
<gizmore>
camus: you want to serialize the json into a file?
nerium has joined #ruby
charliesome has joined #ruby
bigmac_ has quit [Remote host closed the connection]
<camus>
gizmore: hello, thanks for your reply - basically, when i query that URL, it gives me back JSON, I would like to put that reply into a file, and then do it over and over again for other email addresses, so that at the end i have a file with a bunch of JSON in it.
madcodes has joined #ruby
jnagro has quit [Quit: Leaving]
<gizmore>
camus: and eleminate duplicates?
<gizmore>
or just replace with newestß
<camus>
gizmore: just append each new response to the file
<gizmore>
hmm not exactly
<gizmore>
you get json objects back
<gizmore>
and want to alter them, based on new data
<gizmore>
simple file appending won´t work
<gizmore>
unless you come up with a file format that allows it
<camus>
ah, ok - basically, that API will give you all of the social media information attached an email address
<camus>
so what i want to do is run it across a bunch of email addresses to then have a big json object that i can convert to csv to sort and be able to determine who is most active on social media
<gizmore>
how many adresses do you plan to harvest for your malware campaign?
<gizmore>
less than 100,000?
<camus>
haha, no, i'm trying to determine which of my customers are the most active on social media
<gizmore>
so just a bunch of 100?
<camus>
yeah something like that
<gizmore>
then maybe save the file as JSON or YML
<gizmore>
load it before new request, merge it, and save again
<camus>
that's over my head i think :)
<gizmore>
you got the JSON as ruby object already?
<gizmore>
from the website?
<camus>
so far i have just gotten it to the point of printing the response on my command line
<camus>
i can see the 200 response and the subsequent info
<havenwood>
camus: You can always write to a file with File.write but Ruby has some nifty transactional ways to serialize and store to disk or db built into the stdlib like YAML::DBM, YAML::Store and PStore, etc.
<camus>
gizless: 1. create new file from email address 2. request new file w/ different email address 3. merge 4. save
blackmesa has joined #ruby
<havenwood>
TIMTOWTDI
<camus>
havenwood: ok, thanks for your help too, btw!
jottr has quit [Ping timeout: 240 seconds]
<gizless>
camus: i would suggest you store all emails/customers in one file
<gizless>
hence the load/request/merge
<camus>
ok i have that
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
gizmore has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 43.0.1/20151216175450]]
howdoicomputer has quit [Ping timeout: 240 seconds]
msankhala has quit [Ping timeout: 240 seconds]
<camus>
havenwood: i think i need to gain a little bit more experience first before i try your route
msankhala has joined #ruby
<Ox0dea>
camus: Alternatively, dive in!
<Ox0dea>
You'll either die or learn to swim. :P
<camus>
Ox0dea: you are talking to my spirit :P
TheBloke has joined #ruby
<havenwood>
camus: If you're familiar with Hashes then YDBM might be easier than you imagine!
msankhala has quit [Client Quit]
gizless has quit [Ping timeout: 265 seconds]
<havenwood>
camus: The keys need to be Strings but the values can be anything serializable to YAML.
blackmesa has quit [Ping timeout: 265 seconds]
znz_jp has quit [Quit: kill -QUIT $$]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
camus: If you want to think about it even less, here's a little wrapper I wrote around Ruby's PStore that even picks the file name for you :O https://github.com/havenwood/persist#readme
gizmore has quit [Ping timeout: 272 seconds]
<havenwood>
It's really not much easier than the stdlib ways... ;)
lessless has joined #ruby
TDJACR has joined #ruby
rakm has joined #ruby
ElFerna has quit [Ping timeout: 246 seconds]
bigmac_ has joined #ruby
znz_jp has joined #ruby
gix has quit [Ping timeout: 272 seconds]
<camus>
how do I open the file with email addresses (one per line) and iterate through that?
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
dlitvak has joined #ruby
<havenwood>
camus: Try my YDBM example above with a few email/value pairs and then: ydbm.to_h
<nerium>
camus: They only support a few services, 4 if im not misstaken
slackr has joined #ruby
<nerium>
I was hoping to host my own solution as there arn’t any paid ones that work
<camus>
ah, ok, i understand
<slackr>
.seen jhass
<camus>
havenwood: sorry, i think this is still a bit over my head, i am pretty new
<slackr>
camus, is your nick taken from Albert Camus? or is camus a regular name?
<camus>
slackr: yes, Albert Camus
<havenwood>
camus: Ah, yeah if you're not familiar with Hashes it'd be foreign!
<havenwood>
camus: Hashes are very much worth learning.
<camus>
havenwood: is there something i could do that is more rudimentary, like a for loop or something like that with a method to File.open and then structure the url and to aggregate and store the json?
<camus>
Ox0dea: https://gist.github.com/anonymous/70089eb70f6033ba19d9 <--- I would like to replace the "####@###.###" with a different email address and instead of "print response" would like to store the response to a file (and append each subsequent response to it)
<Ox0dea>
You talk like somebody who thinks they're using a "give me the answer"ing machine.
<camus>
Apologies, more like I don't understand what I'm doing and there is a bit of a knot of confusion - not sure which string to pull first to not make it more of a mess.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
linelevel1 has quit [Ping timeout: 240 seconds]
shanemcd has quit [Ping timeout: 255 seconds]
rgtk has quit [Ping timeout: 246 seconds]
alex_ has joined #ruby
<Ox0dea>
camus: You have an Array of email addresses, yes?
dlitvak has quit [Remote host closed the connection]
ornerymoose has joined #ruby
<camus>
Yeah, I was thinking that maybe I could iterate through the array and concatenate the URL or something? But got a bit dead-ended there.
TheBloke has joined #ruby
p0wn3d_ has joined #ruby
rakm has joined #ruby
<Ox0dea>
camus: The concept you're looking for is called string interpolation.
alex_ has quit [Client Quit]
idefine has joined #ruby
DavidDudson has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DavidDudson has quit [Client Quit]
lxsameer has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
amclain has quit [Quit: Leaving]
idefine has quit [Ping timeout: 246 seconds]
z3uS has joined #ruby
charliesome has joined #ruby
djbkd has joined #ruby
z3uS has quit [Client Quit]
blackmesa has joined #ruby
pawnbox has joined #ruby
charliesome has quit [Client Quit]
RegulationD has joined #ruby
guacamole has joined #ruby
z3uS has joined #ruby
guacamole has quit [Client Quit]
djbkd has quit [Ping timeout: 256 seconds]
arooni_______ has joined #ruby
bitcycle has joined #ruby
psy_ has joined #ruby
z3uS has quit [Client Quit]
z3uS has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
aspire has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
z3uS has quit [Client Quit]
blackmesa has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
lxsameer has quit [Quit: Leaving]
ruu has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
<camus>
Ox0dea: thank you for helping me
renemaya has quit [Quit: Re has gone to sleep. ZZZzzz…]
renemaya has joined #ruby
<Ox0dea>
camus: It was my pleasure and the like.
s00pcan has quit [Remote host closed the connection]
<Ox0dea>
For reference, OpenURI is pretty nice if you only need to perform basic GET requests.
<Ox0dea>
camus: Something like that oughta do in a pinch.
psy_ has joined #ruby
seitensei has quit [Remote host closed the connection]
speaking1ode has joined #ruby
roshanavand has quit [Ping timeout: 265 seconds]
aspire has quit [Ping timeout: 272 seconds]
moeabdol has quit [Ping timeout: 255 seconds]
lxsameer has joined #ruby
howdoicomputer has joined #ruby
Maxed has joined #ruby
<camus>
Ox0dea: thanks again
<Ox0dea>
Ja.
willywos has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Maxed has quit [Remote host closed the connection]
Maxed has joined #ruby
ruu has quit [Remote host closed the connection]
speaking2ode has joined #ruby
djbkd has joined #ruby
pawnbox has joined #ruby
speaking1ode has quit [Quit: leaving]
howdoicomputer has quit [Ping timeout: 240 seconds]
gizmore has joined #ruby
Maxed has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<ja>
Jaså
<Ox0dea>
Sorry about that highlight. :/
<ja>
Haha, don’t be
<ja>
besides, only “ja:” highlights me
<ja>
/^ja:/ even
wjimenez5271 has quit [Ping timeout: 272 seconds]
Maxed has joined #ruby
CloCkWeRX has quit [Ping timeout: 272 seconds]
pawnbox has quit [Ping timeout: 246 seconds]
govg has quit [Ping timeout: 255 seconds]
aspire has joined #ruby
govg has joined #ruby
chouhoulis has quit [Ping timeout: 265 seconds]
wjimenez5271 has joined #ruby
Maxed has quit [Remote host closed the connection]
<camus>
Ox0dea: Hey, I was trying what you just shared (thanks again) and I see that emails is undefined, that's because I need to create my array with the addresses, right?
<Ox0dea>
camus: Right.
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BlackCoyote has quit [Remote host closed the connection]
<dsdeiz>
sorry yeah probably just spelling and just realized that i need it to read markdown files
ornerymoose has quit [Quit: ornerymoose]
<Ox0dea>
All Markdown syntax is symbolic, so you should be able to extract "words" with /\w+/ just fine.
nerium has quit [Quit: nerium]
PedramT has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
<dsdeiz>
ah awesome.. thx Ox0dea
<Ox0dea>
Sure thing?
zast has quit [Remote host closed the connection]
<dsdeiz>
yeah dunno if it'll work or not though any help is appreciated (cause i don't even know where to start in the first place) heh
gizless has joined #ruby
stannard has joined #ruby
yfeldblum has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
ibouvousaime has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
slackr has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
<Ox0dea>
dsdeiz: The simplest approach would be to create a Set containing some list of valid words, then report all those which can't be found therein.
<Ox0dea>
Slightly more complex but efficient would be to use a Bloom filter.
<Ox0dea>
Or just use the wrapper around Hunspell. :P
Dimik has quit []
ehth77_ has joined #ruby
slackr has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ehth77_ has quit [Quit: Leaving]
ornerymoose has joined #ruby
gizmore has joined #ruby
gizmore|2 has joined #ruby
karapetyan has quit [Remote host closed the connection]
gizless has quit [Ping timeout: 256 seconds]
seitensei has joined #ruby
devoldmx has joined #ruby
ur5us has quit [Remote host closed the connection]
gizmore has quit [Ping timeout: 260 seconds]
arup_r has joined #ruby
djbkd has quit []
ur5us has joined #ruby
gambl0re has quit []
karapetyan has joined #ruby
howdoicomputer has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
seitensei has quit [Ping timeout: 240 seconds]
dsdeiz has quit [Ping timeout: 246 seconds]
symm- has joined #ruby
slackr has joined #ruby
<atmosx>
Good morning
<atmosx>
is it normal to serialize a file with Python and not being able to read it with Ruby?
xet7 has joined #ruby
devbug has quit [Read error: Connection reset by peer]
ruu has joined #ruby
howdoicomputer has quit [Ping timeout: 272 seconds]
<Ox0dea>
atmosx: Are you trying to unpickle something with Ruby?
yfeldblum has quit [Remote host closed the connection]
<atmosx>
Ox0dea: no, I'm using json
<Ox0dea>
Then no, that's not normal.
chouhoulis has joined #ruby
<atmosx>
I'm need a light-weight human readable file that will act as DB, but YAML (my first choice) produced by py27 PyYAML are hard to read/edit, then I tried msgpack same, now I'm trying json and I get this
<ruboto>
prillian5, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<Mon_Ouie>
If the gem dependencies are accurate you can't use this version of the money gem with that version of Rails
dorei has joined #ruby
basex has joined #ruby
<Mon_Ouie>
However it might be that the money gem can still run with i18n v0.7.0 despite the stronger dependency, you could try editing the gemspec and running its tests to see if it works
<prillian5>
ok, find out... in a GEMFILE of a plugin, there is an if condition for $RUBY_VERSION.
<prillian5>
But this ENV-Var is not set in system
<prillian5>
how can I set this (maybe for other plugins to use it).
dlitvak has quit [Remote host closed the connection]
<prillian5>
Manualy export it, or is there an "install"-way with ruby
stannard has joined #ruby
basex has quit [Client Quit]
chouhoulis has quit [Ping timeout: 255 seconds]
chipotle has quit [Ping timeout: 246 seconds]
fexilal has joined #ruby
basex has joined #ruby
n008f4g_ has quit [Ping timeout: 246 seconds]
basex has quit [Client Quit]
yashinbasement has joined #ruby
basex has joined #ruby
blandflakes has joined #ruby
iateadonut has joined #ruby
blandflakes has quit [Client Quit]
chipotle has joined #ruby
basex has quit [Client Quit]
lightstalker has quit [Ping timeout: 265 seconds]
Jardayn has joined #ruby
basex has joined #ruby
araujo has quit [Read error: Connection timed out]
bronson has joined #ruby
absolutejam has quit [Ping timeout: 256 seconds]
lightstalker has joined #ruby
speaking1ode has joined #ruby
cdg has joined #ruby
_ko1 has joined #ruby
basex has quit [Client Quit]
ht__ has joined #ruby
idefine has joined #ruby
basex has joined #ruby
absolutejam has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
mary5030 has quit [Remote host closed the connection]
basex has quit [Client Quit]
nerium has joined #ruby
_axx has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
weemsledeux has quit [Client Quit]
<shevy>
prillian5 you could always add to ENV in a .rb file
aryaching has joined #ruby
blandflakes has joined #ruby
thisirs has joined #ruby
speaking1ode has quit [Ping timeout: 246 seconds]
skade has joined #ruby
jackcom has left #ruby [#ruby]
djbkd has joined #ruby
cdg has joined #ruby
basex has joined #ruby
s00pcan has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has quit [Ping timeout: 256 seconds]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
speaking1ode has joined #ruby
PedramT has joined #ruby
Jackneill has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
sankaber has joined #ruby
edwinvdgraaf has joined #ruby
Bellthoven has joined #ruby
FernandoBasso has quit [Ping timeout: 246 seconds]
PedramT_ has joined #ruby
idefine has quit [Remote host closed the connection]
speaking1ode has quit [Quit: Lost terminal]
FernandoBasso has joined #ruby
speaking1ode has joined #ruby
PedramT has quit [Ping timeout: 265 seconds]
Guest80357 has joined #ruby
mistermocha has joined #ruby
akem has quit [Remote host closed the connection]
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
Bellthoven has quit [Ping timeout: 265 seconds]
PedramT_ has quit [Ping timeout: 272 seconds]
n008f4g_ has joined #ruby
yashinbasement has quit [Quit: Leaving]
tk__ has quit [Quit: ばいばい]
puria has quit [Remote host closed the connection]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
stannard has quit [Remote host closed the connection]
mary5030 has joined #ruby
pawnbox has quit [Remote host closed the connection]
arup_r has joined #ruby
pawnbox has joined #ruby
mistermocha has quit [Ping timeout: 272 seconds]
ht__ has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
yardenbar has joined #ruby
AlphaAtom has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
skakri has joined #ruby
sumark_ has quit [Remote host closed the connection]
sumark has joined #ruby
diegoviola has joined #ruby
cassioscabral has joined #ruby
dwfait has joined #ruby
cajone_afk is now known as cajone
nerium has quit [Quit: nerium]
slucx has quit [Ping timeout: 246 seconds]
seitensei has joined #ruby
devoldmx has joined #ruby
dwfait has quit [Ping timeout: 240 seconds]
dwfait_ has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
SenpaiSilver has quit [Read error: Connection reset by peer]
ht__ has joined #ruby
yardenbar has quit [Ping timeout: 246 seconds]
howdoicomputer has joined #ruby
devoldmx has quit [Ping timeout: 272 seconds]
seitensei has quit [Ping timeout: 256 seconds]
atomical_ has joined #ruby
stannard has joined #ruby
ramfjord has joined #ruby
prestorium has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 240 seconds]
atomical has quit [Ping timeout: 240 seconds]
dwfait_ has quit [Ping timeout: 240 seconds]
cassioscabral has quit [Quit: cassioscabral]
startupality has joined #ruby
prestorium has joined #ruby
startupality has quit [Client Quit]
dlitvak has joined #ruby
startupality has joined #ruby
chipotle has quit [Quit: cheerio]
idefine has joined #ruby
yardenbar has joined #ruby
dwfait has joined #ruby
startupality has quit [Client Quit]
doodleha_ has joined #ruby
dlitvak has quit [Remote host closed the connection]
symm- has quit [Quit: Leaving...]
Yzguy has joined #ruby
hesco has joined #ruby
rgtk has joined #ruby
<dwfait>
Hello all. Does anyone have any resources on getting into the internals of Ruby? I’ve tried googling, but most things come up developing with ruby, not ruby itself.
chipotle has joined #ruby
idefine has quit [Ping timeout: 256 seconds]
<hesco>
I'm having issues on a two node Vagrantfile which are explained fully here: https://gist.github.com/hesco/50434ae9b36b1b422e97 Can anyone please lend a moment to suggest what it is I might be getting wrong here? Its probably more of a ruby issue, than a vagrant issue, but I'm not entirely sure about that.
<Ox0dea>
dwfait: Are you quite fluent in C, then?
<dwfait>
So far I’ve been compiling ruby with my own C methods and having a bit of fun, but some overviews of the internal structures like what is an ID versus a Symbol would be good
RegulationD has joined #ruby
<dwfait>
I have a history in C/C++, yeah
hxegon has joined #ruby
<dwfait>
It’s the abstractions and getting to grips with the large codebase I’d like some pointers with :)
<Ox0dea>
Best is really to just dive in with a good editor.
ramfjord has quit [Ping timeout: 240 seconds]
<dwfait>
Cool, thanks - haven’t seen that one, I’ll check it out.
atomical has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
<dwfait>
My second question - I’ve heard a large goal for Ruby 3 is making the language faster. Are there any benchmarking suites I can run against ruby to test out changes?
<dwfait>
Would working on a suite like that be a good contribution for ruby?
djbkd has joined #ruby
idefine has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
doodleha_ has quit [Remote host closed the connection]
<Ox0dea>
I don't think such a thing exists, but I suspect it'd be a welcome addition.
stannard has quit [Remote host closed the connection]
<dwfait>
Thanks all, I’ll get stuck into those
dwfait has quit [Quit: dwfait]
idefine has quit [Ping timeout: 265 seconds]
ht__ has quit [Quit: Konversation terminated!]
<hesco>
under what circumstances would a method remember an argument from a previous invocation, rather than accept and process the new argument. That is the behavior I am seeing and I have refactored this code in multiple ways without changing this observed behavior.
bitri has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has joined #ruby
<toretore>
?code hesco
<ruboto>
hesco, We can't help you without your code, please post it to https://gist.github.com
<havenwood>
Memoiiiize it, don't critiziiiize it. Memoize it and will advertise it.
<Ox0dea>
That answers your question at its barest, but I can't say how it relates to your Vagrant problem.
idefine has quit [Ping timeout: 260 seconds]
solars has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
chipotle has quit [Quit: cheerio]
<shevy>
Memoiiiiiiiiiiiiiize
<shevy>
what is the topic, anyway
<toretore>
hesco, i assume your problem is line 55 and the method on line 8?
idefine_ has quit [Ping timeout: 272 seconds]
<toretore>
hesco, first thing that stands out is you're assigning to a global variable on line 10
<havenwood>
shevy: good mornin'
<hesco>
toretore: yes, method at line 8, invoked from line 55
bitri has joined #ruby
Bellthoven has joined #ruby
<hesco>
The $ sigal is for a global, a : sigal is for a symbol and no signal is a local variable, is that right?
bitri has quit [Remote host closed the connection]
symm- has joined #ruby
<toretore>
hesco, yes
<Ox0dea>
*sigil
<hesco>
on, so I certainly intend a local variable in this context.
<hesco>
testing again. if I can. my build depends on our vpn I suspect, although I am unable to access IRC from the office.
<toretore>
hesco, are you sure this does what you think it does? `Vagrant.configure(2){|c| nodes.each{|n| config.vm.provision 'shell', inline: dynamic_config_for(node) } }`
<toretore>
i think you're just overwriting the vm config
<hesco>
toretore: yes, it will successfully configure a nic on the machines, unfortunately it assigned both machines the same IP.
hxegon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore>
hesco, yes, and now it won't work for reasons that should be clear
govg has quit [Ping timeout: 246 seconds]
<toretore>
actually, you seem to just have changed random words so nothing makes sense any more
IrishGringo has quit [Ping timeout: 255 seconds]
<pipework>
toretore: That's how I code and it seems to work.
<hesco>
Yzguy: as explained in https://gist.github.com/hesco/50434ae9b36b1b422e97#file-010-problem-statement, I believe I may be working with a crippled base image. I had filed bug reports on Mitchell Hashimoto's project thinking it was his suse/cap/network_something.rb code, but now I am blaming the ISO I got from operations when I built our base box.
<toretore>
pipework, if given enough time
<Yzguy>
yeah i read that, i may have mis understood?
<Yzguy>
I think i have run into the same issue
<Yzguy>
before
<toretore>
hesco, as i've already explained: config.vm are *global options*; jenkins.vm are *per machine options*
<toretore>
hesco, that should be enough for you to fix it
<hesco>
toretore: well the reason which seems a bit murky to me is: seems lke am no longer iterating across my provisioning code for each machine.
<toretore>
i don't know what else i can say to make it clearer
<toretore>
you iterate through the `nodes` to make per-machine configuration. the per-machine configuration is done on the `jenkins` object
<toretore>
the `config` object is *global* configuration that is applied to *all* machines
<toretore>
if you have *per machine* configuration, use the *jenkins* object
zzz has joined #ruby
<hesco>
but so I need to bring my shell provisioner inside the jenkins loop then
<hesco>
ok, trying this again.
ashemark has joined #ruby
<ashemark>
Hi!
<Ox0dea>
Hey, ashemark!
<toretore>
start with a new file, then write it from the ground up, adding your configuration from the old file and try to understand each step as you're doing it
<toretore>
ashemark, it's not "the ruby way", it's "the nokogiri way"; meaning: you are limited to what the nokogiri api lets you do
<Yzguy>
it kinda looks like you're trying to condense and handle so much in as little code as possible, which is gonna be hard to manage
ebertx has joined #ruby
sjums_ has joined #ruby
<toretore>
hesco, not at all. do you understand what i'm trying to tell you about config and jenkins and the each loop?
<ashemark>
toretore: of course, but I was thinking on the lines of sed for ruby..
devbug has joined #ruby
<Yzguy>
and we can handle the network interface issue seperately, i think i know how to solve it
<toretore>
ashemark, do you use sed to parse html?
Waheedi has joined #ruby
cdg has quit [Remote host closed the connection]
sjums has quit [Ping timeout: 272 seconds]
<ashemark>
toretore: want to combine nokogiri and sed
<toretore>
ashemark, how would that work?
<ashemark>
thought as awesome as ruby is, there must be already be a nice method/library
last_staff has quit [Read error: Connection reset by peer]
zzz_ has joined #ruby
<ashemark>
toretore: edit/append to html files at certain places
<hesco>
toretore: what I understand is that: the each loop provides me a jenkins object to configure each vagrant box
last_staff has joined #ruby
<toretore>
ashemark, html parsing and editing is very complex, it's not something that can be distilled into a "nice method/library"
<toretore>
hesco, no, the each loop doesn't, but the config.vm.define does
gambl0re has joined #ruby
<ashemark>
toretore: ok..
<toretore>
hesco, so inside the each loop you use that to define each machine
<hesco>
and further that the config object needs to be global and will apply to every node in the Vagrantfile
<toretore>
hesco, then you pass a block to define which lets you configure that particular machine
<toretore>
hesco, that is true
dmolina has joined #ruby
zzz has quit [Ping timeout: 240 seconds]
<toretore>
ashemark, i suggest: 1) parse html with nokogiri into a dom tree; 2) mutate nokogiri dom tree; 3) write this dom tree to a file or whatever
devbug has quit [Ping timeout: 240 seconds]
<ashemark>
toretore: that's the process I'm contemplating right now..
<toretore>
ashemark, the "in place stream editing" of sed is not fit for html
ramfjord has joined #ruby
<ashemark>
hmm ok
<hesco>
toretore: sorry, of course, the each loop iterates over my hosts hash, config.vm.define exposes the jenkins object.
<toretore>
hesco, yes. and then inside that block put your per-machine config, and *only* that
<toretore>
hesco, it might be easier if you just manually config.vm.define for each machine and use static configuration
<hesco>
defining the jenkins object inside the hash iterations allows me to apply the values of the hash keys to customize each node defined by the jenkins object.
nanoz has quit [Read error: Connection reset by peer]
<Yzguy>
hopefully that helps, like I said https://github.com/yzguy/vagrant-puppet would be a good reference for you on how to accomplish some stuff and organize your code for provisioning
<toretore>
hesco, what Yzguy has is much easier to reason about when you don't know ruby, i suggest you use that
<ashemark>
toretore: ?
stevenxl has joined #ruby
stevenxl has quit [Changing host]
stevenxl has joined #ruby
<Yzguy>
yeah and really, the work you're going to do with the VMs is more important that the vagrant process
last_staff has quit [Remote host closed the connection]
<Yzguy>
so dont try to complicate it
last_staff has joined #ruby
hxegon has joined #ruby
idefine has joined #ruby
PedramT has joined #ruby
idefine_ has joined #ruby
agit0 has joined #ruby
zzz_ has quit [Quit: Leaving...]
<hesco>
toretore: thanks, read that, had not seen the vagrant-hosts plugin trick before. That looks useful. Although in addition to sorting out this multi-box issue, I also have an interest in honing my developing ruby skills to DRY up my code a bit.
<Yzguy>
definitely a good goal, but i wouldn't try it in the context of vagrant, do it in some ruby scripts
rippa has joined #ruby
<toretore>
hesco, don't use any plugins and don't do anything clever; just type everything out manually
<toretore>
hesco, once you have something that works, you can improve on it
<toretore>
dry is overrated
ashemark has left #ruby ["WeeChat 1.3"]
idefine has quit [Ping timeout: 256 seconds]
ElFerna has quit [Ping timeout: 255 seconds]
howdoicomputer has joined #ruby
IrishGringo has joined #ruby
idefine_ has quit [Ping timeout: 260 seconds]
PedramT has quit [Ping timeout: 260 seconds]
fullofcaffeine has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
lacuna has joined #ruby
<hesco>
I started with something that worked, cp'd Vagrantfile Vagrantfile.jenkins_master, refactored that till I had something which worked and cp'd Vagrantfile Vagrantfile.jenkins_slave, then did a diff on those two files and proceeded to integrate them into a single Vagrantfile, although Yzguy seems to suggest that I skipped a step along the refactoring path.
hxegon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stuartb has quit [Ping timeout: 246 seconds]
stevenxl is now known as stevenxl-away
AKASkip has joined #ruby
<Yzguy>
i'm not saying to skipped anything, It just seems you're new to ruby and vagrant maybe, so trying to do two things at once might make it difficult
yeticry has quit [Ping timeout: 255 seconds]
howdoicomputer has quit [Quit: WeeChat 1.3]
<Yzguy>
not new i guess, i don't know you're level but
yeticry has joined #ruby
<Yzguy>
looking at your vagrant file, it is pretty complicated, especially when you have to deal with the network interface issue.
<hesco>
toying with vagrant for two or three years, using it aggressively at work for most of the past year. toyed with ruby for the first time two or five years ago, and finally read Well Grounded Rubyist earlier this year, and using ruby more and more with vagrant and puppet focused projects, though still reach first for bash or perl on greenfield projects.
stuartb has joined #ruby
ramfjord has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
<Yzguy>
I'm in the same boat
stevenxl has joined #ruby
stevenxl has quit [Changing host]
stevenxl has joined #ruby
AKASkip has quit [Ping timeout: 246 seconds]
<Yzguy>
so your vagrant file is "fine", if you got the vagrant understanding down, some ruby understanding, refactoring is good
railswebdev has joined #ruby
<Yzguy>
I would try and get that network interface issue fixed. i think it's prolly just removing that 70-persistent-net.rules and repackage the box
<Yzguy>
that would remove a lot of the code
<hesco>
ok, on the vpn from home now, just ran `vagrant up`. We'll see if this gets me any further.
idefine has joined #ruby
startupality has quit [Quit: startupality]
<hesco>
yeah, the requirements I set for myself when I built the base box was to use the employer blessed ISO and upgrade scripts. makes for a really fat base image (2.3gb as I recall). Turns out I seem to be the one who has been evangelizing vagrant use at work, simply by creating that base box and documenting what I learn in the confluence installation at work.
<Yzguy>
yeah that's awesome.
<Yzguy>
can you describe your interface issue more?
millerti has joined #ruby
<hesco>
but I wanted to offer folks a 'production-like' development environment, and by 'folks' I mean myself mostly, though its cool to see others finding that base box useful.
<Yzguy>
yeah we do the same thing at work, we have a rhel 6.6 vagrant box, we use it for a puppet dev environment, developers have one for muleesb, grails, etc.
<Yzguy>
all using the same base box
<hesco>
before the gymnastics of the get_network_config_script() method, I was unable to get a second nic configured. I filed a bug report on the vagrant project earlier this year, which Mitchell declined to work on.
<Yzguy>
do you have the link to that issue
<Yzguy>
Mitchell is a crazy busy dude, I met him back in september at Hashiconf
sandstrom has quit [Quit: My computer has gone to sleep.]
InvGhost has quit [Read error: Connection reset by peer]
startupality has joined #ruby
InvGhost has joined #ruby
<Yzguy>
hm
Drakevr_ is now known as Drakevr
xcesariox has joined #ruby
lacuna has quit [Remote host closed the connection]
Drakevr has quit [Changing host]
Drakevr has joined #ruby
aufi has joined #ruby
idefine has quit [Remote host closed the connection]
seitensei has joined #ruby
devoldmx has joined #ruby
stevenxl has quit [Quit: leaving]
<Yzguy>
so what are you looking for for an interface/network configuration
<Yzguy>
at the end stage
colegatron has joined #ruby
dlitvak has quit [Remote host closed the connection]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
<hesco>
a nic with an IP assigned communicating through a network segment with other vagrant boxes on the same host machine.
seitensei has quit [Ping timeout: 265 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aufi has quit [Quit: Konversation terminated!]
cdg has joined #ruby
<Yzguy>
so just a private network
<Yzguy>
ok
startupality has quit [Quit: startupality]
<Yzguy>
so when you do like :private_network you will get 2 nics on your vm, 1 for NAT, 1 for private network
<Yzguy>
but that should be fine for you
<Yzguy>
am almost done with your vagrant file
idefine has joined #ruby
startupality has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
<hesco>
My test is nearly complete. in previous iterations it would configure the extra nic before applying the puppet catalogue, but now it seems to do the shell provisioning code after the catalogue application.
<hesco>
the slave has the expected IP, waiting on the jenkins plugins on the master to complete, before it configures the network on the master
idefine has quit [Ping timeout: 256 seconds]
seitensei has joined #ruby
zzz has joined #ruby
shadoi has quit [Quit: Leaving.]
IrishGringo has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
stamina has joined #ruby
<Yzguy>
okay my second one doesnt work, fixing it :P. Was waiting for SLES box to download
sandstrom has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby
idefine has joined #ruby
dlitvak has joined #ruby
<hesco>
my refactored Vagrantfile failed again. Now testing yzguy.v1
startupality has quit [Quit: startupality]
symm-_ is now known as symm-
agit0 has quit [Quit: zzzZZZ….]
djbkd has quit [Ping timeout: 256 seconds]
millerti has joined #ruby
<hesco>
looks like it is missing the key declaration: *.ssh.private_key_path
<Yzguy>
you shouldn't need that
<hesco>
adding that and testing again
<Yzguy>
vagrant will put one in on its own
<Yzguy>
unless you're doing something weird with your base box
<hesco>
yes, our base box has an $employer_specific key pair
<Yzguy>
hm
idefine has quit [Ping timeout: 265 seconds]
<Yzguy>
might not be the best idea to do that. adds another unnecessary complication
blackmesa has joined #ruby
<Yzguy>
the whole ssh key thing is handled and provided by vagrant
blackmes1 has joined #ruby
<hesco>
it was done to keep the security and compliance teams off my back over the NDA
<Yzguy>
well where are you publishing your box?
<hesco>
on our internal repo
<Yzguy>
ok
sandstrom has quit [Quit: My computer has gone to sleep.]
<hesco>
concentric circles of security and all that
IrishGringo has joined #ruby
jottr has joined #ruby
<Yzguy>
another one of those pointless security things huh
djbkd has joined #ruby
zast has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 272 seconds]
<hesco>
still looking at authentication errors on `vagrant up`, but in the next window `vagrant ssh -c"sudo /sbin/ifconfif -a" finds lo, eth0, eth1 though eth1 has no IP.
dlitvak has quit [Remote host closed the connection]
aef has quit [Remote host closed the connection]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stevenxl-away has quit [Remote host closed the connection]
bronson has joined #ruby
<hesco>
ah, I see you swapped out the base box for a publicly accessible one
<hesco>
rethinking this again
<Yzguy>
yeah, i wanted to use a sles box, and i cant use yours right :P
jottr has quit [Ping timeout: 255 seconds]
idefine has joined #ruby
<Yzguy>
but yeah honestly, this too many hands in your dev environment configuration would piss me off
Jet4Fire_ has left #ruby [#ruby]
Bellthoven has joined #ruby
blackmes1 has quit [Read error: Connection reset by peer]
<hesco>
how do you mean?
<Yzguy>
like security saying "You need to use a specific private key"
<Yzguy>
thats stupidity and just like a security department
Jet4Fire has joined #ruby
<hesco>
security and compliance never spoke with me about this project. were probably unaware of it even.
<Yzguy>
its not a production box, you're not putting it on the internet. you're just using vagrant as a framework to get boxes built
blackmes1 has joined #ruby
<hesco>
but my contract included an NDA, which I assume I ought to make a best effort to protect the proprietary intellectual property of those who write my checks.
agit0 has joined #ruby
<hesco>
I like getting those checks and it seemed a simple precaution to avoid this ever becoming an issue.
sankaber has quit [Ping timeout: 240 seconds]
<Yzguy>
sure
<Yzguy>
just seems like an unncessary complication you've added in
<Yzguy>
for a non existent problem
idefine has quit [Ping timeout: 240 seconds]
<Yzguy>
anywho, that super long vagrantfile should be easier to use, you'll need to modify it to your needs
aef has joined #ruby
cyfr0n1 has joined #ruby
devoldmx has joined #ruby
<Yzguy>
but your'e doign some crazy stuff so it's incredibly hard to help you with your problems, hence why your issue was closed
prestorium has quit [Quit: Leaving]
<hesco>
understood. hold no grudges against Hashimoto, gave me an opportunity to dig in and understand vagrant architecture a bit better.
<Ox0dea>
You're advised to check "Ignore stroke order". :P
<ljarvis>
well im shit at this
<adaedra>
?crosspost ljarvis
<ruboto>
ljarvis, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
nonopposition has quit [Ping timeout: 255 seconds]
<ljarvis>
oi
lacuna has quit [Remote host closed the connection]
<ljarvis>
I think the second one is season
jottr has quit [Ping timeout: 260 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has quit [Remote host closed the connection]
<ljarvis>
fist of spring chant
<hesco>
toretore: your advice that DRY is over-rated, along with Yzguy's wet Vagrantfile, along with my *.vm.network . . . auto_config: false, plus my shell provisioner using the get_network_config_script( ip ), at long last got me to the promised land. I now have a functioning multi-node Vagrantfile !!! which builds across the vpn in 20 minutes, although those two nodes only take 11 minutes in the office.
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
atomical_ has quit [Ping timeout: 272 seconds]
rgtk has quit [Ping timeout: 246 seconds]
jobewan has joined #ruby
ruu_ has joined #ruby
jobewan has quit [Client Quit]
last_staff has quit [Quit: last_staff]
ohaibbq has joined #ruby
ohaibbq has quit [Remote host closed the connection]
ohaibbq has joined #ruby
dwfait has joined #ruby
millerti has joined #ruby
ruu_ has quit [Ping timeout: 256 seconds]
AKASkip has quit [Ping timeout: 272 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
underplank has quit [Quit: underplank]
nonopposition has quit [Remote host closed the connection]
minimalism has joined #ruby
stevenxl has joined #ruby
stevenxl has joined #ruby
SleepySensei has joined #ruby
pawnbox has joined #ruby
dwfait has quit [Ping timeout: 240 seconds]
YankNYC has joined #ruby
solars has quit [Quit: WeeChat 0.4.2]
pawnbox has quit [Ping timeout: 255 seconds]
nonopposition has joined #ruby
Jardayn has joined #ruby
stannard has joined #ruby
<YankNYC>
hey so i'm confused about carrierwave. it looks like it has rmagick already included as a module but i get an error telling me require cannot load such file and to install rmagick gem
<YankNYC>
when i include the gem in my gemfile I get a deprecation warning RMagick is deprecated use rmagick instead
<YankNYC>
maybe i should look into an image uploading alternative
chouhoulis has joined #ruby
bugo has left #ruby [#ruby]
shoutsid06 has quit []
<YankNYC>
this error is being thrown because i'm including CarrierWave::RMagick in my uploader
alex88 has quit [Quit: Leaving...]
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
ornerymoose has quit [Quit: ornerymoose]
roshanavand has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
_djbkd has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
zenlot3 has quit [Ping timeout: 256 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
devbug has joined #ruby
zenlot3 has joined #ruby
s1kx has joined #ruby
Vitor has joined #ruby
mary5030 has joined #ruby
s00pcan has quit [Ping timeout: 256 seconds]
sigurding has joined #ruby
s00pcan has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Vitor has quit [Ping timeout: 255 seconds]
ta has joined #ruby
dwfait has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
s00pcan has quit [Ping timeout: 256 seconds]
InvGhost has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
s00pcan has joined #ruby
bartkoo has joined #ruby
<dwfait>
Is anyone familiar with bench9000 that could help me get it running? Seems people were right when they said it was not easy to use
pawnbox has quit [Ping timeout: 265 seconds]
spider-mario has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
jottr has joined #ruby
stannard has quit [Remote host closed the connection]
jottr_ has joined #ruby
arescorpio has joined #ruby
chouhoulis has joined #ruby
FernandoBasso has quit [Quit: Leaving]
jottr has quit [Ping timeout: 255 seconds]
bartkoo has quit [Quit: bartkoo]
samgerber has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has quit [Ping timeout: 255 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
s00pcan has joined #ruby
rattatmatt has joined #ruby
<samgerber>
Is there anyone who would be willing to help me with an OO design question?
<Ox0dea>
?anyone samgerber
<ruboto>
samgerber, Just ask your question, if anyone has or can, they will respond.
<pwnd_nsfw>
lol
<pwnd_nsfw>
Can anyone do a thing?
stannard has joined #ruby
<shevy>
only if someone can't do anything
<shevy>
samgerber you must ask the question
idefine has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
<samgerber>
I'm getting hung up on inheritance. I'm trying to build a game, and I will have essentially three types of players: ComputerPlayer, HumanPlayer, and SolitairePlayer. They all have some things in common, but not enough that instantiating a Player superclass would produce a useful object. SolitairePlayer would be a subclass of HumanPlayer, but instead of extending HumanPlayer with MORE behavior and attributes, it would b
<samgerber>
e reducing the available behavior and attributes. How many ways have I committed sacrilege, and is there a place where I can read about the right way to do this sort of thing?
<shevy>
usually you find the common lowest denominator that is shared across your classes, then you can make this your base class Player
<shevy>
the specialized behaviour that is unique to the specific player class goes into the e. g. class ComputerPlayer < Player one
<shevy>
for simple constants, use a module
agent_white has quit [Quit: brb]
akaiiro has quit [Quit: Leaving]
pwnd_nsfw has quit [Ping timeout: 240 seconds]
idefine has quit [Ping timeout: 256 seconds]
dsdeiz has joined #ruby
<samgerber>
@shevy, thank you. Is it a Bad Thing if the superclass doesn't make sense on its own and is just holding the intersection of two similar subclasses?
roshanavand has joined #ruby
<shevy>
you can use an abstract class of course
akem has joined #ruby
<shevy>
the thing is how much you want to specialize your class
bigmac_ has quit [Ping timeout: 256 seconds]
<samgerber>
@shevy, thank you, you've given me some ideas to work with. I'll head back to the drawing board now and leave you nice people alone :) Thanks again!
<shevy>
but really, find the smallest subset that is common to the classes and put that into one
<shevy>
see ya
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]