<rwh1>
I have an nginx reverse proxy, and want to run a rails app (redmine) behind it on another machine. Best option would be passenger standalone, right?
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
umaaji has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 268 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bronson has joined #ruby
nobitanobi has quit [Remote host closed the connection]
canteen4 has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
<pinksandles>
easiest maybe
<pinksandles>
but if you already have reverse proxy, then all ruby web servers(thin, unicorn, ..) are good
canteen4 has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bambanx has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 276 seconds]
aduabu has joined #ruby
johnny56 has joined #ruby
canteen4 has quit [Ping timeout: 276 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
mim1k has joined #ruby
aduabu has joined #ruby
nobitanobi has joined #ruby
canteen4 has quit [Ping timeout: 276 seconds]
cdg has joined #ruby
canteen4 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
aduabu has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 248 seconds]
dlitvak has quit [Quit: Connection closed for inactivity]
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 246 seconds]
<rwh1>
pinksandles: thanks
<rwh1>
next step is getting it set up on debian - the debian passenger package doesn't include a systemd unit file, or init script or anything to make it go ...
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 276 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 246 seconds]
rwh1 has quit [Quit: Leaving.]
oliv_____ has quit [Remote host closed the connection]
bambanx has quit [Quit: Leaving]
aduabu has joined #ruby
nobitanobi has joined #ruby
mtkd has quit [Ping timeout: 246 seconds]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
canteen4 has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
canteen4 has joined #ruby
nobitanobi has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
nobitanobi has joined #ruby
milardovich has joined #ruby
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 276 seconds]
aduabu has joined #ruby
edwardly has quit [*.net *.split]
lucas has quit [*.net *.split]
spectra has quit [*.net *.split]
meinside has quit [*.net *.split]
Alina-malina has quit [*.net *.split]
inoperable has quit [*.net *.split]
aspiers has quit [*.net *.split]
iamyask has quit [*.net *.split]
lipoqil has quit [*.net *.split]
Tony-St4rk has quit [*.net *.split]
AKPWD has quit [*.net *.split]
jtperreault has quit [*.net *.split]
tfitts has quit [*.net *.split]
jokke has quit [*.net *.split]
ablackack has quit [*.net *.split]
Technaton has quit [*.net *.split]
FiendKing04 has quit [*.net *.split]
mistym has quit [*.net *.split]
Raboo has quit [*.net *.split]
Kero has quit [*.net *.split]
madhatter has quit [*.net *.split]
DenSchub has quit [*.net *.split]
zipkid has quit [*.net *.split]
Brak____________ has quit [*.net *.split]
doesntbyte has quit [*.net *.split]
afisher has quit [*.net *.split]
pizzaops has quit [*.net *.split]
[spoiler] has quit [*.net *.split]
sspreitz has quit [*.net *.split]
manveru has quit [*.net *.split]
stephenh has quit [*.net *.split]
mbr has quit [*.net *.split]
Chew has quit [*.net *.split]
cats has quit [*.net *.split]
BackEndCoder has quit [*.net *.split]
contradictioned has quit [*.net *.split]
jokester has quit [*.net *.split]
Miron has quit [*.net *.split]
chromis has quit [*.net *.split]
bazzy has quit [*.net *.split]
discopatrick has quit [*.net *.split]
pmarreck has quit [*.net *.split]
danzilio has quit [*.net *.split]
bove has quit [*.net *.split]
zzak has quit [*.net *.split]
sparr has quit [*.net *.split]
craysiii has quit [*.net *.split]
cttttt has quit [*.net *.split]
cardoni has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
Fire-Dragon-DoL has quit [*.net *.split]
rrichardsr3 has quit [*.net *.split]
async_prince has quit [*.net *.split]
voker57 has quit [*.net *.split]
ndrst has quit [*.net *.split]
Takumo has quit [*.net *.split]
jrgifford has quit [*.net *.split]
skmp has quit [*.net *.split]
SuperTux88 has quit [*.net *.split]
petems has quit [*.net *.split]
raddazong has joined #ruby
in0perable has joined #ruby
voker57 has joined #ruby
voker57 has joined #ruby
voker57 has quit [Changing host]
milardovich has quit [Ping timeout: 248 seconds]
ablackack has joined #ruby
AKPWD has joined #ruby
DenSchub has joined #ruby
SuperTux88_ has joined #ruby
mbr has joined #ruby
doesntbyte has joined #ruby
async_prince has joined #ruby
stephenh has joined #ruby
ndrst has joined #ruby
aspiers has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
Raboo has joined #ruby
lucas has joined #ruby
SuperTux88_ is now known as SuperTux88
lipoqil has joined #ruby
Takumo has joined #ruby
afisher has joined #ruby
jtperreault has joined #ruby
jokester has joined #ruby
ndrst is now known as Guest3800
Tony-St4rk has joined #ruby
bove has joined #ruby
contradictioned has joined #ruby
pmarreck has joined #ruby
cttttt has joined #ruby
zzak has joined #ruby
Cohedrin_ has joined #ruby
jrgifford has joined #ruby
petems has joined #ruby
pizzaops has joined #ruby
rrichardsr3 has joined #ruby
chromis has joined #ruby
skmp has joined #ruby
cardoni has joined #ruby
danzilio has joined #ruby
discopatrick has joined #ruby
craysiii has joined #ruby
manveru has joined #ruby
nyuszika7h has joined #ruby
Technaton has joined #ruby
jokke has joined #ruby
gix has quit [Ping timeout: 240 seconds]
sunrunner20 has quit [Ping timeout: 260 seconds]
sparr has joined #ruby
mistym has joined #ruby
sspreitz has joined #ruby
Alina-malina has joined #ruby
FiendKing04 has joined #ruby
mistym has joined #ruby
mistym has quit [Changing host]
bazzy has joined #ruby
cats has joined #ruby
bokayio has quit [Ping timeout: 240 seconds]
[spoiler] has joined #ruby
aupadhye has joined #ruby
Fire-Dragon-DoL has joined #ruby
Miron has joined #ruby
escrooge1 has joined #ruby
edwardly has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
Kero has joined #ruby
sunrunner20 has joined #ruby
BackEndCoder has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
bokayio has joined #ruby
govg has joined #ruby
canteen4 has joined #ruby
gix has joined #ruby
spectra has joined #ruby
ChickeNES has quit [Excess Flood]
ChickeNES has joined #ruby
aduabu has quit [Ping timeout: 276 seconds]
canteen4 has quit [Ping timeout: 260 seconds]
aduabu has joined #ruby
canteen4 has joined #ruby
cagomez has joined #ruby
mahlon has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 260 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
cagomez has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
im314ous has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oleo has quit [Quit: irc client terminated!]
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
jameser_ has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
jameser has joined #ruby
cschneid_ has joined #ruby
aufi has joined #ruby
guardianx has quit [Remote host closed the connection]
biberu has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
brent__ has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
cschneid_ has quit [Ping timeout: 246 seconds]
aduabu has quit [Ping timeout: 240 seconds]
bronson has quit [Remote host closed the connection]
<dminuoso>
pinksandles: actually I just realized that each_with_index is willy
<pinksandles>
?
harai has joined #ruby
paranoicsan has joined #ruby
<dminuoso>
pinksandles: Under the hood *just* with_index(0)
<pinksandles>
haha
<pinksandles>
then WithIndexable makes a little more sense
alfiemax has joined #ruby
<dminuoso>
pinksandles: No. Just use with_index
<pinksandles>
*shrug*
<pinksandles>
quite rare i need with_index
canteen4 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
postmodern_ has joined #ruby
postmodern has quit [Read error: Connection reset by peer]
canteen4 has quit [Ping timeout: 252 seconds]
<pinksandles>
ary = [1,2,3].extend(WithIndexable)
<pinksandles>
ary.select_with_index(1) {|e,i| }
<pinksandles>
beaut-tat-ful
<workmad3>
pinksandles: I'd probably make `with_indexable` specific to enumerable methods tbh... something like `%i(map reject select ...).each { |m| define_method "#{m}_with_index" { |*args, **kwargs, &blk| public_send(m).with_index(*args, **kwargs, &blk) } }`
<pinksandles>
right, that'd be faster
vondruch has quit [Quit: vondruch]
<workmad3>
and also not cause weird side-effects with non-enumerable methods
vondruch has joined #ruby
<pinksandles>
if m.to_s =~ /(\w+)_with_index/ and respond_to?($1, false)
<pinksandles>
enum.respond_to?(:with_index) ? enum.with_index(*a, &b) : super
<pinksandles>
enum = public_send($1)
<pinksandles>
i think that should cover the side effects
<workmad3>
ary.delete_with_index("foo")
<pinksandles>
it would only work if `ary.delete.with_index` is a thing.
<workmad3>
no, it would have already called `delete`
<workmad3>
in order to get the `enum` to test for `with_index` support
<pinksandles>
ah true.
mim1k has quit [Ping timeout: 240 seconds]
<pinksandles>
yea. not sure what good work arounds there are for that. i'll probably come back to it later
zipace has joined #ruby
<workmad3>
I don't think there is a workaround with a method_missing approach... and you could take the view that someone trying that deserves what they get :)
<pinksandles>
well. there is.
conta has quit [Remote host closed the connection]
<pinksandles>
you could just take `%i(map reject select ...` from your example, then check $1 is there.
<workmad3>
oh right... test for a specific set of methods that support `.with_index` chaining in the method_missing :P
<pinksandles>
yep.
<pinksandles>
same thing your solution does
frozengeek has joined #ruby
<workmad3>
I was discounting that one, because it also removes the point of a method_missing type approach, which is to still work without modification as new chainable methods are added
<pinksandles>
i don't agree.
<workmad3>
e.g. `String.include(WithIndexable); "fooo".each_char_with_index`...
<pinksandles>
a whitelist-type approach for method_missing is useful if the runtime is not gauranteed to be the same.
canteen4 has joined #ruby
<workmad3>
hmm... true... tradeoffs
kapil___ has joined #ruby
mim1k has joined #ruby
<pinksandles>
yea. i dont think most code is that dynamic. so most likely defining the methods is better
aduabu has quit [Ping timeout: 252 seconds]
brent__ has joined #ruby
jane_booty_doe has joined #ruby
aduabu has joined #ruby
<pinksandles>
yea for sure. tried here. and it works out much better
brent__ has quit [Ping timeout: 248 seconds]
mikecmpb_ has quit [Quit: inabit. zz.]
<pinksandles>
but then. with method_missing you could add/remove select methods. and always be able to. eg: include WithIndexable(%w(map select reject))
canteen4 has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
canteen4 has joined #ruby
conta has joined #ruby
jinie has quit [Read error: Connection reset by peer]
<ruby[bot]>
Bish: # => /tmp/execpad-889b2092a2d5/source-889b2092a2d5:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/849121)
<Bish>
i dont think they were like " oh, to_json, to_s, doesnt matter"
<Bish>
>> require 'json'; class ComplexObject; def to_s; super;end; def to_json *args;"{}";end;end; co = ComplexObject.new; {co=>co}.to_json
<ruby[bot]>
Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Bish>
:o
<pinksandles>
def to_s(); isoXXXX; end seems like a decent solution.
<Bish>
im scared of that solution
<pinksandles>
why?
<Bish>
libraries might use that format
<pinksandles>
but it's to_s, the human-representation of the object
<Bish>
well not sure if thats to_s's purpose
<pinksandles>
Time#to_s, i think so, as long as it's a parseable timestamp... shouldn't matter much
bronson has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 246 seconds]
aupadhye has joined #ruby
olivi____ has quit [Quit: Leaving...]
olivi____ has joined #ruby
olivi____ has quit [Client Quit]
olivi____ has joined #ruby
<pinksandles>
but yeah. monkey patching core classes sucks.
marr has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
Beams_ has joined #ruby
pyemkey has joined #ruby
Beams has quit [Ping timeout: 248 seconds]
aduabu has quit [Ping timeout: 240 seconds]
<pyemkey>
Hello all. Can anyone help me understand requirements I have to implement.
<pyemkey>
program-start-time, program-end-time (optional field) and presentation-time should be an unsigned 64 bit integer representing the number of 100-nanosecond intervals elapsed since Unix Epoch in UTC. stream-name is an identifier of a particular bitrate quality of stream. It should be unique within a representation.
xuanrui has quit [Remote host closed the connection]
Defenestrate has quit [Quit: Leaving]
AnoHito_ has joined #ruby
olivi____ has quit [Quit: Leaving...]
olivi____ has joined #ruby
gixxer1k has quit [Remote host closed the connection]
olivi____ has left #ruby [#ruby]
gixxer1k has joined #ruby
AnoHito has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
gnufied has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
laphoraig92 has quit [Quit: Leaving]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
tera_ has quit [Ping timeout: 260 seconds]
gixxer1k has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 240 seconds]
sorah___ has quit [Ping timeout: 276 seconds]
sorah___ has joined #ruby
kapil___ has quit [Ping timeout: 276 seconds]
discopatrick has quit [Ping timeout: 276 seconds]
graingert has quit [Ping timeout: 276 seconds]
rflot has quit [Ping timeout: 276 seconds]
craysiii has quit [Ping timeout: 276 seconds]
harai has quit [Ping timeout: 255 seconds]
blznblzn2 has quit [Ping timeout: 276 seconds]
fnux has left #ruby ["WeeChat 1.9"]
graingert has joined #ruby
craysiii has joined #ruby
blznblzn2 has joined #ruby
kapil___ has joined #ruby
rflot has joined #ruby
discopatrick has joined #ruby
canteen4 has joined #ruby
ruby740 has joined #ruby
<Burgestrand>
pyemkey What's your question?
jamesaxl has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
<pyemkey>
I want to make conversion like: 8 Feb 2012 20:00:00 UTC => 13287312000000000. Result should be an unsigned 64 bit integer representing the number of 100-nanosecond intervals elapsed since Unix Epoch in UTC.
harfangk has quit [Quit: No Ping reply in 180 seconds.]
mim1k has quit [Ping timeout: 248 seconds]
harfangk has joined #ruby
ruby740 has quit [Ping timeout: 260 seconds]
<matthewd>
pyemkey: What have you found so far?
[diecast] has quit [Ping timeout: 276 seconds]
zack6849 has quit [Ping timeout: 240 seconds]
rjungemann has quit [Ping timeout: 276 seconds]
Tony-St4rk has quit [Ping timeout: 276 seconds]
pwillard has quit [Ping timeout: 276 seconds]
my123 has joined #ruby
my123 has joined #ruby
[diecast] has joined #ruby
Tony-St4rk has joined #ruby
rjungemann has joined #ruby
pwillard has joined #ruby
rwb has quit [Ping timeout: 246 seconds]
Beams_ has quit [Quit: .]
mostlybadfly has joined #ruby
andikr has quit [Remote host closed the connection]
<ruby[bot]>
Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Bish>
oh shoot
canteen4 has quit [Ping timeout: 248 seconds]
paranoicsan is now known as paranoicsan[Away
AnoHito_ has quit [Read error: Connection reset by peer]
AnoHito has joined #ruby
<chrisseaton>
I know some uses of a Enumerator will create a Fiber, but I'm having a mental block of which ones might do that - can anyone remind me?
ur5us has quit [Ping timeout: 260 seconds]
<Papierkorb>
chrisseaton: you can build a iterator-returning #each (or other methods) out of a yielding #each using fibers
<Papierkorb>
with awful performance, but it works. no idea if ruby does it though
<chrisseaton>
Papierkorb: that's what I wanted - can you give me an example of a snippet of code which would do that though?
paranoicsan[Away is now known as paranoicsan
<matthewd>
>> [1,2,3].each.next.next
<ruby[bot]>
matthewd: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Papierkorb>
chrisseaton: I've never used fibers in Ruby. I implemented that in Crystal (which is really near to Ruby) recently as test. You generally use tons of fibers in that language anyway.
ta_ has quit [Remote host closed the connection]
<matthewd>
I *believe* that involves a fiber, at least
<chrisseaton>
I'll try that, thanks
gixxer1k has quit [Quit: Leaving]
<matthewd>
Oops, I missed a tap there; the second #next is calling Integer#next :P
<ruby[bot]>
chrisseaton: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
TinkerTyper has quit [Ping timeout: 240 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matthewd>
Or more explicitly: Object.new.tap { |o| class << o; def each; yield 1; yield 2; yield 3; end; end }.enum_for(:each).tap { |e| puts e.next; puts e.next }
harai has quit [Ping timeout: 252 seconds]
<matthewd>
Avoids any "arrays might be special" magic -- there has to be a fiber whose ip is sitting between the two yields in that method, because that's the only way it could be working
__Yiota has joined #ruby
<matthewd>
(this proof-by-behaviour brought to you by "matthewd's being too lazy to just open the code")
canteen4 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
AnoHito_ has joined #ruby
DTZUZO has joined #ruby
chouhoulis has joined #ruby
nobitanobi has joined #ruby
smithascari has quit [Quit: byee o/]
InfinityFye has joined #ruby
smithasc has joined #ruby
smithasc has quit [Client Quit]
aduabu has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
smithascari has joined #ruby
AnoHito has quit [Ping timeout: 255 seconds]
AnoHito has joined #ruby
h1fuelcell has joined #ruby
AnoHito_ has quit [Ping timeout: 240 seconds]
raddazong has quit [Quit: leaving]
madhatter has joined #ruby
TinkerTyper has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
fumk has quit [Quit: It wasn't me, it was the papers :(]
chouhoul_ has joined #ruby
MyMind has joined #ruby
Sembei has quit [Ping timeout: 248 seconds]
bruno- has joined #ruby
cschneid_ has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
rwb has joined #ruby
paranoicsan is now known as paranoicsan[Away
chouhoul_ has quit [Remote host closed the connection]
canteen4 has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
rippa has joined #ruby
njichev has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
Lavan has joined #ruby
<Lavan>
Hi guys
<Lavan>
me having a question
<Lavan>
people think ruby is dead
<elomatreb>
Not just guys here
<Lavan>
is that true?
<elomatreb>
Hang on a second, I'll ask all 764 other people people
<havenwood>
Lavan: None of the top ten languages in use are dead. Java isn't dead. C isn't dead. Python isn't dead. Javascript isn't dead. Ruby isn't dead. Etc.
canteen4 has quit [Ping timeout: 240 seconds]
polishdub has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
<cjohnson>
Oh yes tap I think is nicer than having the explicit return at the end
<cjohnson>
I was looking for a smarter way to conditionally modify and always return without it being 4 distinct operations like I had
<smithascari>
yeah, and you don't need a initial declaration as well
dionysus69 has quit [Ping timeout: 248 seconds]
<matthewd>
This is probably a simplified example.. but if the method actually just had to do this one thing, I'd probably go with a straight if/else, with two hash literals
xuanrui has quit [Client Quit]
xuanrui has joined #ruby
<cjohnson>
It's actually pretty complete, but it's part of a 2-method pair. let me paste both
mim1k has quit [Read error: Connection reset by peer]
alfiemax has quit [Ping timeout: 240 seconds]
conta has quit [Ping timeout: 248 seconds]
frozengeek has joined #ruby
<matthewd>
And I guess this is a 3rd-party-facing API? Presumably if the request were coming from your own HTML/JS, you wouldn't need to be so forgiving about possible truthy values
ana_ has quit [Ping timeout: 252 seconds]
govg has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Zimsky has joined #ruby
herbmillerjr has quit [Remote host closed the connection]
tomphp has joined #ruby
__Yiota has joined #ruby
xuanrui has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Remote host closed the connection]
<cjohnson>
Not 3rd party, but we write APIs that are highly consumed by the company
<epochwolf>
baweaver: that is seriously cool, thanks for sharing! :D
Mon_Ouie has quit [Ping timeout: 240 seconds]
canteen4 has quit [Ping timeout: 248 seconds]
anjen has joined #ruby
<mica>
konsolebox: got an other issue with rbenv
danieli has joined #ruby
<mica>
libreadline6 (= 6.2+dfsg-0.1)
<mica>
shit
<mica>
not that one
mim1k has quit [Ping timeout: 248 seconds]
beilabs_ has joined #ruby
beilabs has quit [Read error: Connection reset by peer]
<anjen>
Hi folks. Not a direct "ruby quesiyton but one that many of you *may be able to ansser. When working witjh am payments page, if a customer mis enterd info , forcing a redirect back to the payment interfact, how much of the input data may I reatin? We have a customer whose compainig becuas the year resets to its default when an error doens't alow the payment to go through and I'm concerned about retaining info (obviosuly, not the
<anjen>
cc # or CCV, but other details like exp year, name, etc.)
<anjen>
PS> sorry for the length and for my typos.
Mon_Ouie has joined #ruby
f48ds2 has joined #ruby
<epochwolf>
anjen: iirc PCI says no CC/CCV2 otherwise doesn't care.
kies has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mica>
thanks konsolebox
<anjen>
epochwolf: thank you.
<epochwolf>
You can send back the last 4 if you have a secure storage mechanism on the server but that requires the highest PCI security.
<mica>
I think I'm juste gonna do some vodoo on ruby
<epochwolf>
I mean, if you have a token for the CC, you can return the last 4 and reuse the token.
<epochwolf>
For example, braintree has a way to retry a transaction using a token.
CrazyEddy has quit [Remote host closed the connection]
Lyubo1 has quit [Ping timeout: 248 seconds]
<anjen>
epochwolf: Ah...I';ll have to lok into how our payment interface works re: tokens. thanks again!
<epochwolf>
You can't store the CC yourself unless you meet PCI requirements for secure credit card storage.
<epochwolf>
Storing last 4 in an encrypted format, that's okay.
<baweaver>
anjen: Just use Square or Stripe and save yourself the effort.
<anjen>
Lol...we don't *want to store cc info. The only thing we capture is the validation code from authorize dot net.
tomphp has joined #ruby
mim1k has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
<baweaver>
They both have embedded forms for it.
<baweaver>
Though I'm biased towards Square for some reason
<anjen>
possibly baweaver but not in this iteration. Maybe... when I bring the new version online later this year
<epochwolf>
baweaver: note, embedded forms still require PCI compliance. Shit sucks.
yqt has joined #ruby
<baweaver>
Oh I know. They take care of that one.
<cjohnson>
baweaver: What's the point of that?
<havenwood>
And a lot of niceties, like card type or wrong card detection, etc.
* baweaver
works at Square now
bruno-_ has joined #ruby
TinkerTyper has joined #ruby
<baweaver>
cjohnson conditional merging
<cjohnson>
matthewd: The reasoning is that I want the overwrite_parameter stuff to happen and THEN the disclaimer overwrite to happen, so even if the former does some change, the disclaimer will always override that
<baweaver>
Skimmed the above content.
<cjohnson>
baweaver: Oh I see so instead of returning {} I just conditionally merge
tomphp has quit [Client Quit]
<baweaver>
yep. Logic in the block.
gusrub has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
Lyubo1 has joined #ruby
anjen has quit [Quit: anjen]
mikeric has joined #ruby
canteen4 has joined #ruby
ForeignBiscuit has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
aduabu has quit [Ping timeout: 246 seconds]
TinkerTyper has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
Beams has quit [Quit: .]
tsia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
Lyubo1 has quit [Ping timeout: 260 seconds]
cagomez has joined #ruby
jackjackdripper has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
GodFather has joined #ruby
ForeignBiscuit has joined #ruby
ForeignBiscuit has quit [Max SendQ exceeded]
ForeignBiscuit has joined #ruby
ForeignBiscuit has quit [Max SendQ exceeded]
swills has joined #ruby
swills has joined #ruby
swills has quit [Changing host]
ForeignBiscuit has joined #ruby
ForeignBiscuit has quit [Max SendQ exceeded]
Asher has quit [Quit: Leaving.]
ForeignBiscuit has joined #ruby
ForeignBiscuit has quit [Max SendQ exceeded]
ForeignBiscuit has joined #ruby
ForeignBiscuit has quit [Max SendQ exceeded]
XD_ has quit [Quit: Leaving]
Lyubo1 has joined #ruby
ForeignBiscuit has joined #ruby
__Yiota has joined #ruby
ta_ has joined #ruby
__Yiota has quit [Client Quit]
gbgdev has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
TomyWork has quit [Remote host closed the connection]
AndBobsYourUncle has quit [Ping timeout: 252 seconds]
eckhardt has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
uZiel has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
conta has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
SqREL has joined #ruby
canteen4 has joined #ruby
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
SqREL_ has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
nobitanobi has quit []
nobitanobi has joined #ruby
SqREL has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
mim1k_ has quit [Ping timeout: 240 seconds]
Lyubo1 has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 268 seconds]
SqREL_ has quit [Remote host closed the connection]
canteen4 has quit [Ping timeout: 276 seconds]
SqREL has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
conta has quit [Ping timeout: 248 seconds]
aufi has quit [Quit: Leaving]
hahuang65 has joined #ruby
canteen4 has joined #ruby
SqREL has quit [Ping timeout: 248 seconds]
Lavan has quit [Quit: Page closed]
aduabu has quit [Ping timeout: 240 seconds]
chouhoul_ has joined #ruby
aduabu has joined #ruby
Yzguy has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
Asher has joined #ruby
TomyLobo has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
canteen4 has quit [Ping timeout: 276 seconds]
TinkerTyper has joined #ruby
canteen4 has joined #ruby
graft has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
aduabu has quit [Ping timeout: 252 seconds]
<graft>
basic rack middleware question - i know how to make a middleware and stick it in my config.ru
<graft>
but how do i make a middleware that invokes another middleware? for example, i want to make a Logger middleware which will 'use Rack::CommonLogger, logger'
aduabu has joined #ruby
uZiel has joined #ruby
GodFather has joined #ruby
bronson has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
kies has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
ldnunes has quit [Ping timeout: 252 seconds]
sdrew has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerTyper has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
njichev has quit [Ping timeout: 240 seconds]
SqREL has joined #ruby
aduabu has joined #ruby
jinie has joined #ruby
gixxer1k has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
gixxer1k has quit [Remote host closed the connection]
SqREL has quit [Ping timeout: 240 seconds]
gbgdev has quit [Ping timeout: 260 seconds]
orbyt_ has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
GodFather_ has joined #ruby
GodFather has quit [Remote host closed the connection]
TinkerTyper has quit [Ping timeout: 248 seconds]
ldnunes has joined #ruby
TinkerTyper has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
tacoboy has joined #ruby
tacoboy has quit [Read error: Connection reset by peer]
duckdanger has joined #ruby
duckdanger has quit [Read error: Connection reset by peer]
tacoboy has joined #ruby
drcode has quit [Read error: Connection reset by peer]
ShekharReddy has quit [Quit: Connection closed for inactivity]
aduabu has joined #ruby
ForeignBiscuit is now known as ResidentBiscuit
mahlon has joined #ruby
spheric has quit [Ping timeout: 260 seconds]
mtkd has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has joined #ruby
mtkd has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
aduabu has quit [Ping timeout: 240 seconds]
conta3 has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
conta3 has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 246 seconds]
aduabu has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
ramfjord has joined #ruby
mikecmpbll has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 276 seconds]
Lyubo1 has joined #ruby
conta3 has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 276 seconds]
conta3 has quit [Client Quit]
TinkerTyper has quit [Ping timeout: 248 seconds]
Rapture has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
majuk has quit [Remote host closed the connection]
uZiel has joined #ruby
TinkerTyper has joined #ruby
harai has joined #ruby
Bock has quit [Ping timeout: 248 seconds]
aduabu has joined #ruby
cdg has joined #ruby
AnotherNick has joined #ruby
tsglove2 has joined #ruby
lxsameer has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
lxsameer is now known as Guest6497
cdg_ has quit [Ping timeout: 252 seconds]
neekoso has joined #ruby
<tsglove2>
Hello everyone. Got a n00b question, which although not specific to Ruby, I hope you can send me in the right direction. I am trying to setup Jekyll(rb.com). Which requires "a full Ruby development environment with all headers and RubyGems". I have never used Ruby, or Ruby on Rails. Is this the same thing?
drcode has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
GodFather_ has quit [Ping timeout: 252 seconds]
harai has quit [Ping timeout: 252 seconds]
TinkerTyper has quit [Ping timeout: 252 seconds]
<jrabe>
Hi tsglove2, Rails is a web application framework for Ruby. As far as I know Jekyll doesn't have anything to do with Rails. If you have a working Ruby environment and run "gem install bundler jekyll" you should be good to go.
mikeric has quit []
TinkerTyper has joined #ruby
<tsglove2>
jrabe, thanks for the reply! That explains various questions I had.
Dimik has joined #ruby
<tsglove2>
I still don't have a working Ruby environment, so I can't get to the "gem ...." I have this link open: https://github.com/rbenv/rbenv
<elomatreb>
Ruby is the language, Rails, Jekyll, etc are apps that are written in Ruby
<matthewd>
tsglove2: If you happen to have found a "how to install Ruby on Rails" tutorial, then you can probably follow that and just stop when it tells you to `gem install rails`
<tsglove2>
Would that be the way to go forward with installing the Ruby environment?
<jrabe>
Are you on Windows?
<elomatreb>
Depending on your OS you may be able to get a decent version of Ruby just from your package manager
<tsglove2>
elomatreb, ahhh ok
<tsglove2>
jrabe, linux
<jrabe>
Thank goodness :)
<tsglove2>
haha yes...
<elomatreb>
Arch usually has recent versions of Ruby in the repos, no need for rvm/rbenv/etc
<elomatreb>
Debian tends to have crusty stuff but you can add a PPA to get recent versions
chouhoulis has joined #ruby
<tsglove2>
Now I understand a little bit more. So "Ruby" is a language... and all the others ("Ruby on Rails", and "Jekyll") are programs written using the *Ruby* language itself?
SteenJobs has joined #ruby
<jrabe>
Correct
<jrabe>
And if you ever get a chance to, you should absolutely learn Ruby. It's amazing. :-)
maryo has joined #ruby
<tsglove2>
ok super. I'm running a plain-vanilla Ubuntu 16.04, so I could do apt install ruby
<tsglove2>
jrabe, yes! I am a relative beginner in programming... so I look forward to learning Ruby.
<elomatreb>
Then you will get a fairly old version of Ruby (2.2 I think)
<tsglove2>
These past months have been awesome with javascript (given its simplicity), and learning all about post/get, the xmlhttprequest object, etc etc
<jrabe>
Yes, that should work. Depending on Jekyll's dependencies you might have to install ruby-dev as well, but try it without first.
<jrabe>
If you like JavaScript you'll *love* Ruby.
Rapture has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 246 seconds]
<tsglove2>
Really? Super! I was playing around with php... and the "sessions" was like a "Wowza" moment. So, although a geek, all this is new and awesomely interesting.
__Yiota has joined #ruby
<tsglove2>
Yet trying to build stuff (simple and probably crappy)... that way it actually "enters" my brain.
chouhoul_ has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
<jrabe>
Not a huge PHP fan here, learned Rails a while ago and never looked back. As you can tell I'm a huge fan of the whole Ruby ecosystem :)
chouhoulis has quit [Remote host closed the connection]
<tsglove2>
jrabe, I think you'll be seeing me more often in this # then! =)
<jrabe>
Yup, write as much code as you can when learning a new language. That's what I do too. No harm if the code isn't great, you can always rewrite it once you're more experienced.
AndBobsYourUncle has joined #ruby
<jrabe>
Sounds great hahah :)
chouhoulis has joined #ruby
SqREL has joined #ruby
SqREL has quit [Remote host closed the connection]
mikeric has joined #ruby
SqREL has joined #ruby
<orbyt_>
I've got this .erb layout and am trying to figure out a complex render..I've got a loop iterating over 8 items. For the first and last items, it should render it's own Bootstrap ".row". Then, every pair of items between items 2-7 should have 2 per ".row". How can I accomplish this?
TinkerTyper has quit [Ping timeout: 248 seconds]
aduabu has quit [Ping timeout: 248 seconds]
<jrabe>
orbyt_, you could do something like "first, *middle, last = array" if your items are in an array.
<orbyt_>
what?
hanmac has quit [Ping timeout: 276 seconds]
<orbyt_>
I'm not sure what you're suggesting
TinkerTyper has joined #ruby
<orbyt_>
I can handle the first and last item cases fairly trivially...the hard part is on the iterations between items 2-7
phinxy has joined #ruby
<elomatreb>
Take a look at Enumerable#each_slice
adlerdias has left #ruby [#ruby]
<jrabe>
^ each_slice(2) will give you groups of 2 items
uZiel has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 240 seconds]
<orbyt_>
That would give me items [1,2][3,4][5,6][7,8]
<orbyt_>
I need [1][2,3][4,5][6,7][8]
<matthewd>
orbyt_: That's why you trivially handle the first and last first
<elomatreb>
If you combine that with the thing jrabe suggested you can make each_slice only operate on the "middle" part
mikeric has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
<orbyt_>
Hmm..ok I think I see where this is going
<orbyt_>
thanks all
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
aduabu has joined #ruby
SqREL_ has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
Yzguy has quit [Quit: Zzz...]
cagomez has quit [Ping timeout: 252 seconds]
canteen4 has quit [Ping timeout: 248 seconds]
InfinityFye has quit [Quit: Leaving]
SqREL has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hanmac has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
canteen4 has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
paranoicsan has joined #ruby
aduabu has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
canteen4 has quit [Ping timeout: 252 seconds]
oaao has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
robouk has quit [Quit: Konversation terminated!]
drcode has quit [Read error: Connection reset by peer]
neekoso has quit [Ping timeout: 248 seconds]
canteen4 has joined #ruby
PaulCape_ has quit [Quit: .]
PaulCapestany has joined #ruby
spheric has joined #ruby
drcode has joined #ruby
aduabu has quit [Ping timeout: 248 seconds]
uZiel has joined #ruby
aduabu has joined #ruby
TinkerTyper has joined #ruby
drcode has quit [Excess Flood]
canteen4 has quit [Ping timeout: 252 seconds]
PaulCapestany has quit [Client Quit]
sepp2k has quit [Quit: Leaving.]
canteen4 has joined #ruby
PaulCapestany has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
milardovich has quit [Read error: Connection reset by peer]
canteen4 has joined #ruby
milardov_ has joined #ruby
nobitanobi has quit [Remote host closed the connection]
drcode has joined #ruby
nobitanobi has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.8]
sleepee has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 276 seconds]
njichev has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
neekoso has joined #ruby
nobitanobi has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
kies has quit [Ping timeout: 260 seconds]
ramfjord has quit [Ping timeout: 276 seconds]
aduabu has joined #ruby
drcode has quit [Read error: Connection reset by peer]
Puffball has quit [Remote host closed the connection]
cagomez has quit [Remote host closed the connection]
TinkerTyper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
cagomez has joined #ruby
Silthias1 has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
GinoMan2440 has joined #ruby
<Guest67636>
Wow so many people here. Hi :) I'm a new to Ruby but learning it every day. Today, I wanted to create a very simple validation for a small part of my code.
<apeiros>
Guest67636: ^ also consider the above if you want to accept anything from y, ye to a full yes
<gr33n7007h>
Guest67636: use could also use a regex. `if answer[/y|Y/] ...`
GinoMan has quit [Ping timeout: 240 seconds]
<apeiros>
that regex will also accept "nay!"
GinoMan2440 has quit [Ping timeout: 248 seconds]
<konsolebox>
if answer =~ /^[yY]([eE][sS])?$/
govg has quit [Quit: leaving]
jinie has joined #ruby
Ishido has quit [Ping timeout: 260 seconds]
<gr33n7007h>
answer[/^[y|Y]/]
alfiemax has joined #ruby
<apeiros>
you want /^[yY]/ ;-)
<apeiros>
or /^y/i
<Guest67636>
Hmm I am interested in 'y' / 'Y' only, so I guess using .downcase would work? (not sure where to put it though) but regex makes sense and I guess it's easy to implement.
<konsolebox>
answer = 'yeahno'
<apeiros>
also it's a good idea to get yourself used to \A instead of ^
<gr33n7007h>
apeiros: ah, yep, my regex sucks :P
<ShalokShalom>
konsolebox: Smalltalk?
<apeiros>
since almost always you want that
<Guest67636>
I tried using || but I failed misserably ;d
<ShalokShalom>
When an object of class A sends a message to an object of class B because A wants B to do something specific, that isn't OO (according to Kay's vision.) If A is sending the message to inform B that something has happened (rather than telling it to do something,) that is OO.
<apeiros>
Guest67636: downcase would be appended to the chomp
<ShalokShalom>
Is Ruby OO in that way?
TinkerTyper has quit [Ping timeout: 248 seconds]
<Guest67636>
ohh now it makes sense... Will test both regex and .downcase. Thank you guys!
<apeiros>
ShalokShalom: so all observer pattern?
<apeiros>
and no, ruby isn't that way. you can write code that way in ruby, but it's not prescribed, not even common I think
<apeiros>
I mean, yes, observer/event/pubsub patterns exist and are used, but it's not the default MO
<ShalokShalom>
thanks a lot
ldnunes has quit [Quit: Leaving]
TinkerTyper has joined #ruby
<ShalokShalom>
so, Rubys definition of what is OO goes away from that original context
<ShalokShalom>
Pythons too, i guess
<apeiros>
no, it goes away from your description of it
alfiemax has quit [Ping timeout: 260 seconds]
<apeiros>
do you have a source of alan kay phrasing OO like that?