summaryrefslogtreecommitdiff
path: root/Rudyfile
diff options
context:
space:
mode:
authordelano <delano@solutious.com>2009-08-11 12:50:17 -0400
committerdelano <delano@solutious.com>2009-08-11 12:50:17 -0400
commit833147e0525f0b25bc6ecea99bf1e59c2c3c22ee (patch)
treed01525de2ec24e07b44bd5d5fdcb0e0f3b6d3ef6 /Rudyfile
parent3d946cccca05534498ad48286cfc4d3a7dc8f4e0 (diff)
downloadnet-ssh-833147e0525f0b25bc6ecea99bf1e59c2c3c22ee.tar.gz
Added Rudyfile for clean linux tests
Diffstat (limited to 'Rudyfile')
-rw-r--r--Rudyfile110
1 files changed, 110 insertions, 0 deletions
diff --git a/Rudyfile b/Rudyfile
new file mode 100644
index 0000000..2028574
--- /dev/null
+++ b/Rudyfile
@@ -0,0 +1,110 @@
+# Rudyfile
+#
+# This configuration is used to test installing
+# and running net-ssh on a clean machine.
+#
+# Usage:
+#
+# $ rudy -vv startup
+# $ rudy -vv testsuite
+# $ rudy -vv shutdown
+#
+# Requires: Rudy 0.9 (http://code.google.com/p/rudy/)
+#
+
+defaults do
+ color true
+ environment :test
+ role :netssh
+end
+
+machines do
+ region :'us-east-1' do
+ ami 'ami-e348af8a' # Alestic Debian 5.0, 32-bit (US)
+ end
+ env :test do
+ role :netssh do
+ user :root
+ end
+ end
+end
+
+commands do
+ allow :apt_get, "apt-get", :y, :q
+ allow :gem_install, "/usr/bin/gem", "install", :n, '/usr/bin', :y, :V, "--no-rdoc", "--no-ri"
+ allow :gem_sources, "/usr/bin/gem", "sources"
+ allow :gem_uninstall, "/usr/bin/gem", "uninstall", :V
+ allow :update_rubygems
+ allow :rm
+end
+
+routines do
+
+ testsuite do
+ before :sysupdate, :installdeps, :install_gem
+
+ remote :root do
+ directory_upload 'test', '/tmp/'
+ cd '/tmp'
+ ruby :I, 'lib/', :I, 'test/', :r, 'rubygems', 'test/test_all.rb'
+ end
+
+ after :install_rubyforge, :install_github
+ end
+
+ install_rubyforge do
+ remote :root do
+ gem_install 'net-ssh', '--version', '2.0.7'
+ gem_install 'net-ssh'
+ end
+ end
+
+ install_github do
+ remote :root do
+ gem_sources :a, "http://gems.github.com"
+ gem_install 'net-ssh-net-ssh'
+ end
+ end
+
+ install_gem do
+ before :package_gem
+ remote :root do
+ disable_safe_mode
+ file_upload "pkg/net-ssh-*.gem", "/tmp/"
+ gem_install "/tmp/net-ssh-*.gem"
+ end
+ end
+
+ package_gem do
+ local do
+ rm :r, :f, 'pkg'
+ rake 'package'
+ end
+ end
+
+ remove do
+ remote :root do
+ gem_uninstall 'net-ssh'
+ end
+ end
+
+ installdeps do
+ remote :root do
+ gem_install "rye", "test-unit", "mocha"
+ rye 'authorize-local'
+ end
+ end
+
+ sysupdate do
+ remote :root do
+ apt_get "update"
+ apt_get "install", "build-essential", "git-core"
+ apt_get "install", "ruby1.8-dev", "rdoc", "libzlib-ruby", "rubygems"
+ mkdir :p, "/var/lib/gems/1.8/bin" # Doesn't get created, but causes Rubygems to fail
+ gem_install "builder", "session"
+ gem_install 'rubygems-update', "-v=1.3.4" # circular issue with 1.3.5 and hoe
+ update_rubygems
+ end
+ end
+end
+