Custom matcher gem naming and namespace?

36 views
Skip to first unread message

Robb Shecter

unread,
Jan 5, 2014, 2:06:46 PM1/5/14
to rs...@googlegroups.com
I have custom matchers for testing web services such as checking the SSL certificate installation. I'm not quite sure how to best name this:

  • rspec-webservice?
  • rspec-matchers-webservice?
  • rspec_webservice?
  • rspec-dogweather?  (My github name)

... or something else? The naming guidelines don't quite seem to address this case:

rspec-webservice seems correct because I am "adding functionality to another gem". But this will correspond to the gem residing in RSpec::Webservice, and I'm not the maintainer of RSpec, and so a naming conflict can arise.

rspec-matchers-webservice is a possibility because that seems to be how the RSpec library itself is organized.

rspec_webservice is a safe option, because it will simply be in its own root namespace (RSpecWebservice), and conflicts will be ruled out because the rubygems system will ensure that this name cannot be used for another gem.

 rspec-dogweather because it doesn't greedily use a generic term?

Myron Marston

unread,
Jan 6, 2014, 3:26:57 PM1/6/14
to rs...@googlegroups.com
If your library is meant to only provide matchers (and not other functionality), I'd recommend `rspec-webservice_matchers` (with the `RSpec::WebserviceMatchers` namespace).  This is simliar to the recently extacted https://github.com/rspec/rspec-collection_matchers gem.

HTH,
Myron

Robb Shecter

unread,
Jan 8, 2014, 1:22:38 AM1/8/14
to rs...@googlegroups.com
Thanks! I appreciate the pointer. I've begun the project: https://github.com/dogweather/rspec-webservice_matchers
Reply all
Reply to author
Forward
0 new messages