Fernando-Basso has quit [Remote host closed the connection]
simonfromspace has quit [Ping timeout: 240 seconds]
coffeex3 has quit [Ping timeout: 255 seconds]
evdubs has quit [Quit: Leaving]
evdubs has joined #ruby
emers2n has joined #ruby
DTZUZU has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
DTZUZU has joined #ruby
DaRock has joined #ruby
bsdbandit-01 has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
bsdband29 has quit [Ping timeout: 255 seconds]
<emers2n>
Get this... you're making an API call in Ruby. Occasionally, the API service returns a 'too many requests' error, and the entire script fails without data from the request.
<emers2n>
In which case, how do I make the script keep trying every 1-2 seconds until it succeeds? Can't figure out how to code this in an intelligent manor, I feel like I'm a single while statement away from solution? Code example https://pastebin.com/raw/YaFMBmXk
<t0th_->
hi, anybody can help me with elasticsearch gem?
simonfromspace has joined #ruby
bsdband65 has quit [Ping timeout: 240 seconds]
bsdbandit-01 has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
vondruch has quit [Ping timeout: 258 seconds]
schne1der has joined #ruby
jacksop has quit [Remote host closed the connection]
jacksop has joined #ruby
jacksop has quit [Client Quit]
mossplix has joined #ruby
royal_screwup21 has joined #ruby
Esa_ has joined #ruby
royal_screwup21 has quit [Remote host closed the connection]
banisterfiend has joined #ruby
alfiemax has quit [Remote host closed the connection]
conta has quit [Quit: conta]
Swyper has joined #ruby
royal_screwup21 has joined #ruby
dinfuehr has quit [Ping timeout: 260 seconds]
wickedbloodfart has joined #ruby
dinfuehr has joined #ruby
chalkmonster has joined #ruby
lucasb has joined #ruby
seenseen has quit [Ping timeout: 240 seconds]
royal_screwup21 has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 265 seconds]
Nathan2296 has joined #ruby
<Nathan2296>
I'm trying to build fluentd from the gemfile, but after it's installed I get the following: https://pastebin.com/BYZ1S8brBut both yajl and yajl-ruby are installed as seen by 'gem list'
<ruby[bot]>
Nathan2296: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12>
Nathan2296: You're running a command?
minall has joined #ruby
burningserenity has quit [Ping timeout: 240 seconds]
mossplix has quit [Remote host closed the connection]
<Nathan2296>
Yeah sorry I forgot to copy that, I get that error just by running 'fluentd'
<adam12>
Nathan2296: What happens if you use `bundle exec fluentd`?
<Nathan2296>
Let me try that, give me a second to build bundle
<adam12>
Nathan2296: Hmm? What do you mean?
mossplix has joined #ruby
<Nathan2296>
root@qemux86-64:~# bundle exec fluentdCould not locate Gemfile
royal_screwup21 has joined #ruby
<Nathan2296>
no dice
<adam12>
Nathan2296: Oh. I thought you had a Gemfile? Says in the beginning.
<Nathan2296>
Oh sorry
<Nathan2296>
I'm building it as a package from the Gemfile
m_antis has joined #ruby
<adam12>
Nathan2296: From the Gemspec?
<adam12>
Nathan2296: A package like rpm or deb or something?
<Nathan2296>
It's being built through the ruby bbclass for bitbake
m_antis has quit [Read error: Connection reset by peer]
m_antis has joined #ruby
<Nathan2296>
Which complicates things unfortunately
royal_screwup21 has quit [Remote host closed the connection]
<adam12>
Nathan2296: Yeah .. you've lost me.
<Nathan2296>
In theory, the gems are being built with 'gem build ...' and included into an embedded linux image
<Nathan2296>
And using gem list, I can see that all of the runtime dependencies for fluentd are at least being detected by gem
Fraeon has quit [Ping timeout: 260 seconds]
<Nathan2296>
But actually trying to use fluentd produces that error that it can't load such file yajl/yajl
jintseng has joined #ruby
<adam12>
Nathan2296: I wonder if yajl is a C library
<adam12>
yajl/yajl might actually be yajl.yajl.so
<adam12>
s/\/\//
<Nathan2296>
God lol, there's the C yajl, the yajl gem, and the yajl-ruby gem
<Nathan2296>
And as far as I can tell I have them all installed
Fraeon has joined #ruby
<adam12>
Nathan2296: I just wonder if a file was missed. If it's a C binding, it might generated a shared object file. When you build it, it might not be included hence the missing require.
<adam12>
Nathan2296: Are you using gem build for yajl and yajl-ruby?
<Nathan2296>
Yes
<adam12>
Nathan2296: Does it give you a .gem file?
dviola has joined #ruby
<adam12>
Also, I think you don't need the yajl dependency. It looks unrelated to the the JSON parsing library. yajl-ruby likely.
<adam12>
(you likely need yajl-ruby)
<Nathan2296>
Yajl dependency as in the C yajl or the yajl gem
<adam12>
Nathan2296: yajl gem. Looking at the project, it's actually a logger. I might be wrong.
<Nathan2296>
Yeah I don't think so either, and only yajl-ruby is listed as a fluentd dependency
burningserenity has joined #ruby
<adam12>
Nathan2296: You are doing `gem build yajl-ruby` somewhere?
<Nathan2296>
So searching the filesystem I have '/usr/lib64/ruby/gems/2.5.0/cache/yajl-ruby-1.0.0.gem'
<adam12>
Nathan2296: I'd probably try unpacking the gem and see what's in it.
<Nathan2296>
Okay unpacking it I don't see anything strange
<Nathan2296>
Is there something I should be looking for in particular?
<adam12>
Nathan2296: Does it have a lib/yajl/yajl.rb?
<Nathan2296>
Nope
<adam12>
Nathan2296: how about lib/yajl/yajl.so ?
<Nathan2296>
It has the directory yajl-ruby-1.0.0/lib/yajl with several folders and rb files
<Nathan2296>
No yajl.* files tho
<adam12>
That's a weird version too. Latest is 1.4.1.
<Nathan2296>
I'm using it as it's specified for fluentd
<adam12>
Ah.
Swyper has quit [Remote host closed the connection]
<Nathan2296>
Doing gem unpack on a normal 'gem install yajl-ruby' has neither the yajl.rb or yajl.so files
<Nathan2296>
So nothing amiss there
<adam12>
There's got to be a yajl.so file missing from somewhere tho.
<adam12>
Instead of calling gem build for that dependency, maybe you can unpack and run `rake gem` instead. It will use the rake-compiler gem which builds dependencies.
<Nathan2296>
Oh, in yajl-ruby-1.0.0/lib there is a yajl.rb
<adam12>
Yeah. You need yajl/yajl.so.
<Nathan2296>
No yajl.so's on the system
<Nathan2296>
Interestingly though, there are .so files for some of the other gems that I needed as dependencies
simonfromspace has quit [Ping timeout: 258 seconds]
<adam12>
Did you install them the same way? And are they so files for dependencies or for gems?
<Nathan2296>
Installed exactly the same, and they're .so files for gems that are dependencies for fluentd
<Nathan2296>
i.e. `find msgpack-1.3.3 -name *.so` yields `lib/msgpack/msgpack.so`
<Nathan2296>
but `find yajl-ruby -name *.so` doesn't find anything
<Nathan2296>
I'm assuming then that it needs a .so file to import?
Swyper has joined #ruby
<adam12>
Yes. C bindings normally have .so files along with them (not always since they can use the FFI interface Fiddle but yajl doesn't)
<adam12>
Ruby looks for both .rb and .so files when requiring. So require "yajl/yajl" would be "yajl/yajl.rb" and "yajl/yajl.so"
<adam12>
I know there's a .so file missing; I built it locally and it exists.
<adam12>
If you're not cross compiling, build yajl-ruby by installing it's dev dependencies, unpacking it, then running `rake native gem`. In theory you'll get a gem file WITH the .so file in it. I haven't tried it and I'm not 100% familiar with rake-compiler.
<Nathan2296>
Strange, when I `gem install yajl-ruby` there's no .so file
<adam12>
Nathan2296: Does it say "Building native extensions" when installing?
<Nathan2296>
Yes
<Nathan2296>
But then unpacking it, it doesn't have the .so file
<adam12>
Ah. That's normal. Unpack only extracts the source.
<adam12>
Unless it gets shipped as a native gem.
<Nathan2296>
Ah
<adam12>
You could try `gem info yajl-ruby` and then view the directory it shows.
<Nathan2296>
So as above, I installed the dependencies with `bundle install` and than ran `rake native gem`, but end up with `NoMethodError: undefined method `split' for nil:NilClass`
<adam12>
or if you have an editor, `gem open yajl-ruby`
coffeex3 has joined #ruby
<adam12>
Yeah; I received the same error. I'm presuming it might be a bug in rake-compiler but I didn't look.
<Nathan2296>
`gem open yajl-ruby` there's no .so file in the lib folder
<Nathan2296>
Oh but there is in yajl directory, mb
<Nathan2296>
So when I `gem install yajl-ruby` locally, and then `gem open yajl-ruby` there is a .so file. On my image doing `gem open yajl-ruby` there is no .so file
<Nathan2296>
But also, when I try `gem install yajl-ruby -v 1.0.0` locally I get a compiler error. I'm wondering if my build process is squashing that error and it's not being properly installed
<adam12>
I couldn't build 1.0.0 either. I'm presuming it's related to Ruby version, since 1.0.0 is almost 10 years old.
<adam12>
But that's entirely possible.
<Nathan2296>
Let me try 1.4.1 on the image and see what happens
<Nathan2296>
Running into build issues but I think it's env related, give me a few mins to try to resolve
poontangmessiah has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
coffeex3 has quit [Ping timeout: 240 seconds]
bsdbandit-01 has joined #ruby
coffeex3 has joined #ruby
<Nathan2296>
adam12: Sorry for the long wait, ran into a stupid issue, fixed now. Doing `gem open yajl-ruby` on 1.2.1 yajl-ruby on my image I don't have a .so file
kinduff has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ttoocs has quit [Ping timeout: 240 seconds]
coffeex3 has quit [Quit: WeeChat 2.4]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
fphilipe has quit [Read error: Connection reset by peer]
fphilipe has joined #ruby
mossplix has quit [Ping timeout: 265 seconds]
mossplix has joined #ruby
mossplix has quit [Read error: Connection reset by peer]
<havenwood>
simonfromspace: This UserInterface can be used like your old one without changing other code, but it's EZTVScraper::UserInterface not a top level UserInterface that might conflict with other UserInterfaces out there.
<havenwood>
Pry::Forwardable doesn't stomp on anyone else's Forwardable, since it's in the Pry namespace.
<havenwood>
And the filename mirrors.
dviola has quit [Quit: WeeChat 2.7]
<havenwood>
simonfromspace: After these namespace changes, I'd vote go ahead and cut a gem.
<simonfromspace>
Done as instructed and app works fine
<havenwood>
simonfromspace: That's a nice way to get and share easy access to the executable in your PATH.
cthulchu_ has joined #ruby
<simonfromspace>
This is a capstone project for me, and one of our goals was to make unit tests
<simonfromspace>
So far, I've been unable to make tests except create a variable named success and pass it if everything goes well or return false if rescue catches an error. Like, that was the super hacky way for me to write a test.
<simonfromspace>
Should I have written the app any differently.
<simonfromspace>
I'm not passing any value or parameters between methods
<simonfromspace>
and that makes it even more difficult to test anything.
<adam12>
Nathan2276: Nothing further from me when you dropped connection. I'm all out of ideas. You need that .so file to be shipped with the gem you're packaging.
clemens3 has quit [Quit: and bye]
phaul has quit [Ping timeout: 255 seconds]
<havenwood>
simonfromspace: It's normal in tests to have some setup. Then you test the interface. You can also test what's printed. This is a very print-heavy thing.
<havenwood>
simonfromspace: Push the most recent code?
<simonfromspace>
pushed
<Nathan2276>
adam12: Ahah! So turns out that for whatever reason I was building 1.2.1 rather than 1.4.0, 1.4.0 does produce the .so file! Thanks so much for all of your help, I wouldn't have figured that out without you
davidw has joined #ruby
davidw has joined #ruby
davidw has quit [Changing host]
<adam12>
Nathan2276: Cheers.
<havenwood>
simonfromspace: Looking muuuch better! I think you're right, it's time for tests
<Nathan2276>
More fun Ruby questions. I'm trying to build concurrent-ruby, with `gem build concurrent-ruby` but get an error about a missing concurrent_ruby.jar file
<Nathan2276>
It seems I have to generate it somehow
tau has quit [Ping timeout: 240 seconds]
Snowy has joined #ruby
fphilipe has joined #ruby
impermanence has joined #ruby
<havenwood>
Nathan2276: Are you using JRuby? I'd suggest asking in the #jruby channel, in any case, since they'll know.
<havenwood>
simonfromspace: Congrats on cutting your first gem!!
<havenwood>
simonfromspace: Say more about what you mean there?
<havenwood>
simonfromspace: When you install the gem, the executable should be available in your path to run.
<simonfromspace>
I mean, like an app I can run in the CLI anywhere
<simonfromspace>
I assume that's another whole topic
fphilipe has quit [Ping timeout: 272 seconds]
<havenwood>
simonfromspace: I don't understand.
<havenwood>
simonfromspace: Try in your command line: eztv-scraper
<havenwood>
simonfromspace: You should add option parsing. :)
<simonfromspace>
does nothing
<Nathan2276>
havenwood: Sorry I'm a little lost. Since it needs the jar does that mean that Java is a runtime dependency?
<havenwood>
Nathan2276: Nope, it just has Java extensions. JRuby folk in #jruby should know what the deal is or there are probably issues or docs showing what's up but I don't know where.
<simonfromspace>
calling the class EZTVScraper.new does everything
<havenwood>
simonfromspace: Then it should *just work*.
<simonfromspace>
Yes sir
<simonfromspace>
It works fine when I call the class in a ruby file
<havenwood>
simonfromspace: But the executable does nothing?
<simonfromspace>
You know how git works anywhere when you call it, I thought it would work like that
<havenwood>
simonfromspace: Sanity check that it's the right file. Check: command -V eztv-scraper
<havenwood>
simonfromspace: It should work like that.
<havenwood>
simonfromspace: I don't think I get your issue. Are you saying you're running `eztv-scraper` and it doesn't print anything?
<havenwood>
simonfromspace: Look at the file you're running: cat `which eztv-scraper`
<havenwood>
simonfromspace: which -a eztv-scraper
<havenwood>
simonfromspace: I'm in a meeting, but make sure you're running the gem you've installed, the right branch, and that the content you think is in the executable is tere.
<havenwood>
there*
<simonfromspace>
Okay
<simonfromspace>
You should attend your meeting
<simonfromspace>
Thanks for the suggestions
<simonfromspace>
I'll see what I can do
splud_wurk has joined #ruby
chalkmonster has joined #ruby
coderhs has joined #ruby
mikecmpbll has joined #ruby
burningserenity has quit [Ping timeout: 255 seconds]
chalkmonster has quit [Quit: WeeChat 2.7]
Snowy has quit [Remote host closed the connection]
codefriar has joined #ruby
Snowy has joined #ruby
royal_screwup21 has joined #ruby
Snowy has quit [Ping timeout: 258 seconds]
gigetoo has quit [Ping timeout: 245 seconds]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
gigetoo has joined #ruby
bsdbandit-01 has joined #ruby
burningserenity has joined #ruby
royal_screwup21 has quit [Remote host closed the connection]
<simonfromspace>
I tried to look at other gems on Github including their gemspec but I can't figure out why my gem does not run when called in the CLI
<havenwood>
simonfromspace: Alternatively, just run the local version of the binary: bin/eztv_scraper
<havenwood>
simonfromspace: Are you on Windows or something Unixy?
<simonfromspace>
Yes
alexherbo24 has joined #ruby
<simonfromspace>
Win 10 x64
<havenwood>
I don't know PowerShell, but check what the equivalent of `which` and `cat` are and take a look at `which eztv_scraper` and then `cat $(which eztv_scraper`.
<havenwood>
simonfromspace: You can just edit the gem files.
<havenwood>
simonfromspace: Then restore them, with: gem pristine
alexherbo2 has quit [Ping timeout: 255 seconds]
alexherbo24 is now known as alexherbo2
<havenwood>
simonfromspace: Figure out a quick feedback loop for editing the gem and do some print-based debugging with the executable to sanity check.
xco has joined #ruby
xco has quit [Client Quit]
ellcs1 has joined #ruby
burningserenity has quit [Ping timeout: 265 seconds]
<simonfromspace>
Do you think I need any changes in my gemspec?
<gheegh>
anyone dealing with Rails ever have the problem that Sidekiq is processing the queue in LIFO order instead of FIFO order? I can't find ANYTHING that explains why this is happening..
<simonfromspace>
Removed the require_relative and it worked just fine :D ytti
<simonfromspace>
havenwood, it works. my gem works. it executes
burningserenity has quit [Read error: Connection reset by peer]
fphilipe has joined #ruby
hiroaki has joined #ruby
burningserenity has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<hramrach>
what is the rb_stacktrace supposed to do?
burningserenity has quit [Read error: Connection reset by peer]
SuperL4g has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
burningserenity has joined #ruby
<hramrach>
call (void) rb_backtrace() outputs stacktrace to stderr which I have redirected
<hramrach>
and it's actually looping so that should not be that bad to figure out
gheegh has joined #ruby
gheegh has quit [Client Quit]
SuperLag has quit [Ping timeout: 265 seconds]
gheegh has joined #ruby
burningserenity has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
markopasha has joined #ruby
<ellcs1>
i didn't see rb_stacktrace ¯\_(ツ)_/¯
wald0 has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
<wald0>
if i want to revert a series of commits, what is the correct order? from the older one to the new one?
<wald0>
oops, wrong channel
wald0 has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
wald0 has joined #ruby
wald0 has quit [Client Quit]
burningserenity has joined #ruby
chalkmonster has joined #ruby
<al2o3-cr>
shame sprintf doesn't support `'` flag
minall has joined #ruby
<minall>
Hello Ruby community!
<minall>
I'm studying about ruby's modules, and in one example, They create a module named Trig, and a method called: Trig.sin(x). This is understandable, they are creating a method for Trig that takes a parameter
<minall>
My question is, couldn't the method just be created as sin(x) instead of Trig.sin(x)?... I could just refer to Trig.sin(2) or something like that after all
bvdw has quit [Read error: Connection reset by peer]
<minall>
What's the difference between naming it Trig.sin(x) and just sin(x) since they two can be called as Trig.sin(5) or something like that?
bvdw has joined #ruby
<adam12>
minall: Defining sin(x) inside Trig would be in a different scope. You wouldn't be able to call Trig.sin(x) since that expects sin(x) to live on the Trig eigenclass or singleton class. The only way to do that is to reopen the singleton class by asking Ruby to (ie. Calling `Trig` explicitely, using `self` when self is the singleton class, class << self when self is the singleton class, etc.)
TCZ has joined #ruby
<adam12>
minall: The only way to make it work would be to use the module_function method, which copies a method from the scope of the module into the scope of the singleton class.
mossplix has joined #ruby
<minall>
Thanks adam12, so they are different... I'm reading about instance methods vs class methods
<minall>
Thanks havenwood !, that makes more sense
leah2 has quit [Remote host closed the connection]
Tuor has joined #ruby
code_zombie has joined #ruby
leah2 has joined #ruby
<Tuor>
Hi, I would like to be able to use ruby2.7 on Ubuntu 19.10. I installed the snap but when I enter ruby -v it still prints 2.5.5. How can I use the ruby which comes with the snap package?
mossplix has quit [Remote host closed the connection]
<minall>
Ok, thanks for the example of havenwood, I understood that class methods can't be called from a new variable created but referencing the class
<minall>
And instance methods can't be used referencing the class but by creating a new variable
<minall>
I'm thinking on an example of a real world usage on this, but I can't think anything
<havenwood>
Tuor: Check: which -a ruby
chalkmonster has quit [Ping timeout: 258 seconds]
<Tuor>
there is /snap/bin/ruby
<havenwood>
Tuor: You can probably just move /bin/snap in front of your PATH.
<havenwood>
Tuor: export PATH="/bin/snap:$PATH"
<Tuor>
:) thx
<havenwood>
minall: If you have no internal state, then you can use a module instead of a class. Modules are great for functions that don't rely on any state associated with the receiver module. If you have a single instance of state, there's a special Singleton class. Or if you have multiple instances of state, just use a regular class.
<havenwood>
minall: That ^ shows a module with a function, so no state - all info comes from parameters to the functions.
<havenwood>
minall: And a singleton class, where there's just a single instance ever.
<havenwood>
minall: And then a regular class, where you can have a bunch of different versions, each with internal state.
leah2 has quit [Remote host closed the connection]
mossplix has quit [Remote host closed the connection]
<minall>
Thanks for the great example havenwood !
<minall>
I think I'm not asking for the think I'm looking for... A better question will be:
<havenwood>
minall: No prob! You'll note on the `singleton_instance` one you can do `SingleInstanceOfState.instance` and it's the same as that variable.
<minall>
Yes!
leah2 has joined #ruby
<minall>
I'm actually looking for... Why is that you can't call class methods on instance objects and instance methods on class objects?
<minall>
Or I'll find the answer by clearing questions about OOP?
<havenwood>
minall: Ruby is flexible, so you *can* do all sorts of things.
<minall>
Of course, I could also return an instanece variable
<havenwood>
minall: For example, there ^ I defined a singleton method on a single string. ¯\_(ツ)_/¯
<havenwood>
You can do the same for the class itself.
<havenwood>
minall: I think you'll find that if you follow simplest-thing-that-works you'll only occasionally be using some of these features.
<minall>
Lol that's amazing
nofxx_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
nofxx has quit [Ping timeout: 255 seconds]
burningserenity has quit [Quit: Leaving.]
<minall>
I'm realizing that it depends on the approach, why I want to declare an instance methods and why and the same with class methods
<minall>
I understand it now... Thanks havenwood !
<havenwood>
minall: You're welcome!
<minall>
But as the good apprentice, I have to keep asking questions
mossplix has joined #ruby
<minall>
I'm reading about namespaces, one of the example of using them is: there are times when you want to group things together that don't naturally form a class.
<minall>
I can't think of an example when I want to group things that don't form a class. If a class is methods
<minall>
*can have methods
<minall>
I mean, if I create a method with some classes an include it in some classes, isn't the same as creating classes and creating more classes inside of that clasS? or inheriting the class?
<phaul>
stdlib has Math
<phaul>
Math.cos, sin, exp etc
<phaul>
but there is no math instance. debatable if the desing where these are instance methods on a Numeric is better or worse
<phaul>
so instead 2.3.sin, but it reads somewhat unnatural
<phaul>
Math.sin(2.3) is more the human way
<minall>
Cool!, and I see that namespaces can be used to reference modules variables!
<havenwood>
&>> class Integer; include Math; def sin; super self end end; 666.sin
<havenwood>
minall: That's ^ taking advantage of the mixin style, just to show how you might use it.
<minall>
Lol!
<havenwood>
minall: #super there calls the mixed in #sin
<minall>
That's cool, I'm making some experiments, I can say: class About < Neo::Koan will make a new About class that will inherit everything from the class Koan inside the module neo... Trying to understand this was also why I was reading about instances and such
<dreamreal>
havenwood: also, and probably a total and complete surprise to you: chruby works better than rvm
<havenwood>
dreamreal: It does one thing, and does it well.
hoijui has quit [Ping timeout: 240 seconds]
<havenwood>
dreamreal: RVM does all sorts of things that chruby doesn't, but it's over 10,000 lines of code versus chruby's ~200 lines. It makes chruby much easier to maintain. You just sit back and watch it *just work*.
<havenwood>
Version switchers are a thorn patch, generally.
<dreamreal>
yeah
Ai9zO5AP has quit [Quit: WeeChat 2.7]
bsdbandit-01 has quit [Ping timeout: 258 seconds]
bsdband97 has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
sagax has quit [Ping timeout: 272 seconds]
Nathan2276 has quit [Remote host closed the connection]
jmcgnh has joined #ruby
Ai9zO5AP has joined #ruby
minall has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 272 seconds]
dostoyevsky has quit [Ping timeout: 240 seconds]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gheegh has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
citizentwo has quit [Remote host closed the connection]
bsdband97 has quit [Ping timeout: 255 seconds]
citizentwo has joined #ruby
ellcs1 has quit [Ping timeout: 240 seconds]
bsdbandit-01 has joined #ruby
zapata has quit [Ping timeout: 245 seconds]
citizentwo has quit [Remote host closed the connection]
zapata has joined #ruby
fphilipe has joined #ruby
dostoyevsky has joined #ruby
Esa has quit []
alfiemax has joined #ruby
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcalla has quit [Ping timeout: 265 seconds]
alfiemax has quit [Ping timeout: 258 seconds]
TinderFX has quit [Ping timeout: 240 seconds]
LinuxKnight has quit [Ping timeout: 272 seconds]
jcalla has joined #ruby
Fernando-Basso has quit [Quit: Leaving]
ewanchic has joined #ruby
Fusl has quit [Quit: K-Lined]
jenrzzz_ has joined #ruby
jintseng has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
Fusl has joined #ruby
mossplix has quit [Remote host closed the connection]
DaRock has joined #ruby
pwnd_nsfw has joined #ruby
lxsameer has quit [Quit: WeeChat 2.6]
hiroaki has quit [Ping timeout: 272 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
<simonfromspace>
in rspec, how do I expect a method that's inside a module, inside a class
<phaul>
is it a public instance method of the class?
<simonfromspace>
yes
coderhs has quit [Ping timeout: 248 seconds]
<simonfromspace>
yes
<phaul>
module M; class X; def foo; 13; end; end; end; Rspec.describe M::X do subject { described_class.new } ; it 'is 13' { expect(subject.foo).to eq 13 }; end
<phaul>
I haven't tried the syntax just giving you idea
<TCZ>
how to add 2 arrays -> [1,2,3] + [4,5,6] = [5,7,9], is there a class for this purpose like vector or smthing
<phaul>
or more succint context '#foo' do subject {described_class.new.foo } ; it { is_expected.to eq 13 } ; end inside the describe block
ur5us has quit [Ping timeout: 248 seconds]
<phaul>
I made a few rspec best practice violations in these suggestions. that context prly should be describe, and we should name our subject if it expects on subject.some_message. But these are stylistic questions