-
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.
-
Codecast: Create a RubyGem 10: Make the gem configurable
This is the 10th video in the NerdDice create a RubyGem series. In this video, Mike adds a configuration class to NerdDice, allowing users to supply configuration for different properties of the gem and customize use of it using a common Ruby design pattern.
-
Codecast: Create a RubyGem 09: Fix RuboCop issues and release a patch version
This is the 9th video in the NerdDice create a RubyGem series. In this video, Mike takes on one of the issues in the issue backlog, fixes the RuboCop issues, does a bit of refactoring, backports the changes to 0.1.x and releases a new patch version of the gem (0.1.1).