graphene has quit [Remote host closed the connection]
graphene has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
sanscoeur has quit [Ping timeout: 250 seconds]
dbz has joined #ruby
keden has joined #ruby
elphe has quit [Ping timeout: 250 seconds]
\void has quit [Ping timeout: 250 seconds]
dbz has quit [Remote host closed the connection]
\void has joined #ruby
venmx has quit [Ping timeout: 250 seconds]
graphene has quit [Remote host closed the connection]
keden has quit [Ping timeout: 268 seconds]
graphene has joined #ruby
elphe has joined #ruby
<cthu|>
my lovely folks!
gix has quit [Ping timeout: 268 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
awkwords has quit [Quit: sleepy time]
awkwords has joined #ruby
keden has joined #ruby
crankhar1er has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
nchambers has joined #ruby
keden has quit [Ping timeout: 250 seconds]
crankhar1er has quit [Ping timeout: 268 seconds]
<Radar>
uh oh
<cthu|>
my folks, help me with getting the last modified file in a directory
<cthu|>
would this do the trick? target_file = Dir[File.expand_path("~/.Genymobile/Genymotion/deployed/#{device_name}/logcat-*.txt").glob("logcat-*.txt").max_by {|f| File.mtime(f)}
<cthu|>
oops. forgot to close the ]
<cthu|>
anyhow
keden has joined #ruby
brkkyk has quit [Read error: Connection reset by peer]
reber has quit [Remote host closed the connection]
perique has joined #ruby
aupadhye has joined #ruby
fluxAeon has quit [Ping timeout: 246 seconds]
sauvin has joined #ruby
akem__ has quit [Ping timeout: 246 seconds]
chussenot has quit [Quit: chussenot]
segy has quit [Ping timeout: 240 seconds]
segy has joined #ruby
conta has joined #ruby
keden has joined #ruby
chris349 has quit [Ping timeout: 245 seconds]
keden has quit [Ping timeout: 246 seconds]
themsay has joined #ruby
fluxAeon has joined #ruby
fluxAeon has quit [Ping timeout: 245 seconds]
agent_white has quit [Quit: later]
dbz has joined #ruby
dbz has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
aupadhye is now known as aupadhye|food
perique has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
keden has joined #ruby
keden has quit [Ping timeout: 268 seconds]
DTZUZO has joined #ruby
clemens3 has joined #ruby
hiroaki has joined #ruby
Puffball has joined #ruby
r0B-O has joined #ruby
aupadhye|food is now known as aupadhye
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #ruby
r0B-O has quit [Remote host closed the connection]
r0b0 has joined #ruby
asphyxia has joined #ruby
r0b0 has quit [Remote host closed the connection]
r0B-O has joined #ruby
r0B-O has quit [Client Quit]
Burgestrand has joined #ruby
r0B-O has joined #ruby
themsay has quit [Ping timeout: 245 seconds]
r0B-O has quit [Remote host closed the connection]
r0B-O has joined #ruby
keden has joined #ruby
r0B-O has quit [Remote host closed the connection]
r0B-O has joined #ruby
r0B-O has quit [Remote host closed the connection]
r0B-O has joined #ruby
Dbugger has joined #ruby
r0B-O has quit [Read error: Connection reset by peer]
icantc has quit [Ping timeout: 240 seconds]
hiroaki has quit [Ping timeout: 268 seconds]
Dbugger has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
Sembei has quit [Read error: Connection reset by peer]
Sembei has joined #ruby
kapil____ has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
conta has quit [Ping timeout: 268 seconds]
fluxAeon has joined #ruby
DTZUZO has quit [Quit: WeeChat 2.0]
DTZUZO has joined #ruby
waheedi has joined #ruby
venmx has joined #ruby
danguita has quit [Quit: Connection closed for inactivity]
Burgestrand has quit [Quit: Good bye and have a nice day!]
lomex has joined #ruby
Burgestrand has joined #ruby
TheBloke has quit [Read error: Connection reset by peer]
TheBloke has joined #ruby
asphyxia has quit [Ping timeout: 250 seconds]
conta has joined #ruby
Guest21835 has joined #ruby
dbz has joined #ruby
bhaak has quit [Ping timeout: 245 seconds]
conta has quit [Ping timeout: 250 seconds]
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
nchambers has quit [Ping timeout: 250 seconds]
keden has quit [Ping timeout: 244 seconds]
dbz has quit [Ping timeout: 250 seconds]
ua has quit [Remote host closed the connection]
teclator has joined #ruby
keden has joined #ruby
keden has quit [Ping timeout: 246 seconds]
dhollinger has quit [Read error: Connection reset by peer]
dhollinger has joined #ruby
druonysus has quit [Ping timeout: 268 seconds]
LinuxKnight has quit [Remote host closed the connection]
LinuxKnight has joined #ruby
keden has joined #ruby
Snowy has joined #ruby
keden has quit [Ping timeout: 245 seconds]
Snowy has quit [Client Quit]
ua has joined #ruby
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 244 seconds]
phaul has joined #ruby
hiroaki has joined #ruby
asphyxia has joined #ruby
keden has joined #ruby
esrse has quit [Ping timeout: 268 seconds]
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has joined #ruby
tjbp has quit [Ping timeout: 268 seconds]
lomex has joined #ruby
Burgestrand has quit [Quit: Closing time!]
conta has quit [Ping timeout: 268 seconds]
lomex has quit [Ping timeout: 252 seconds]
r0B-O has joined #ruby
r0B-O has quit [Remote host closed the connection]
Burgestrand has joined #ruby
Puffball has quit [Remote host closed the connection]
tjbp has joined #ruby
hahuang6- has quit [Ping timeout: 250 seconds]
hahuang65 has joined #ruby
jlebrech has joined #ruby
<jlebrech>
hi, i have a bunch of stubs that just return a [] can i specify those as a one liner somehow?
asphyxia has quit [Ping timeout: 250 seconds]
elphe has quit [Ping timeout: 268 seconds]
<phaul>
%i(foo bar baz).each { |sym| allow(object).to receive(sym).and_return([]) } ?
<jlebrech>
ooh, yeah make's sense. might put that in spec helper
<jlebrech>
makes*
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
nolanv has joined #ruby
<jlebrech>
phaul: will call it any_instance_empty :)
<phaul>
jlebrech: ok
conta has joined #ruby
asphyxia has joined #ruby
asphyxia has quit [Client Quit]
Ca1us is now known as Caius
Burgestrand has quit [Quit: Good bye and have a nice day!]
roshanavand has joined #ruby
piks3l has joined #ruby
InfinityFye has joined #ruby
Burgestrand has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
chussenot has joined #ruby
roshanavand has quit [Ping timeout: 245 seconds]
phaul has quit [Quit: bye]
chussenot has left #ruby [#ruby]
mangold has joined #ruby
phaul has joined #ruby
roshanavand has joined #ruby
<jlebrech>
phaul: works nicely :)
bmurt has joined #ruby
rann has joined #ruby
akem__ has joined #ruby
cd has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
Guest21835 has quit [Ping timeout: 246 seconds]
Guest21835 has joined #ruby
Burgestrand has quit [Quit: Closing time!]
hiroaki has quit [Ping timeout: 244 seconds]
AJA4350 has joined #ruby
Guest21835 has quit [Ping timeout: 245 seconds]
conta has quit [Ping timeout: 250 seconds]
beeman has joined #ruby
jgpawletko has joined #ruby
Guest21835 has joined #ruby
mangold has quit [Quit: Leaving]
jgpawletko has quit [Client Quit]
Guest21835 has quit [Ping timeout: 246 seconds]
szulak_ has joined #ruby
Guest21835 has joined #ruby
elphe has joined #ruby
aufi has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
Burgestrand has joined #ruby
elphe has quit [Ping timeout: 268 seconds]
Guest21835 has quit [Ping timeout: 250 seconds]
aufi has quit [Remote host closed the connection]
aufi has joined #ruby
Azure|dc has quit [Ping timeout: 246 seconds]
szulak_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crankharder has joined #ruby
Guest21835 has joined #ruby
dbz has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
dbz has quit [Ping timeout: 246 seconds]
conta1 has joined #ruby
GodFather has joined #ruby
akem__ has quit [Remote host closed the connection]
akem__ has joined #ruby
jlebrech has quit [Remote host closed the connection]
kaleido has quit [Remote host closed the connection]
kaleido has joined #ruby
akem__ has quit [Remote host closed the connection]
roshanavand has joined #ruby
akem__ has joined #ruby
graphene has quit [Remote host closed the connection]
reber has joined #ruby
jottr has joined #ruby
graphene has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
polishdub has joined #ruby
bambanx has joined #ruby
wildermind has joined #ruby
elphe has joined #ruby
fredmorcos has joined #ruby
rippa has joined #ruby
elphe has quit [Ping timeout: 250 seconds]
GodFather has quit [Ping timeout: 268 seconds]
Inline has joined #ruby
dinfuehr has joined #ruby
Renich has joined #ruby
dinfuehr_ has quit [Ping timeout: 250 seconds]
roshanavand has joined #ruby
code_zombie has joined #ruby
Burgestrand has quit [Quit: Closing time!]
fredmorcos has quit [Remote host closed the connection]
lypsis_ has quit [Ping timeout: 246 seconds]
roshanavand1 has joined #ruby
Renich_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand1 is now known as roshanavand
Renich has quit [Ping timeout: 245 seconds]
Renich_ is now known as Renich
SeepingN has joined #ruby
lypsis has joined #ruby
SeepingN has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
akem__ has quit [Quit: Leaving]
elphe has joined #ruby
za1b1tsu has joined #ruby
bambanx has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
leitz has joined #ruby
eclm has joined #ruby
nchambers has joined #ruby
bambanx has joined #ruby
<leitz>
Not trying to start a flame war, just building my 2019 learning plan. Are there things that Cucumber does that RSPEC 3 does not?
roshanavand has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
za1b1tsu has quit [Quit: WeeChat 2.2]
Azure has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
conta1 has quit [Ping timeout: 244 seconds]
<jhass>
cucumber specs are actually meant to be written by your buisness people, basically a formal format for user stories that you also happen to be able to write code for so they could be executed as tests
<jhass>
if you don't need that, don't use it
troulouliou_div2 has joined #ruby
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 246 seconds]
nchambers has quit [Quit: WeeChat 2.2]
<jhass>
as providing this abstraction is all it does
<leitz>
jhass, thanks! I'm trying to build more tests, to include "is my DB up?" and things like that.
<leitz>
Learning more RSPEC is high on my "to do" list but I was not sure if I needed to add Cucumber.
<jhass>
tests should test your code not your environment ;)
<leitz>
I support the environment, having automated tests helps. :)
roshanavand has quit [Read error: Connection reset by peer]
nowhere_man has quit [Remote host closed the connection]
roshanavand has joined #ruby
Aqo has quit [Ping timeout: 250 seconds]
jaddison has joined #ruby
nowhere_man has joined #ruby
clemens3 has quit [Remote host closed the connection]
jaddison has quit [Client Quit]
Yxhuvud has joined #ruby
jaddison has joined #ruby
Aqo has joined #ruby
bambanx has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
dinfuehr has joined #ruby
dinfuehr_ has quit [Ping timeout: 268 seconds]
conta1 has joined #ruby
sanscoeur has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has quit [Ping timeout: 246 seconds]
jaddison has quit [Quit: jaddison]
jaddison has joined #ruby
bhaak has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 268 seconds]
szulak_ has joined #ruby
joast has quit [Quit: Leaving.]
joast has joined #ruby
dviola has joined #ruby
dinfuehr has joined #ruby
dinfuehr_ has quit [Ping timeout: 250 seconds]
hutch has joined #ruby
GodFather has joined #ruby
sanscoeur has quit [Remote host closed the connection]
sanscoeur has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
Azure has quit [Read error: Connection reset by peer]
darkhanb has joined #ruby
Azure has joined #ruby
jottr has quit [Read error: Connection reset by peer]
jottr has joined #ruby
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 246 seconds]
Azure has quit [Ping timeout: 250 seconds]
bambanx has joined #ruby
houhoulis has joined #ruby
venmx has quit [Ping timeout: 245 seconds]
SuperLag has quit [Remote host closed the connection]
sanscoeur has quit [Remote host closed the connection]
SuperLag has joined #ruby
sanscoeur has joined #ruby
Azure has joined #ruby
akem has joined #ruby
Exuma has joined #ruby
szulak_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Renich has quit [Remote host closed the connection]
dinfuehr has joined #ruby
dinfuehr_ has quit [Ping timeout: 250 seconds]
Renich has joined #ruby
Renich_ has joined #ruby
Exuma has quit [Client Quit]
za1b1tsu has joined #ruby
sanscoeur has quit [Remote host closed the connection]
piks3l has quit [Quit: piks3l]
sanscoeur has joined #ruby
Renich has quit [Ping timeout: 246 seconds]
Renich_ is now known as Renich
za1b1tsu has quit [Client Quit]
za1b1tsu has joined #ruby
i4 has joined #ruby
sanscoeur has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
<i4>
Hi all. I have a Hash named 'hash_one' = {:a {a1: 1, a2: 2}, :c {c1: 1, c2: 2},:b {b1: 1, b2: 2}... How can I split the Hash by keyset? For example: ':a' and ':b' to get the new hash_two = {one: {:a{}, :c{}}, two: {:b{}}} ?
mikecmpbll has quit [Quit: inabit. zz.]
jcutrell has joined #ruby
<jcutrell>
Hi folks.
<jcutrell>
Dealing with an interesting issue, wondering if anyone has seen something similar - we’ve got OmniAuth set up in a Sinatra app. We’re using OmniAuth Builder twice for the same provider. Would this cause issues?
sanscoeur has joined #ruby
jottr has quit [Read error: Connection reset by peer]
Exuma has joined #ruby
dbz has joined #ruby
bambanx has quit [Ping timeout: 272 seconds]
Dreamer3_ has quit [Quit: Computer has gone to sleep.]
elphe has quit [Ping timeout: 268 seconds]
za1b1tsu has quit [Remote host closed the connection]
tdy has joined #ruby
beeman has quit [Quit: Connection closed for inactivity]
aupadhye has quit [Ping timeout: 268 seconds]
\void has joined #ruby
aufi has quit [Remote host closed the connection]
aufi has joined #ruby
GodFather has quit [Ping timeout: 246 seconds]
sanscoeur has quit [Remote host closed the connection]
<al2o3-cr>
i4: you could group by the key.
<i4>
into hash?
<al2o3-cr>
al2o3-cr: let me check.
Guest21835 has quit [Ping timeout: 250 seconds]
<al2o3-cr>
i4: maybe something like this could work for you? `hash_one.group_by { |k, _| k == :b ? :two : :one }.transform_values(&:to_h)'
<i4>
how I can get the index of any key in hash? is it possible?
<havenwood>
i4: check methods on Hash (yes, it's possible)
<i4>
HBut how?
houhoulis has quit []
<al2o3-cr>
i4: the clue is your question :)
<i4>
did you mean each_with_index?
sanscoeur has quit [Remote host closed the connection]
<havenwood>
i4: yup - that's a way
<jhass>
i4: also think about whether you actually got your hash the right way around (the right things as keys and the right things as values) if you want to operate that much on the keyset
<i4>
Can I get first second third and etc order keys without .each do |x|
<i4>
?
<havenwood>
i4: you can turn a Hash into an Array
<jhass>
or maybe you actually want an array of two element arrays
<i4>
hm
<havenwood>
i4: like jhass said ^, consider if your data structure here is what it should be
<i4>
I have hash and I want to print first item form it, then two items from it and then by 3 items untill the end of hash
<al2o3-cr>
ah.
<havenwood>
i4: when you say "items" do you mean key/value pairs or something else?
akem has quit [Remote host closed the connection]
akem has joined #ruby
<i4>
keys
<jhass>
do you ever do your_hash[:something]?
sepp2k has joined #ruby
CrazyEddy has joined #ruby
<i4>
hm?
<al2o3-cr>
i4: could you produce a little gist/paste desired input/output? it would benefit you massively.
<i4>
ok
<havenwood>
i4: Do you use your Hash to find values by key?
<i4>
yes
salasrod has quit [Quit: /quit]
<i4>
which pastebin resource i must use?
salasrod has joined #ruby
<al2o3-cr>
?paste i4
<havenwood>
i4: gist.github.com or dpaste.de are good options.
<al2o3-cr>
does the bot have a trigger for a list of decent pastebins?
<jhass>
do you actually ever have keys not matching the pattern in the select? Do you actually ever make use of the anchors you define in your YAML?
<i4>
In this example with select on => I get all I need
<i4>
only keys with values where is the :bod present
<i4>
and not null
Puffball has joined #ruby
<i4>
havenwood, this is example for incremental
<jhass>
I'm talking about the first select, not the second
<jhass>
btw there's never time wasted on proper variable/key names, abreviations you will not remember yourself in half a year
sanscoeur has quit [Remote host closed the connection]
<i4>
But I need #=> [1], #=> [2], [3], #=> [4], [5], [6], #=> [7], [8], [9]
<i4>
etc
crankharder has quit [Quit: Lost terminal]
<i4>
maybe you right
<i4>
yes, you right
krawchyk has joined #ruby
InfinityFye has quit [Quit: Leaving]
chouhoulis has quit [Ping timeout: 268 seconds]
sanscoeur has joined #ruby
<i4>
that's why I want to undrstand how to enumerate keys in hashes
<i4>
to get keys by number like a first or third or four and slice or split
sanscoeur has quit [Remote host closed the connection]
keden has joined #ruby
<jhass>
I'd probably keep it simple, extract all redundant code to a partial/helper method and then do data[0], data[1], data[2], data[3..-1].each_slice(3) do |item|