Archives for the ‘ruby’ Category

XSLT and Ruby/Rails

While adding REST support for Libraryfind, I found that I wanted to provide an output in XML, but that could also provide HTML if an XSLT was attached.  In Rails, generating XML files is actually pretty easy.  In Rails, output is specified in views.  HTML views are created using a .rhtml extension, while xml views […]

LibraryFind installation: dealing with problems relating to openssl and rubygems

I was installing LibraryFind on a server at Willamette University the other day for testing purposes, and ran into something that I had never seen before.  While setting up the dependencies on the test server, I found that the current version of ruby found in the distro’s YUM repository was old (1.8.5), so I decided […]

LibraryFind 0.8.5: threading and XSLT and REST, Oh my

At present, I’m wrapping up the back-end changes to what will be LibraryFind 0.8.5.  Yup, we’ll be skipping 0.8.4 in part because I’d like the release point to represent the broadness of the changes being made.  In fact, had the UI portions of the code been modified to completely support the new back-end searching, we’d […]

LibraryFind and Mobile Services

One of the things I was really impressed with while attending DLF was the presentation on the lightweight web platform being built at NCSU.  Leveraging their endeca catalog, the folks at NCSU have been able to produce a set of REST-based api for querying the catalog.  With those services, they’ve designed a mobile interface and […]

LibraryFind 0.8.4 upcoming changes

At some point, I’ll likely move this to the LibraryFind blog.  I just realized that I couldn’t remember my login information to post to the blog — so, I’ll post here.
I’m not exactly sure if the UI changes will be made in 0.8.4 to incorporate the new spawning/pinging (I think that they will), but the […]

LibraryFind 0.8.3 tagged

Jeremy I’m sure will get the tgz version of the file up and ready on the LF site soon, but the 0.8.3 instance of libraryfind has been tagged.  If you are interested in finding out more about libraryfind, see: http://www.libraryfind.org.
 
–TR

LibraryFind code refactoring

I’ve been spending time this weekend refactoring a major piece of the LibraryFind code partly in an effort to make it easier to add protocol classes.  This change affects a lot of the current API code-base, but the biggest change comes in the meta_search.rb file where nearly all the business logic relating to searching, etc. […]

Ruby and Date classes

I’d seen this somewhere before, but thought I’d benchmark it to see if it was true.  Ruby has 3 classes for doing dates.  There is Date, DateTime and Time classes.  In languages like C# and PHP, the equivalent DateTime class is the one that is generally utilized to do date/time manipulations.  However, in Ruby, DateTime […]

Why I miss strong variable typing in scripting languages

I love strong typed languages.  Languages that require you to define all variables before use.  They save me from myself, or, from my attrocious spelling.  I was working on LibraryFind, OSU’s opensource metasearch service, three days ago making a few tweaks and changes.  One of the things that this tool has that is somewhat researchy […]

Google Spell API — Ruby

Someone had asked if I could post the ruby code we use to interact with the google toolbar spell api.  Well, here it is.

require ‘net/https’
require ‘uri’
require ‘rexml/document’

class GoogleSpell
def GetWords(phrase)
results = []
x = 0
i = 0

[…]