RougeR

Activity Graph

Page 1 of 12 | Next »

2019-05-17

[08:59:36] RougeR: has joined #ruby

2019-04-27

[09:59:35] RougeR: has joined #ruby
[14:42:30] RougeR: has joined #ruby
[14:42:30] RougeR: Changing host
[15:57:33] RougeR: Ping timeout: 245 seconds
[18:02:49] RougeR: has joined #ruby

2019-04-26

[10:54:11] RougeR: has joined #ruby
[13:28:23] RougeR: any fluentd users here>
[16:47:00] RougeR: Ping timeout: 250 seconds
[17:54:01] RougeR: has joined #ruby

2019-04-03

[10:08:09] RougeR: has joined #ruby
[10:46:59] RougeR: skarlso, is rbenv an option
[10:47:08] RougeR: its much less invasive than rvm
[10:47:39] RougeR: it just adds shims to the path rather than overwriting various system methods
[10:47:41] RougeR: i far prefer it
[10:48:36] RougeR: even if its not an option. have a look how it works
[10:48:51] RougeR: good to hear, have a go with that. i recently swapped to it from RVM
[10:49:00] RougeR: so if you run into issues might be able to help
[15:49:00] RougeR: skarlso, rbenv worked for you?
[15:49:48] RougeR: nice, glad that is working
[15:50:14] RougeR: im still trying to get sinatra to work with AR 5.X
[15:50:22] RougeR: yeah thats basically how rbenv works. just shims the paths
[16:51:17] RougeR: Ping timeout: 245 seconds

2019-03-21

[09:49:45] RougeR: has joined #ruby
[09:49:57] RougeR: does lantins come here at all?
[09:50:20] RougeR: also anyone else got experience with resque, ive got a fair bit and am trying to implement some plugin logic
[16:19:32] RougeR: i might be being daft here
[16:19:35] RougeR: but im a bit stuck
[16:20:25] RougeR: how do i access a 'private' instance method when inside a class singleton method
[16:21:22] RougeR: havenwood, not really atm. but you might have just answered by question
[16:21:30] RougeR: i could mock soemthing up if this doesnt work
[16:22:00] RougeR: aghh im in a catch 22
[16:22:02] RougeR: okay yeah
[16:22:09] RougeR: let me mock it up and show you
[16:32:27] RougeR: havenwood,
[16:32:28] RougeR: https://dpaste.de/fmRs
[16:32:33] RougeR: i think this is accurate
[16:32:48] RougeR: so i want to call a private instance method from inside a class method
[16:33:39] RougeR: cant instantiate new instance of the class from that method either
[16:33:55] RougeR: unless i use metaprogramming which if i can avoid it for something trivial id rather not
[16:34:05] RougeR: if i have to refactor the class, its possible or i can add another way
[16:34:14] RougeR: but i think there is another way
[16:43:41] RougeR: it is possible haha
[16:43:44] RougeR: just found a way!
[16:43:53] RougeR: self.allocate.send(:task_update)
[16:44:18] RougeR: this callback method gets hit when a task fails properly and can no longer be retried
[16:44:31] RougeR: phaul, creates a new instance of the class without calling initialize
[16:44:43] RougeR: which i cant call, because its doing other things
[16:44:56] RougeR: (i did not write any of this code before, im merely working on it)
[16:45:37] RougeR: so it would be task_update('failed') for example
[16:45:56] RougeR: everywhere else its called its from an instance method
[16:46:07] RougeR: the calback method has to be a class method due to the third party lib
[16:46:38] RougeR: does that make sens?
[16:49:01] RougeR: phaul, hm?
[16:50:39] RougeR: yeah it is, pleased with it.
[16:50:46] RougeR: sure itll get flagged in pr
[16:50:54] RougeR: im having to use instance_variable_set as well :l
[16:51:05] RougeR: thanks for your help, didnt mean to come off snappy if i did.
[17:58:40] RougeR: Ping timeout: 246 seconds
[18:20:03] RougeR: has joined #ruby

2019-03-15

[09:41:14] RougeR: has joined #ruby

2019-03-14

[17:40:49] RougeR: has joined #ruby
[18:37:29] RougeR: Ping timeout: 268 seconds

2019-02-22

