more changes and testing stuff

This commit is contained in:
John Bintz 2011-06-06 09:49:37 -04:00
parent 761de5a80a
commit 76c5d0e850
5 changed files with 14 additions and 4 deletions

5
.travis.yml Normal file
View File

@ -0,0 +1,5 @@
rvm:
- 1.8.7
- 1.9.2
- ree
script: "bundle exec spec"

View File

@ -2,7 +2,7 @@ source "http://rubygems.org"
# Specify your gem's dependencies in guard-jasmine-headless-webkit.gemspec # Specify your gem's dependencies in guard-jasmine-headless-webkit.gemspec
gemspec gemspec
gem 'guard' gem 'guard', :git => 'https://github.com/guard/guard.git'
gem 'rspec' gem 'rspec'
gem 'mocha' gem 'mocha'
gem 'rake', '0.8.7' gem 'rake', '0.8.7'

View File

@ -17,6 +17,7 @@ home folder's `.jasmine-headless-webkit` file.
* `:all_on_start => false` to not run everything when starting, just like `guard-rspec`. * `:all_on_start => false` to not run everything when starting, just like `guard-rspec`.
* `:run_before => "<command to run>` to run a command before running specs. If the command fails, the test run stops. * `:run_before => "<command to run>` to run a command before running specs. If the command fails, the test run stops.
* `:jammit => true` to run `jammit -f 2>/dev/null` before the tests for the current file change are run. * `:jammit => true` to run `jammit -f 2>/dev/null` before the tests for the current file change are run.
* `:valid_extensions => %w{` to run `jammit -f 2>/dev/null` before the tests for the current file change are run.
## What's the deal with `newest_js_file`? ## What's the deal with `newest_js_file`?

View File

@ -7,6 +7,10 @@ task :push_everywhere do
system %{git push guard master} system %{git push guard master}
end end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
namespace :spec do namespace :spec do
desc "Run on three Rubies" desc "Run on three Rubies"
task :platforms do task :platforms do
@ -15,8 +19,9 @@ namespace :spec do
fail = false fail = false
%w{1.8.7 1.9.2 ree}.each do |version| %w{1.8.7 1.9.2 ree}.each do |version|
puts "Switching to #{version}" puts "Switching to #{version}"
system %{rvm #{version}} Bundler.with_clean_env do
system %{bundle exec rspec spec} system %{bash -c 'source ~/.rvm/scripts/rvm && rvm #{version} && bundle exec rake spec'}
end
if $?.exitstatus != 0 if $?.exitstatus != 0
fail = true fail = true
break break

View File

@ -73,7 +73,6 @@ module Guard
class Dsl class Dsl
def newest_js_file(path) def newest_js_file(path)
p binding
Dir[path + '*.{js,coffee}'].sort { |left, right| File.mtime(right) <=> File.mtime(left) }.first Dir[path + '*.{js,coffee}'].sort { |left, right| File.mtime(right) <=> File.mtime(left) }.first
end end
end end