update the template so the right files get watched

This commit is contained in:
John Bintz 2011-06-18 18:20:49 -04:00
parent 288a8ea403
commit 2226a3025e
6 changed files with 40 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 rake spec"

View File

@ -6,6 +6,7 @@ gemspec
require 'rbconfig' require 'rbconfig'
gem 'guard' gem 'guard'
gem 'guard-rspec' gem 'guard-rspec'
gem 'rake'
if RbConfig::CONFIG['host_os'] =~ /darwin/ if RbConfig::CONFIG['host_os'] =~ /darwin/
gem 'growl' gem 'growl'

View File

@ -1,8 +1,8 @@
It's a [Guard](http://github.com/guard/guard) for the [Rocco](http://github.com/rtomayko/rocco) documentation system! It's a [Guard](http://github.com/guard/guard) for the [Rocco](http://github.com/rtomayko/rocco) documentation system!
guard 'rocco' do guard 'rocco' do
watch(%r{app/.*\.(rb|coffee)}) watch(%r{^app/.*\.(rb|coffee)$})
watch(%r{lib/.*\.rb}) watch(%r{^lib/.*\.rb$})
end end
Only one option for now: Only one option for now:

View File

@ -2,3 +2,32 @@ include Rake::DSL if defined?(Rake::DSL)
require 'bundler' require 'bundler'
Bundler::GemHelper.install_tasks Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
namespace :spec do
desc "Run on three Rubies"
task :platforms do
current = %x{rvm-prompt v}
fail = false
%w{1.8.7 1.9.2 ree}.each do |version|
puts "Switching to #{version}"
Bundler.with_clean_env do
system %{bash -c 'source ~/.rvm/scripts/rvm && rvm #{version} && bundle exec rake spec'}
end
if $?.exitstatus != 0
fail = true
break
end
end
system %{rvm #{current}}
exit (fail ? 1 : 0)
end
end
task :default => 'spec:platforms'

View File

@ -1,5 +1,6 @@
require 'rocco' require 'rocco'
require 'guard/guard' require 'guard/guard'
require 'guard/watcher'
require 'fileutils' require 'fileutils'
module Guard module Guard

View File

@ -1,6 +1,6 @@
guard 'rocco' do guard 'rocco' do
# For Rails 3.0.x and 3.1 # For Rails 3.0.x and 3.1
watch(%r{app/.*\.(rb|coffee)}) watch(%r{^app/.*\.(rb|coffee)$})
watch(%r{lib/.*\.rb}) watch(%r{^lib/.*\.rb$})
end end