public
Description: response for lets you decorate your actions respond_to blocks
Homepage: http://blog.ardes.com/response_for
Clone URL: git://github.com/ianwhite/response_for.git
Click here to lend your support to: response_for and make a donation at www.pledgie.com !
Making cruise task push docs to plugins.ardes.com on success
ianwhite (author)
Mon Sep 22 22:06:02 -0700 2008
commit  bea7a88e29a2ca16edf88b60038615157d78e564
tree    13805c69324353061f630ffe3f1050525b24f2ec
parent  db80cbb03d000b44e9275e24c6d5d1663e417c25
...
2
3
4
 
...
2
3
4
5
0
@@ -2,3 +2,4 @@
0
 doc/*
0
 garlic
0
 garlic.rb
0
+garlic_report.txt
...
6
7
8
9
 
10
11
12
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
15
16
...
6
7
8
 
9
10
11
12
 
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
0
@@ -6,11 +6,31 @@ require 'spec/rake/spectask'
0
 require 'spec/rake/verify_rcov'
0
 require 'rake/rdoctask'
0
 
0
-plugin_name = File.basename(File.dirname(__FILE__))
0
+plugin_name = 'respond_to'
0
 
0
 task :default => :spec
0
 
0
-task :cruise => "garlic:all"
0
+task :cruise do
0
+  # run the garlic task, capture the output, if succesful make the docs and copy them to ardes
0
+  begin
0
+    sh "rake garlic:all > garlic_report.txt"
0
+    
0
+    # send abridged rpeort
0
+    report = File.read('garlic_report.txt').sub(/^.*?==========/m, '==========')
0
+    report = "garlic report for #{plugin_name}\n#{`git log -n 1 --pretty=oneline --no-color`}\n" + report
0
+    File.open('garlic_report.txt', 'w+') {|f| f << report }
0
+    sh "scp -i ~/.ssh/ardes garlic_report.txt ardes@ardes.com:~/subdomains/plugins/httpdocs/doc/#{plugin_name}_garlic_report.txt"
0
+
0
+    # build doc and send that
0
+    cd "garlic/work/edge/vendor/plugins/#{plugin_name}" do
0
+      sh "rake doc:all"
0
+      sh "scp -i ~/.ssh/ardes -r doc ardes@ardes.com:~/subdomains/plugins/httpdocs/doc/inherit_views"
0
+    end
0
+    
0
+  ensure
0
+    puts File.read('garlic_report.txt')
0
+  end
0
+end
0
 
0
 desc "Run the specs for #{plugin_name}"
0
 Spec::Rake::SpecTask.new(:spec) do |t|

Comments