[00:06:48] RougeR: try telling that to my manager who refuses to let me run ubuntu
[00:06:54] RougeR: even though 100% of my work is ruby
[00:10:41] RougeR: yeah im not a fan of macs, but id rather one than windows
[00:10:49] RougeR: much prefer windows/ubuntu dual boot or vm
[00:55:57] RougeR: Quit: Leaving
[09:24:31] RougeR: has joined #ruby
[10:36:47] RougeR: Ping timeout: 255 seconds

2019-02-21

[23:29:34] RougeR: has joined #ruby
[23:29:52] RougeR: im jjust about done with my manager
[23:30:06] RougeR: hes blindly insisting that ruby runs better on windows than ubuntu
[23:30:14] RougeR: because hes got a fucking .net core background
[23:30:25] RougeR: he even complains about osx daily
[23:32:41] RougeR: https://www.reddit.com/r/ruby/comments/65n186/is_rubyror_on_windows_really_that_bad/
[23:33:47] RougeR: https://www.reddit.com/r/ruby/comments/65n186/is_rubyror_on_windows_really_that_bad/
[23:34:05] RougeR: https://stackoverflow.com/questions/164896/limitations-in-running-ruby-rails-on-windows
[23:34:12] RougeR: tldr hes a fucking idiot
[23:38:25] RougeR: https://github.com/Microsoft/WSL/issues/893
[23:56:05] RougeR: interesting havenwood
[23:56:22] RougeR: but yeahl. my boss is a .net guy and he refuses to admit that ubuntu is better than windows
[23:57:08] RougeR: smoother is the right word, you can dev on windows. but it wont be fun...atm im forced to used windows. i just run a full screen ubuntu vm
[23:57:34] RougeR: then i get mocked for giving 6 of my 16GB ram to ubuntu along with full processing power for each core of cpu
[23:57:44] RougeR: ...i have loads to spare and its my main de

2019-02-20

[10:38:01] RougeR: has joined #ruby
[10:38:28] RougeR: ...i cant believe there is nothing like object.is_a?(Bool) in ruby, or is_bool?
[10:38:41] RougeR: i have to use this
[10:38:42] RougeR: ( object.is_a?(TrueClass) || object.is_a?(FalseClass) )
[10:44:48] RougeR: yeah ive seen there is a few ways of doing it phaul i quite liked this for it being the explicit functionality i wanted
[10:45:15] RougeR: but yeah i feel standard ruby should have a is_bool? method built in
[10:45:50] RougeR: i can tell you what its for
[10:45:59] RougeR: i want to pass true or false for a json api request
[10:46:08] RougeR: and i want to validate that a param is either true or false
[10:53:53] RougeR: i disagree
[10:54:05] RougeR: otherwise sticking in any old string will work as true
[10:54:25] RougeR: im not sure why validating a bool is bad
[10:54:57] RougeR: i have thought about using just a string as the decider
[10:55:05] RougeR: but i think having bools should be fine
[10:56:56] RougeR: but thats not really any different too .is_a?(TrueClas)
[11:07:52] RougeR: ellcs, haha yeah thats exactly what i just did
[11:08:05] RougeR: but for now im going to stick to a method
[11:08:19] RougeR: or similar to that
[11:08:36] RougeR: phaul, hmmm ill have a look at that
[11:08:57] RougeR: thanks for expanding on it for me. I would normally agree that validating on types is silly and also too broad
[11:09:12] RougeR: but when it can only be one of two things (true or false). then it seems acceptable
[11:09:51] RougeR: most of my validations are checking keys exists(all or any), or checking that a param value is an allowed string
[11:10:03] RougeR: few of these too
[11:10:04] RougeR: params[:setting].to_i.nonzero?
[11:10:36] RougeR: to allow for any numeric non zero string or any integer
[11:11:44] RougeR: thinking ill end up extracting most of my validations into reusable methods
[17:47:27] RougeR: Ping timeout: 240 seconds

2019-02-15

