Yeah, I actually tried running those rake tasks, but it did not work. Maybe because of a ruby 1.8.6 issue somehow? Contrary to what the error messages imply, I do certainly have the rspec gem installed on this machine -- but it's rspec 1.3.0, maybe that's bad?
[rochkind@xs001 parslet]$ rake spec:unit --trace (in /home/rochkind/parslet) rake aborted! no such file to load -- rspec/core/rake_task /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' [Same thing from "rake spec". ] I did try to stop in the IRC channel yesterday, but it seemed nobody was around when I was. I think our timezones may be too out of sync for synchronous communication. What I am working on: Parse somewhat google-like search queries, such as: "one -two +three (a OR b OR c) NOT d" Translate them to a certain kind of query against Solr (there are some choices you could make there about how to translate, I have made some). The code is actually in a Rails engine plugin (Rails2 at the moment, sadly) meant to work with a particular Rails2 application (called Blacklight), but is written in a reasonably de-coupled way so if someone was interested it could probably be extracted into it's own gem. Still a work in progress (and no documentation yet), but here's what it is so far, if you want to check it out. The first file is the Parslet grammar (which is pretty clean, I think). The second file is my method of transforming into an Object tree and the definitions for those objects, including output translation methods (getting a bit sketchy, I might have been better off trying to do something with Parslet::Transformer, but just couldn't wrap my head around it), then three files of specs. https://github.com/projectblacklight/blacklight_advanced_search/blob/parsing_nesting/lib/parsing_nesting/grammar.rb https://github.com/projectblacklight/blacklight_advanced_search/blob/parsing_nesting/lib/parsing_nesting/tree.rb https://github.com/projectblacklight/blacklight_advanced_search/blob/parsing_nesting/spec/parsing_nesting/consuming_spec.rb https://github.com/projectblacklight/blacklight_advanced_search/blob/parsing_nesting/spec/parsing_nesting/build_tree_spec.rb https://github.com/projectblacklight/blacklight_advanced_search/blob/parsing_nesting/spec/parsing_nesting/to_solr_spec.rb On 3/22/2011 3:59 AM, Kaspar Schiess wrote: > Hi Jonathan, > >> Will do, makes sense. Not sure the 'right' way to run all the tests from >> the checked out code? Can you give me a hint? > rake -T ;) > > ... > rake spec # Run all tests: Exhaustive. > rake spec:unit # Only run unit tests: Fast. > ... > > The integration tests in rake spec might provoke some failures, since > the output of the examples is tested as well. That's 'normal'. > >> We already know that Object#tap has to be added to a 1.8.6 env for >> parslet to work; I too am curious to see if all tests pass once this is >> done or not. >> >> Either way, it is in fact _working_ (once I worked around that weird >> issue at the start of this thread) for me in 1.8.6. > I guess I would try to make sure. But whatever fits your needs ;) > > More assistance can be had on the IRC channel, btw. And we might ask you > to explain what it is you're doing, out of curiosity ;) > > kaspar > > > > > >
