From 98e2f0f35ccba2e85fa3afac484f7723ee576b3c Mon Sep 17 00:00:00 2001 From: Benjamin Young Date: Mon, 7 Nov 2011 10:13:22 -0500 Subject: [PATCH 1/2] moved rspec requirement into spec task to narrow dependencies You can now run `rake jquery` and friends without installing rspec. Closes #135. --- Rakefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index 94a6a77..a19c5ea 100644 --- a/Rakefile +++ b/Rakefile @@ -1,15 +1,15 @@ require 'rake' -require 'rspec/core/rake_task' task :default => :spec -RSpec::Core::RakeTask.new(:spec) do |t| - #t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""] - t.pattern = 'test/*_spec.rb' -end - desc "Run all specs" -task :spec +task :spec do + require 'rspec/core/rake_task' + RSpec::Core::RakeTask.new(:spec) do |t| + #t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""] + t.pattern = 'test/*_spec.rb' + end +end def templated_build(name, opts={}) # Create a rule that uses the .tmpl.{pre,post} stuff to make a final, From 577f7cc4370fcaf092bb479492c352b200a4a6c8 Mon Sep 17 00:00:00 2001 From: Benjamin Young Date: Mon, 7 Nov 2011 10:17:20 -0500 Subject: [PATCH 2/2] noting rspec is only needed for testing now --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64096b5..0ed41b8 100644 --- a/README.md +++ b/README.md @@ -288,8 +288,10 @@ Or just install it as a RubyGem: ## Plugins for jQuery, Dojo, Yui, CommonJS, qooxdoo This repository lets you build modules for [jQuery][], [Dojo][], [Yui][] and -[CommonJS][] / [Node.js][] with the help of `rake`. You may need to install -rspec first by running `gem install rspec`. +[CommonJS][] / [Node.js][] with the help of `rake`. + +NOTE: The default `rake` task is only used for testing and require rspec to be +installed (see below). Run `rake jquery` to get a jQuery compatible plugin file in the `mustache-jquery/` directory. @@ -307,6 +309,8 @@ Run `rake qooxdoo` to get a qooxdoo compatible file named `qooxdoo.mustache.js`. ## Testing +NOTE: You will need to install rspec first by running `gem install rspec`. + To run the mustache.js test suite, run `rake spec`. All specs will be run first with JavaScriptCore (using `jsc`) and again with Rhino, using `java org.mozilla.javascript.tools.shell.Main`.