[09:57:35] RougeR: has joined #ruby
[10:11:51] RougeR: anyone able to help with this
[10:11:52] RougeR: https://dpaste.de/fAWf
[10:12:02] RougeR: i want to mock this JobRequest using mocha/minitest
[10:12:18] RougeR: settings is a sinatra feature that i cant figure out how to stub
[10:13:26] RougeR: or i need a way to do this
[10:13:36] RougeR: http://sinatrarb.com/configuration.html
[10:16:43] RougeR: https://www.rubydoc.info/github/floehopper/mocha/Mocha%2FParameterMatchers:has_entries
[10:16:43] RougeR: or this maybe
[10:24:45] RougeR: that took all last afternoon
[10:25:24] RougeR: i ended up creating a mock class and including the modules i needed. then stubbing settings to return Sinatra.settings which expects logger
[10:27:18] RougeR: https://dpaste.de/stko
[12:25:16] RougeR: Ping timeout: 244 seconds

2019-02-13

[01:22:48] RougeR: has joined #ruby
[02:52:58] RougeR: Ping timeout: 245 seconds

2019-02-12

[13:02:11] RougeR: has joined #ruby
[18:28:44] RougeR: soo. developing ruby on windows
[18:28:46] RougeR: opinions.
[18:29:02] RougeR: yeah ill be using WSL
[18:29:12] RougeR: my work is making me swap to windows....i currently use ubuntu
[18:29:20] RougeR: i still cant get a straight answer out of them why
[18:29:44] RougeR: ill likely just spend all my time in virtualbox with ubuntu and full guest additions...
[18:29:55] RougeR: TomyWork, all gems are going to have issues
[18:30:02] RougeR: currently half my unit tests fail out the box
[18:30:17] RougeR: im waiting to get WSL installed. but i need to install a windows update
[18:30:24] RougeR: im curious if they pass with WSL
[18:30:48] RougeR: fucking linux
[18:30:50] RougeR: all linux
[18:30:58] RougeR: ubuntu18.10
[18:31:01] RougeR: the same os i was running
[18:31:20] RougeR: but im being treated like a stupid child for trying to say this
[18:31:27] RougeR: i had a few issues with rdp and other linux qualms
[18:31:30] RougeR: TomyWork, i did
[18:31:43] RougeR: i also offered full dualboot
[18:31:55] RougeR: laptop has an ssd so 10s reboot times
[18:32:05] RougeR: but nope. windows or bust
[18:32:32] RougeR: I think that and no one else in the company uses linux
[18:32:48] RougeR: TomyWork, i deal with it lol
[18:33:01] RougeR: i have been for 6 months
[18:33:27] RougeR: honestly. im just going to go the malicious complicance route
[18:33:49] RougeR: TomyWork, i bet im going to have a lot of issues with gems natively
[18:34:31] RougeR: RDP....and 1 or two piece of propietary remote access software
[18:34:34] RougeR: which i can run in a vm
[18:34:56] RougeR: i always had issues with rdp on my ubuntu install...but i used it so infrequently i never bothered to fix it
[18:35:03] RougeR: it was okay. just issues with guest additions
[18:35:33] RougeR: ill see how the malicious complicance route goes. but currently im trying to mirror my enviroment in a ubuntu vm and windows
[18:35:45] RougeR: giving it a 100GB+ dynamic drive and 8GB RAM to the VM
[18:36:27] RougeR: i dont know, needed to rant
[18:38:44] RougeR: haha. TomyWork i could do that on the VM
[18:38:47] RougeR: more meta
[18:39:02] RougeR: on the best OS for ruby dev
[18:39:05] RougeR: You can also use elementaryOS, which is built of ubuntu, but borrows heavily from macOS UI design. Or Linux Mint, also built of Ubuntu, but UI looks a bit more like windows (windows 7 era)"
[18:39:05] RougeR: starter distro.
[18:39:05] RougeR: "Ubuntu. I don't care how you use ubuntu. You can install it to free room on your hdd, install it to a second hdd, or you can overwrite your windows install. But, Ubuntu is what you want. Bash shell, and relative ease installing rails. Idk how you personally install rails on a mac, but I use RVM, and it's not bad. Whatever method you use to get it up and running, will probably be done identically on Ubuntu. Or any linux distro. But Ubuntu is a nice
[18:39:52] RougeR: nahh no chance
[18:40:04] RougeR: i honestly dont know. im going to dig deeper
[18:40:12] RougeR: any time i put up any kind of questioning or resistance
[18:40:25] RougeR: i get treated like an ignorant 5 year old....because im the only guy who runs nix
[18:40:34] RougeR: lot of .net guys in the company
[18:40:48] RougeR: TomyWork, yeah i dont wana get sacked
[18:41:34] RougeR: and they all use macbooks
[18:41:48] RougeR: hes the one forcing it on me
[18:41:52] RougeR: macbooks with osx
[18:42:01] RougeR: and i think occasional use of parralels
[18:42:35] RougeR: well originally i didnt want a mac. and they let me use linux on some crappy windows pc
[18:42:40] RougeR: which i was okay with
[18:43:07] RougeR: i really dont like osx, but id rather run it than windows i think.
[18:43:19] RougeR: with a bit of work, would be fine
[18:45:37] RougeR: ive never google a ruby question and been given a windows based answer
[18:56:46] RougeR: i agree miah. and i have no issue with windows or osx being used to their strengths
[18:56:52] RougeR: if im developing .net ill use windows
[18:56:59] RougeR: if im developing ruby...linux or osx
[18:57:21] RougeR: what tools did you use
[18:57:29] RougeR: works? or works without lots of annoying bugs?
[18:59:07] RougeR: interesting miah
[18:59:17] RougeR: yeah ive been thinking of using something like vagrant
[18:59:55] RougeR: nice. yeah all of our stuff runs dockerized. its just building it from local and running tests
[19:00:42] RougeR: miah, honestly its just the way that ive been treated through the whole thing, like a naughty child for running what im comfortable and used too.
[19:01:01] RougeR: integrates with vb?
[19:03:15] RougeR: having a shifty now
[19:29:10] RougeR: Ping timeout: 246 seconds

