Implementing Driver Ruby - ruby

This may seem like a dumb question but I cannot seem to find an answer anywhere. I ran into this Gem and it is asking to implement a driver. How would one go abouts doing that? Here is the git link
https://github.com/ozfortress/tournament-system
Again sorry for the dumb question.

You copy-paste the driver scaffold provided by the gem author somewhere into your project’s tree and implement all the empty functions needed by the gem to actually know about your game of choice.
The easiest way would be to take a test driver implemented by the gem author for tests for inspiration.

Related

Ruby Project VS Ruby Gem

I have read through Q&A/articles that explain the ideal structure of a Ruby project. I read the RubyGems guides on how to create a Ruby gem. I have just read a Q&A asking at what point a ruby project becomes a ruby gem but I can not for the life of me see the difference between the two. The structure seems to be the same. The files, where they go, everything looks the same to me. Is it how they're used? Can someone please explain the difference between the two to me?
The question that must be answered respect to 'Gemify' or not is: am I writing something that is readily reusable in a different context? If the answer is yes then your application is a candidate for 'Gemification'. If not then generally it is not worth the additional complexity to convert a Ruby project into a Gem.
For example. If one makes a CLI Ruby application that collects mortgage rates from multiple vendors and updates a database then there are two ways this could be converted into a gem.
First: You could generalise the interface/configuration and make it useful as a plugin/add-on/extension to projects written by someone needing the same or similar functionality. So someone could add the gemified version to their project and use it to do the grunt work for them and just make use of the results. This describes the most common use case for gems.
Second: However, you could also extract the framework of your CLI project layout into a generator gem for others to easily create their own CLI project layouts. This is how Rails came to be.

Which resource did you find to be the most helpful when making a gem?

Hey, seems to be a few questions on SO about making a ruby gem. I'm interested in those of you that have actually built gems, hoping for Rails3, and your experiences with resources that you have used to make a gem.
My question is the title: Which resource did you find to be the most helpful when making a gem?
Jeweler is an awesome tool that does most of the packaging / gem layout work for you. I've used it in every gem I've made.
I found that intro quite useful to get started:
http://buzaz.com/index.php/2010/01/03/how-to-build-a-ruby-gem/
You could also have a look at this Railscast:
http://railscasts.com/episodes/135-making-a-gem

What is the canonical mechanism for creating a Ruby gem?

I've looked in a lot of places - including www.rubygems.org - but can't find any tutorial that describes an easy, straightforward, technique for producing gems that doesn't rely on other (non-standard-Ruby) components, such as newgem and hoe.
I have several requirements for gem production, from the simplest case of one library file+one test file, to complex ones involving C source files and multiple utility .rb files.
All help gratefully received!
I was researching gem making recently and was also surprised that there wasn't a single, obvious way that everyone does it like how RubyGems is the one-stop shop for managing gems. I discovered that you can actually use Bundler to create gems, and I've chosen this route for my own gems. Take a look at this guide on gem development with Bundler by Radar.
look into Jeweler or one of these options:
http://ruby-toolbox.com/categories/gem_creation.html
its seems like overkill, but you don't need to use all the options, you can use it just to create the skeleton of the gem.
I've recently been looking into the same thing. Here are a few sources I found useful Walk through of a simple gem, Gem spec reference. Also I found it useful to check out large projects on github and model after them Thor's Gem spec.
Don't know if you've seen "Gemcutter Is The New Official Default RubyGem Host", but it's a good starting point. RubyGems.org is a good second stop to read Creating Your Own Gem.

Discovering capabilities of Ruby gem

The Ruby (and RoR) community publishes a large number of gems. But more often than not using these gems requires a good amount of effort, specially if one is new to Ruby. It would to be nice if Ruby experts (rockstars) share the best approaches to utilize inadequately documented gems.
Thanks
--arsh
As my manager likes to say:
The truth is in the code.
Look for examples of how others have used it, and modify as necessary.
There are frequently example directories in gems
Search the internet, people like to put this stuff in blogs
Read the docs.
Maybe posted on github
Frequently a link from the rubygems page
If installed as a gem, you can host your own server with $ gem server then go to localhost:8808 to get a list of all your installed gems, and you click the one you are interested in to see its documentation.
Look for tutorials that cover the gem
Railscasts are great for this
Many gems will have a wiki on github
Many of the more useful / cool / fun gems will be talked about in different books. You can get a lot of tutorials about how to deal with a given gem by getting a book that uses that gem to do something. The downside of this is that these kinds of books tend to go out of date pretty quickly.
Look at the code
If the code base is small, or you have a specific question about how something works, or want the truly definitive source, go check out the code.
If the code is installed as a gem, you can type $ gem environment and it will tell you your rubygems dir. Go there, cd into the gem you are interested in, check out its code in the lib directory.
Ask a mailing list
If a gem or project is large enough, it will have its own mailing list. You can usually find these by going to its homepage or reading its readme.
If not, try asking about the gem on the Ruby or the Ruby on Rails mailing lists.
You can always give your own gems a rockstar promotion. Vimeo: Zombie-chaser version 0.1: Mutation testing ... with zombies!

Ruby web spider & search engine library

I'm looking for a Ruby library or gem (or set of gems) which will not only do spidering, but also collect the data into, say, a database, and allow basic searches on the data (i.e. a typical web search).
I've found several spidering libraries, so that part seems well covered (I was going to try Anemone first), but I can't find anything that will take the spidered data and allow querying on it. For lack of an existing one, I was going to write something myself with Anemone.
Any suggestions?
That blog post might give you some pointers. Also, look into ferret for the search part.
there is a ruby gem may help you:
http://spidr.rubyforge.org/
There are lots of great stuff on github.com

Resources