rick-vlad 1.2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,71 @@
1
+ require 'test/unit'
2
+ require 'stringio'
3
+ require 'vlad'
4
+
5
+ class StringIO
6
+ def readpartial(size) read end # suck!
7
+ end
8
+
9
+ module Process
10
+ def self.expected status
11
+ @@expected ||= []
12
+ @@expected << status
13
+ end
14
+
15
+ def self.waitpid2(pid)
16
+ [ @@expected.shift ]
17
+ end
18
+ end
19
+
20
+
21
+ class Rake::RemoteTask
22
+ attr_accessor :commands, :action, :input, :output, :error
23
+
24
+ Status = Struct.new :exitstatus
25
+
26
+ class Status
27
+ def success?() exitstatus == 0 end
28
+ end
29
+
30
+ def system *command
31
+ @commands << command
32
+ self.action ? self.action[command.join(' ')] : true
33
+ end
34
+
35
+ def popen4 *command
36
+ @commands << command
37
+
38
+ @input = StringIO.new
39
+ out = StringIO.new @output.shift.to_s
40
+ err = StringIO.new @error.shift.to_s
41
+
42
+ raise if block_given?
43
+
44
+ status = self.action ? self.action[command.join(' ')] : 0
45
+ Process.expected Status.new(status)
46
+
47
+ return 42, @input, out, err
48
+ end
49
+
50
+ def select reads, writes, errs, timeout
51
+ [reads, writes, errs]
52
+ end
53
+
54
+ end
55
+
56
+ class VladTestCase < Test::Unit::TestCase
57
+ undef_method :default_test
58
+
59
+ def setup
60
+ @vlad = Rake::RemoteTask
61
+ @vlad.reset
62
+ Rake.application.clear
63
+ @task_count = Rake.application.tasks.size
64
+ @vlad.set :domain, "example.com"
65
+ end
66
+
67
+ def util_set_hosts
68
+ @vlad.host "app.example.com", :app
69
+ @vlad.host "db.example.com", :db
70
+ end
71
+ end
data/vladdemo.sh ADDED
@@ -0,0 +1,64 @@
1
+ #!/bin/bash
2
+
3
+ killall mongrel svnserve 2> /dev/null
4
+
5
+ rm -rf ~/demo
6
+ mkdir ~/demo
7
+ cd ~/demo
8
+
9
+ pause() {
10
+ echo -n "waiting... hit return... "
11
+ read
12
+ echo
13
+ }
14
+
15
+ echo "Starting demo from scratch"
16
+ echo " This step creates a subversion code repo and imports a new rails app"
17
+ echo " It modifies the Rakefile to load Vlad and creates config/deploy.rb"
18
+ echo
19
+ pause
20
+
21
+ svnadmin create svnrepo
22
+ echo "anon-access = write" >> svnrepo/conf/svnserve.conf
23
+
24
+ svnserve -d --foreground -r svnrepo --listen-host localhost &
25
+
26
+ rails mydemoapp
27
+
28
+ cd mydemoapp
29
+
30
+ echo "require 'rubygems'
31
+ require 'vlad'
32
+ Vlad.load" >> Rakefile
33
+
34
+ echo "set :code_repo, 'svn://localhost/blah'
35
+ set :domain, 'localhost'
36
+ set :deploy_to, '/Users/ryan/demo/website'
37
+ set :web_command, 'sudo apachectl'" > config/deploy.rb
38
+
39
+ svn import -m Added . svn://localhost/blah
40
+
41
+ echo
42
+ echo "Here are the tasks available:"
43
+ echo
44
+
45
+ rake -T vlad
46
+
47
+ echo
48
+ echo "The next step deploys and fires up the application"
49
+ echo
50
+ pause
51
+
52
+ rake -t vlad:setup vlad:update vlad:start
53
+
54
+ open http://localhost:8000/
55
+
56
+ echo
57
+ echo "done! check it out"
58
+ echo
59
+ pause
60
+
61
+ rake vlad:stop
62
+
63
+ kill %1
64
+
metadata ADDED
@@ -0,0 +1,127 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rick-vlad
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Ryan Davis
8
+ - Eric Hodel
9
+ - Wilson Bilkovich
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+
14
+ date: 2009-01-14 00:00:00 -08:00
15
+ default_executable:
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: rake
19
+ version_requirement:
20
+ version_requirements: !ruby/object:Gem::Requirement
21
+ requirements:
22
+ - - ">"
23
+ - !ruby/object:Gem::Version
24
+ version: 0.0.0
25
+ version:
26
+ - !ruby/object:Gem::Dependency
27
+ name: open4
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.0
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: hoe
37
+ version_requirement:
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 1.5.1
43
+ version:
44
+ description: "Vlad the Deployer is pragmatic application deployment automation, without mercy. Much like Capistrano, but with 1/10th the complexity. Vlad integrates seamlessly with Rake, and uses familiar and standard tools like ssh and rsync. Impale your application on the heartless spike of the Deployer. == FEATURES/PROBLEMS: * Full deployment automation stack. * Turnkey deployment for mongrel+apache+svn. * Supports single server deployment with just 3 variables defined. * Built on rake. Easy. Engine is small. * Very few dependencies. All simple. * Uses ssh with your ssh settings already in place. * Uses rsync for efficient transfers. * Run remote commands on one or more servers. * Mix and match local and remote tasks. * Compatible with all of your tab completion shell script rake-tastic goodness. * Ships with tests that actually pass in 0.028 seconds! * Does NOT support Windows right now (we think). Coming soon in 1.2."
45
+ email: ryand-ruby@zenspider.com
46
+ executables: []
47
+
48
+ extensions: []
49
+
50
+ extra_rdoc_files:
51
+ - History.txt
52
+ - Manifest.txt
53
+ - README.txt
54
+ - considerations.txt
55
+ - doco/faq.txt
56
+ - doco/getting_started.txt
57
+ - doco/migration.txt
58
+ - doco/perforce.txt
59
+ - doco/variables.txt
60
+ files:
61
+ - History.txt
62
+ - Manifest.txt
63
+ - README.txt
64
+ - Rakefile
65
+ - considerations.txt
66
+ - doco/faq.txt
67
+ - doco/getting_started.txt
68
+ - doco/migration.txt
69
+ - doco/perforce.txt
70
+ - doco/variables.txt
71
+ - lib/rake_remote_task.rb
72
+ - lib/vlad.rb
73
+ - lib/vlad/apache.rb
74
+ - lib/vlad/core.rb
75
+ - lib/vlad/git.rb
76
+ - lib/vlad/lighttpd.rb
77
+ - lib/vlad/maintenance.rb
78
+ - lib/vlad/merb.god.rb
79
+ - lib/vlad/mercurial.rb
80
+ - lib/vlad/mongrel.rb
81
+ - lib/vlad/nginx.rb
82
+ - lib/vlad/perforce.rb
83
+ - lib/vlad/subversion.rb
84
+ - lib/vlad/thin.rb
85
+ - lib/vlad/web.rb
86
+ - test/test_rake_remote_task.rb
87
+ - test/test_vlad.rb
88
+ - test/test_vlad_git.rb
89
+ - test/test_vlad_mercurial.rb
90
+ - test/test_vlad_perforce.rb
91
+ - test/test_vlad_subversion.rb
92
+ - test/vlad_test_case.rb
93
+ - vladdemo.sh
94
+ has_rdoc: true
95
+ homepage: http://rubyhitsquad.com/
96
+ post_install_message:
97
+ rdoc_options:
98
+ - --main
99
+ - README.txt
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: "0"
107
+ version:
108
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: "0"
113
+ version:
114
+ requirements: []
115
+
116
+ rubyforge_project: hitsquad
117
+ rubygems_version: 1.2.0
118
+ signing_key:
119
+ specification_version: 2
120
+ summary: Vlad the Deployer is pragmatic application deployment automation, without mercy. Much like Capistrano, but with 1/10th the complexity. Vlad integrates seamlessly with Rake, and uses familiar and standard tools like ssh and rsync.
121
+ test_files:
122
+ - test/test_rake_remote_task.rb
123
+ - test/test_vlad.rb
124
+ - test/test_vlad_git.rb
125
+ - test/test_vlad_mercurial.rb
126
+ - test/test_vlad_perforce.rb
127
+ - test/test_vlad_subversion.rb