2019-02-08

[04:11:52] RougeR: Ping timeout: 246 seconds
[09:37:55] RougeR: has joined #ruby
[17:53:11] RougeR: Ping timeout: 244 seconds

2019-02-07

[12:47:36] RougeR: https://benscheirman.com/2013/12/using-rbenv-in-cron-jobs/
[12:47:59] RougeR: im spending all week writing tests
[12:48:11] RougeR: no one ever wrote tests for our api....and i refactored it all last week
[12:48:17] RougeR: i aint releasing it without tests....
[12:48:33] RougeR: i aint guna be the one who gets fucked when there's a bug
[14:26:55] RougeR: mkroman, i just want 100% coverage for the api and resque tasks
[14:26:57] RougeR: thats my goal
[14:27:10] RougeR: at the moment total coverage has got to be under 10%
[14:28:29] RougeR: ive heard the name
[14:28:33] RougeR: let me have a look
[14:30:24] RougeR: phaul, looks very interesting given than i want coverage of certain areas too
[14:30:58] RougeR: mmm i think its worth investigating
[14:31:15] RougeR: ill have a play with it tomorrow afternoon (dev free time)
[14:31:46] RougeR: mkroman, yes i agree with that
[14:32:00] RougeR: and i dont use any kind of ruby versioning in production
[14:32:14] RougeR: think we run 2.4.1 pretty widely
[14:34:57] RougeR: we have one, weve got a pipeline etc
[14:35:21] RougeR: but testing was never done well and was an afterthought. my first job as a dev was to test all the core task logic
[14:35:43] RougeR: only 3 guys in our department and no way either of them are spending time writing test cases
[14:35:51] RougeR: so ill do it lol
[14:36:20] RougeR: ive put it off for a few months, while i learnt the codebase better
[14:37:03] RougeR: theres also the 'threat' of us moving to .net core, which puts people off testing this code
[15:13:36] RougeR: despai, i dont think you can
[15:21:40] RougeR: despai, yeah you can. but its not really the same thing
[15:21:44] RougeR: have a look
[15:22:11] RougeR: we would like to do a similar thing where i work
[16:57:41] RougeR: does anyone know how to test methods inside a block with minitest
[16:58:04] RougeR: i.e jon.transaction { MANY_METHODS_CALLED }
[16:58:16] RougeR: and i want to call expectations on the job
[17:14:26] RougeR: found away
[17:14:35] RougeR: :transaction is also a class method
[17:14:49] RougeR: so in this scenario i think i can do Job.transaction { }
[17:14:53] RougeR: and it should be identical
[17:38:36] RougeR: Ping timeout: 246 seconds
[23:26:59] RougeR: has joined #ruby