adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.3, 2.7.5, 2.6.9: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
josephl has quit [Ping timeout: 240 seconds]
conjunctive has quit [Ping timeout: 240 seconds]
josephl has joined #ruby
conjunctive has joined #ruby
Liothen has quit [Ping timeout: 245 seconds]
r0bby has quit [Ping timeout: 245 seconds]
pjlsergeant has quit [Ping timeout: 245 seconds]
jposer has quit [Ping timeout: 245 seconds]
keyvan has quit [Ping timeout: 245 seconds]
keyvan has joined #ruby
r0bby has joined #ruby
pjlsergeant has joined #ruby
jposer has joined #ruby
Liothen has joined #ruby
Inline has joined #ruby
nat_of_cy has joined #ruby
nat_of_cy has quit [Quit: nat_of_cy]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
roadie has joined #ruby
Bish has quit [Ping timeout: 260 seconds]
ur5us_ has joined #ruby
Guest30 has joined #ruby
Guest30 has quit [Client Quit]
ur5us_ has quit [Remote host closed the connection]
ur5us has joined #ruby
Bish has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 245 seconds]
gr33n7007h has quit [Ping timeout: 245 seconds]
gr33n7007h has joined #ruby
roadie has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
oma6 has quit [Ping timeout: 250 seconds]
roadie` has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
easbarbosa has joined #ruby
niv has quit [Ping timeout: 260 seconds]
roadie` has quit [Read error: Connection reset by peer]
ralu has quit [Ping timeout: 250 seconds]
whysthatso1 has quit [Read error: Connection reset by peer]
whysthatso1 has joined #ruby
ralu has joined #ruby
niv has joined #ruby
hololeap_ has joined #ruby
hololeap has quit [Ping timeout: 276 seconds]
hololeap_ is now known as hololeap
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
jetchisel has quit [Ping timeout: 268 seconds]
Milos has quit [Quit: ZNC 1.8.2 - https://znc.in]
Milos has joined #ruby
<nakilon> does that plague have a name that people put a single file in ./lib and require all the file tree in it
teclator has joined #ruby
grenierm has joined #ruby
wannakis1 has quit [Quit: leaving]
lunarkitty has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
easbarbosa has quit [Ping timeout: 268 seconds]
gr33n7007h has quit [Quit: WeeChat 3.3]
swaggboi has quit [Quit: C-x C-c]
nmollerup has quit [Quit: Leaving]
swaggboi has joined #ruby
pwnd_sfw has quit [Quit: Ping timeout (120 seconds)]
pwnd_sfw has joined #ruby
hololeap has quit [Remote host closed the connection]
hololeap has joined #ruby
menace has joined #ruby
Deknos has quit [Ping timeout: 250 seconds]
fef has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
_ht has joined #ruby
tkonto has joined #ruby
tkonto has quit [Quit: tkonto]
___nick___ has joined #ruby
fef has quit [Quit: Leaving]
roadie has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
menace has quit [Quit: menace]
jetchisel has joined #ruby
BSaboia has joined #ruby
m_antis has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
Milos has quit [Ping timeout: 260 seconds]
shiru has joined #ruby
Inline has quit [Quit: Leaving]
ged has quit [Ping timeout: 265 seconds]
mahlon has quit [Ping timeout: 256 seconds]
Inline has joined #ruby
shiru has quit [Quit: leaving]
Inline has quit [Remote host closed the connection]
BSaboia has quit [Quit: This computer has gone to sleep]
Inline has joined #ruby
BSaboia has joined #ruby
graywolf has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
postmodern has joined #ruby
wannadance has joined #ruby
mahlon has joined #ruby
ged has joined #ruby
<wannadance> My Ruby app is soon complete
<wannadance> Finally after like 10 years :-)
<wannadance> Shoutout to adam12, jhass|off, havenwood, weaksauce, Cork, wmoxam and postmodern for all the help over the years
<wannadance> But most of all -- our favorite Ruby hero -- Radar
BSaboia has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
smp has quit [Quit: ZNC 1.8.2 - https://znc.in]
smp has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
<ule> 10 years? Ouch congrats wannadance
BSaboia has joined #ruby
<wannadance> Thanks :-)
<wannadance> For what it's worth: https://imgur.com/a/x7Z39Zq
BSaboia has quit [Quit: This computer has gone to sleep]
Rounin has joined #ruby
BSaboia has joined #ruby
<ox1eef> nakilon: what's wrong with requiring the lib upfront, the benefits of not ive never seen materialize, just a waste of time.
jetchisel has joined #ruby
fef has joined #ruby
roadie has joined #ruby
Milos has joined #ruby
shokohsc8618 has quit [Quit: The Lounge - https://thelounge.chat]
shokohsc8618 has joined #ruby
roadie has quit [Ping timeout: 268 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
fredlinhares has joined #ruby
fef has quit [Ping timeout: 276 seconds]
Inline has quit [Quit: Leaving]
taupiqueur has joined #ruby
darkxploit has joined #ruby
weyhmueller has quit [Quit: ZNC 1.8.2 - https://znc.in]
weyhmueller has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
darkxploit has quit [Ping timeout: 268 seconds]
roadie has quit [Client Quit]
random-jellyfish has joined #ruby
fredlinhares has quit [Read error: Connection reset by peer]
fredlinhares has joined #ruby
jhass|off is now known as jhass
Inline has joined #ruby
<weaksauce> congrats wannadance
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #ruby
goldfish has joined #ruby
<adam12> wannadance: nice!
<adam12> wannadance: I've been working on my own app for something like 10 years too. It's rediculous. But I spend at least 50% of my time consulting for others, and have launched apps for them... in fareness.
darkxploit has joined #ruby
husam212 has joined #ruby
<husam212> Hi, I'm wondering how can I make class be called like a method? For example String(1) will convert the integer 1 to a string "1"
justache is now known as justBOOMER
<adam12> husam212: Define it on Kernel is one way.
<adam12> husam212: Alternatively, if you're OK with square brackets, you can define self.[] on the class.
<adam12> module Kernel; def YourMethod(args);
<adam12> I prefer the square bracket notation as it's a bit cleaner.
random-jellyfish has quit [Ping timeout: 256 seconds]
<husam212> adam12 thanks, yeah square bracket  looks clean
husam212 has quit [Quit: Client closed]
___nick___ has quit [Ping timeout: 260 seconds]
jpw has quit [Remote host closed the connection]
_ht has quit [Remote host closed the connection]
apple-corps has joined #ruby
<apple-corps> Hello, I'm using rspec tests around logstash and the logstash/dev-utils ruby gem. I'm trying to get a debugger attached or perhaps first log to standard out so I can try to understand the logstash / dev-utils and ruby testing framework. I have yet been able to get logging messages via a logging library or puts when executing the rspec tests.
<apple-corps> Similarly I have not yet been able to make a debugger work. I am wondering if anyone would try to help work with me towards this solution before I give in.
<apple-corps> So I guess a good place to start would be to look for assistance for the logging. I would expect that to be the easiest thing to do,
apple-corps has quit [Quit: Client closed]
apple-corps has joined #ruby
<apple-corps> So my first goal is to write some logging to STD out interlaced with the rspec output so I can get a handle on the testing setup. I will try this again but I'm intimidated by the ruby world
<apple-corps> So do any folks know a good way to write logs from an rspec test / ruby test?
<weaksauce> have you tried "require 'pry'; binding.pry"
<apple-corps> Not yet. I was going to try that when I got to the debugging. I was trying to make logging work. But I can try that now. I think one problem I have is managing gems. It's very difficult for me working with the logstash / jruby setup. I started using docker containers because I was having trouble setting up locally on the mac. Let me go this route
<apple-corps> now.
<weaksauce> do you not use bundler?
<apple-corps> No, currently I've been using https://github.com/iteratec/logstash-rspec/blob/master/Dockerfile to execute the test and here's the description where I got started with this: https://gquintana.github.io/2016/09/07/Testing-Logstash-configuration.html
<apple-corps> I've also explored using https://github.com/cameronkerrnz/logstash-plugin-dev but I haven't been successful in triggering the rspec tests from that container. But I think it's Dockerfile more clearly defines the build platform including bundler calls.
<apple-corps> In short it seems like the first container is just providing an execution engine to run rspec tests while the later is providing a ruby stack to build plugins. I don't need to build plugins but I am trying to test logstash configurations.
<weaksauce> yeah i don't know anything about logstash
fredlinhares has quit [Quit: WeeChat 3.3]
<apple-corps> Looking at those two docker containers, do you think I should continue with the one that currently executes the tests or work with the one that has the clear-er use of bundler, etc and try to make it's rspec work?
<apple-corps> Maybe I will drop some output from working on the later
<weaksauce> does the first one work at all?
<weaksauce> i'd think that the bundled rspec should work ootb
<weaksauce> the plugin one seems pretty heavy handed
hololeap has quit [Ping timeout: 276 seconds]
hololeap_ has joined #ruby
<apple-corps> the first one works to execute the tests
ur5us has joined #ruby
<apple-corps> I'm not sure how to use bundler or gem in that one to install required dependencies if for example pry is missing.
<weaksauce> i'd just add a new run command "RUN gem install pry"
<weaksauce> or if you don't want a layer append it
<weaksauce> that said i have no clue how bare bones the ruby is in that dockerfile
<apple-corps> hmm i seem to have had luck with the more involved container. I ran `rake test:install-default` and I seem to be installing required dependencies and I think I made rspec work in that environment where I did not before. I think this might be better because it seems to have bundler setup.
<weaksauce> seems pretty well thought out so
<apple-corps> But I'm still not terribly familiar here. I think some ruby knowledge of tooling might help
<weaksauce> not a bad path
<apple-corps> So if I want to install another gem, what route do I go
<weaksauce> bundler is the main way people generally interact with gems for a project
<weaksauce> docker kinda changes that a touch but you can do it
<weaksauce> you have a gemfile and a gemfile.lock that lists all the gems you use and bundle install installs them
<weaksauce> bundle exec will run whatever command in the context of those gems
<weaksauce> bundle add pry would append pry to the gemfile and install it
<apple-corps> ok let me try this. And what was that rake test:install-default. That seemed to get a bunch of needed things ...
<weaksauce> rake is rubymake
<apple-corps> Ah rake is like make. doh. hmm
<weaksauce> so it is used to run things and install things
<apple-corps> So where do I find the makefile def of that test:install-default ?
<weaksauce> it's gonna be in a Rakefile
<weaksauce> or a rake subdirectory
<apple-corps> I see the Rakefile and it looks like it reads a bunch of lib dirs. But now I have some ideas what is going on. I will try bundle add something. Thanks!
<weaksauce> good luck!
<apple-corps> But I get a Gem::GemNotFoundException
<apple-corps> for bundler
<weaksauce> is bundler bundled with jruby?
<weaksauce> i don't really use jruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<apple-corps> yeah all this logstash uses jruby. I think there might be a java core and jruby. I ran bundler and it installed a bunch of stuff.
<apple-corps> so if you're a java dev or a ruby dev you don't know what the hell is going on unless you know both && jruby :D
<weaksauce> hah pretty much
<apple-corps> seems like the bundler is confused. I ran bundle add and it fetched a bunch of deps. Then I ran the rspec test and got an error Bundler:FemNotFound: Could not find little-plugger-1.1.4 in any of the sources.
<apple-corps> maybe I installed a bad requirement for the jruby world?
<apple-corps> I was trying to install the logging library
goldfish has quit [Ping timeout: 260 seconds]
ivz_hh has quit [Quit: WeeChat 2.8]
ivzhh has joined #ruby
<weaksauce> no clue
<weaksauce> never had a need for jruby
<apple-corps> I think perhaps they are using their own interface to bundler to manage dependencies and then if trying to use bundler on my own things get screwed: https://github.com/elastic/logstash/blob/main/lib/pluginmanager/install.rb https://github.com/elastic/logstash/blob/main/rakelib/test.rake#L64
<weaksauce> bundler should be installed per the last comment
<weaksauce> are you bundle exec foo.rb
<weaksauce> well rspec instead of foo.rb
<apple-corps> no I've been running the tests with rspec not bundle
<weaksauce> actually the log thing is referenced in that issue
<weaksauce> This is creating an issue for us in Logstash as we install our own version of Bundler
<apple-corps> Ok, so I assume I want to invoke the logstash bundler if I want to add a gme
<weaksauce> yeah
<weaksauce> they usually have binstubs for things so that might be something to look into
<apple-corps> I was trying to dig through the rake tasks to see where they provide the gem list for the development dependencies but maybe just looking for their bundler would be simpler
<weaksauce> bin/bundle
nat_of_cy has joined #ruby
jmcgnh has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 240 seconds]
random-jellyfish has joined #ruby
<apple-corps> weaksauce got distracted there. That makes sense. I'll try that bundler and see what happens