{"id":19063253,"url":"https://github.com/delner/blue_apron","last_synced_at":"2026-06-22T13:31:44.823Z","repository":{"id":151359940,"uuid":"53453521","full_name":"delner/blue_apron","owner":"delner","description":"Rock Paper Scissors code sample","archived":false,"fork":false,"pushed_at":"2016-03-08T23:46:42.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T02:41:16.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/delner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-08T23:46:28.000Z","updated_at":"2016-03-08T23:46:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"64af17da-c2e4-4f81-b3ea-06f9c413f8b4","html_url":"https://github.com/delner/blue_apron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/delner/blue_apron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fblue_apron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fblue_apron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fblue_apron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fblue_apron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delner","download_url":"https://codeload.github.com/delner/blue_apron/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fblue_apron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34651747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T00:29:24.367Z","updated_at":"2026-06-22T13:31:44.799Z","avatar_url":"https://github.com/delner.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blue Apron: Rock Paper Scissors\n###### Requires Ruby 2.3.0\n\nSimulates a game of rock paper scissors.\n\n## Installation\n\nTo use as a gem, add this line to your application's Gemfile:\n\n    gem 'blue_apron'\n\nAnd then install with Bundler:\n\n    $ bundle\n\nOr install it manually with:\n\n    $ gem install blue_apron\n\n## Usage\n\nRun the game from terminal using the `rps.rb` script:\n\n    $ ruby rps.rb \u003cstrategy\u003e\n\nWhere `\u003cstrategy\u003e` can be `favorite` or `last`.\n\nPress `r`, `p`, `s` at prompts to play a rock, paper or scissors move, respectively. Press `x` to quit.\n\n## Testing\n\nRun some tests via\n\n    $ rspec\n\n## Developer's notes\n\nAlthough the requirements were simple, and this script could have been made much more procedural, I thought it best to showcase some use of object-oriented programming, even if it wasn't entirely necessary.\n\nI wanted to make the game more modular, and possibly extendable. With the `Moves` and `Strategies` module, it'd be pretty easy to implement additional moves and strategies as an extension of this gem, using the `#add` functions. I also thought it was a good idea to separate user input/output from the game flow itself, so that conceivably a better interface could be implemented. This proved to be a good decision, as it made it easier to drive the application from RSpec by swapping out the default terminal interface for one that could be easily used by tests.\n\nTests and code was added in TDD style, using RSpec. Most were unit tests, but I ended up adding a couple of psuedo integration tests to `game_spec.rb` to add some additional coverage.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelner%2Fblue_apron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelner%2Fblue_apron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelner%2Fblue_apron/lists"}