Skip to content

Commit

Permalink
Simplify Rakefile, README, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Feb 6, 2009
1 parent af2c69b commit 4cb912c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 110 deletions.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion README

This file was deleted.

12 changes: 5 additions & 7 deletions README.rdoc
Expand Up @@ -28,14 +28,12 @@ Example:
# will look for views in 'views/bar', then 'views/foo', then 'view/application'
end

See Ardes::InheritViews for more details
See InheritViews for more details

=== Specs and Coverage
* {SPECDOC}[link:files/SPECDOC.html] lists the specifications
* {RSpec Report}[link:rspec_report.html] is a report of spec pass/fails
* {RCov Report}[link:coverage/index.html] is the rcov report

=== Testing
=== Testing & CI

RSpec is used for testing, so the tests are in <tt>spec/</tt> rather than
<tt>test/</tt> Do rake --tasks for more details.

{garlic}[http://github.com/ianwhite/garlic] is used for CI, see garlic.rb for details on
what versions of rails are tested.
56 changes: 14 additions & 42 deletions Rakefile
Expand Up @@ -16,64 +16,36 @@ Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_opts = ["--colour"]
end

namespace :spec do
desc "Generate RCov report for #{plugin_name}"
Spec::Rake::SpecTask.new(:rcov) do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.rcov = true
t.rcov_dir = 'doc/coverage'
t.rcov_opts = ['--text-report', '--exclude', "spec/,rcov.rb,#{File.expand_path(File.join(File.dirname(__FILE__),'../../..'))}"]
end

namespace :rcov do
desc "Verify RCov threshold for #{plugin_name}"
RCov::VerifyTask.new(:verify => "spec:rcov") do |t|
t.threshold = 100.0
t.index_html = File.join(File.dirname(__FILE__), 'doc/coverage/index.html')
end
end

desc "Generate specdoc for #{plugin_name}"
Spec::Rake::SpecTask.new(:doc) do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ["--format", "specdoc:SPECDOC"]
end
desc "Generate RCov report for #{plugin_name}"
Spec::Rake::SpecTask.new(:rcov) do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.rcov = true
t.rcov_dir = 'doc/coverage'
t.rcov_opts = ['--text-report', '--exclude', "spec/,rcov.rb,#{File.expand_path(File.join(File.dirname(__FILE__),'../../..'))}"]
end

namespace :doc do
desc "Generate html specdoc for #{plugin_name}"
Spec::Rake::SpecTask.new(:html => :rdoc) do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ["--format", "html:doc/rspec_report.html", "--diff"]
end
namespace :rcov do
desc "Verify RCov threshold for #{plugin_name}"
RCov::VerifyTask.new(:verify => "spec:rcov") do |t|
t.threshold = 100.0
t.index_html = File.join(File.dirname(__FILE__), 'doc/coverage/index.html')
end
end

task :rdoc => :doc
task "SPECDOC" => "spec:doc"

desc "Generate rdoc for #{plugin_name}"
Rake::RDocTask.new(:doc) do |t|
t.rdoc_dir = 'doc'
t.main = 'README'
t.main = 'README.rdoc'
t.title = "#{plugin_name}"
t.template = ENV['RDOC_TEMPLATE']
t.options = ['--line-numbers', '--inline-source']
t.rdoc_files.include('README', 'SPECDOC', 'MIT-LICENSE')
t.rdoc_files.include('README.rdoc', 'History.txt', 'License.txt')
t.rdoc_files.include('lib/**/*.rb')
end

namespace :doc do
desc "Generate all documentation (rdoc, specdoc, specdoc html and rcov) for #{plugin_name}"
task :all => ["spec:doc:html", "spec:doc", "spec:rcov", "doc"]
end

task :cruise do
# run the garlic task, capture the output, if succesful make the docs and copy them to ardes
sh "garlic clean && mkdir -p .garlic && (garlic all > .garlic/report.txt)"
`scp -i ~/.ssh/ardes .garlic/report.txt ardes@ardes.com:~/subdomains/plugins/httpdocs/doc/#{plugin_name}_garlic_report.txt`
cd ".garlic/2.2-stable/vendor/plugins/#{plugin_name}" do
`rake doc:all`
`scp -i ~/.ssh/ardes -r doc ardes@ardes.com:~/subdomains/plugins/httpdocs/doc/#{plugin_name}`
end
puts "The build is GOOD"
end
59 changes: 0 additions & 59 deletions SPECDOC

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion garlic.rb
Expand Up @@ -23,7 +23,7 @@
end
run do
cd "vendor/plugins/inherit_views" do
sh "rake spec:rcov:verify"
sh "rake rcov:verify"
end
end
end
Expand Down

0 comments on commit 4cb912c

Please sign in to comment.