calas-capitate 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. data/Capfile +13 -0
  2. data/History.txt +167 -0
  3. data/License.txt +20 -0
  4. data/Manifest.txt +121 -0
  5. data/README.txt +8 -0
  6. data/Rakefile +4 -0
  7. data/config/hoe.rb +72 -0
  8. data/config/requirements.rb +17 -0
  9. data/lib/capitate.rb +56 -0
  10. data/lib/capitate/cap_ext/connections.rb +105 -0
  11. data/lib/capitate/cap_ext/docs.rb +26 -0
  12. data/lib/capitate/cap_ext/namespace.rb +34 -0
  13. data/lib/capitate/cap_ext/run_via.rb +16 -0
  14. data/lib/capitate/cap_ext/task_definition.rb +22 -0
  15. data/lib/capitate/cap_ext/variables.rb +132 -0
  16. data/lib/capitate/plugins/base.rb +140 -0
  17. data/lib/capitate/plugins/build.rb +71 -0
  18. data/lib/capitate/plugins/gem.rb +24 -0
  19. data/lib/capitate/plugins/prompt.rb +109 -0
  20. data/lib/capitate/plugins/rake.rb +25 -0
  21. data/lib/capitate/plugins/script.rb +96 -0
  22. data/lib/capitate/plugins/templates.rb +113 -0
  23. data/lib/capitate/plugins/utils.rb +151 -0
  24. data/lib/capitate/plugins/yum.rb +76 -0
  25. data/lib/capitate/recipes.rb +5 -0
  26. data/lib/capitate/task_node.rb +262 -0
  27. data/lib/capitate/version.rb +9 -0
  28. data/lib/deployment/centos-5.1-64-web/install.rb +196 -0
  29. data/lib/recipes/active_record.rb +36 -0
  30. data/lib/recipes/apache.rb +47 -0
  31. data/lib/recipes/backgroundrb.rb +29 -0
  32. data/lib/recipes/centos/backgroundjob.rb +27 -0
  33. data/lib/recipes/centos/backgroundrb.rb +23 -0
  34. data/lib/recipes/centos/centos.rb +45 -0
  35. data/lib/recipes/centos/imagemagick.rb +29 -0
  36. data/lib/recipes/centos/memcached.rb +45 -0
  37. data/lib/recipes/centos/merb.rb +23 -0
  38. data/lib/recipes/centos/mongrel_cluster.rb +54 -0
  39. data/lib/recipes/centos/monit.rb +62 -0
  40. data/lib/recipes/centos/mysql.rb +25 -0
  41. data/lib/recipes/centos/nginx.rb +64 -0
  42. data/lib/recipes/centos/ruby.rb +40 -0
  43. data/lib/recipes/centos/sphinx.rb +59 -0
  44. data/lib/recipes/docs.rb +24 -0
  45. data/lib/recipes/logrotate/backgroundjob.rb +26 -0
  46. data/lib/recipes/logrotate/backgroundrb.rb +26 -0
  47. data/lib/recipes/logrotate/merb.rb +25 -0
  48. data/lib/recipes/logrotate/mongrel_cluster.rb +29 -0
  49. data/lib/recipes/logrotate/monit.rb +28 -0
  50. data/lib/recipes/logrotate/mysql.rb +26 -0
  51. data/lib/recipes/logrotate/nginx.rb +37 -0
  52. data/lib/recipes/logrotate/rails.rb +21 -0
  53. data/lib/recipes/logrotate/sphinx.rb +21 -0
  54. data/lib/recipes/logrotated.rb +61 -0
  55. data/lib/recipes/memcached.rb +26 -0
  56. data/lib/recipes/merb.rb +32 -0
  57. data/lib/recipes/monit.rb +35 -0
  58. data/lib/recipes/monit/backgroundjob.rb +38 -0
  59. data/lib/recipes/monit/backgroundrb.rb +38 -0
  60. data/lib/recipes/monit/database.rb +25 -0
  61. data/lib/recipes/monit/memcached.rb +22 -0
  62. data/lib/recipes/monit/merb.rb +58 -0
  63. data/lib/recipes/monit/mongrel_cluster.rb +85 -0
  64. data/lib/recipes/monit/mysql.rb +20 -0
  65. data/lib/recipes/monit/nginx.rb +37 -0
  66. data/lib/recipes/monit/sphinx.rb +38 -0
  67. data/lib/recipes/monit/sshd.rb +27 -0
  68. data/lib/recipes/mysql.rb +42 -0
  69. data/lib/recipes/nginx.rb +29 -0
  70. data/lib/recipes/rails.rb +71 -0
  71. data/lib/recipes/redmine.rb +38 -0
  72. data/lib/recipes/sphinx.rb +60 -0
  73. data/lib/recipes/sshd.rb +47 -0
  74. data/lib/recipes/syslogd.rb +21 -0
  75. data/lib/templates/apache/vhost.mongrel_cluster.conf.erb +46 -0
  76. data/lib/templates/backgroundjob/backgroundjob.initd.centos.erb +54 -0
  77. data/lib/templates/backgroundjob/backgroundjob.monitrc.erb +3 -0
  78. data/lib/templates/backgroundrb/backgroundrb.initd.centos.erb +58 -0
  79. data/lib/templates/backgroundrb/backgroundrb.monitrc.erb +3 -0
  80. data/lib/templates/backgroundrb/backgroundrb.yml.erb +14 -0
  81. data/lib/templates/capistrano/Capfile +22 -0
  82. data/lib/templates/logrotated/conf.erb +3 -0
  83. data/lib/templates/memcached/memcached.initd.centos.erb +58 -0
  84. data/lib/templates/memcached/memcached.monitrc.erb +4 -0
  85. data/lib/templates/memcached/memcached.yml.erb +14 -0
  86. data/lib/templates/merb/merb-no-http.monitrc.erb +13 -0
  87. data/lib/templates/merb/merb.initd.centos.erb +123 -0
  88. data/lib/templates/merb/merb.monitrc.erb +15 -0
  89. data/lib/templates/mongrel/mongrel_cluster.initd.centos.erb +94 -0
  90. data/lib/templates/mongrel/mongrel_cluster.monitrc.erb +15 -0
  91. data/lib/templates/mongrel/mongrel_cluster.yml.erb +11 -0
  92. data/lib/templates/monit/monit.cnf +34 -0
  93. data/lib/templates/monit/monit.initd.centos.erb +68 -0
  94. data/lib/templates/monit/monitrc.erb +18 -0
  95. data/lib/templates/mysql/install_db.sql.erb +6 -0
  96. data/lib/templates/mysql/my.cnf.innodb_1024.erb +122 -0
  97. data/lib/templates/mysql/my.cnf.innodb_512.erb +127 -0
  98. data/lib/templates/mysql/mysql.monitrc.erb +6 -0
  99. data/lib/templates/nginx/nginx.conf.erb +97 -0
  100. data/lib/templates/nginx/nginx.initd.centos.erb +69 -0
  101. data/lib/templates/nginx/nginx.monitrc.erb +4 -0
  102. data/lib/templates/nginx/nginx_vhost.conf.erb +101 -0
  103. data/lib/templates/nginx/nginx_vhost_generic.conf.erb +99 -0
  104. data/lib/templates/rails/database.yml.erb +7 -0
  105. data/lib/templates/redmine/email.yml.erb +10 -0
  106. data/lib/templates/ruby/fix_openssl.sh +12 -0
  107. data/lib/templates/sphinx/sphinx.conf.erb +157 -0
  108. data/lib/templates/sphinx/sphinx.monitrc.erb +4 -0
  109. data/lib/templates/sphinx/sphinx_app.initd.centos.erb +90 -0
  110. data/lib/templates/sshd/sshd.monitrc.erb +5 -0
  111. data/script/destroy +14 -0
  112. data/script/generate +14 -0
  113. data/script/txt2html +80 -0
  114. data/setup.rb +1585 -0
  115. data/tasks/deployment.rake +34 -0
  116. data/tasks/environment.rake +7 -0
  117. data/tasks/website.rake +23 -0
  118. data/test/test_helper.rb +2 -0
  119. data/test/test_plugin_upload.rb +32 -0
  120. data/test/test_recipes.rb +37 -0
  121. data/test/test_templates.rb +29 -0
  122. metadata +198 -0
