00:00
Lewix has quit [Remote host closed the connection]
00:01
michaeldeol has joined #ruby-lang
00:07
ta_ has joined #ruby-lang
00:13
carlos_ has joined #ruby-lang
00:14
charliesome has quit [Quit: zzz]
00:14
ta_ has quit [Ping timeout: 240 seconds]
00:16
<
carlos_ >
Is it good practise to read a file in a while loop waiting for new lines so we can print the new lines in the terminal?
00:17
<
centrx >
like 'tail' does?
00:18
apeiros has quit [Remote host closed the connection]
00:19
apeiros has joined #ruby-lang
00:21
<
carlos_ >
my script is kinda diferent
00:21
<
carlos_ >
I output the content of a log file
00:21
symm- has quit [Ping timeout: 245 seconds]
00:21
<
carlos_ >
everytime it logs something new
00:22
symm-_ has joined #ruby-lang
00:22
<
bradland >
carlos_: nothing wrong with that
00:22
<
bradland >
i use a 'while ARGF.gets' loop in my scripts all the time
00:23
<
bradland >
i do that so i can tail -f the contents of one file in to my ruby script where some processing happens
00:23
<
carlos_ >
but it seems to decrease performance
00:24
<
bradland >
in what way?
00:24
lytol has quit [Remote host closed the connection]
00:24
mannyt has quit [Quit: Connection closed for inactivity]
00:24
<
bradland >
or rather, versus what other method?
00:25
<
bradland >
this only works for streaming operations, where you can operate on a line, or a chunk of lines and output data along the way
00:25
<
bradland >
if you need the entire dataset to perform your op (like a reduce operation), then reading the whole thing in to memory may be faster
00:25
leonshalimov has joined #ruby-lang
00:27
<
carlos_ >
my method seems to decrease my server's performance
00:27
_fritchie has joined #ruby-lang
00:28
<
bradland >
i'm not sure what that means
00:28
<
bradland >
is your ruby process consuming a lot of CPU?
00:29
<
carlos_ >
as I'm always checking for ONE new line, if the log file receive a lot of lines (data) it may even bug no?
00:29
<
carlos_ >
yes, consuming a lot of CPU
00:29
<
bradland >
can you post the script?
00:30
<
bradland >
if you're processing a lot of data, then it follows that you'll consume some CPU, but there may be a bug
00:30
leonshalimov has quit [Ping timeout: 240 seconds]
00:31
<
carlos_ >
i can't at the moment, I'm running lubuntu and can't find the network devices
00:32
<
carlos_ >
I have the file saved on a Raspberry Pi
00:33
<
carlos_ >
I will try to figure out
00:34
<
bradland >
good luck :)
00:34
benten has joined #ruby-lang
00:37
hahuang61 has quit [Ping timeout: 276 seconds]
00:38
carlos_ has quit [Ping timeout: 245 seconds]
00:39
carlosss has joined #ruby-lang
00:39
workmad3 has quit [Ping timeout: 240 seconds]
00:39
<
carlosss >
sorry, connection failed
00:40
HoloIRCUser2 has joined #ruby-lang
00:41
spuk has joined #ruby-lang
00:42
HoloIRCUser2 has left #ruby-lang [#ruby-lang]
00:43
loincloth has quit [Remote host closed the connection]
00:44
carlosss has quit [Quit: Konversation terminated!]
00:47
|jemc| has quit [Ping timeout: 245 seconds]
00:49
svajone has joined #ruby-lang
00:52
gwendall has joined #ruby-lang
00:53
g0bl1n has quit [Quit: Leaving]
00:54
yusuf1 has joined #ruby-lang
00:54
yusuf1 has quit [Max SendQ exceeded]
00:54
yusuf1 has joined #ruby-lang
00:56
gwendall has quit [Ping timeout: 276 seconds]
00:59
hinbody-mobile has quit [Quit: leaving]
00:59
skade has joined #ruby-lang
01:03
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
01:04
Lewix has joined #ruby-lang
01:04
Lewix has quit [Changing host]
01:04
Lewix has joined #ruby-lang
01:09
SuMo_D has joined #ruby-lang
01:11
Lewix has quit [Remote host closed the connection]
01:15
ta_ has joined #ruby-lang
01:15
Bwild has quit [Read error: No route to host]
01:16
jds has quit [Quit: Connection closed for inactivity]
01:17
Bwild has joined #ruby-lang
01:19
chouhoulis has joined #ruby-lang
01:20
hendranata_ has joined #ruby-lang
01:20
ta_ has quit [Ping timeout: 276 seconds]
01:21
svajone has quit [Quit: svajone]
01:23
ta_ has joined #ruby-lang
01:23
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
01:26
brooks has joined #ruby-lang
01:28
amsi has quit [Quit: Leaving]
01:28
ascarter has joined #ruby-lang
01:30
|jemc| has joined #ruby-lang
01:30
Lewix has joined #ruby-lang
01:31
symm-_ has quit [Ping timeout: 245 seconds]
01:31
ta_ has quit [Ping timeout: 245 seconds]
01:31
brooks has quit [Ping timeout: 272 seconds]
01:37
womble has quit [Ping timeout: 265 seconds]
01:37
tenderlove has joined #ruby-lang
01:38
debill has quit [Ping timeout: 240 seconds]
01:39
leonshalimov has joined #ruby-lang
01:39
timanema has quit [Quit: leaving]
01:40
<
waxjar >
agreed zenspider
01:40
timanema has joined #ruby-lang
01:42
Torrieri has quit [Quit: Be back later ...]
01:42
Torrieri has joined #ruby-lang
01:42
Torrieri has quit [Changing host]
01:42
Torrieri has joined #ruby-lang
01:43
loincloth has joined #ruby-lang
01:43
RobertBirnie has quit [Ping timeout: 256 seconds]
01:45
slawrenc_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
01:46
kyb3r_ has quit [Ping timeout: 244 seconds]
01:47
amclain has joined #ruby-lang
01:48
loincloth has quit [Ping timeout: 256 seconds]
01:48
womble has joined #ruby-lang
01:50
Torrieri has quit [Ping timeout: 244 seconds]
01:52
<
whitequark >
zenspider: deprecating RP yet? :]
01:53
gwendall has joined #ruby-lang
01:55
timanema has quit [Ping timeout: 255 seconds]
01:57
leonshalimov has quit [Ping timeout: 240 seconds]
01:57
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
01:57
gwendall has quit [Ping timeout: 276 seconds]
01:59
wallerdev has quit [Quit: wallerdev]
02:00
kyb3r_ has joined #ruby-lang
02:03
Lewix has quit [Remote host closed the connection]
02:04
tzero has quit [Quit: WeeChat 0.4.3]
02:04
tzero has joined #ruby-lang
02:06
SuMo_D_ has joined #ruby-lang
02:06
SuMo_D has quit [Ping timeout: 252 seconds]
02:07
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
02:07
iamninja has quit [Quit: ZZZzzz…]
02:10
chouhoulis has quit [Remote host closed the connection]
02:10
leandrosnunes has joined #ruby-lang
02:11
slawrence00 has joined #ruby-lang
02:12
Torrieri has joined #ruby-lang
02:12
Torrieri has joined #ruby-lang
02:15
djbkd has quit [Remote host closed the connection]
02:17
chouhoulis has joined #ruby-lang
02:17
djbkd has joined #ruby-lang
02:17
rbowlby has quit [Remote host closed the connection]
02:20
leandrosnunes has quit [Ping timeout: 276 seconds]
02:21
ur5us has joined #ruby-lang
02:23
ta_ has joined #ruby-lang
02:25
chills42 has joined #ruby-lang
02:28
cored has quit [Ping timeout: 264 seconds]
02:32
ta_ has quit [Ping timeout: 276 seconds]
02:33
ta_ has joined #ruby-lang
02:38
wallerdev has joined #ruby-lang
02:38
kaaaahirul has joined #ruby-lang
02:39
timanema has joined #ruby-lang
02:40
kaaaahirul has quit [Remote host closed the connection]
02:44
ta_ has quit [Ping timeout: 276 seconds]
02:46
ta_ has joined #ruby-lang
02:51
ta_ has quit [Ping timeout: 276 seconds]
02:52
yfeldblum has quit [Remote host closed the connection]
02:53
benten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
02:53
gwendall has joined #ruby-lang
02:53
leonshalimov has joined #ruby-lang
02:56
ta_ has joined #ruby-lang
02:58
leonshalimov has quit [Ping timeout: 252 seconds]
02:58
gwendall has quit [Ping timeout: 264 seconds]
03:04
maso has joined #ruby-lang
03:05
rahul_j has joined #ruby-lang
03:06
Bwild has quit [Ping timeout: 245 seconds]
03:07
Bwild has joined #ruby-lang
03:10
cantonic has quit [Read error: Connection reset by peer]
03:10
cantonic has joined #ruby-lang
03:11
kapil__ has joined #ruby-lang
03:11
maso has quit [Remote host closed the connection]
03:12
ta_ has quit [Ping timeout: 272 seconds]
03:13
maso has joined #ruby-lang
03:15
fclausen has joined #ruby-lang
03:16
<
bitflipping >
bradland: so it does load the gems from the proper location. When executing it can run your script to find all dependencies if you want. That is what was failing, because a regular run won't use the gems from the proper path
03:17
<
bitflipping >
so there is an option --no-dep-run that you can use to skip that run through and then it will just package all the gems in the gemfile for you
03:17
<
bitflipping >
not that you use it, but just to update you haha
03:18
rbowlby has joined #ruby-lang
03:19
rbowlby has quit [Remote host closed the connection]
03:19
tenderlove has quit [Remote host closed the connection]
03:20
vozcelik has joined #ruby-lang
03:20
rbowlby has joined #ruby-lang
03:21
tenderlove has joined #ruby-lang
03:21
tenderlove has quit [Remote host closed the connection]
03:21
ledestin has joined #ruby-lang
03:21
tenderlove has joined #ruby-lang
03:21
tenderlove has quit [Remote host closed the connection]
03:23
tenderlove has joined #ruby-lang
03:23
tenderlove has quit [Remote host closed the connection]
03:23
tenderlove has joined #ruby-lang
03:23
tenderlove has quit [Remote host closed the connection]
03:24
rbowlby has quit [Remote host closed the connection]
03:25
loincloth has joined #ruby-lang
03:26
tenderlove has joined #ruby-lang
03:26
tenderlove has quit [Remote host closed the connection]
03:30
loincloth has quit [Ping timeout: 264 seconds]
03:30
tenderlove has joined #ruby-lang
03:30
tenderlove has quit [Remote host closed the connection]
03:32
rahul_j has quit [Quit: rahul_j]
03:32
tenderlove has joined #ruby-lang
03:32
tenderlove has quit [Remote host closed the connection]
03:33
stardiviner has joined #ruby-lang
03:33
rahul_j has joined #ruby-lang
03:38
rahul_j has quit [Client Quit]
03:40
tenderlove has joined #ruby-lang
03:40
tenderlove has quit [Remote host closed the connection]
03:43
rahul_j has joined #ruby-lang
03:47
tenderlove has joined #ruby-lang
03:47
tenderlove has quit [Remote host closed the connection]
03:49
tenderlove has joined #ruby-lang
03:49
tenderlove has quit [Remote host closed the connection]
03:51
tenderlove has joined #ruby-lang
03:51
tenderlove has quit [Remote host closed the connection]
03:51
chills42 has quit [Remote host closed the connection]
03:52
tenderlove has joined #ruby-lang
03:52
tenderlove has quit [Remote host closed the connection]
03:53
tenderlove has joined #ruby-lang
03:53
yfeldblum has joined #ruby-lang
03:54
gwendall has joined #ruby-lang
03:54
rahul_j has quit [Quit: rahul_j]
03:58
yfeldblum has quit [Ping timeout: 245 seconds]
03:58
tenderlove has quit [Ping timeout: 240 seconds]
03:58
fclausen has quit [Ping timeout: 272 seconds]
03:59
gwendall has quit [Ping timeout: 276 seconds]
04:02
spuk has quit [Ping timeout: 252 seconds]
04:07
kaaaahirul has joined #ruby-lang
04:08
chouhoulis has quit [Remote host closed the connection]
04:09
Mon_Ouie has quit [Ping timeout: 276 seconds]
04:10
gix has quit [Ping timeout: 244 seconds]
04:12
Hawkran has quit [Read error: Connection reset by peer]
04:15
araujo has quit [Ping timeout: 256 seconds]
04:15
gix has joined #ruby-lang
04:15
rahul_j has joined #ruby-lang
04:19
Torrieri has quit [Quit: Be back later ...]
04:19
Torrieri has joined #ruby-lang
04:20
mattyohe has quit [Quit: Connection closed for inactivity]
04:22
ta_ has joined #ruby-lang
04:23
rahul_j has quit [Quit: rahul_j]
04:23
Torrieri has quit [Ping timeout: 246 seconds]
04:24
rahul_j has joined #ruby-lang
04:25
rbowlby has joined #ruby-lang
04:26
SuMo_D_ has quit [Read error: Connection reset by peer]
04:26
SuMo_D has joined #ruby-lang
04:26
ta_ has quit [Ping timeout: 265 seconds]
04:29
brooks has joined #ruby-lang
04:30
rbowlby has quit [Ping timeout: 244 seconds]
04:31
vozcelik has quit [Ping timeout: 245 seconds]
04:34
brooks has quit [Ping timeout: 264 seconds]
04:38
rahul_j has quit [Quit: rahul_j]
04:40
djbkd has quit [Remote host closed the connection]
04:41
cantonic has left #ruby-lang [#ruby-lang]
04:42
leonshalimov has joined #ruby-lang
04:45
fujimura has joined #ruby-lang
04:46
fclausen has joined #ruby-lang
04:47
leonshalimov has quit [Ping timeout: 252 seconds]
04:52
charliesome has joined #ruby-lang
04:52
mkosaki has quit [Quit: Leaving...]
04:53
rahul_j has joined #ruby-lang
04:53
ur5us has quit [Remote host closed the connection]
04:53
ur5us has joined #ruby-lang
04:54
rahul_j has quit [Client Quit]
04:54
tenderlove has joined #ruby-lang
04:55
gwendall has joined #ruby-lang
04:56
rahul_j has joined #ruby-lang
04:58
ur5us has quit [Ping timeout: 272 seconds]
04:59
gwendall has quit [Ping timeout: 276 seconds]
05:00
tenderlove has quit [Ping timeout: 264 seconds]
05:00
kaaaahirul has quit [Remote host closed the connection]
05:05
iamninja has joined #ruby-lang
05:06
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
05:06
stardiviner has joined #ruby-lang
05:07
stardiviner has quit [Client Quit]
05:08
billy_ran_away has quit [Remote host closed the connection]
05:13
stardiviner has joined #ruby-lang
05:14
yfeldblum has joined #ruby-lang
05:16
kaaaahirul has joined #ruby-lang
05:18
stardiviner has quit [Client Quit]
05:18
kaaaahirul has quit [Remote host closed the connection]
05:19
timanema has quit [Ping timeout: 245 seconds]
05:20
stardiviner has joined #ruby-lang
05:21
kaaaahirul has joined #ruby-lang
05:21
hahuang61 has joined #ruby-lang
05:21
kapil__ has quit [Quit: Connection closed for inactivity]
05:21
timanema has joined #ruby-lang
05:24
slawrence00 has joined #ruby-lang
05:26
timanema has quit [Ping timeout: 245 seconds]
05:27
timanema has joined #ruby-lang
05:28
martinbmadsen has joined #ruby-lang
05:29
kaaaahirul has quit [Remote host closed the connection]
05:29
yfeldblum has quit [Remote host closed the connection]
05:30
Torrieri has joined #ruby-lang
05:31
ur5us has joined #ruby-lang
05:31
timanema has quit [Remote host closed the connection]
05:33
cantonic has joined #ruby-lang
05:33
kaaaahirul has joined #ruby-lang
05:34
Torrieri has quit [Ping timeout: 245 seconds]
05:35
mattyohe has joined #ruby-lang
05:36
ur5us has quit [Ping timeout: 272 seconds]
05:39
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
05:42
stardiviner has joined #ruby-lang
05:42
kaaaahirul has quit [Remote host closed the connection]
05:44
loincloth has joined #ruby-lang
05:46
jxie has quit [Read error: Connection reset by peer]
05:46
jxie has joined #ruby-lang
05:48
spuk has joined #ruby-lang
05:48
rahul_j_ has joined #ruby-lang
05:49
loincloth has quit [Ping timeout: 264 seconds]
05:49
rahul_j has quit [Ping timeout: 272 seconds]
05:49
rahul_j_ is now known as rahul_j
05:53
timanema has joined #ruby-lang
05:55
rahul_j has quit [Quit: rahul_j]
05:55
gwendall has joined #ruby-lang
05:56
rahul_j has joined #ruby-lang
05:56
tenderlove has joined #ruby-lang
05:59
yfeldblum has joined #ruby-lang
05:59
timanema has quit [Ping timeout: 264 seconds]
06:00
timanema has joined #ruby-lang
06:01
gwendall has quit [Ping timeout: 276 seconds]
06:01
tenderlove has quit [Ping timeout: 246 seconds]
06:04
yfeldblu_ has joined #ruby-lang
06:06
kyb3r_ has quit [Read error: Connection reset by peer]
06:06
kaaaahirul has joined #ruby-lang
06:06
yfeldblum has quit [Ping timeout: 246 seconds]
06:07
thang has quit [Ping timeout: 252 seconds]
06:08
timanema has quit [Ping timeout: 264 seconds]
06:09
hendranata_ has quit [Ping timeout: 256 seconds]
06:09
kaaaahirul has quit [Remote host closed the connection]
06:09
timanema has joined #ruby-lang
06:12
thang has joined #ruby-lang
06:14
timanema has quit [Ping timeout: 245 seconds]
06:16
AKASkip has joined #ruby-lang
06:16
timanema has joined #ruby-lang
06:17
futilegames has joined #ruby-lang
06:23
timanema has quit [Ping timeout: 255 seconds]
06:23
ddd has joined #ruby-lang
06:23
timanema has joined #ruby-lang
06:24
iamninja has quit [Quit: ZZZzzz…]
06:28
shinnya_ has quit [Ping timeout: 255 seconds]
06:28
WishBoy has joined #ruby-lang
06:29
timanema has quit [Remote host closed the connection]
06:30
timanema has joined #ruby-lang
06:31
leonshalimov has joined #ruby-lang
06:34
djbkd has joined #ruby-lang
06:36
benten has joined #ruby-lang
06:36
leonshalimov has quit [Ping timeout: 246 seconds]
06:36
rippa has joined #ruby-lang
06:38
maso has quit [Remote host closed the connection]
06:39
djbkd has quit [Ping timeout: 264 seconds]
06:43
timanema has quit [Ping timeout: 256 seconds]
06:44
timanema has joined #ruby-lang
06:44
kaaaahirul has joined #ruby-lang
06:46
spuk has quit [Ping timeout: 252 seconds]
06:47
ta_ has joined #ruby-lang
06:47
fujimura has quit [Remote host closed the connection]
06:48
timanema has quit [Ping timeout: 256 seconds]
06:48
kaaaahirul has quit [Ping timeout: 265 seconds]
06:49
timanema has joined #ruby-lang
06:52
ta_ has quit [Ping timeout: 276 seconds]
06:54
timanema has quit [Ping timeout: 245 seconds]
06:54
fclausen has quit [Ping timeout: 272 seconds]
06:55
timanema has joined #ruby-lang
06:55
WishBoy has quit [Remote host closed the connection]
06:56
gwendall has joined #ruby-lang
06:57
tenderlove has joined #ruby-lang
06:59
spuk has joined #ruby-lang
07:00
timanema has quit [Ping timeout: 256 seconds]
07:00
timanema has joined #ruby-lang
07:01
gwendall has quit [Ping timeout: 276 seconds]
07:03
tenderlove has quit [Ping timeout: 252 seconds]
07:05
kaaaahirul has joined #ruby-lang
07:05
timanema has quit [Ping timeout: 256 seconds]
07:06
timanema has joined #ruby-lang
07:07
kaaaahirul has quit [Remote host closed the connection]
07:08
kapil__ has joined #ruby-lang
07:14
rbowlby has joined #ruby-lang
07:14
ta_ has joined #ruby-lang
07:19
rbowlby has quit [Ping timeout: 264 seconds]
07:20
ur5us has joined #ruby-lang
07:22
gwendall has joined #ruby-lang
07:22
ta_ has quit [Ping timeout: 276 seconds]
07:25
timanema has quit [Ping timeout: 256 seconds]
07:25
ur5us has quit [Ping timeout: 272 seconds]
07:26
j4cknewt has quit [Remote host closed the connection]
07:27
kyb3r_ has joined #ruby-lang
07:27
j4cknewt has joined #ruby-lang
07:27
ta_ has joined #ruby-lang
07:29
GBrawl has joined #ruby-lang
07:36
kaaaahirul has joined #ruby-lang
07:37
charliesome has quit [Quit: zzz]
07:38
kaaaahirul has quit [Remote host closed the connection]
07:43
charliesome has joined #ruby-lang
07:44
hahuang61 has quit [Ping timeout: 272 seconds]
07:49
simi has joined #ruby-lang
07:51
rbowlby has joined #ruby-lang
07:53
[spoiler] has joined #ruby-lang
07:59
tenderlove has joined #ruby-lang
08:00
mattyohe has quit [Quit: Connection closed for inactivity]
08:01
kyb3r_ has quit [Read error: Connection reset by peer]
08:02
apeiros has quit [Remote host closed the connection]
08:02
apeiros has joined #ruby-lang
08:03
kyb3r_ has joined #ruby-lang
08:04
tenderlove has quit [Ping timeout: 256 seconds]
08:05
charliesome has quit [Quit: zzz]
08:05
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
08:08
oleo is now known as Guest17441
08:08
oleo__ has joined #ruby-lang
08:09
chouhoulis has joined #ruby-lang
08:11
Guest17441 has quit [Ping timeout: 256 seconds]
08:14
chouhoulis has quit [Ping timeout: 264 seconds]
08:16
SuMo_D has quit [Remote host closed the connection]
08:17
SuMo_D has joined #ruby-lang
08:17
banister has joined #ruby-lang
08:20
leonshalimov has joined #ruby-lang
08:21
SuMo_D has quit [Ping timeout: 255 seconds]
08:22
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
08:22
benten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
08:24
leonshalimov has quit [Ping timeout: 245 seconds]
08:28
martinbmadsen has quit [Ping timeout: 246 seconds]
08:34
simi has quit [Ping timeout: 246 seconds]
08:38
j4cknewt has quit [Remote host closed the connection]
08:39
kaaaahirul has joined #ruby-lang
08:45
kaaaahirul has quit [Remote host closed the connection]
08:50
yusuf1 has quit [Quit: Leaving.]
08:51
stardiviner has quit [Ping timeout: 246 seconds]
08:57
ur5us has joined #ruby-lang
08:58
simi has joined #ruby-lang
08:58
marr has joined #ruby-lang
08:59
loincloth has joined #ruby-lang
09:00
AKASkip1 has joined #ruby-lang
09:00
tenderlove has joined #ruby-lang
09:01
AKASkip has quit [Ping timeout: 255 seconds]
09:01
kyb3r_ has quit [Read error: Connection reset by peer]
09:02
kyb3r_ has joined #ruby-lang
09:04
loincloth has quit [Ping timeout: 264 seconds]
09:05
kyb3r_ has quit [Read error: Connection reset by peer]
09:05
stardiviner has joined #ruby-lang
09:06
tenderlove has quit [Ping timeout: 264 seconds]
09:07
Torrieri has joined #ruby-lang
09:07
Torrieri has joined #ruby-lang
09:08
JohnBat26 has joined #ruby-lang
09:08
rahul_j has quit [Quit: rahul_j]
09:11
wallerdev has quit [Quit: wallerdev]
09:12
charliesome has joined #ruby-lang
09:13
Kryptonita has joined #ruby-lang
09:15
rahul_j has joined #ruby-lang
09:17
SuMo_D has joined #ruby-lang
09:19
Mon_Ouie has joined #ruby-lang
09:19
Mon_Ouie has joined #ruby-lang
09:22
kaaaahirul has joined #ruby-lang
09:24
kaaaahirul has quit [Client Quit]
09:24
SuMo_D has quit [Ping timeout: 245 seconds]
09:26
nofxx has quit [Ping timeout: 245 seconds]
09:27
charliesome has quit [Quit: zzz]
09:28
charliesome has joined #ruby-lang
09:30
GBrawl has quit [Quit: (null)]
09:32
stamina has joined #ruby-lang
09:39
amclain has quit [Quit: Leaving]
09:39
j4cknewt has joined #ruby-lang
09:40
nofxx has joined #ruby-lang
09:43
j4cknewt has quit [Ping timeout: 256 seconds]
09:47
stardiviner has quit [Ping timeout: 240 seconds]
09:55
ur5us has quit [Remote host closed the connection]
10:00
GBrawl has joined #ruby-lang
10:01
stardiviner has joined #ruby-lang
10:02
tenderlove has joined #ruby-lang
10:04
Torrieri has quit [Quit: Be back later ...]
10:07
tenderlove has quit [Ping timeout: 240 seconds]
10:08
Torrieri has joined #ruby-lang
10:09
leonshalimov has joined #ruby-lang
10:11
Torrieri has quit [Read error: Connection reset by peer]
10:12
Torrieri has joined #ruby-lang
10:13
leonshalimov has quit [Ping timeout: 264 seconds]
10:15
rahul_j has quit [Quit: rahul_j]
10:17
otertore has joined #ruby-lang
10:17
riffraff has joined #ruby-lang
10:23
Torrieri has quit [Quit: Be back later ...]
10:33
chinmay_dd_ has joined #ruby-lang
10:34
rbowlby has quit [Remote host closed the connection]
10:34
loincloth has joined #ruby-lang
10:37
nofxx has quit [Ping timeout: 252 seconds]
10:39
loincloth has quit [Ping timeout: 245 seconds]
10:39
fujimura has joined #ruby-lang
10:41
Kryptonita has quit [Remote host closed the connection]
10:49
Kryptonita has joined #ruby-lang
10:51
simi has quit [Ping timeout: 246 seconds]
10:52
nofxx has joined #ruby-lang
10:53
micmus has joined #ruby-lang
10:54
thelastinuit has joined #ruby-lang
10:54
Kryptonita has quit [Remote host closed the connection]
10:55
ur5us has joined #ruby-lang
10:56
Kryptonita has joined #ruby-lang
10:56
GaelanAintAround has quit [Ping timeout: 264 seconds]
10:56
zz_dlu has quit [Ping timeout: 245 seconds]
10:58
GaelanAintAround has joined #ruby-lang
10:58
zz_dlu has joined #ruby-lang
11:00
nofxx has quit [Ping timeout: 246 seconds]
11:00
cornerma1 has joined #ruby-lang
11:01
cantonic has quit [Quit: cantonic]
11:03
ledestin has quit [Quit: ledestin]
11:04
tenderlove has joined #ruby-lang
11:04
cornerman has quit [Ping timeout: 264 seconds]
11:04
cornerma1 is now known as cornerman
11:09
tenderlove has quit [Ping timeout: 252 seconds]
11:10
Kryptonita has quit [Remote host closed the connection]
11:11
leandrosnunes has joined #ruby-lang
11:21
SuMo_D has joined #ruby-lang
11:26
SuMo_D has quit [Ping timeout: 246 seconds]
11:27
trajing|Mobile has joined #ruby-lang
11:32
ta_ has quit [Ping timeout: 272 seconds]
11:32
sarkyniin has joined #ruby-lang
11:41
djbkd has joined #ruby-lang
11:46
djbkd has quit [Ping timeout: 245 seconds]
11:47
cantonic has joined #ruby-lang
11:51
cantonic has quit [Client Quit]
11:52
cantonic has joined #ruby-lang
11:52
ta_ has joined #ruby-lang
11:55
symm- has joined #ruby-lang
11:57
leonshalimov has joined #ruby-lang
11:57
ta_ has quit [Ping timeout: 276 seconds]
12:00
donove has joined #ruby-lang
12:00
donove has joined #ruby-lang
12:02
leonshalimov has quit [Ping timeout: 265 seconds]
12:03
booly-yam has quit [Ping timeout: 272 seconds]
12:03
booly-yam_ has joined #ruby-lang
12:05
trajing|Mobile has quit [Read error: Connection reset by peer]
12:05
trajing|Mobile has joined #ruby-lang
12:05
tenderlove has joined #ruby-lang
12:05
iamninja has joined #ruby-lang
12:10
tenderlove has quit [Ping timeout: 245 seconds]
12:12
trajing|Mobile has quit [Read error: Connection reset by peer]
12:15
cantonic_ has joined #ruby-lang
12:15
trajing|Mobile has joined #ruby-lang
12:16
trajing|Mobile has quit [Read error: Connection reset by peer]
12:16
dellavg_ has joined #ruby-lang
12:18
trajing|Mobile has joined #ruby-lang
12:19
ta_ has joined #ruby-lang
12:21
stardiviner has quit [Ping timeout: 264 seconds]
12:24
fujimura has quit [Remote host closed the connection]
12:28
chinmay_dd_ has quit [Quit: Leaving]
12:28
ta_ has quit [Ping timeout: 252 seconds]
12:30
oleo__ is now known as oleo
12:31
oleo has quit [Quit: Verlassend]
12:32
oleo has joined #ruby-lang
12:32
cantonic has quit [Quit: cantonic]
12:32
cantonic_ is now known as cantonic
12:33
cantonic has quit [Quit: cantonic]
12:34
micmus has quit [Ping timeout: 265 seconds]
12:39
trajing|Mobile has quit [Read error: Connection reset by peer]
12:39
trajing|Mobile has joined #ruby-lang
12:40
tobiassvn has joined #ruby-lang
12:40
micmus has joined #ruby-lang
12:43
cantonic has joined #ruby-lang
12:44
cantonic has quit [Client Quit]
12:44
Hawkran has joined #ruby-lang
12:45
Integralist has joined #ruby-lang
12:46
Integralist has quit [Client Quit]
12:46
Integralist has joined #ruby-lang
12:50
fujimura has joined #ruby-lang
12:51
ottlikg has joined #ruby-lang
12:51
devgiant has joined #ruby-lang
12:52
Forgetful_Lion has quit [Remote host closed the connection]
12:55
dstodolny has joined #ruby-lang
12:57
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
12:58
dstodolny has quit [Read error: Connection reset by peer]
12:58
konr has joined #ruby-lang
12:58
dstodolny has joined #ruby-lang
13:02
ur5us has quit [Remote host closed the connection]
13:03
dstodolny has left #ruby-lang [#ruby-lang]
13:04
dstodolny has joined #ruby-lang
13:04
stardiviner has joined #ruby-lang
13:04
stardiviner has quit [Changing host]
13:04
stardiviner has joined #ruby-lang
13:05
ottlikg has quit [Ping timeout: 256 seconds]
13:05
dstodolny has left #ruby-lang [#ruby-lang]
13:07
tenderlove has joined #ruby-lang
13:07
devgiant has quit [Quit: Leaving]
13:09
Kryptonita has joined #ruby-lang
13:12
tenderlove has quit [Ping timeout: 265 seconds]
13:13
symm- has quit [Read error: Connection reset by peer]
13:14
trajing|Mobile has quit [Read error: Connection reset by peer]
13:18
j0n3 has joined #ruby-lang
13:19
Bwild has quit [Remote host closed the connection]
13:23
djbkd has joined #ruby-lang
13:23
siaw has joined #ruby-lang
13:25
j0n3 has quit [Quit: Leaving]
13:26
j0n3 has joined #ruby-lang
13:26
Bwild has joined #ruby-lang
13:28
djbkd has quit [Ping timeout: 255 seconds]
13:28
Bwild has quit [Client Quit]
13:29
fusillicode has joined #ruby-lang
13:31
loincloth has joined #ruby-lang
13:32
fusillicode1 has quit [Ping timeout: 256 seconds]
13:32
jxie has quit [Ping timeout: 245 seconds]
13:33
djbkd has joined #ruby-lang
13:34
jxie has joined #ruby-lang
13:34
dagda1_ has quit [Read error: Connection reset by peer]
13:35
rbowlby has joined #ruby-lang
13:36
mkosaki has joined #ruby-lang
13:36
loincloth has quit [Ping timeout: 272 seconds]
13:37
benlovell has joined #ruby-lang
13:37
djbkd has quit [Ping timeout: 252 seconds]
13:40
rbowlby has quit [Ping timeout: 264 seconds]
13:40
jxie has quit [Ping timeout: 246 seconds]
13:42
ottlikg has joined #ruby-lang
13:42
jxie has joined #ruby-lang
13:46
leonshalimov has joined #ruby-lang
13:47
gwendall has quit [Remote host closed the connection]
13:48
riffraff has quit [Quit: This computer has gone to sleep]
13:51
bruno has joined #ruby-lang
13:51
leonshalimov has quit [Ping timeout: 264 seconds]
13:51
<
bruno >
im new with ruby, and rspec i need some help to mock a file exists? and open
13:52
fujimura has quit [Remote host closed the connection]
13:52
<
bruno >
any1 with time ?
13:52
apeiros has quit [Read error: Connection reset by peer]
13:52
fujimura has joined #ruby-lang
13:52
apeiros has joined #ruby-lang
13:53
<
ljarvis >
bruno: what's the problem?
13:53
gjaldon has joined #ruby-lang
13:54
<
bruno >
so i got a yml file
13:54
<
bruno >
needed for config
13:54
<
bruno >
in the spec ive tryed to stub it
13:55
<
bruno >
but the method that checks if the file exists is returning false
13:55
<
bruno >
ill paste the spec code
13:55
<
bruno >
let(:resource) { double('app_id = "app_id"\n app_secret ="app_secret"') }
13:55
<
bruno >
context 'initialization' do
13:55
<
bruno >
before(:each) do
13:55
<
bruno >
allow(File).to receive(:exists?).and_return(true)
13:55
<
bruno >
allow(File).to receive(:open).and_return(:resource)
13:55
<
bruno >
it 'should have a config file' do
13:55
<
bruno >
expect(Kiik.file_exists?).to equal(true)
13:55
<
bruno >
it 'should load a config file' do
13:55
<
ljarvis >
bruno: please paste code to gist.github.com not on the channel
13:55
<
bruno >
expect(Kiik.load_config("kiik.yml").empty?).to equal(false)
13:56
fujimura has quit [Ping timeout: 252 seconds]
13:57
<
jhass >
please paste the implementation of Kiik too
13:57
djbkd has joined #ruby-lang
13:58
riffraff has joined #ruby-lang
13:58
booly-yam_ has quit [Ping timeout: 255 seconds]
13:58
[spoiler] has quit [Quit: Leaving]
13:59
gjaldon_ has joined #ruby-lang
14:00
<
ljarvis >
bruno: your specs dont test anything
14:00
fusillicode1 has joined #ruby-lang
14:00
postmodern has quit [Quit: Leaving]
14:01
<
ljarvis >
also line 3 needs an if or a &&
14:01
gjaldon has quit [Ping timeout: 245 seconds]
14:02
<
bruno >
ljarvis but when i run it tryies to validate
14:02
<
ljarvis >
the only method on your Kiik class that I would even consider stubbing out is `config_path`. If that returned a fixture file from your spec directory then everything else would be properly testable
14:02
dstodolny_ has joined #ruby-lang
14:03
Lewix has joined #ruby-lang
14:03
<
ljarvis >
you should generally consider using stubbing as little as possible
14:03
<
bruno >
not the config_path , the load_config return a file
14:04
djbkd has quit [Ping timeout: 256 seconds]
14:04
<
ljarvis >
no it doesn't
14:04
fusillicode has quit [Ping timeout: 255 seconds]
14:04
Asher has joined #ruby-lang
14:04
charliesome has quit [Quit: zzz]
14:04
gjaldon_ has quit [Remote host closed the connection]
14:04
Asher is now known as Guest34750
14:05
siaw has quit [Quit: siaw]
14:05
<
bruno >
the config_path returns a string path which the load_config will try to open, so even if i stub this method
14:05
booly-yam_ has joined #ruby-lang
14:05
<
ljarvis >
then that's your entry point
14:05
siaw has joined #ruby-lang
14:05
Guest34750 has quit [Client Quit]
14:05
booly-yam_ has quit [Remote host closed the connection]
14:05
<
ljarvis >
why would you need to stub anything else. Everything else you've stubbed has made your spec pointless
14:06
gjaldon has joined #ruby-lang
14:06
<
bruno >
the point is to test the load method itself
14:06
<
ljarvis >
if config_path returns "spec/fixtures/kiik.yml" then you can test everything without stubbing everything
14:06
<
bruno >
OOOh i see now
14:07
<
bruno >
what u mean
14:07
<
bruno >
yeah thats a nice way to do it
14:07
<
bruno >
but i still want to know why it doesnt stub the File methods
14:07
riffraff has quit [Quit: Leaving]
14:07
<
bruno >
as i expected it to do
14:08
<
ljarvis >
also, line 11 is wrong, you want "and_return(resource)" not :resource
14:08
Lewix has quit [Ping timeout: 272 seconds]
14:08
tenderlove has joined #ruby-lang
14:09
<
ljarvis >
anyway, I reckon you can just rebuild this spec with one method stubbed: config_path
14:09
<
ljarvis >
better yet, make config_path an accessor and then don't stub it out at all
14:09
<
ljarvis >
stubs == bad
14:09
gwendall has joined #ruby-lang
14:10
<
bruno >
as you said
14:10
jxie has quit [Ping timeout: 265 seconds]
14:10
mkosaki has quit [Ping timeout: 265 seconds]
14:11
benlovell has quit [Ping timeout: 245 seconds]
14:12
benlovell has joined #ruby-lang
14:12
jxie has joined #ruby-lang
14:12
mkosaki has joined #ruby-lang
14:12
siaw has left #ruby-lang [#ruby-lang]
14:13
tenderlove has quit [Ping timeout: 245 seconds]
14:15
gjaldon has quit [Read error: Connection reset by peer]
14:15
gjaldon has joined #ruby-lang
14:16
Kryptonita has quit [Remote host closed the connection]
14:17
<
bruno >
but now when i try to invoke Kiik.config it raises "The spec/fixtures/kiik.yml config file is missing"
14:17
<
ljarvis >
so create it ;)
14:17
<
bruno >
ive already created
14:17
<
bruno >
the 2 first tests pass
14:17
<
ljarvis >
bruno: can you paste the updated code
14:19
<
bruno >
ive updated the gist
14:22
<
ljarvis >
bruno: again, line 7 makes no sense
14:22
<
ljarvis >
bruno: that will raise every time
14:22
<
ljarvis >
bruno: @config.empty? raise NotConfigured.new
14:22
<
bruno >
isnt .empty method checking for keys in config ?
14:23
<
ljarvis >
there is no if
14:23
dstodolny has joined #ruby-lang
14:23
<
ljarvis >
so it just runs both statements separately
14:23
<
ljarvis >
so you either want `raise ... if @config.empty?` or `config.empty? && raise ...`
14:24
djbkd has joined #ruby-lang
14:24
<
bruno >
hmmmm sorry
14:26
mattyohe has joined #ruby-lang
14:26
tomkad has joined #ruby-lang
14:26
slawrence00 has joined #ruby-lang
14:27
tomkad has quit [Client Quit]
14:28
djbkd has quit [Ping timeout: 256 seconds]
14:29
leandrosnunes has quit [Ping timeout: 245 seconds]
14:31
Kryptonita has joined #ruby-lang
14:31
futilegames has quit [Quit: futilegames]
14:32
<
bruno >
ljarvis thnxs a lot ive fixed the config method and updated the gist
14:32
<
ljarvis >
bruno: nice one
14:32
<
ljarvis >
fwiw, I would move that check into load_config
14:32
<
ljarvis >
otherwise it'll be checked every time you use config which probably isn't what you want
14:33
<
ljarvis >
does that make sense?
14:33
<
bruno >
you r right ill do it
14:33
<
ljarvis >
that way load_config will only ever be called once for X times config is called
14:33
dstodolny_ has quit [Quit: Ex-Chat]
14:34
futilegames has joined #ruby-lang
14:34
<
bruno >
and the config_path will be called once per load_config
14:34
dstodolny has left #ruby-lang [#ruby-lang]
14:37
Asher- has joined #ruby-lang
14:37
dstodolny has joined #ruby-lang
14:39
dstodolny has left #ruby-lang [#ruby-lang]
14:40
dstodolny_ has joined #ruby-lang
14:40
dstodolny_ has left #ruby-lang [#ruby-lang]
14:41
dstodolny_ has joined #ruby-lang
14:42
svajone has joined #ruby-lang
14:43
dstodolny_ has quit [Client Quit]
14:43
djbkd has joined #ruby-lang
14:44
sangwoojoo has joined #ruby-lang
14:44
dstodolny_ has joined #ruby-lang
14:44
chouhoulis has joined #ruby-lang
14:45
dstodolny_ has quit [Client Quit]
14:45
dstodolny_ has joined #ruby-lang
14:45
dstodolny_ has quit [Client Quit]
14:45
dstodolny_ has joined #ruby-lang
14:47
leonshalimov has joined #ruby-lang
14:47
Kryptonita has quit [Remote host closed the connection]
14:47
tsou has joined #ruby-lang
14:48
dstodolny_ has quit [Client Quit]
14:48
djbkd has quit [Ping timeout: 245 seconds]
14:48
gjaldon has quit [Ping timeout: 256 seconds]
14:50
<
bruno >
ljarvis thanxs a lot
14:50
<
bruno >
ill change so i wont need a stub in spec
14:50
chouhoulis has quit [Ping timeout: 276 seconds]
14:52
leonshalimov has quit [Ping timeout: 256 seconds]
14:52
gjaldon has joined #ruby-lang
14:55
jxie has quit [Ping timeout: 244 seconds]
14:55
shinnya has joined #ruby-lang
14:57
djbkd has joined #ruby-lang
14:57
jxie has joined #ruby-lang
14:58
gjaldon has quit [Remote host closed the connection]
14:58
brooks has joined #ruby-lang
15:00
Kryptonita has joined #ruby-lang
15:03
ottlikg has quit [Ping timeout: 265 seconds]
15:03
kaahirul has joined #ruby-lang
15:04
ta_ has joined #ruby-lang
15:05
Kryptonita has quit [Ping timeout: 245 seconds]
15:05
timanema has joined #ruby-lang
15:05
brooks has quit [Quit: brooks]
15:07
gjaldon has joined #ruby-lang
15:08
dstodolny has joined #ruby-lang
15:08
djbkd has quit [Ping timeout: 245 seconds]
15:08
sangwoojoo has quit [Ping timeout: 245 seconds]
15:09
dstodolny has quit [Client Quit]
15:09
dstodolny has joined #ruby-lang
15:10
apeiros has quit [Remote host closed the connection]
15:11
apeiros has joined #ruby-lang
15:11
ta_ has quit [Ping timeout: 276 seconds]
15:12
gjaldon has quit [Remote host closed the connection]
15:14
dstodolny has quit [Client Quit]
15:14
dstodolny has joined #ruby-lang
15:15
apeiros has quit [Ping timeout: 256 seconds]
15:17
benlovell has quit [Quit: leaving]
15:18
ottlikg has joined #ruby-lang
15:19
ta_ has joined #ruby-lang
15:19
brooks has joined #ruby-lang
15:21
djbkd has joined #ruby-lang
15:22
j0n3 has quit [Read error: Connection reset by peer]
15:22
loincloth has joined #ruby-lang
15:23
konr has quit [Quit: Connection closed for inactivity]
15:24
ta_ has quit [Ping timeout: 245 seconds]
15:26
j0n3 has joined #ruby-lang
15:26
djbkd has quit [Ping timeout: 245 seconds]
15:26
j0n3_ has joined #ruby-lang
15:27
Integralist has quit [Ping timeout: 272 seconds]
15:27
j0n3_ has quit [Read error: Connection reset by peer]
15:27
loincloth has quit [Ping timeout: 256 seconds]
15:28
sangwoojoo has joined #ruby-lang
15:29
djbkd has joined #ruby-lang
15:35
djbkd has quit [Ping timeout: 240 seconds]
15:37
micmus has quit [Remote host closed the connection]
15:38
djbkd has joined #ruby-lang
15:41
kapil__ has quit [Quit: Connection closed for inactivity]
15:42
booly-yam-6520 has joined #ruby-lang
15:43
booly-yam-4405 has joined #ruby-lang
15:44
djbkd has quit [Ping timeout: 240 seconds]
15:44
Olipro has joined #ruby-lang
15:44
Olipro has quit [Read error: Connection reset by peer]
15:46
booly-yam-9422 has joined #ruby-lang
15:46
leandrosnunes has joined #ruby-lang
15:47
chouhoulis has joined #ruby-lang
15:49
booly-yam-4405 has quit [Remote host closed the connection]
15:49
booly-yam-9422 has quit [Remote host closed the connection]
15:49
booly-yam-6520 has quit [Remote host closed the connection]
15:50
SuMo_D has joined #ruby-lang
15:52
jxie has quit [Ping timeout: 245 seconds]
15:53
booly-yam-4115 has joined #ruby-lang
15:54
jxie has joined #ruby-lang
15:57
fusillicode1 has quit [Quit: Leaving.]
15:57
fusillicode has joined #ruby-lang
15:58
djbkd has joined #ruby-lang
16:00
brooks has quit [Quit: brooks]
16:01
VictorBjelkholm has joined #ruby-lang
16:01
iamninja has quit [Quit: ZZZzzz…]
16:01
unreal has joined #ruby-lang
16:03
svajone has quit [Quit: svajone]
16:04
devgiant has joined #ruby-lang
16:07
djbkd has quit [Ping timeout: 255 seconds]
16:08
Olipro has joined #ruby-lang
16:12
djbkd has joined #ruby-lang
16:15
symm- has joined #ruby-lang
16:16
VictorBjelkholm has quit [Quit: Leaving]
16:16
djbkd has quit [Ping timeout: 265 seconds]
16:17
stamina has quit [Quit: WeeChat 1.1]
16:22
kaahirul has quit [Remote host closed the connection]
16:26
sangwoojoo has quit [Ping timeout: 244 seconds]
16:26
kaahirul has joined #ruby-lang
16:28
Integralist has joined #ruby-lang
16:29
djbkd has joined #ruby-lang
16:29
riffraff has joined #ruby-lang
16:30
mattyohe has quit [Quit: Connection closed for inactivity]
16:31
tomqq has joined #ruby-lang
16:31
tomqq has quit [Client Quit]
16:33
Integralist has quit [Ping timeout: 244 seconds]
16:34
fjfish has joined #ruby-lang
16:34
leonshalimov has joined #ruby-lang
16:35
Asher- is now known as Asher
16:37
djbkd has quit [Ping timeout: 245 seconds]
16:39
leonshalimov has quit [Ping timeout: 265 seconds]
16:39
djbkd has joined #ruby-lang
16:39
kaahirul has quit [Remote host closed the connection]
16:40
fujimura has joined #ruby-lang
16:43
djbkd has quit [Ping timeout: 264 seconds]
16:46
j4cknewt has joined #ruby-lang
16:48
djbkd has joined #ruby-lang
16:48
rahul_j has joined #ruby-lang
16:49
ta_ has joined #ruby-lang
16:50
j4cknewt has quit [Ping timeout: 245 seconds]
16:50
simi has joined #ruby-lang
16:51
bryancp has quit [Ping timeout: 276 seconds]
16:51
avdi has quit [Ping timeout: 244 seconds]
16:52
michaeldeol has joined #ruby-lang
16:52
manveru has quit [Ping timeout: 244 seconds]
16:52
djbkd has quit [Ping timeout: 245 seconds]
16:54
ta_ has quit [Ping timeout: 276 seconds]
16:54
djbkd has joined #ruby-lang
16:57
rahul_j has quit [Quit: rahul_j]
16:58
diegoviola has joined #ruby-lang
16:58
rahul_j has joined #ruby-lang
17:03
djbkd has quit [Ping timeout: 252 seconds]
17:07
djbkd has joined #ruby-lang
17:08
booly-yam-4115 has quit [Ping timeout: 240 seconds]
17:11
ta_ has joined #ruby-lang
17:12
djbkd has quit [Ping timeout: 264 seconds]
17:13
loincloth has joined #ruby-lang
17:15
ascarter has joined #ruby-lang
17:16
ta_ has quit [Ping timeout: 245 seconds]
17:18
loincloth has quit [Ping timeout: 265 seconds]
17:23
chouhoulis has quit [Remote host closed the connection]
17:26
djbkd has joined #ruby-lang
17:26
avdi has joined #ruby-lang
17:30
adambeynon has joined #ruby-lang
17:34
djbkd has quit [Ping timeout: 245 seconds]
17:35
leonshalimov has joined #ruby-lang
17:38
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
17:39
ta_ has joined #ruby-lang
17:40
leonshalimov has quit [Ping timeout: 264 seconds]
17:42
bryancp has joined #ruby-lang
17:43
djbkd has joined #ruby-lang
17:43
ritek has joined #ruby-lang
17:44
gjaldon has joined #ruby-lang
17:45
ta_ has quit [Ping timeout: 276 seconds]
17:46
manveru has joined #ruby-lang
17:47
AKASkip1 has quit [Ping timeout: 245 seconds]
17:47
djbkd has quit [Ping timeout: 255 seconds]
17:48
rahul_j_ has joined #ruby-lang
17:48
devo2000 has joined #ruby-lang
17:48
rahul_j has quit [Ping timeout: 256 seconds]
17:48
rahul_j_ is now known as rahul_j
17:50
bruno has quit [Ping timeout: 272 seconds]
17:52
riffraff has quit [Quit: Leaving]
17:52
devgiant_ has joined #ruby-lang
17:53
devo2000 has quit [Client Quit]
17:54
devgiant has quit [Ping timeout: 245 seconds]
17:55
hackeron_ is now known as hackeron
17:55
ascarter has joined #ruby-lang
17:55
hackeron has quit [Changing host]
17:55
hackeron has joined #ruby-lang
17:57
gjaldon has quit []
17:57
gwendall has quit [Remote host closed the connection]
17:58
leandrosnunes has quit [Quit: WeeChat 1.0]
17:58
gwendall has joined #ruby-lang
18:01
red_menace has joined #ruby-lang
18:03
djbkd has joined #ruby-lang
18:03
gwendall has quit [Ping timeout: 276 seconds]
18:07
bruno has joined #ruby-lang
18:08
havenwood has joined #ruby-lang
18:08
djbkd has quit [Ping timeout: 264 seconds]
18:09
wallerdev has joined #ruby-lang
18:10
devgiant_ has quit [Quit: Leaving]
18:11
j0n3 has quit [Quit: Leaving]
18:11
j0n3 has joined #ruby-lang
18:11
j0n3 has quit [Client Quit]
18:11
djbkd has joined #ruby-lang
18:13
fedexo has joined #ruby-lang
18:15
wallerdev has quit [Quit: wallerdev]
18:16
wallerdev has joined #ruby-lang
18:16
djbkd has quit [Ping timeout: 245 seconds]
18:17
djbkd has joined #ruby-lang
18:22
djbkd has quit [Ping timeout: 264 seconds]
18:24
djbkd has joined #ruby-lang
18:25
xsdg has quit [Ping timeout: 246 seconds]
18:25
trajing|Mobile has joined #ruby-lang
18:26
trajing|Mobile has quit [Read error: Connection reset by peer]
18:27
xsdg has joined #ruby-lang
18:28
djbkd has quit [Ping timeout: 265 seconds]
18:29
leandrosnunes has joined #ruby-lang
18:30
leandrosnunes has quit [Client Quit]
18:31
ddd has quit [Quit: leaving]
18:32
mattwildig has joined #ruby-lang
18:32
gwendall has joined #ruby-lang
18:33
chouhoulis has joined #ruby-lang
18:35
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
18:38
chouhoulis has quit [Ping timeout: 245 seconds]
18:40
rahul_j has quit [Quit: rahul_j]
18:42
djbkd has joined #ruby-lang
18:42
stamina has joined #ruby-lang
18:43
martinbmadsen has joined #ruby-lang
18:45
segy_ has joined #ruby-lang
18:46
segy has quit [Ping timeout: 264 seconds]
18:46
djbkd has quit [Ping timeout: 245 seconds]
18:46
segy_ is now known as segy
18:47
nofxx has joined #ruby-lang
18:47
nofxx has joined #ruby-lang
18:49
djbkd has joined #ruby-lang
18:50
leonshalimov has joined #ruby-lang
18:51
booly-yam-9490 has joined #ruby-lang
18:53
ta_ has joined #ruby-lang
18:54
djbkd has quit [Ping timeout: 264 seconds]
18:55
leonshalimov has quit [Ping timeout: 264 seconds]
18:58
ta_ has quit [Ping timeout: 276 seconds]
18:59
loincloth has joined #ruby-lang
18:59
Miphix has quit [Quit: Leaving]
19:01
djbkd has joined #ruby-lang
19:03
fjfish has quit [Remote host closed the connection]
19:04
loincloth has quit [Ping timeout: 276 seconds]
19:04
francisfish has joined #ruby-lang
19:05
djbkd has quit [Ping timeout: 245 seconds]
19:05
centrx has joined #ruby-lang
19:06
stamina has quit [Ping timeout: 245 seconds]
19:09
[H]unt3r has joined #ruby-lang
19:09
trajing|Mobile has joined #ruby-lang
19:11
kyb3r_ has joined #ruby-lang
19:13
ur5us has joined #ruby-lang
19:14
trajing|Mobile has quit [Read error: Connection reset by peer]
19:14
trajing|Mobile has joined #ruby-lang
19:19
djbkd has joined #ruby-lang
19:20
martinbmadsen has quit [Ping timeout: 265 seconds]
19:24
benten has joined #ruby-lang
19:27
djbkd has quit [Ping timeout: 245 seconds]
19:34
martinbmadsen has joined #ruby-lang
19:39
benten has quit [Quit: ...]
19:39
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
19:40
kaahirul has joined #ruby-lang
19:40
trajing|Mobile has quit [Read error: Connection reset by peer]
19:44
kaahirul has quit [Ping timeout: 245 seconds]
19:45
symbol has joined #ruby-lang
19:45
gwendall has quit [Remote host closed the connection]
19:48
ta_ has joined #ruby-lang
19:49
ascarter has joined #ruby-lang
19:50
brooks has joined #ruby-lang
19:52
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
19:53
ta_ has quit [Ping timeout: 252 seconds]
19:53
bruno has quit [Ping timeout: 246 seconds]
20:02
bruno has joined #ruby-lang
20:11
postmodern has joined #ruby-lang
20:12
havenwood has quit [Remote host closed the connection]
20:13
Lewix has joined #ruby-lang
20:13
Lewix has joined #ruby-lang
20:15
robbyoconnor has quit [Quit: Konversation terminated!]
20:15
|jemc| has quit [Ping timeout: 256 seconds]
20:16
AKASkip has joined #ruby-lang
20:16
gix has quit [Ping timeout: 255 seconds]
20:17
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
20:17
yorickpeterse has joined #ruby-lang
20:18
yorickpeterse has quit [Client Quit]
20:18
stamina has joined #ruby-lang
20:19
trajing|Mobile has joined #ruby-lang
20:23
gix has joined #ruby-lang
20:23
<
bruno >
to call a block and then reset a value setted before
20:23
brooks has quit [Quit: brooks]
20:23
trajing|Mobile has quit [Read error: Connection reset by peer]
20:23
<
bruno >
i.e: a = b block.call(a) a = c ?
20:24
<
bruno >
will it work ?
20:28
martinbmadsen has quit [Ping timeout: 276 seconds]
20:30
ashconnor has joined #ruby-lang
20:31
ashconnor is now known as aconnor
20:31
oleo has quit [Ping timeout: 240 seconds]
20:32
svajone has joined #ruby-lang
20:33
ur5us has quit [Remote host closed the connection]
20:35
aconnor has quit [Quit: aconnor]
20:35
oleo has joined #ruby-lang
20:36
aconnor has joined #ruby-lang
20:36
cored has joined #ruby-lang
20:36
cored has joined #ruby-lang
20:36
<
epitron >
That looks fine
20:37
<
epitron >
I'm not exactly sure why you think that would be problematic though
20:38
<
epitron >
It leads me to believe that you're trying to do something less obvious, or your conception of variable references isn't clear
20:39
leonshalimov has joined #ruby-lang
20:40
loincloth has joined #ruby-lang
20:42
ruby-lang365 has joined #ruby-lang
20:42
<
ruby-lang365 >
Hi, does anyone know how to match exact word while ignoring whitespace using regex?
20:42
j4cknewt has joined #ruby-lang
20:43
<
ruby-lang365 >
I don't know regex and I'm left with ^example$ but I don't know where to put the \x and always keep getting invalid hex escape
20:44
yorickpeterse has joined #ruby-lang
20:44
j4cknewt_ has joined #ruby-lang
20:44
loincloth has quit [Ping timeout: 245 seconds]
20:44
leonshalimov has quit [Ping timeout: 265 seconds]
20:45
yorickpeterse has quit [Client Quit]
20:46
<
ericwood >
ruby-lang365: can you give an example of what you're trying to match?
20:47
j4cknewt has quit [Ping timeout: 245 seconds]
20:48
<
ruby-lang365 >
I'm working on a program where I need "cd" command to show current dir while "cd c:\users" should change dir to \users similr to cmd
20:48
<
ericwood >
there's a bunch of builtin stuff for working with that sort of thing
20:49
<
ruby-lang365 >
I don't know how that link would help....
20:49
<
ericwood >
I guess I don't quite understand the problem
20:49
<
ericwood >
are you trying to pull "users" out of "cd c:\users"?
20:50
<
ruby-lang365 >
I'm sorry it's just my english.
20:50
<
ericwood >
no worries
20:50
<
ericwood >
hit up rubular.com and link to your example
20:51
<
ericwood >
type in what you've got going right now and it should be a little clearer
20:51
<
ruby-lang365 >
When you type "cd" command,include?("cd") would return true so all I need to know is whether the user typed in just "cd" (space should be allowed) or "cd c:\user"
20:51
yorickpeterse has joined #ruby-lang
20:51
<
ericwood >
>> 'cd c:\user' =~ /^cd$/
20:51
lsegal has joined #ruby-lang
20:52
<
ericwood >
so in that case you can conclude they only typed in cd
20:52
<
ruby-lang365 >
A sample code
20:53
<
ericwood >
you might want to use == instead of = in line one
20:53
<
ruby-lang365 >
The first line will only accept "cd" but not "cd " or " cd" but I want to ignore whitespace...
20:53
<
ruby-lang365 >
Sorry just for demonstration purpose so I didn't look through the code
20:54
<
ericwood >
>> 'cd '.strip == 'cd'
20:55
<
ruby-lang365 >
Thanks. I didn't know you could do this with .strip though
20:55
<
tobiasvl >
that's what strip is for
20:56
<
ruby-lang365 >
I only knew things like "a b c d".strip(' ') etc
20:56
<
tobiasvl >
that doesn't work
20:56
<
tobiasvl >
>> "a b c d".strip(' ')
20:57
rbowlby has joined #ruby-lang
20:57
<
ruby-lang365 >
I just forgoet then hmm... D:
20:58
ascarter has joined #ruby-lang
20:58
<
ruby-lang365 >
But there was like "a b c d".strip(' ') => ["a","b","c","d"] or something...
20:59
<
tobiasvl >
>> "a b c d".split(' ') # :)
21:00
<
ruby-lang365 >
Ok I must now go for a check up as I didn't even conciously knew I was typing "strip" instead of "split" omg
21:00
<
tobiasvl >
haha. no problem ;)
21:01
<
ruby-lang365 >
Thanks very much. Off I go now to code bye!
21:03
ottlikg has quit [Ping timeout: 245 seconds]
21:03
djbkd has joined #ruby-lang
21:03
diegoviola has quit [Quit: WeeChat 1.1]
21:05
trajing|Mobile has joined #ruby-lang
21:08
havenwood has joined #ruby-lang
21:09
ruby-lang365 has quit [Ping timeout: 246 seconds]
21:16
ruby-lang146 has joined #ruby-lang
21:18
<
ruby-lang146 >
Hello. Could You help me? I would like to return from nested if function (in main if function), on certain condition, to main if and have main condition (in main if) checked once again
21:19
<
ruby-lang146 >
How could I achieve it (without using goto)?
21:20
pwnz0r has joined #ruby-lang
21:24
<
whitequark >
"if function"?
21:24
<
ruby-lang146 >
I mean conditiopnal statement
21:24
<
ruby-lang146 >
nested in another If
21:25
<
ruby-lang146 >
and I would like to go to main conditional statement check on certain condition in nested if
21:25
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
21:26
kyb3r_ has quit [Read error: Connection reset by peer]
21:28
diegoviola has joined #ruby-lang
21:28
kyb3r_ has joined #ruby-lang
21:31
Lewix has quit [Remote host closed the connection]
21:31
cored has quit [Ping timeout: 255 seconds]
21:34
Hawkran has joined #ruby-lang
21:38
cored has joined #ruby-lang
21:38
cored has joined #ruby-lang
21:38
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
21:42
<
heftig >
i'm kinda missing a bsearch_index
21:43
<
heftig >
having to map in the index sucks
21:44
dstodolny has quit [Quit: Ex-Chat]
21:44
dstodolny has joined #ruby-lang
21:44
dellavg_ has quit [Ping timeout: 264 seconds]
21:45
dstodolny has quit [Remote host closed the connection]
21:51
RobertBirnie has joined #ruby-lang
21:52
ruby-lang146 has quit [Ping timeout: 246 seconds]
21:53
RobertBi_ has joined #ruby-lang
21:56
RobertBirnie has quit [Ping timeout: 240 seconds]
21:58
trajing|Mobile has quit [Read error: Connection reset by peer]
22:00
trajing|Mobile has joined #ruby-lang
22:02
chouhoulis has joined #ruby-lang
22:03
trajing|Mobile has quit [Read error: Connection reset by peer]
22:03
kyb3r_ has quit [Read error: Connection reset by peer]
22:08
ta_ has joined #ruby-lang
22:12
SuMo_D has quit [Remote host closed the connection]
22:14
ta_ has quit [Ping timeout: 276 seconds]
22:15
hplar_ has joined #ruby-lang
22:17
symbol has quit [Remote host closed the connection]
22:18
michaeldeol has joined #ruby-lang
22:20
GBrawl has quit [Quit: (null)]
22:21
pwnz0r has quit [Remote host closed the connection]
22:21
charliesome has joined #ruby-lang
22:24
loincloth has joined #ruby-lang
22:24
GBrawl has joined #ruby-lang
22:28
leonshalimov has joined #ruby-lang
22:28
svajone has quit [Quit: svajone]
22:28
loincloth has quit [Ping timeout: 264 seconds]
22:29
sangwoojoo has joined #ruby-lang
22:32
leonshalimov has quit [Ping timeout: 245 seconds]
22:38
stamina has quit [Remote host closed the connection]
22:38
sangwoojoo has quit [Quit: Leaving.]
22:42
sangwoojoo has joined #ruby-lang
22:42
charliesome has quit [Quit: zzz]
22:45
Bwild has joined #ruby-lang
22:45
charliesome has joined #ruby-lang
22:46
aconnor has quit [Ping timeout: 244 seconds]
22:47
Forgetful_Lion has joined #ruby-lang
22:53
GBrawl has quit [Ping timeout: 276 seconds]
22:53
apeiros has joined #ruby-lang
22:54
<
epitron >
bsearch.with_index? :)
22:55
futilegames has quit [Quit: futilegames]
22:58
[H]unt3r has quit [Quit: Leaving]
23:02
trajing|Mobile has joined #ruby-lang
23:03
cornerma1 has joined #ruby-lang
23:03
trajing|Mobile has quit [Read error: Connection reset by peer]
23:05
mattwildig has quit []
23:06
cornerman has quit [Ping timeout: 276 seconds]
23:06
cornerma1 is now known as cornerman
23:09
diegoviola has quit [Remote host closed the connection]
23:10
Lewix has joined #ruby-lang
23:10
Lewix has joined #ruby-lang
23:11
mistym has quit [Ping timeout: 244 seconds]
23:11
TheXP has joined #ruby-lang
23:13
SuMo_D has joined #ruby-lang
23:15
elia has joined #ruby-lang
23:17
chouhoulis has quit [Remote host closed the connection]
23:18
SuMo_D has quit [Ping timeout: 265 seconds]
23:20
cored has quit [Ping timeout: 264 seconds]
23:26
Lewix has quit [Remote host closed the connection]
23:28
wprice has joined #ruby-lang
23:29
wallerdev has quit [Quit: wallerdev]
23:29
donove has quit [Quit: Leaving]
23:31
mistym has joined #ruby-lang
23:37
arBmind1 has quit [Ping timeout: 264 seconds]
23:38
arBmind has joined #ruby-lang
23:38
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
23:41
djbkd has quit [Quit: My people need me...]
23:41
GaelanAintAround has quit [Ping timeout: 245 seconds]
23:41
zz_dlu has quit [Ping timeout: 245 seconds]
23:44
GaelanAintAround has joined #ruby-lang
23:45
zz_dlu has joined #ruby-lang
23:47
trajing|Mobile has joined #ruby-lang
23:54
AKASkip has quit [Ping timeout: 276 seconds]