update the template so the right files get watched
This commit is contained in:
parent
288a8ea403
commit
2226a3025e
5
.travis.yml
Normal file
5
.travis.yml
Normal file
@ -0,0 +1,5 @@
|
||||
rvm:
|
||||
- 1.8.7
|
||||
- 1.9.2
|
||||
- ree
|
||||
script: "bundle exec rake spec"
|
1
Gemfile
1
Gemfile
@ -6,6 +6,7 @@ gemspec
|
||||
require 'rbconfig'
|
||||
gem 'guard'
|
||||
gem 'guard-rspec'
|
||||
gem 'rake'
|
||||
|
||||
if RbConfig::CONFIG['host_os'] =~ /darwin/
|
||||
gem 'growl'
|
||||
|
@ -1,8 +1,8 @@
|
||||
It's a [Guard](http://github.com/guard/guard) for the [Rocco](http://github.com/rtomayko/rocco) documentation system!
|
||||
|
||||
guard 'rocco' do
|
||||
watch(%r{app/.*\.(rb|coffee)})
|
||||
watch(%r{lib/.*\.rb})
|
||||
watch(%r{^app/.*\.(rb|coffee)$})
|
||||
watch(%r{^lib/.*\.rb$})
|
||||
end
|
||||
|
||||
Only one option for now:
|
||||
|
29
Rakefile
29
Rakefile
@ -2,3 +2,32 @@ include Rake::DSL if defined?(Rake::DSL)
|
||||
|
||||
require 'bundler'
|
||||
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'
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
require 'rocco'
|
||||
require 'guard/guard'
|
||||
require 'guard/watcher'
|
||||
require 'fileutils'
|
||||
|
||||
module Guard
|
||||
|
@ -1,6 +1,6 @@
|
||||
guard 'rocco' do
|
||||
# For Rails 3.0.x and 3.1
|
||||
watch(%r{app/.*\.(rb|coffee)})
|
||||
watch(%r{lib/.*\.rb})
|
||||
watch(%r{^app/.*\.(rb|coffee)$})
|
||||
watch(%r{^lib/.*\.rb$})
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user