-
Codecast: Create a RubyGem 19: End of an Epic – Finish the configurable generator story
This is the 19th video in the NerdDice create a RubyGem series. In this video, Mike finishes up getting all of the RSpec scenarios passing, updates the README, updates the CHANGELOG, fixes RuboCop offenses, opens a pull request, merges it, and closes the story. This resolves the issue (that was more of an epic than…
-
Codecast: Create a RubyGem 18: Reset the seed when configured value reached
This is the 18th video in the NerdDice create a RubyGem series. In this video, Mike implements functionality to use the existing configuration settings to refresh the seed when the configured interval is reached and makes partial progress on getting all of the test scenarios passing in RSpec.
-
Codecast: Create a RubyGem 17: Finish the refresh_seed! method
This is the 17th video in the NerdDice create a RubyGem series. In this video, Mike finishes refactoring the specs from the previous videos and then comments out the refresh_seed! method and simulates redoing test-driven development to ensure the specs all fail without the code and pass with it. He refactors longer methods out into…
-
Codecast: Create a RubyGem 16: Refactor specs with a support module and shared examples
This is the 16th video in the NerdDice create a RubyGem series. In this video, Mike refactors the specs from the previous video using a module in the spec/support directory and uses RSpec shared examples to avoid multiple expectations in the same “it” block. He also fixes some RuboCop violations from the previous 2 videos.
-
Codecast: Create a RubyGem 15: Add specs to cover the NerdDice.refesh_seed! scenarios
This is the 15th video in the NerdDice create a RubyGem series. In this video, Mike finishes up writing specs for the other scenarios (seed options, technique option) of the refresh_seed! method.
-
Codecast: Create a RubyGem 14: Add a method to refresh the generator seed
This is the 14th video in the NerdDice create a RubyGem series. In this video, Mike adds a method to (NerdDice.refresh_seed!) to reset the seed on the random number generators and writes the specs for the no argument (default) scenario.
-
Codecast: Create a RubyGem 13: Add branding and adjust class methods
This is the 13th video in the NerdDice create a RubyGem series. In this video, Mike adds the NerdDice logo to the GitHub repo and adjusts some of the class methods so that the execute_die_roll method is public and directly covered by specs. Also due to the release of Ruby 3, the securerandom gem is…
-
Codecast: Create a RubyGem 12: Apply generator configuration
This is the 12th video in the NerdDice create a RubyGem series. In this video, Mike takes the configuration that was developed in video 10 (Make the gem configurable) and applies it to the total_dice method so that users can specify their preferred random number generation method. We also take this opportunity to refactor repeated…
-
Codecast: Create a RubyGem 11: Ruby Pseudo-Random Number Generation
This is the 11th video in the NerdDice create a RubyGem series. In this video, Mike provides an overview of the pseudo-random number generation options in Ruby (Random.rand(), Kernel.rand(), Random.new(), SecureRandom.rand()) as well as a demonstration of the determined and replayable order of random events if the seed is known.
-
Ruby 3 released! Nerd Christmas and Real Christmas
Merry Christmas 2020 from Stateless Code! In this video, Mike turns the camera around for a Christmas message and then we look at the newly-released Ruby 3.0. This video includes: Overview of the release notes Pasting code into IRB. (A comparison of Ruby 2.7 and Ruby 3) Using Ruby 3 with our NerdDice gem Trying…