#ruby - 01 April 2019
« Back 1 day Forward 1 day »
[00:57:24] uplime: I've got some certificates (let's just say they're all PEM encoded right now) in a single file that I can read into a string easily enough, but does anyone have a good way to split it up so I can store each certificate in their own `OpenSSL::X509::Certificate` instance? The only thing I can think of is splitting on "-----\n-----", but that doesn't seem like a very good method
[04:41:55] dysaniak: When I define it in a function, it freezes properly, but if I define it outside the scope of the function, it behaves truly randomly.
[04:45:50] dysaniak: Each call to rand increments something. Hence the method-level definition stays locked: it resets the incrementer.
[10:39:47] AndreYuhai: Hello there, I want to select a range from the array which will be from the index number 1 to the last index. I've tried this: arr[1..] and this worked on irb, but then RuboCop warns me on RubyMine. Is that expression correct?
[11:03:42] AndreYuhai: al2o3-cr: should I create the rubocop.yml file for each project separately? Because I can't find it.
[11:10:21] AndreYuhai: al2o3-cr: Thank you. Now I've created them but in rubocop.yml it says inherit from rubocop_todo.yml but in todo there is nothing about AllCops
[12:10:36] al2o3-cr: AndreYuhai: can i just make a suggestion. use can use arr.drop(1) which is ~2x faster
[12:11:51] AndreYuhai: al2o3-cr: Oh I didn't know about that method. Sure that is even better what I needed was just to drop first index (table header :D)
[13:33:15] Superhanz: so that I could have [("fastest time", "blue team"), ("least hints", "red team"), ... ]
[15:18:40] rails759: An error occurred while installing bootsnap (1.4.2), and Bundler cannot continue. Make sure that gem install bootsnap -v '1.4.2' --source 'https://rubygems.org/' succeeds before bundling.
[15:19:43] havenwood: rails759: What error do you get when you try to install the bootsnap gem as it recommends?
[15:42:47] havenwood: rails759: It's hard to say without seeing the rest of the build error. Do you have system build tools installed?
[15:45:09] havenwood: rails759: You'll want to install the "DevKit" then: https://rubyinstaller.org/add-ons/devkit.html
[15:47:09] rails759: very good, I am installing the devkit, thank you so much for your help and response
[15:56:27] havenwood: Ooh, that's an interesting new experimental feature... the fourquals operator: ====
[16:03:13] havenwood: Ruby 2.4 version bump time! Ruby 2.4.6 was released with a variety of little backported fixes.
[16:20:27] ngw: hello *, I'm struggling with a problem that I guess is quite easy: I'm using a node.js module to encrypt some variables with Aws kms, variables that I want to decrypt using ruby and obviously the aws-kms module
[16:22:05] ngw: I can see everything is happening here: https://github.com/nordcloud/serverless-kms-secrets/blob/master/index.js#L81-L94
[16:22:40] ngw: I'm not sure what that `Buffer.from` is in Node.js and how to emulate it in Ruby, but unfortunately I can't make it work
[16:23:20] ngw: The whole thing is summarized in https://stackoverflow.com/questions/55168878/decrypting-keys-from-aws-kms-in-ruby if someone wants some reputation points on SO
[18:17:23] JL: Hi. Does anyone recall the name of the Ruby lessons that took you from simple to more complex Ruby concepts and would check your work. I used it years ago and thought it was excellent. It may have been a Gem but recall it being a Japanese name. It had about 100 lessons and you used the terminal to modify the code it started you with. Thank you.
[18:30:52] baweaver: The latter is up and down depending on how much the owners are paying attention
[18:37:14] JL: baweaver: Thank you. Maybe RubyKatas. It sounds Japanese to me. I'll look google that. I don't think it was RubyMonk because I did the lessons on my own system on the command line.