Permalink
Browse files

Simplify Rakefile, README, etc

  • Loading branch information...
1 parent a367b83 commit 5c5e0ea27f00994f36069a942dbec26708ac056c @ianwhite committed Feb 6, 2009
Showing with 42 additions and 157 deletions.
  1. 0 CHANGELOG → History.txt
  2. 0 MIT-LICENSE → License.txt
  3. +5 −7 README.rdoc
  4. +13 −41 Rakefile
  5. +0 −59 SPECDOC
  6. 0 TODO → Todo.txt
  7. +24 −50 garlic.rb
File renamed without changes.
File renamed without changes.
View
@@ -24,14 +24,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.
View
@@ -16,40 +16,23 @@ 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|
@@ -58,22 +41,11 @@ Rake::RDocTask.new(:doc) do |t|
t.title = "#{plugin_name}"
t.template = ENV['RDOC_TEMPLATE']
t.options = ['--line-numbers', '--inline-source']
- t.rdoc_files.include('README.rdoc', '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
View
59 SPECDOC
@@ -1,59 +0,0 @@
-
-AController < TestController; inherit_views (the class)
-- should be inherit views
-- should have inherit view paths == ['a']
-
-AController < TestController; inherit_views (an instance)
-- should be inherit views
-- should have inherit view paths == ['a']
-- GET :in_abc should render a/in_abc
-- GET :in_a should render a/in_a
-- GET :in_ab should render a/in_ab
-- GET :render_non_existent_partial should raise ActionView::TemplateError
-- GET :render_non_existent_template should raise ActionView::MissingTemplate
-
-BController < TestController; inherit_views 'a' (the class)
-- should be inherit views
-- should have inherit view paths == ['b', 'a']
-
-BController < TestController; inherit_views 'a' (an instance)
-- should be inherit views
-- should have inherit view paths == ['b', 'a']
-- GET :in_first should render a/in_a
-- GET :in_ab should render b/in_ab
-- GET :in_b should render b/in_b
-- GET :in_abc should render b/in_abc
-- GET :partial_in_bc should render b/partial_in_bc & b/_partial_in_bc
-- GET :partial_in_b should render b/partial_in_b & b/_partial_in_b
-- GET :collection_in_bc should render b/collection_in_bc then b/_partial_in_bc
-
-CController < BController (the class)
-- should be inherit views
-- should have inherit view paths == ['c', 'b', 'a']
-
-CController < BController (an instance)
-- should be inherit views
-- should have inherit view paths == ['c', 'b', 'a']
-- GET :in_a should render a/in_a
-- GET :in_ab should render b/in_ab
-- GET :in_b should render b/in_b
-- GET :in_abc should render c/in_abc
-- GET :in_c should render c/in_c
-- GET :partial_in_bc should render b/partial_in_bc then c/_partial_in_bc
-- GET :partial_in_b should render b/partial_in_b & b/_partial_in_b
-- GET :collection_in_bc should render b/collection_in_bc then c/_partial_in_bc
-
-DController < AController; inherit_views 'other' (the class)
-- should be inherit views
-- should have inherit view paths == ['d', 'other', 'a']
-
-DController < AController; inherit_views 'other' (an instance)
-- should be inherit views
-- should have inherit view paths == ['d', 'other', 'a']
-
-NormalController
-- GET :partial_from_c should render normal/partial_from_c, then c/_partial_in_bc
-
-Finished in 0.242443 seconds
-
-37 examples, 0 failures
View
File renamed without changes.
View
@@ -1,58 +1,32 @@
garlic do
repo 'inherit_views', :path => '.'
- repo 'rails', :url => 'git://github.com/rails/rails' #, :local => "~/dev/vendor/rails"
- repo 'rspec', :url => 'git://github.com/dchelimsky/rspec' #, :local => "~/dev/vendor/spec"
- repo 'rspec-rails', :url => 'git://github.com/dchelimsky/rspec-rails' #, :local => "~/dev/vendor/spec"
-
- # these are for testing rails-2.0-2.1 branch
- repo 'ianwhite-rspec', :url => 'git://github.com/ianwhite/rspec' #, :local => "~/dev/ianwhite/spec"
- repo 'ianwhite-rspec-rails', :url => 'git://github.com/ianwhite/rspec-rails' #, :local => "~/dev/ianwhite/spec"
-
+ repo 'rails', :url => 'git://github.com/rails/rails'
+ repo 'rspec', :url => 'git://github.com/dchelimsky/rspec'
+ repo 'rspec-rails', :url => 'git://github.com/dchelimsky/rspec-rails'
- # for target, default repo is 'rails', default branch is 'master'
- target '2.2-stable', :branch => 'origin/2-2-stable' do
- prepare do
- plugin 'inherit_views', :branch => 'origin/master', :clone => true
- plugin 'ianwhite-rspec', :as => 'rspec'
- plugin 'ianwhite-rspec-rails', :as => 'rspec-rails' do
- sh "script/generate rspec -f"
- end
- end
- run do
- cd "vendor/plugins/inherit_views" do
- sh "rake spec:rcov:verify"
- end
- end
- end
-
- target '2.0-stable', :branch => 'origin/2-0-stable' do
- prepare do
- plugin 'inherit_views', :branch => 'origin/rails-2.0-2.1', :clone => true
- plugin 'ianwhite-rspec', :as => 'rspec'
- plugin 'ianwhite-rspec-rails', :as => 'rspec-rails' do
- sh "script/generate rspec -f"
- end
- end
- run do
- cd "vendor/plugins/inherit_views" do
- sh "rake spec"
- end
- end
- end
-
- target '2.1-stable', :branch => 'origin/2-1-stable' do
- prepare do
- plugin 'inherit_views', :branch => 'origin/rails-2.0-2.1', :clone => true
- plugin 'ianwhite-rspec', :as => 'rspec'
- plugin 'ianwhite-rspec-rails', :as => 'rspec-rails' do
- sh "script/generate rspec -f"
+ # first is rails target, last is inherit views branch
+ [
+ {:rails => 'master', :inherit_views => 'rails-2.3'},
+ {:rails => '2-2-stable', :inherit_views => 'master'},
+ {:rails => '2-1-stable', :inherit_views => 'rails-2.0-2.1'}
+ #{:rails => '2-0-stable', :inherit_views => 'rails-2.0-2.1'} rspec + raisl 2.0 is not playing nice at the moment
+ ].each do |target|
+
+ target target[:rails], :branch => "origin/#{target[:rails]}" do
+ prepare do
+ plugin 'inherit_views', :branch => "origin/#{target[:inherit_views]}", :clone => true
+ plugin 'rspec', :as => 'rspec'
+ plugin 'rspec-rails', :as => 'rspec-rails' do
+ sh "script/generate rspec -f"
+ end
end
- end
- run do
- cd "vendor/plugins/inherit_views" do
- sh "rake spec"
+ run do
+ cd "vendor/plugins/inherit_views" do
+ sh "rake rcov:verify"
+ end
end
end
+
end
-end
+end

0 comments on commit 5c5e0ea

Please sign in to comment.