{"id":18355382,"url":"https://github.com/midwire/march_hare_mock","last_synced_at":"2025-07-19T13:32:34.146Z","repository":{"id":23604838,"uuid":"26973776","full_name":"midwire/march_hare_mock","owner":"midwire","description":"MarchHare/RabbitMQ mock class in JRuby. Useful for mocking MarchHare usage in test code.","archived":false,"fork":false,"pushed_at":"2014-11-21T21:35:48.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-10T01:47:43.285Z","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/midwire.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}},"created_at":"2014-11-21T19:04:23.000Z","updated_at":"2014-11-21T21:35:48.000Z","dependencies_parsed_at":"2022-08-21T19:40:09.756Z","dependency_job_id":null,"html_url":"https://github.com/midwire/march_hare_mock","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/midwire/march_hare_mock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwire%2Fmarch_hare_mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwire%2Fmarch_hare_mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwire%2Fmarch_hare_mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwire%2Fmarch_hare_mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midwire","download_url":"https://codeload.github.com/midwire/march_hare_mock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwire%2Fmarch_hare_mock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265942569,"owners_count":23853294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-05T22:06:43.713Z","updated_at":"2025-07-19T13:32:34.101Z","avatar_url":"https://github.com/midwire.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MarchHareMock\n\n**Version: 0.0.1**\n\nMarchHareMock is a simple mocking library for those using JRuby and the MarchHare gem for RabbitMQ messaging. Inspired by the [BunnyMock](https://github.com/midwire/bunny_mock) gem.\n\nMarchHareMock does not cover all of the methods of MarchHare. It currently only mocks the behavior we have required for our immediate needs, which is mainly creating and binding queues and exchanges, and publishing/subscribing messages.\n\nFeel free to fork it to add more behavior mocking and send me a pull request, just \"Don't Mock the March Hare\":\n\n**Warning:** This March Hare may mock ***you***!\n![Don't Mock the March Hare!](http://animals.ekstrax.com/wp-content/uploads/2014/05/Funny-Rabbit-Pictures-25.jpg \"Don't Mock the March Hare!\")\n\n## Installation\n\nAdd the following to your application's Gemfile:\n\n```ruby\ngroup :test do\n  gem 'march_hare_mock'\n  # ... other gems as necessary\nend\n```\n\nAnd then execute:\n\n    bundle install\n\nOr install it into your global gemspace as:\n\n    gem install march_hare_mock\n\n## Usage\n\nSince this project is intended as a simple way to help test your collaboration with MarchHare/RabbitMQ, it does not really opereate as a real queue, but it _does_ support receiving messages into a queue, and reading them out. The main thing to be aware of is that the `MarchHareMock::Queue#subscribe` method does not block waiting for messages, consumes all queued messages, and returns when there are no more messages. This differs from the behavior of the real MarchHare.\n\nSee the first \"integration\" test case in `spec/lib/march_hare_mock_spec.rb` for a quick example of how to use MarchHareMock.\n\n## Authors\n\n* Chris Blackburn - https://midwire.github.io\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/march_hare_mock/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n# License\n\nThis code is licensed under [The MIT License](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidwire%2Fmarch_hare_mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidwire%2Fmarch_hare_mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidwire%2Fmarch_hare_mock/lists"}