havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
powerhouse has joined #ruby
sgen has quit [Ping timeout: 246 seconds]
bsdbandit-01 has joined #ruby
<rubyn00b> I'm trying to create a subclass for a class that is an Enumerator by overwriting its #each method: `def each; super.each { |entry| yield entry }; end` However, when I run it, I get an infinite loop: `MyArray[1,2,3].each { |entry| puts entry }
<apotheon> That's because your use of super.each is basically doing this:
<apotheon> each.each
<apotheon> Maybe you just want `def each; super {|entry| yield entry }; end` instead.
<rubyn00b> Oh, `super` is for calling the original method? I thought it referred to the parent class's object.
<rubyn00b> apotheon: thanks that works by the way.
<apotheon> As I recall, #super refers to the parent class implementation of the currently executing method.
<rubyn00b> Hmm, my mistake.
<apotheon> glad to help
<apotheon> It's late in the day, though, so my mental exhaustion might be imagining things.
<rubyn00b> Where are you? It's just 5 pm here.
<rubyn00b> Not too early for me, not too late.
<apotheon> late in the mental day
<rubyn00b> ah, haha
<apotheon> I'm in northern CO, actually.
<apotheon> . . . so similar time zone placement with you, apparently.
bruce_lee has quit [Remote host closed the connection]
<apotheon> I personally operate on AZ time, though, because DST bugs the crap out of me.
<apotheon> I haven't quite managed to shift myself to thinking in UTC, though.
<apotheon> The next step after that is probably going to be Unix time.
<apotheon> aka Unix epoch
<rubyn00b> Time zones have become so irrelevant these days. Every day feels like living in a space shuttle, nowhere to go.
<apotheon> har
alexherbo2 has quit [Ping timeout: 260 seconds]
ap4y has quit [Ping timeout: 240 seconds]
dualfade has quit [Ping timeout: 240 seconds]
dualfade has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
ap4y has joined #ruby
i9zO5AP has joined #ruby
Ai9zO5AP has quit [Ping timeout: 240 seconds]
x0f_ has joined #ruby
x0f has quit [Ping timeout: 260 seconds]
pppktz has quit [Ping timeout: 256 seconds]
bhaak has quit [Ping timeout: 256 seconds]
reaVer has quit [Ping timeout: 264 seconds]
ur5us has joined #ruby
bsdbandit-01 has joined #ruby
reaVer has joined #ruby
orbyt_ has joined #ruby
elcuervo has quit [Read error: Connection reset by peer]
baojg has joined #ruby
elcuervo has joined #ruby
mangoicedtea has quit [Quit: Leaving]
IRC-Source_37 has quit [Quit: Connection closed]
ChmEarl has joined #ruby
pppktz has joined #ruby
drincruz has joined #ruby
r29v has joined #ruby
roadie has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
x0f has joined #ruby
x0f_ has quit [Ping timeout: 240 seconds]
Emmanuel_ChanelW has joined #ruby
chouhoulis has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Max SendQ exceeded]
bsdbandit-01 has joined #ruby
sagax has quit [Remote host closed the connection]
x0n has quit [Read error: Connection reset by peer]
x0n has joined #ruby
drincruz has quit [Ping timeout: 258 seconds]
roadie has quit [Ping timeout: 264 seconds]
r29v has quit [Quit: r29v]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has joined #ruby
x0f_ has joined #ruby
x0f has quit [Ping timeout: 265 seconds]
braincrash has quit [Quit: bye bye]
sagax has joined #ruby
braincrash has joined #ruby
meinside has joined #ruby
gix has quit [Ping timeout: 246 seconds]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cthulchu_ has quit [Ping timeout: 246 seconds]
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 244 seconds]
roshanavand_ is now known as roshanavand
Rudd0 has joined #ruby
tsujp has quit [Ping timeout: 246 seconds]
howdoi has joined #ruby
tsujp has joined #ruby
donofrio has quit [Remote host closed the connection]
akem has quit [Ping timeout: 258 seconds]
johnny56 has quit [Ping timeout: 240 seconds]
ChmEarl has quit [Quit: Leaving]
adu has joined #ruby
johnny56 has joined #ruby
orbyt_ has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
Dara has quit [Ping timeout: 240 seconds]
ap4y has quit [Quit: WeeChat 2.8]
Dara has joined #ruby
johnny56 has joined #ruby
adu_ has joined #ruby
adu has quit [Ping timeout: 246 seconds]
adu_ is now known as adu
Secret-Fire has quit [Remote host closed the connection]
Secret-Fire has joined #ruby
bhaak has joined #ruby
johnny56 has quit [Ping timeout: 258 seconds]
ur5us has quit [Ping timeout: 244 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bocaneri has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
johnny56 has joined #ruby
postmodern has quit [Quit: Leaving]
johnny56 has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
johnny56 has joined #ruby
x0f_ has quit [Ping timeout: 258 seconds]
x0f has joined #ruby
<zxq2> if you want to check whether an instance variable is defined, which is better style: checking whether it's nil or using 'defined?'
chalkmonster has joined #ruby
ur5us has joined #ruby
hiroaki has quit [Ping timeout: 265 seconds]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
FetidToot0 has joined #ruby
<havenwood> zxq2: Using its truthiness sounds right if you mean set to something other than nil or false.
<havenwood> zxq2: There's #instance_variable_defined? if you really need to check if it's defined: https://docs.ruby-lang.org/en/2.7.0/Object.html#method-i-instance_variable_defined-3F
<havenwood> zxq2: We might have more specific suggestions if you have shareable code for context.
bsdbandit-01 has joined #ruby
FetidToot has quit [Ping timeout: 240 seconds]
<havenwood> &>> instance_variable_defined? :@nope
FetidToot has joined #ruby
<havenwood> #=> false
FetidToot0 has quit [Ping timeout: 258 seconds]
johnny56 has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
johnny56 has joined #ruby
fercell has joined #ruby
johnny56 has quit [Ping timeout: 256 seconds]
adu has quit [Quit: adu]
Rudd0 has quit [Remote host closed the connection]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
johnny56 has joined #ruby
bambanx has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
cd has quit [Quit: cd]
vondruch has joined #ruby
johnny56 has joined #ruby
fercell has quit [Quit: WeeChat 2.8]
johnny56 has quit [Ping timeout: 258 seconds]
ur5us has quit [Ping timeout: 244 seconds]
johnny56 has joined #ruby
akem has joined #ruby
lxsameer has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
johnny56 has quit [Ping timeout: 256 seconds]
johnny56 has joined #ruby
fercell has joined #ruby
bambanx has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
TomyWork has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
johnny56 has quit [Read error: Connection reset by peer]
yasumi2136 has joined #ruby
yasumi2136_ has quit [Ping timeout: 258 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
random-jellyfish has joined #ruby
TomyWork has quit [Ping timeout: 256 seconds]
johnny56 has joined #ruby
alexherbo2 has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
Dara has quit [Ping timeout: 240 seconds]
johnny56 has joined #ruby
Dara has joined #ruby
johnny56 has quit [Ping timeout: 256 seconds]
leitz has joined #ruby
johnny56 has joined #ruby
<leitz> With rspec, can you make a double identify as the doubled class?
johnny56 has quit [Ping timeout: 240 seconds]
<leitz> So that "item.class == Doubled::Class" passes.
random-jellyfish has quit [Ping timeout: 245 seconds]
vondruch has joined #ruby
yitaochi has joined #ruby
johnny56 has joined #ruby
yitaochi has quit [Client Quit]
yasumi2136 has quit [Quit: Konversation terminated!]
dionysus69 has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
i9zO5AP has quit [Remote host closed the connection]
ho0po3 has joined #ruby
x0f has quit [Ping timeout: 240 seconds]
dhollinger has quit [Ping timeout: 265 seconds]
dhollinger has joined #ruby
johnny56 has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
johnny56 has quit [Ping timeout: 265 seconds]
arahael has quit [Ping timeout: 246 seconds]
arahael1 has joined #ruby
<ljarvis__> leitz: depends how far you want to go with "identification" -- do you just want `.class` to return the class name or do you want more?
ljarvis__ is now known as ljarvis
ellcs has joined #ruby
johnny56 has joined #ruby
<leitz> ljarvis, there's an '==' comparison (https://github.com/makhidkarun/free_trader/blob/master/lib/free_trader/merchant.rb#L62), I'm not sure if the class itself is too fragile, or if I need to keep that line and figure out how to have the double "be" that class. Setting "class" to it doesn't work.
<ljarvis> leitz: you can stub `.class` no?: expect(dbl).to receive(:class) { FreeTrader::Lot } for example
johnny56 has quit [Ping timeout: 258 seconds]
* leitz goes to test
<ljarvis> (though if you can't, I'd really suggest building an instance of that actual class and using stubs on the instance rather than a double)
Rudd0 has joined #ruby
<ljarvis> though if you can*
bsdbandit-01 has quit [Read error: Connection reset by peer]
imode has quit [Ping timeout: 258 seconds]
x0f has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
johnny56 has joined #ruby
ellcs has joined #ruby
CustosLimen has quit [Ping timeout: 240 seconds]
strmpnk has quit [Ping timeout: 272 seconds]
kozowu has quit [Ping timeout: 240 seconds]
ec has quit [Read error: Connection reset by peer]
manveru has quit [Ping timeout: 244 seconds]
Lewix has quit [Read error: Connection reset by peer]
afisher has quit [Ping timeout: 265 seconds]
clinth has quit [Read error: Connection reset by peer]
ctOS has quit [Ping timeout: 240 seconds]
r3my has quit [Read error: Connection reset by peer]
dputtick has quit [Read error: Connection reset by peer]
gajus has quit [Ping timeout: 244 seconds]
kevinsjoberg has quit [Ping timeout: 260 seconds]
jhill has quit [Ping timeout: 240 seconds]
dputtick has joined #ruby
englishm has quit [Ping timeout: 260 seconds]
kozowu has joined #ruby
strmpnk has joined #ruby
Lewix has joined #ruby
clinth has joined #ruby
darkstardevx has quit [Ping timeout: 256 seconds]
afisher has joined #ruby
CustosLimen has joined #ruby
r3my has joined #ruby
manveru has joined #ruby
ec has joined #ruby
ctOS has joined #ruby
jhill has joined #ruby
englishm has joined #ruby
csaunders has joined #ruby
gajus has joined #ruby
kevinsjoberg has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
ellcs has quit [Ping timeout: 246 seconds]
johnny56 has joined #ruby
<leitz> ljarvis, Sorry, I needed to tend to something else. It took me a moment to study your comment; I had set the double to respond to "class:" and set the class properly. Except that I put quotes around the class name, making it a string. Removing the quotes allows the test to pass.
<ljarvis> great
csaunders has quit [Ping timeout: 240 seconds]
johnny56 has quit [Ping timeout: 258 seconds]
<wild_buffalo> adam12, I don't know, could be!
<wild_buffalo> So the inverted angle bracket is not valid Ruby?
<wild_buffalo> or idk maybe the person who wrote the original line made a mistake
johnny56 has joined #ruby
maxmanders__ has quit [Ping timeout: 260 seconds]
JayDoubleu has quit [Read error: Connection reset by peer]
Sina has quit [Ping timeout: 272 seconds]
AutomationD has quit [Ping timeout: 260 seconds]
coffeejunk has quit [Ping timeout: 260 seconds]
KnownSyntax has quit [Ping timeout: 272 seconds]
graphicsv has quit [Ping timeout: 260 seconds]
peteretep has quit [Ping timeout: 272 seconds]
wild_buffalo has quit [Remote host closed the connection]
rann has quit [Ping timeout: 272 seconds]
Argorok has quit [Ping timeout: 272 seconds]
podman has quit [Ping timeout: 272 seconds]
Rudd0^ has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
Rudd0 has quit [Ping timeout: 265 seconds]
lalitmee has joined #ruby
podman has joined #ruby
peteretep has joined #ruby
coffeejunk has joined #ruby
graphicsv has joined #ruby
JayDoubleu has joined #ruby
KnownSyntax has joined #ruby
Sina has joined #ruby
rann has joined #ruby
Argorok has joined #ruby
AutomationD has joined #ruby
lalitmee has quit [Quit: Leaving]
lalitmee has joined #ruby
lalitmee has quit [Max SendQ exceeded]
lalitmee has joined #ruby
johnny56 has joined #ruby
lalitmee has quit [Client Quit]
TomyWork has joined #ruby
maxmanders__ has joined #ruby
lacrymology has joined #ruby
<lacrymology> sorry, I'm very inexperienced with ruby, and I'm trying to add some debug strings to a script, I'm seeing this: `log 'message', %[sent to #{config.http_url}:#{config.http_port}#{http_path}] unless config.quiet`
<lacrymology> first I don't quite understand what the %[] syntax means, and how it works without any quotes.. been searching for it, but found nothing
johnny56 has quit [Ping timeout: 256 seconds]
<lacrymology> secondly I'd like to add another log line like `log 'headers', (#{key}: #{value} for key, value in head)` (sorry about the pseudocode)
<lacrymology> IDK if the %[] syntax will allow me to do something like head.each inside it, if that should go between #{} or what
linuus[m] has joined #ruby
johnny56 has joined #ruby
drale2k has joined #ruby
greengriminal has joined #ruby
johnny56 has quit [Ping timeout: 258 seconds]
arahael1 is now known as Arahael
TCZ has joined #ruby
<leitz> lacrymology, are you familiar with irb or pry?
<leitz> lacrymology, both will let you test code "live", to see what it does.
alexherbo2 has quit [Ping timeout: 240 seconds]
johnny56 has joined #ruby
alexherbo2 has joined #ruby
<leftylink> https://docs.ruby-lang.org/en/2.7.0/syntax/literals_rdoc.html is the correct place to look to understand %[].
johnny56 has quit [Ping timeout: 240 seconds]
<ljarvis> lacrymology: %[] is the same as "" -- the % allows you to add alternative delimiters. In your example I don't see any point though
<ljarvis> lacrymology: your additional log called could be: `log 'headers', head.map { |key, value| "#{key}: #{value}" }.join`
x0n has quit [Ping timeout: 258 seconds]
Thaodan has joined #ruby
<Thaodan> Hey do I need ruby to compile ruby?
<ljarvis> no
x0n has joined #ruby
<Thaodan> where does that say? I try to build ruby 2.7.1 and it tries to run ruby code during configure
mnathani has joined #ruby
<ljarvis> Thaodan: what's the error message?
<Thaodan> checking for ruby... false
<Thaodan> configure: error: cannot run /bin/sh tool/config.sub
<ljarvis> that's an error running `/bin/sh` not ruby
<ljarvis> the ruby is just a check, returning false is fine
johnny56 has joined #ruby
<Thaodan> yes because it can't download the previous files using ruby
<ljarvis> ah maybe not, looks like Ubuntu package does expect Ruby to be installed
<ljarvis> that's pretty dumb
TCZ has quit [Quit: Leaving]
<Thaodan> The thing is I try to bootstrap ruby from a ruby version 1.9.x
<Thaodan> I build miniruby to from 2.2 with 1.9 and then usin that I bootstrap 2.7.x
<ljarvis> where did you get the 2.7 Ruby from?
<Thaodan> sourcecode
<ljarvis> grab a package from ruby-lang.org
<ljarvis> I just installed one of those on a VM that doesn't have Ruby
<Thaodan> it needs to be build from source
<ljarvis> that _is_ from source
<ljarvis> the difference is that it's packaged differently from the version on e.g. github
<Thaodan> why is the source differently then from git? is the same script to convert that in the source tree?
<Thaodan> mine fails when building ruby/tool/ruby_vm/helpers/dumper.rb:13:in `require': cannot load such file -- pathname (LoadError)
chouhoulis has joined #ruby
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has joined #ruby
GodFather_ has joined #ruby
chouhoulis has quit [Ping timeout: 258 seconds]
drale2k has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.9]
claudiuinberlin has quit [Ping timeout: 240 seconds]
chalkmonster has joined #ruby
lektrik has quit [Quit: Leaving]
GodFather_ has quit [Ping timeout: 260 seconds]
<Thaodan> are the packaging scripts for that somwhere?
drincruz has joined #ruby
stryek has joined #ruby
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leah2 has quit [Ping timeout: 240 seconds]
drale2k has joined #ruby
iNs_ has joined #ruby
iNs has quit [Ping timeout: 240 seconds]
GodFather has quit [Quit: Ex-Chat]
leah2 has joined #ruby
drale2k has quit [Client Quit]
GodFather_ has joined #ruby
Emmanuel_ChanelW has quit [Quit: Leaving]
dualfade has quit [Ping timeout: 258 seconds]
dualfade has joined #ruby
xco has joined #ruby
<leitz> Thaodan, you should be able to install the OS version of Ruby, and some other tools, and then build Ruby from course if you like. Depending on your OS, you'll need a slightly current version of autoconf, make, gcc and libraries, SSL git, libffi. My notes are at: https://github.com/LeamHall/ruby_admin_tools/blob/master/docs/process_to_compile_ruby.txt
ChmEarl has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
x0f has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #ruby
sgen has joined #ruby
adu has joined #ruby
cuerbot has joined #ruby
<Thaodan> leitz: You add the prebuilt update gems and extract gems to your pkg?
elcuervo has quit [Ping timeout: 256 seconds]
<Thaodan> I have succesfully run miniruby but generating of the real ruby sources uses some gems
CrazyEddy has quit [Ping timeout: 265 seconds]
Dara has quit [Ping timeout: 240 seconds]
Dara has joined #ruby
<lacrymology> ljarvis: thanks a lot
<Thaodan> The difference is that I build miniruby in between
<leitz> Thaodan, usually I remove any OS ruby and gems, after I have the new ruby built.
<Thaodan> I build for the OS. But my version is 1.9 so I can't bootstrap from it.
<leitz> Thaodan, you don't actually need the ruby_admin_tools gem.
<Thaodan> I use miniruby but then some requires aren't found
<Thaodan> no
<Thaodan> I don't need that
<leitz> Thaodan, yeah, you have to build a 2.x version first. I think I targeted 2.2.
<Thaodan> thats what I did but as miniruby
<leitz> Have you tried to do an install with the 2.2 version?
<Thaodan> Then I have to package that version
<Thaodan> But I just want to use it during built
<leitz> Then you can add any gems required and remove the OS Ruby.
<leitz> Thaodan, what do you mean by "package"? Sorry if I missed that earlier.
<Thaodan> Package like an rpm package
<Thaodan> I create one
<leitz> What I did was build 2.2 and get it running, and then turn around and build the later version (2.7 or 2.8).
<leitz> That way you can remove the OS Ruby stuff, and then you can get rid of the 2.2 stuff once you have the 2.7 going. You can then package 2.7.
<leitz> Make sense? The main difference is that you build a full 2.2 Ruby, instead of just miniruby.
<Thaodan> I can't remove stuff during packaging. Its a clean build and I can't change the environment. But if its possible to use a full ruby in a different directory that could.
<Thaodan> All requires files are in the dir of miniruby but it somehow doesn't find it
imperator has joined #ruby
<Thaodan> use use miniruby -I"minirubydir/lib"
<imperator> anyone know how to preserve literal quotes with Process.spawn?
<imperator> fork { exec('ruby', '-Ilib', '-e', 'sleep \'120\'.to_i', '--', 'foo bar') } # I see literal quotes with ps -ef
<imperator> Process.spawn("ruby -Ilib -e sleep \'120\'.to_i -- foo bar") # but here i don't
<Thaodan> is loapath recursive?
<adam12> imperator: Any idea if your Process.spawn shows `sh` as a parent?
dasher00 has joined #ruby
ho0po3 has quit [Ping timeout: 256 seconds]
<imperator> 501 81052 80972 0 10:11AM ttys003 0:00.06 ruby -Ilib -e sleep '120'.to_i -- foo bar
<imperator> adam12, looks like the same parent pid to me
<imperator> 501 81052 80972 0 10:11AM ttys003 0:00.06 ruby -Ilib -e sleep '120'.to_i -- foo bar
<imperator> 501 81055 80972 0 10:11AM ttys003 0:00.06 ruby -Ilib -e sleep 120.to_i -- foo bar
<imperator> (sorry for the extra paste there)
<adam12> imperator: Linux?
<adam12> imperator: I see sh as a parent when I run it (WSL2). The sh parent has literal quotes and then the Ruby process has no quotes. I'm guessing that sh is eating them, not Ruby.
<adam12> imperator: Switching to the array invokation might get you what you want. It will probably bypass the shell and call execve() directly.
<imperator> adam12, mac actually, but looks like it behaves the same
<imperator> ok, will try that
<adam12> adam 3170 3169 0 10:31 pts/1 00:00:00 sh -c ruby -Ilib -e sleep '120'.to_i -- foo bar
<adam12> adam 3171 3170 0 10:31 pts/1 00:00:00 ruby -Ilib -e sleep 120.to_i -- foo bar
<adam12> vs
<adam12> adam 3181 3169 1 10:34 pts/1 00:00:00 ruby -Ilib -e sleep '120'.to_i -- foo bar
<adam12> Process.spawn("ruby", "-Ilib", "-e", "sleep '120'.to_i", "--", "foo", "bar")
Dara has quit [Ping timeout: 240 seconds]
Dara has joined #ruby
chouhoulis has joined #ruby
<imperator> adam12, actually, not sure what you mean by array invocation
drale2k has joined #ruby
<imperator> oic: Process.spawn("ruby", "-Ilib", "-e", "sleep \'120\'.to_i", "--", "foo bar") # that seems to work
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
x0f has joined #ruby
drale2k has joined #ruby
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
Eiam has joined #ruby
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rudd0^ has quit [Ping timeout: 260 seconds]
cd has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
orbyt_ has joined #ruby
Rudd0 has joined #ruby
skape has joined #ruby
Tempesta has quit [Quit: See ya!]
imperator has quit [Quit: This computer has gone to sleep]
johnny56 has quit [Ping timeout: 256 seconds]
fercell has quit [Quit: WeeChat 2.8]
Tempesta has joined #ruby
cthulchu_ has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
imperator has joined #ruby
johnny56 has joined #ruby
renosis has joined #ruby
imperator has quit [Client Quit]
<renosis> Hi, I need some help. I have a ruby script I created to make the configuration of cameras easy, which went great. Basically I just use httparty to use the cameras web configuration to send all the commands. Now I need to upload firmware too and am running into trouble.
<renosis> I am using httmultiparty to upload a 56 mb firmware file. I get back a response of: Error: Image file was too short. The system upgrade failed.
<renosis> I can use the same file to upgrade fine manually from browser. I notice a discrepancy in file size reporting between browser and what ruby reports.
coniptor has joined #ruby
<renosis> Any suggestions on a different gem I can use for multipart post uploads or any other ideas?
drale2k has joined #ruby
<adam12> renosis: Ruby version?
<renosis> 2.6.5p114
<adam12> renosis: How did you install httmultiparty? gem or bundler?
<renosis> gem
<adam12> What version of multipart-post is installed? gem list multipart-post
<renosis> 2.1.1
<adam12> renosis: I'd maybe try http.rb instead of httparty + httpmultiparty.
<adam12> renosis: multipart-post had issues with content-length at one point in time I think; it might still.
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<renosis> ok, I'll give that a shot. thanks adam12
<adam12> There's also Faraday, but it relies on multipart-post. It might suffer the same issue.
<adam12> If you could recreate the bug with multipart-post I'm sure they'd appreciate the bug report, but I'm not sure it would be a right-in-your-face type of bug.
<renosis> It has been difficult to get some diagnostic info for the problem, because I don't have access to the camera's web server. For all I know it could be some other problem and it is misreporting as file size issue. Their error messages aren't very descriptive either.
gix has joined #ruby
<renosis> But, I'll submit a bug report.
howdoi has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bukkitgerman8608 has quit [Quit: Ping timeout (120 seconds)]
bukkitgerman8608 has joined #ruby
<adam12> renosis: What's the output of `file your_firmware`? Just curious.
<renosis> adam12: I'm sorry, not sure what you are requesting?
<apotheon> renosis: I think adam12 is asking you to run the `file` command at the command line prompt with an argument of your firmware name.
<adam12> renosis: I'm curious what `file` detects your firmware image as.
<apotheon> Yeah, what adam12 said.
<adam12> renosis: file being file(1). https://linux.die.net/man/1/file
TomyWork has quit [Remote host closed the connection]
<adam12> Unless you're on Windows.
<renosis> I recognized the system call. But I am on windows currently.
<renosis> hold on
<adam12> Ah. OK. Where are you running the Ruby script from? And you're not using JRuby are you?
<renosis> not Jruby. I just have a folder called camera-scripts on hard-drive, I call the firmware bin file from the same folder as the script is in currently.
<adam12> renosis: OK. I think there was a multipart-post bug with Jruby for bytesize method calls. But I was just curious what the blob looked like from file(1)'s POV. If you can't get it, no issue.
<renosis> I have a linux box behind me.
<apotheon> WSL (or whatever it's called) might offer a way to use the file command.
<renosis> PDP-11 UNIX/RT ldp
<adam12> Neat.
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<renosis> I don't recognize that.
<adam12> It's probably just the magic bytes at the beginning. Likely unrelated.
<adam12> Sometimes the magic bytes are used for determining content type. Not sure if that's happening here but if the POST had a Content-Type header and it was something weird from the magic bytes, maybe that would of been a clue.
<adam12> I'm spitballing because I don't remember how multipart forms work off the top of my head.
<renosis> I may have found a work around. Could just turn on ftp access on the cameras using the standard web interface tricks I used before. Upload using ftp client and apparently it will auto update if you do that.
Dara has quit [Ping timeout: 240 seconds]
Axy has joined #ruby
Axy has joined #ruby
Mia has quit [Ping timeout: 264 seconds]
Dara has joined #ruby
<adam12> https://github.com/ruby/ruby/pull/3453/files I wonder what the intent of this is. Rogue bot?
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
Axy has quit [Ping timeout: 256 seconds]
rubyn00b has quit [Remote host closed the connection]
cliluw has quit [Ping timeout: 240 seconds]
cliluw has joined #ruby
<renosis> Yup, ftp thing works. Gonna go that route instead, dirty but faster. Just gotta make sure I turn the ftp option off at the end of the script. Thanks for the help Adam12.
drale2k has joined #ruby
<adam12> renosis: Cheers.
rippa has joined #ruby
dionysus69 has quit [Remote host closed the connection]
akem has quit [Remote host closed the connection]
akem has joined #ruby
akem has quit [Client Quit]
GodFather_ has quit [Ping timeout: 258 seconds]
postmodern has joined #ruby
orbyt_ has joined #ruby
renosis has quit [Ping timeout: 245 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
code_zombie has joined #ruby
hiroaki has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.9]
ellcs has joined #ruby
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dka has joined #ruby
<dka> What URL does spaceship use to authenticate against apple developer portal?
drale2k has joined #ruby
<dka> that look like a GET
<adam12> dka: Maybe it is. I'm not sure the authors of spaceship are in here.
<adam12> dka: I'd just run mitmproxy and set SPACESHIP_PROXY.
<dka> i don't know about ruby
<dka> I just use expo-cli that under the hood use ruby
<dka> I don't get why my CI can't authenticate to apple while my host can
<dka> I am running in the CI curl https://idmsa.apple.com
<dka> just to see if it reply
bocaneri has quit [Remote host closed the connection]
<dka> and they all can reach so that s no tit
ellcs has quit [Ping timeout: 240 seconds]
donofrio has joined #ruby
crowley has joined #ruby
akem has joined #ruby
podman has quit [Ping timeout: 240 seconds]
JayDoubleu has quit [Ping timeout: 240 seconds]
coffeejunk has quit [Ping timeout: 272 seconds]
AutomationD has quit [Ping timeout: 244 seconds]
KnownSyntax has quit [Ping timeout: 244 seconds]
isene has joined #ruby
rann has quit [Ping timeout: 244 seconds]
coffeejunk has joined #ruby
podman has joined #ruby
AutomationD has joined #ruby
JayDoubleu has joined #ruby
KnownSyntax has joined #ruby
rann has joined #ruby
adu has quit [Quit: adu]
dionysus69 has joined #ruby
adu has joined #ruby
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 260 seconds]
vondruch has quit [Ping timeout: 260 seconds]
xco has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand_ is now known as roshanavand
johnny56 has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
x0n- has joined #ruby
x0n has quit [Ping timeout: 256 seconds]
akem has quit [Quit: Leaving]
johnny56 has joined #ruby
jordanm has joined #ruby
drale2k has joined #ruby
leitz has quit [Quit: Leaving]
drale2k has quit [Client Quit]
ikarus has joined #ruby
snickers has joined #ruby
johnny56 has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Remote host closed the connection]
mnathani has quit [Remote host closed the connection]
mnathani has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dualfade has quit [Ping timeout: 246 seconds]
x0f_ has joined #ruby
dead10cc has joined #ruby
x0f has quit [Ping timeout: 240 seconds]
wburke00 has joined #ruby
dualfade has joined #ruby
dead10cc has left #ruby [#ruby]
ikarus has quit [Ping timeout: 240 seconds]
johnny56 has joined #ruby
darkstardevx has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
mbrndtgn5 has joined #ruby
bvdw4 has joined #ruby
bvdw4 has quit [Client Quit]
bvdw8 has joined #ruby
johnny56 has joined #ruby
bukkitgerman8608 has quit [Quit: Ping timeout (120 seconds)]
mbrndtgn has quit [Read error: Connection reset by peer]
rafadc has quit [Quit: ZNC - https://znc.in]
bvdw has quit [Read error: Connection reset by peer]
rafadc has joined #ruby
bvdw8 is now known as bvdw
mbrndtgn5 is now known as mbrndtgn
donofrio has quit [Read error: Connection reset by peer]
donofrio has joined #ruby
bruce_lee has quit [Quit: Konversation terminated!]
Mia has quit [Read error: Connection reset by peer]
sgen has quit [Ping timeout: 258 seconds]
wburke00 has quit [Quit: WeeChat 2.9]
johnny56 has quit [Ping timeout: 240 seconds]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cloaked1 has joined #ruby
cloaked1 has quit [Changing host]
cloaked1 has joined #ruby
ur5us has joined #ruby
duderonomy has joined #ruby
drale2k has joined #ruby
johnny56 has joined #ruby
drale2k has quit [Client Quit]
GodFather_ has joined #ruby
ellcs has joined #ruby
drale2k has joined #ruby
TCZ has quit [Quit: Leaving]
ellcs has quit [Ping timeout: 240 seconds]
adu has quit [Quit: adu]
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drale2k has joined #ruby
klaas has quit [Read error: Connection reset by peer]
TCZ has joined #ruby
crowley has quit [Remote host closed the connection]
crowley has joined #ruby
crowley has quit [Remote host closed the connection]
mnathani has quit [Read error: Connection reset by peer]
mnathani has joined #ruby
klaas has joined #ruby
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rapidwave has joined #ruby
<rapidwave> Trying to use a script, but it's saying two packages doesn't have extensions built. It suggests running gem pristine on ed25519-1.2.4 and wdm-0.1.1, but doing so didn't help any
cliluw has quit [Ping timeout: 240 seconds]
cliluw has joined #ruby
GodFather_ has quit [Ping timeout: 258 seconds]
cliluw has quit [Ping timeout: 260 seconds]
x0f_ has quit [Ping timeout: 264 seconds]
mnathani has quit [Remote host closed the connection]
mnathani has joined #ruby
dualfade has quit [Ping timeout: 240 seconds]
dualfade has joined #ruby
ap4y has joined #ruby
x0f has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
mnathani has quit [Read error: Connection reset by peer]
mnathani has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
titanbiscuit has quit [Ping timeout: 256 seconds]
mangoicedtea has joined #ruby
titanbiscuit has joined #ruby
x0f_ has joined #ruby
x0f has quit [Ping timeout: 260 seconds]
impermanence has joined #ruby
chalkmonster has joined #ruby
sgen has joined #ruby
mnathani has quit [Read error: Connection reset by peer]
mnathani has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]