data/Capfile ADDED
@@ -0,0 +1,13 @@
1
+ #
2
+ # Capfile for running base install recipe
3
+ #
4
+
5
+ load 'deploy' if respond_to?(:namespace) # cap2 differentiator
6
+
7
+ require 'lib/capitate'
8
+
9
+ # Load recipes
10
+ require 'lib/capitate/recipes'
11
+
12
+ require 'erb'
13
+
@@ -0,0 +1,167 @@
1
+ == 0.3.6 ?
2
+
3
+ * Fixing backgroundjob to use --daemon
4
+ * Fixing merb init to use daemon init function on start (then it plays nice with monit)
5
+ * Fixing backgroundjob init (BIN_PATH error)
6
+ * Adding --log to backgroundjob init.d
7
+ * Fixing sphinx monit start/stop/restart
8
+ * Adding task arguments to DSL
9
+ * Updating most of the documentation to pull from task args
10
+
11
+ == 0.3.5 2008-05-08
12
+
13
+ * Adding merb:migrate recipe
14
+ * Fixing merb monitrc
15
+ * Added preview variables prompt
16
+ * Fixed merb logrotate defaults
17
+
18
+ == 0.3.4 2008-05-05
19
+
20
+ * Removed upload plugin (obsolete)
21
+ * Fixing nginx host recipe
22
+
23
+ == 0.3.3 2008-04-29
24
+
25
+ * Adding merb init script (for Centos)
26
+ * Adding merb monit confs
27
+ * Adding merb logrotate
28
+ * Created generic nginx vhost template
29
+ * Deprecated rails:setup for active_record:setup (for merb setup)
30
+
31
+ == 0.3.2 2008-04-03
32
+
33
+ * Adding hostname helper (utils.hostname)
34
+ * Adding sphinx_hostname var. Needed for delta conf.
35
+ * Updated example sphinx conf template
36
+
37
+ == 0.3.1 2008-04-02
38
+
39
+ * Fixing the init scripts to use killproc and have nice output (centos)
40
+ * Fixing sphinx initscript to clean on start (if process does not exist)
41
+ * Removing some roles options. Roles are confusing, I don't want to use them.
42
+
43
+ == 0.2.15 2008-03-31
44
+
45
+ * Adding backgroundjob recipes and templates.
46
+ * Fixed backgroundrb monit host port check (removed)
47
+
48
+ == 0.2.14 2008-03-27
49
+
50
+ * Removing my lame monkey patches
51
+ * Mysql cnf template
52
+ * Cleaning up mysql grant locations
53
+ * Logrotate for mysql slow query log
54
+
55
+ == 0.2.13 2008-03-26
56
+
57
+ * Fixing monit re/start for mongrel cluster and backgroundrb
58
+
59
+ == 0.2.12 2008-03-26
60
+
61
+ * Re-formatting some documentation, experimenting with getting source in the docs (FAIL!)
62
+ * Including backgroundrb logrotate, monit, restart
63
+
64
+ == 0.2.11 2008-03-25
65
+
66
+ * Backgroundrb recipes and templates
67
+ * Memcached yml template and recipe
68
+ * Rails update code task
69
+
70
+ == 0.2.9 <never>
71
+
72
+ * SSH keygen and authorize key recipes
73
+ * Updated rails:setup recipe to include option for specifying path to database yml template
74
+ * Logrotate recipes
75
+
76
+ * Plugin adds/changes:
77
+ ** utils.install_template
78
+ ** utils.append_to
79
+ ** utils.egrep
80
+ ** utils.exist?
81
+
82
+ == 0.2.8 2008-03-13
83
+
84
+ * Recipe, mysql:centos:install, doing restart incase already run
85
+ * Added sshd monit recipe. In case using non-standard sshd port
86
+ * Updated example deployment install script (centos 5.1 x86_64)
87
+ * Move monit inittab install at the end
88
+ * Added fetch_any(:var1, :var2)
89
+
90
+ == 0.2.7 2008-03-10
91
+
92
+ * Add clean method to sphinx init script
93
+ * Moved install and make_install into build plugin
94
+ * Added symlink option to make_install
95
+ * Added fetch_role and fetch_roles methods
96
+
97
+ == 0.2.6 2008-02-29
98
+
99
+ * Fix SSH connect debug when connecting to more than 1 server.
100
+ * Added monit restart (hup) recipe.
101
+ * Mysql setup task, showing sql. Setting to :db role only.
102
+ * Capistrano patch: execute_on_servers_without_capitate(options, &block) to rescue Capistrano::NoMatchingServersError, and ignore as non-fatal
103
+
104
+ == 0.2.5 2008-02-28
105
+
106
+ * Adding application configuration for mongrel cluster monit setup.
107
+ * Renaming recipes, using consistent names for namespaces.
108
+ * Capistrano patch: if missing role, ignore the task instead of throwing error.
109
+ * Capistranp patch: Showing debug statement on SSH connect.
110
+
111
+ == 0.2.4 2008-02-26
112
+
113
+ * Change prompt.password to take options
114
+ * Adding password retry and check_hash
115
+ * Fixing :shell option for build scripting
116
+ * Add readline-devel to ruby centos install dependency
117
+
118
+ == 0.2.3 2008-02-25
119
+
120
+ * Various task and recipe fixes.
121
+ * Taking sh -c default out of script, doesn't escape right
122
+
123
+ == 0.2.2 2008-02-24
124
+
125
+ * Fixes to setup tasks.
126
+ * Removing with_user on add_user task.
127
+
128
+ == 0.2.1 2008-02-24
129
+
130
+ * Removing all my brain dead recipes.
131
+ * Added build options for install tasks.
132
+ * Updating documentation
133
+
134
+ == 0.1.9 2008-02-23
135
+
136
+ * Adding config_script to mongrel_cluster recipe
137
+ * Creating upload plugin that streams data
138
+
139
+ == 0.1.8 2008-02-22
140
+
141
+ * Fixing up documentation
142
+ * Creating recipe documentation recipe
143
+ * New website generation
144
+ * Moved some recipes around
145
+
146
+ == 0.1.7 2008-02-21
147
+
148
+ * Renamed to 'capitate'
149
+ * Moving centos specific recipes into separate namespace
150
+ * Plugin: build.make_install
151
+ * Documentation and explicitly fetching vars (for install tasks), showing useful error messages
152
+
153
+ == 0.1.4 2008-02-07
154
+
155
+ * Using capistrano's plugin architecture instead of hacking around
156
+
157
+ == 0.1.3 2008-02-06
158
+
159
+ * Fixing local recipes
160
+
161
+ == 0.1.2 2008-02-06
162
+
163
+ * Loading recipes from gem
164
+
165
+ == 0.1.1 2008-02-06
166
+
167
+ * Initial import
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 Gabriel Handford
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,121 @@
1
+ Capfile
2
+ History.txt
3
+ License.txt
4
+ Manifest.txt
5
+ README.txt
6
+ Rakefile
7
+ config/hoe.rb
8
+ config/requirements.rb
9
+ lib/capitate.rb
10
+ lib/capitate/cap_ext/connections.rb
11
+ lib/capitate/cap_ext/docs.rb
12
+ lib/capitate/cap_ext/namespace.rb
13
+ lib/capitate/cap_ext/run_via.rb
14
+ lib/capitate/cap_ext/task_definition.rb
15
+ lib/capitate/cap_ext/variables.rb
16
+ lib/capitate/plugins/base.rb
17
+ lib/capitate/plugins/build.rb
18
+ lib/capitate/plugins/gem.rb
19
+ lib/capitate/plugins/rake.rb
20
+ lib/capitate/plugins/prompt.rb
21
+ lib/capitate/plugins/script.rb
22
+ lib/capitate/plugins/templates.rb
23
+ lib/capitate/plugins/utils.rb
24
+ lib/capitate/plugins/yum.rb
25
+ lib/capitate/recipes.rb
26
+ lib/capitate/task_node.rb
27
+ lib/capitate/version.rb
28
+ lib/deployment/centos-5.1-64-web/install.rb
29
+ lib/recipes/active_record.rb
30
+ lib/recipes/apache.rb
31
+ lib/recipes/backgroundrb.rb
32
+ lib/recipes/centos/backgroundjob.rb
33
+ lib/recipes/centos/backgroundrb.rb
34
+ lib/recipes/centos/centos.rb
35
+ lib/recipes/centos/imagemagick.rb
36
+ lib/recipes/centos/memcached.rb
37
+ lib/recipes/centos/merb.rb
38
+ lib/recipes/centos/mongrel_cluster.rb
39
+ lib/recipes/centos/monit.rb
40
+ lib/recipes/centos/mysql.rb
41
+ lib/recipes/centos/nginx.rb
42
+ lib/recipes/centos/ruby.rb
43
+ lib/recipes/centos/sphinx.rb
44
+ lib/recipes/docs.rb
45
+ lib/recipes/logrotate/backgroundjob.rb
46
+ lib/recipes/logrotate/backgroundrb.rb
47
+ lib/recipes/logrotate/merb.rb
48
+ lib/recipes/logrotate/mongrel_cluster.rb
49
+ lib/recipes/logrotate/monit.rb
50
+ lib/recipes/logrotate/mysql.rb
51
+ lib/recipes/logrotate/nginx.rb
52
+ lib/recipes/logrotate/rails.rb
53
+ lib/recipes/logrotate/sphinx.rb
54
+ lib/recipes/logrotated.rb
55
+ lib/recipes/memcached.rb
56
+ lib/recipes/merb.rb
57
+ lib/recipes/monit.rb
58
+ lib/recipes/monit/backgroundjob.rb
59
+ lib/recipes/monit/backgroundrb.rb
60
+ lib/recipes/monit/database.rb
61
+ lib/recipes/monit/memcached.rb
62
+ lib/recipes/monit/merb.rb
63
+ lib/recipes/monit/mongrel_cluster.rb
64
+ lib/recipes/monit/mysql.rb
65
+ lib/recipes/monit/nginx.rb
66
+ lib/recipes/monit/sphinx.rb
67
+ lib/recipes/monit/sshd.rb
68
+ lib/recipes/mysql.rb
69
+ lib/recipes/nginx.rb
70
+ lib/recipes/rails.rb
71
+ lib/recipes/redmine.rb
72
+ lib/recipes/sphinx.rb
73
+ lib/recipes/sshd.rb
74
+ lib/recipes/syslogd.rb
75
+ lib/templates/apache/vhost.mongrel_cluster.conf.erb
76
+ lib/templates/backgroundjob/backgroundjob.initd.centos.erb
77
+ lib/templates/backgroundjob/backgroundjob.monitrc.erb
78
+ lib/templates/backgroundrb/backgroundrb.initd.centos.erb
79
+ lib/templates/backgroundrb/backgroundrb.monitrc.erb
80
+ lib/templates/backgroundrb/backgroundrb.yml.erb
81
+ lib/templates/capistrano/Capfile
82
+ lib/templates/logrotated/conf.erb
83
+ lib/templates/memcached/memcached.initd.centos.erb
84
+ lib/templates/memcached/memcached.monitrc.erb
85
+ lib/templates/memcached/memcached.yml.erb
86
+ lib/templates/merb/merb-no-http.monitrc.erb
87
+ lib/templates/merb/merb.initd.centos.erb
88
+ lib/templates/merb/merb.monitrc.erb
89
+ lib/templates/mongrel/mongrel_cluster.initd.centos.erb
90
+ lib/templates/mongrel/mongrel_cluster.monitrc.erb
91
+ lib/templates/mongrel/mongrel_cluster.yml.erb
92
+ lib/templates/monit/monit.cnf
93
+ lib/templates/monit/monit.initd.centos.erb
94
+ lib/templates/monit/monitrc.erb
95
+ lib/templates/mysql/install_db.sql.erb
96
+ lib/templates/mysql/my.cnf.innodb_1024.erb
97
+ lib/templates/mysql/my.cnf.innodb_512.erb
98
+ lib/templates/mysql/mysql.monitrc.erb
99
+ lib/templates/nginx/nginx.conf.erb
100
+ lib/templates/nginx/nginx.initd.centos.erb
101
+ lib/templates/nginx/nginx.monitrc.erb
102
+ lib/templates/nginx/nginx_vhost.conf.erb
103
+ lib/templates/nginx/nginx_vhost_generic.conf.erb
104
+ lib/templates/rails/database.yml.erb
105
+ lib/templates/redmine/email.yml.erb
106
+ lib/templates/ruby/fix_openssl.sh
107
+ lib/templates/sphinx/sphinx.conf.erb
108
+ lib/templates/sphinx/sphinx.monitrc.erb
109
+ lib/templates/sphinx/sphinx_app.initd.centos.erb
110
+ lib/templates/sshd/sshd.monitrc.erb
111
+ script/destroy
112
+ script/generate
113
+ script/txt2html
114
+ setup.rb
115
+ tasks/deployment.rake
116
+ tasks/environment.rake
117
+ tasks/website.rake
118
+ test/test_helper.rb
119
+ test/test_plugin_upload.rb
120
+ test/test_recipes.rb
121
+ test/test_templates.rb
@@ -0,0 +1,8 @@
1
+ = Capitate
2
+
3
+ http://capitate.rubyforge.org
4
+
5
+ == DESCRIPTION
6
+
7
+ Recipes to make capistrano more useful.
8
+
@@ -0,0 +1,4 @@
1
+ require 'config/requirements'
2
+ require 'config/hoe' # setup Hoe + all gem configuration
3
+
4
+ Dir['tasks/**/*.rake'].each { |rake| load rake }
@@ -0,0 +1,72 @@
1
+ require 'capitate/version'
2
+
3
+ AUTHOR = 'Gabriel Handford' # can also be an array of Authors
4
+ EMAIL = "gabrielh@gmail.com"
5
+ DESCRIPTION = "Capistrano recipes, plugins and templates."
6
+ GEM_NAME = 'capitate' # what ppl will type to install your gem
7
+ RUBYFORGE_PROJECT = 'capitate' # The unix name for your project
8
+ HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
9
+ DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
10
+
11
+ @config_file = "~/.rubyforge/user-config.yml"
12
+ @config = nil
13
+ RUBYFORGE_USERNAME = "gabe"
14
+ def rubyforge_username
15
+ unless @config
16
+ begin
17
+ @config = YAML.load(File.read(File.expand_path(@config_file)))
18
+ rescue
19
+ puts <<-EOS
20
+ ERROR: No rubyforge config file found: #{@config_file}
21
+ Run 'rubyforge setup' to prepare your env for access to Rubyforge
22
+ - See http://newgem.rubyforge.org/rubyforge.html for more details
23
+ EOS
24
+ exit
25
+ end
26
+ end
27
+ RUBYFORGE_USERNAME.replace @config["username"]
28
+ end
29
+
30
+
31
+ REV = nil
32
+ # UNCOMMENT IF REQUIRED:
33
+ # REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
34
+ VERS = Capitate::VERSION::STRING + (REV ? ".#{REV}" : "")
35
+ RDOC_OPTS = ['--quiet', '--title', 'capitate documentation',
36
+ "--opname", "index.html",
37
+ "--line-numbers",
38
+ "--main", "README",
39
+ "--inline-source"]
40
+
41
+ class Hoe
42
+ def extra_deps
43
+ @extra_deps.reject! { |x| Array(x).first == 'hoe' }
44
+ @extra_deps
45
+ end
46
+ end
47
+
48
+ # Generate all the Rake tasks
49
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
50
+ hoe = Hoe.new(GEM_NAME, VERS) do |p|
51
+ p.developer(AUTHOR, EMAIL)
52
+ p.description = DESCRIPTION
53
+ p.summary = DESCRIPTION
54
+ p.url = HOMEPATH
55
+ p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
56
+ p.test_globs = ["test/**/test_*.rb"]
57
+ p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
58
+ p.clean_globs += ['website/recipes/**']
59
+
60
+ # == Optional
61
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
62
+ #p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
63
+ p.extra_deps = [ [ "capistrano", ">=2.1.0" ] ]
64
+
65
+ #p.spec_extras = {} # A hash of extra values to set in the gemspec.
66
+
67
+ end
68
+
69
+ CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
70
+ PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
71
+ hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
72
+ hoe.rsync_args = '-av --delete --ignore-errors'
@@ -0,0 +1,17 @@
1
+ require 'fileutils'
2
+ include FileUtils
3
+
4
+ require 'rubygems'
5
+ %w[rake hoe newgem rubigen].each do |req_gem|
6
+ begin
7
+ require req_gem
8
+ rescue LoadError
9
+ puts "This Rakefile requires the '#{req_gem}' RubyGem."
10
+ puts "Installation: gem install #{req_gem} -y"
11
+ exit
12
+ end
13
+ end
14
+
15
+ $:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
16
+
17
+ require 'capitate'
@@ -0,0 +1,56 @@
1
+ require 'rubygems'
2
+ require 'active_support'
3
+ require 'highline'
4
+ require 'capistrano'
5
+
6
+ HighLine.track_eof = false
7
+
8
+ # Add this path to ruby load path
9
+ $:.unshift File.dirname(__FILE__)
10
+
11
+ module Capitate # :nodoc:
12
+ module Plugins # :nodoc:
13
+ end
14
+ end
15
+
16
+ require 'capitate/plugins/base'
17
+ require 'capitate/plugins/gem'
18
+ require 'capitate/plugins/build'
19
+ require 'capitate/plugins/utils'
20
+ require 'capitate/plugins/script'
21
+ require 'capitate/plugins/prompt'
22
+ require 'capitate/plugins/templates'
23
+ require 'capitate/plugins/yum'
24
+ require 'capitate/plugins/rake'
25
+
26
+ # Extensions + Patches
27
+ require "capitate/cap_ext/connections"
28
+ require "capitate/cap_ext/variables"
29
+ require "capitate/cap_ext/run_via"
30
+ require "capitate/cap_ext/docs"
31
+ require "capitate/cap_ext/namespace"
32
+ require "capitate/cap_ext/task_definition"
33
+
34
+ class Capistrano::Configuration
35
+ include Capitate::CapExt::Variables
36
+ include Capitate::CapExt::RunVia
37
+ include Capitate::CapExt::Connections
38
+ include Capitate::CapExt::Docs
39
+ end
40
+
41
+ class Capistrano::TaskDefinition
42
+ include Capitate::CapExt::TaskDefinition
43
+ end
44
+
45
+ class Capistrano::Configuration::Namespaces::Namespace
46
+ include Capitate::CapExt::Namespace
47
+ end
48
+
49
+ module Capistrano::Configuration::Namespaces
50
+ include Capitate::CapExt::Namespace
51
+ end
52
+
53
+ #module Capistrano::Configuration::Connections; end
54
+
55
+ require 'capitate/task_node'
56
+