capistrano 2.1.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.travis.yml +7 -0
  4. data/CHANGELOG.md +89 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +674 -0
  7. data/README.md +226 -0
  8. data/Rakefile +5 -0
  9. data/bin/cap +2 -3
  10. data/bin/capify +7 -77
  11. data/capistrano-public_cert.pem +22 -0
  12. data/capistrano.gemspec +35 -0
  13. data/features/deploy.feature +52 -0
  14. data/features/installation.feature +16 -0
  15. data/features/remote_file_task.feature +14 -0
  16. data/features/step_definitions/assertions.rb +90 -0
  17. data/features/step_definitions/cap_commands.rb +8 -0
  18. data/features/step_definitions/setup.rb +25 -0
  19. data/features/support/env.rb +12 -0
  20. data/features/support/remote_command_helpers.rb +20 -0
  21. data/lib/Capfile +3 -0
  22. data/lib/capistrano/all.rb +16 -0
  23. data/lib/capistrano/application.rb +60 -0
  24. data/lib/capistrano/configuration/question.rb +42 -0
  25. data/lib/capistrano/configuration/server.rb +133 -0
  26. data/lib/capistrano/configuration/servers/role_filter.rb +86 -0
  27. data/lib/capistrano/configuration/servers.rb +53 -58
  28. data/lib/capistrano/configuration.rb +84 -30
  29. data/lib/capistrano/console.rb +1 -0
  30. data/lib/capistrano/defaults.rb +13 -0
  31. data/lib/capistrano/deploy.rb +3 -0
  32. data/lib/capistrano/dotfile.rb +3 -0
  33. data/lib/capistrano/dsl/env.rb +64 -0
  34. data/lib/capistrano/dsl/paths.rb +94 -0
  35. data/lib/capistrano/dsl/stages.rb +15 -0
  36. data/lib/capistrano/dsl/task_enhancements.rb +53 -0
  37. data/lib/capistrano/dsl.rb +48 -0
  38. data/lib/capistrano/git.rb +1 -0
  39. data/lib/capistrano/hg.rb +1 -0
  40. data/lib/capistrano/i18n.rb +34 -0
  41. data/lib/capistrano/install.rb +1 -0
  42. data/lib/capistrano/setup.rb +21 -0
  43. data/lib/capistrano/tasks/console.rake +21 -0
  44. data/lib/capistrano/tasks/deploy.rake +204 -0
  45. data/lib/capistrano/tasks/framework.rake +67 -0
  46. data/lib/capistrano/tasks/git.rake +62 -0
  47. data/lib/capistrano/tasks/hg.rake +39 -0
  48. data/lib/capistrano/tasks/install.rake +39 -0
  49. data/lib/capistrano/templates/Capfile +26 -0
  50. data/lib/capistrano/templates/deploy.rb.erb +40 -0
  51. data/lib/capistrano/templates/stage.rb.erb +42 -0
  52. data/lib/capistrano/version.rb +1 -20
  53. data/lib/capistrano/version_validator.rb +37 -0
  54. data/lib/capistrano.rb +0 -2
  55. data/spec/integration/dsl_spec.rb +344 -0
  56. data/spec/integration_spec_helper.rb +7 -0
  57. data/spec/lib/capistrano/application_spec.rb +61 -0
  58. data/spec/lib/capistrano/configuration/question_spec.rb +54 -0
  59. data/spec/lib/capistrano/configuration/server_spec.rb +249 -0
  60. data/spec/lib/capistrano/configuration/servers/role_filter_spec.rb +140 -0
  61. data/spec/lib/capistrano/configuration/servers_spec.rb +184 -0
  62. data/spec/lib/capistrano/configuration_spec.rb +101 -0
  63. data/spec/lib/capistrano/dsl/env_spec.rb +10 -0
  64. data/spec/lib/capistrano/dsl/paths_spec.rb +69 -0
  65. data/spec/lib/capistrano/dsl_spec.rb +63 -0
  66. data/spec/lib/capistrano/version_validator_spec.rb +103 -0
  67. data/spec/lib/capistrano_spec.rb +8 -0
  68. data/spec/spec_helper.rb +15 -0
  69. data/spec/support/.gitignore +1 -0
  70. data/spec/support/Vagrantfile +13 -0
  71. data/spec/support/matchers.rb +5 -0
  72. data/spec/support/tasks/database.cap +11 -0
  73. data/spec/support/test_app.rb +138 -0
  74. metadata +251 -179
  75. data/CHANGELOG +0 -512
  76. data/MIT-LICENSE +0 -20
  77. data/README +0 -43
  78. data/examples/sample.rb +0 -14
  79. data/lib/capistrano/callback.rb +0 -45
  80. data/lib/capistrano/cli/execute.rb +0 -82
  81. data/lib/capistrano/cli/help.rb +0 -102
  82. data/lib/capistrano/cli/help.txt +0 -53
  83. data/lib/capistrano/cli/options.rb +0 -183
  84. data/lib/capistrano/cli/ui.rb +0 -28
  85. data/lib/capistrano/cli.rb +0 -47
  86. data/lib/capistrano/command.rb +0 -161
  87. data/lib/capistrano/configuration/actions/file_transfer.rb +0 -35
  88. data/lib/capistrano/configuration/actions/inspect.rb +0 -46
  89. data/lib/capistrano/configuration/actions/invocation.rb +0 -134
  90. data/lib/capistrano/configuration/callbacks.rb +0 -148
  91. data/lib/capistrano/configuration/connections.rb +0 -159
  92. data/lib/capistrano/configuration/execution.rb +0 -126
  93. data/lib/capistrano/configuration/loading.rb +0 -198
  94. data/lib/capistrano/configuration/namespaces.rb +0 -196
  95. data/lib/capistrano/configuration/roles.rb +0 -51
  96. data/lib/capistrano/configuration/variables.rb +0 -127
  97. data/lib/capistrano/errors.rb +0 -15
  98. data/lib/capistrano/extensions.rb +0 -57
  99. data/lib/capistrano/gateway.rb +0 -131
  100. data/lib/capistrano/logger.rb +0 -59
  101. data/lib/capistrano/recipes/compat.rb +0 -32
  102. data/lib/capistrano/recipes/deploy/dependencies.rb +0 -44
  103. data/lib/capistrano/recipes/deploy/local_dependency.rb +0 -46
  104. data/lib/capistrano/recipes/deploy/remote_dependency.rb +0 -96
  105. data/lib/capistrano/recipes/deploy/scm/accurev.rb +0 -169
  106. data/lib/capistrano/recipes/deploy/scm/base.rb +0 -192
  107. data/lib/capistrano/recipes/deploy/scm/bzr.rb +0 -86
  108. data/lib/capistrano/recipes/deploy/scm/cvs.rb +0 -151
  109. data/lib/capistrano/recipes/deploy/scm/darcs.rb +0 -85
  110. data/lib/capistrano/recipes/deploy/scm/git.rb +0 -191
  111. data/lib/capistrano/recipes/deploy/scm/mercurial.rb +0 -129
  112. data/lib/capistrano/recipes/deploy/scm/perforce.rb +0 -126
  113. data/lib/capistrano/recipes/deploy/scm/subversion.rb +0 -114
  114. data/lib/capistrano/recipes/deploy/scm.rb +0 -19
  115. data/lib/capistrano/recipes/deploy/strategy/base.rb +0 -64
  116. data/lib/capistrano/recipes/deploy/strategy/checkout.rb +0 -20
  117. data/lib/capistrano/recipes/deploy/strategy/copy.rb +0 -144
  118. data/lib/capistrano/recipes/deploy/strategy/export.rb +0 -20
  119. data/lib/capistrano/recipes/deploy/strategy/remote.rb +0 -52
  120. data/lib/capistrano/recipes/deploy/strategy/remote_cache.rb +0 -47
  121. data/lib/capistrano/recipes/deploy/strategy.rb +0 -19
  122. data/lib/capistrano/recipes/deploy/templates/maintenance.rhtml +0 -53
  123. data/lib/capistrano/recipes/deploy.rb +0 -494
  124. data/lib/capistrano/recipes/standard.rb +0 -37
  125. data/lib/capistrano/recipes/templates/maintenance.rhtml +0 -53
  126. data/lib/capistrano/recipes/upgrade.rb +0 -33
  127. data/lib/capistrano/server_definition.rb +0 -51
  128. data/lib/capistrano/shell.rb +0 -256
  129. data/lib/capistrano/ssh.rb +0 -109
  130. data/lib/capistrano/task_definition.rb +0 -69
  131. data/lib/capistrano/upload.rb +0 -146
  132. data/test/cli/execute_test.rb +0 -132
  133. data/test/cli/help_test.rb +0 -139
  134. data/test/cli/options_test.rb +0 -226
  135. data/test/cli/ui_test.rb +0 -28
  136. data/test/cli_test.rb +0 -17
  137. data/test/command_test.rb +0 -309
  138. data/test/configuration/actions/file_transfer_test.rb +0 -40
  139. data/test/configuration/actions/inspect_test.rb +0 -62
  140. data/test/configuration/actions/invocation_test.rb +0 -202
  141. data/test/configuration/callbacks_test.rb +0 -206
  142. data/test/configuration/connections_test.rb +0 -288
  143. data/test/configuration/execution_test.rb +0 -159
  144. data/test/configuration/loading_test.rb +0 -127
  145. data/test/configuration/namespace_dsl_test.rb +0 -297
  146. data/test/configuration/roles_test.rb +0 -47
  147. data/test/configuration/servers_test.rb +0 -90
  148. data/test/configuration/variables_test.rb +0 -180
  149. data/test/configuration_test.rb +0 -81
  150. data/test/deploy/scm/accurev_test.rb +0 -23
  151. data/test/deploy/scm/base_test.rb +0 -55
  152. data/test/deploy/scm/git_test.rb +0 -112
  153. data/test/deploy/strategy/copy_test.rb +0 -147
  154. data/test/extensions_test.rb +0 -69
  155. data/test/fixtures/cli_integration.rb +0 -5
  156. data/test/fixtures/config.rb +0 -5
  157. data/test/fixtures/custom.rb +0 -3
  158. data/test/gateway_test.rb +0 -167
  159. data/test/logger_test.rb +0 -123
  160. data/test/server_definition_test.rb +0 -108
  161. data/test/shell_test.rb +0 -64
  162. data/test/ssh_test.rb +0 -97
  163. data/test/task_definition_test.rb +0 -101
  164. data/test/upload_test.rb +0 -131
  165. data/test/utils.rb +0 -42
  166. data/test/version_test.rb +0 -24
data/CHANGELOG DELETED
@@ -1,512 +0,0 @@
1
- *2.1.0* October 14, 2007
2
-
3
- * Default to 0664 instead of 0660 on upload [Jamis Buck]
4
-
5
- * Fix deploy:pending to query SCM for the subsequent revision so that it does not include the last deployed change [Jamis Buck]
6
-
7
- * Prefer 'Last Changed Rev' over 'Revision' when querying latest revision via Subversion [Jamis Buck]
8
-
9
- * Explicitly require 'stringio' in copy_test [mislav]
10
-
11
- * When Subversion#query_revision fails, give a more sane error [Jamis Buck]
12
-
13
- * Don't run the upgrade:revisions task on non-release servers [Jamis Buck]
14
-
15
- * Fix cap shell to properly recognize sudo prompt [Mark Imbriaco, barnaby, Jamis Buck]
16
-
17
- * Git SCM module [Garry Dolley, Geoffrey Grosenbach, Scott Chacon]
18
-
19
- * Use the --password switch for subversion by default, but add :scm_prefer_prompt variable (defaults to false) [Jamis Buck]
20
-
21
-
22
- *2.0.100 (2.1 Preview 1)* September 1, 2007
23
-
24
- * capify-generated Capfile will autoload all recipes from vendor/plugins/*/recipes/*.rb [Graeme Mathieson]
25
-
26
- * Use sudo -p switch to set sudo password prompt to something predictable [Mike Bailey]
27
-
28
- * Allow independent configurations to require the same recipe file [Jamis Buck]
29
-
30
- * Set :shell to false to run a command without wrapping it in "sh -c" [Jamis Buck]
31
-
32
- * Don't request a pty by default [Jamis Buck]
33
-
34
- * Add a "match" remote dependency method [Adam Greene]
35
-
36
- * Allow auth-caching of subversion credentials to be enabled via :scm_auth_cache [tsmith]
37
-
38
- * Don't let a task trigger itself when used as the source for an "on" hook [Jamis Buck]
39
-
40
- * Avoid using the --password switch with subversion for security purposes [sentinel]
41
-
42
- * Add version_dir, current_dir, and shared_dir variables for naming the directories used in deployment [drinkingbird]
43
-
44
- * Use Windows-safe binary reads for reading file contents [Ladislav Martincik]
45
-
46
- * Add Accurev SCM support [Doug Barth]
47
-
48
- * Use the :runner variable to determine who to sudo as for deploy:restart [Graham Ashton]
49
-
50
- * Add Namespaces#top to always return a reference to the topmost namespace [Jamis Buck]
51
-
52
- * Change the "-h" output so that it does not say that "-q" is the default [Jamis Buck]
53
-
54
-
55
- *2.0.0* July 21, 2007
56
-
57
- * Make the "no matching servers" error more sane [halorgium]
58
-
59
- * Make sure the invoke task gives a sane error when the COMMAND value is omitted [halorgium]
60
-
61
- * Make sure variables are conditionally set in the deploy recipes, so as not to clobber values set elsewhere [Jamis Buck]
62
-
63
- * Fix "input stream is empty" errors from HighLine on prompt [Jamis Buck]
64
-
65
- * Added "synchronous_connect" setting to try and work around SFTP hangs for certain users [Jamis Buck]
66
-
67
- * Auto-require the SSH shell service, to avoid race conditions [Jamis Buck]
68
-
69
- * Add a millisecond sleep in upload to reduce CPU impact [Jamis Buck]
70
-
71
- * Allow the logger to be set via Configuration#logger= [Jamis Buck]
72
-
73
- * Allow $CAPISTRANO:HOST$ to be used in filenames to the put command [Jamis Buck]
74
-
75
- * Allow execute_on_servers to be called without a current task again [Jamis Buck]
76
-
77
- * Put $stdout in sync mode, so that Net::SSH prompts are displayed [Jamis Buck]
78
-
79
- * Make sure deploy:check aborts if it fails [Jamis Buck]
80
-
81
- * Spelling corrections in docs [Tim Carey-Smith, Giles Bowkett]
82
-
83
-
84
- *1.99.3 (2.0 Preview 4)* June 28, 2007
85
-
86
- * Don't break task descriptions on a period that appears in the middle of a sentence [Jamis Buck]
87
-
88
- * Added support for :on_error => :continue in task definitions, allowing tasks to effectively ignore connection and execution errors that occur as they run [Rob Holland]
89
-
90
- * Use correct parameters for Logger constructor in the SCM and Strategy base initializers [Jamis Buck]
91
-
92
- * Set LC_ALL=C before querying the revision, to make sure the output is in a predictable locale and can be parsed predictably [via Leandro Nunes dos Santos]
93
-
94
- * Add :copy_remote_dir variable for the :copy strategy, to indicate where the archive should be copied to on the remote servers [Jamis Buck]
95
-
96
- * Make the awk use in the dependencies code work with POSIX awk [mcornick]
97
-
98
- * Make variable accesses thread safe [via Adrian Danieli]
99
-
100
- * Make user input for yes/no prompts work correctly in the Mercurial module [Matthew Elder]
101
-
102
- * Use single quotes to escape semicolon in find command, instead of a backslash [via michael.italia@gmail.com]
103
-
104
- * Better quoting of reserved characters in commands [Jamis Buck]
105
-
106
- * Make sure Net::SSH versions prior to 1.1.0 still work [Jamis Buck]
107
-
108
- * Allow the :hosts and :roles keys to accept lambdas, which will be evaluated lazily to allow runtime selection of hosts and roles in tasks [Jamis Buck]
109
-
110
- * Use `which' to test whether a command exists in the remote path, instead of `test -p' [Jamis Buck]
111
-
112
- * Make sure the connection factory is established synchronously, to avoid multiple gateway instances being spawned [Jamis Buck]
113
-
114
- * Make sure symlink and finalize_update tasks reference the most recent release when called by themselves [Jamis Buck]
115
-
116
-
117
- *1.99.2 (2.0 Preview 3)* June 15, 2007
118
-
119
- * CVS SCM module [Brian Phillips]
120
-
121
- * Fix typo in Perforce SCM module [Chris Bailey]
122
-
123
- * ssh_options < server options when connecting [Jamis Buck]
124
-
125
- * Logger defaults to $stderr instead of STDERR [lhartley]
126
-
127
- * Use cp -RPp instead of -a in the remote cache strategy
128
-
129
- * Make the UploadError exception include an array of the hosts that failed [rob@inversepath.com]
130
-
131
- * Allow "empty" roles to be declared [Jamis Buck]
132
-
133
- * Mercurial SCM module [Tobias Luetke, Matthew Elder]
134
-
135
- * Invoke all commands via sh (customizable via :default_shell) [Jamis Buck]
136
-
137
- * Make sure all directories exist on each deploy which are necessary for subsequent commands to succeed, since some SCM's won't save empty directories [Matthew Elder]
138
-
139
- * Add :default_environment variable, which is applied to every command
140
-
141
-
142
- *1.99.1 (2.0 Preview 2)* May 10, 2007
143
-
144
- * Fix some documentation typos [eventualbuddha]
145
-
146
- * Don't retry failed connections if an explicit auth_methods list is given [Chris Farms]
147
-
148
- * Added support for load and exit callbacks, which get invoked when all recipes have been loaded and when all requested tasks have been executed [Jamis Buck]
149
-
150
- * Added support for start and finish callbacks, which get invoked when any task is called via the command-line [Jamis Buck]
151
-
152
- * Make `capify' understand simple command-line switches [Jamis Buck]
153
-
154
- * Make the server definition itself available to SSH channels, rather than just the host name [Jamis Buck]
155
-
156
- * Identify servers by their complete credentials in logs, rather than simply by hostname [Jamis Buck]
157
-
158
- * Uniquely identify servers based on hostname, port, and username, instead of merely on hostname [Jamis Buck]
159
-
160
- * Allow (e.g.) scm_command and local_scm_command to be set in the event of different paths to the scm command on local vs. remote hosts. [Jamis Buck]
161
-
162
- * Kill the "deploy:app" namespace and move those tasks into deploy, directly. [Jamis Buck]
163
-
164
- * Make sure 'desc' applies to the next defined task, in any namespace. [Jamis Buck]
165
-
166
- * Fix shell so that servers for a task are correctly discovered. [Jamis Buck]
167
-
168
- * Added before(), after(), and on() callback creation methods. [Jamis Buck]
169
-
170
- * Fix broken check! method for some deployment strategies. [Jamis Buck]
171
-
172
- * deploy:cold should also run migrations before starting the app [Jamis Buck]
173
-
174
- * Make the copy strategy check out to a temporary directory [Jamis Buck]
175
-
176
-
177
- *1.99.0 (2.0 Preview 1)* April 24, 2007
178
-
179
- * Add `capify' script to make it easier to prepare a project for deployment using cap [Jamis Buck]
180
-
181
- * Make sure the sudo helper understands the SuSE dialect of the sudo password prompt [Steven Wisener]
182
-
183
- * Fix synchronization issue with Gateway initialization [Doug Barth]
184
-
185
- * Added opt-in "compat" and "upgrade" recipes for tasks to aid in the upgrade process to Capistrano 2 [Jamis Buck]
186
-
187
- * The deployment recipes are now opt-in. Just do 'load "deploy"' in your recipe script. [Jamis Buck]
188
-
189
- * Added $CAPISTRANO:HOST$ placeholder in commands, which will be replaced with the name of the host on which the command is executing [Jamis Buck]
190
-
191
- * Added -e switch to explain specific task. Added -X to extend -x. Made -h much briefer. Added -T to list known tasks. [Jamis Buck]
192
-
193
- * Added namespaces for tasks [Jamis Buck]
194
-
195
- * Merged the Configuration and Actor classes, performed various other massive refactorings of the code [Jamis Buck]
196
-
197
-
198
- *1.4.1* (February 24, 2007)
199
-
200
- * Use the no-auth-cache option with subversion so that username/password tokens do not get cached by capistrano usage [jonathan]
201
-
202
- * Deprecated upper-cased variables [Jamis Buck]
203
-
204
- * Make sure Actor#get does not close the SFTP channel (so subsequent SFTP operations work) [Dov Murik]
205
-
206
- * Add :env option to 'run' (and friends) so that you can specify environment variables to be injected into the new process' environment [Mathieu Lajugie]
207
-
208
-
209
- *1.4.0* (February 3, 2007)
210
-
211
- * Use the auth info for subversion more consistently [Jamis Buck]
212
-
213
- * Add a "capture" helper, for capturing the stdout of a remote command and returning it as a string [Jamis Buck]
214
-
215
- * Add a "get" helper, to pull a file from a remote server to the localhost [bmihelac]
216
-
217
- * Fix gateway to actually increment local_port if a port is in use, so that multiple capistrano instances can run at the same time [Mark Imbriaco]
218
-
219
- * Refactor the permissions tweaking in update_code to a separate task so that people on shared hosts can override it as necessary [jaw6]
220
-
221
- * Set umask during the setup task, so that intermediate directories are created with the proper permissions [NeilW]
222
-
223
- * Removed -c/--caprc switch, since the new load order renders it meaningless (just use -f now) [Mike Bailey]
224
-
225
- * Make sure the standard recipe loads first, so that .caprc and friends can override what it defines. [Mike Bailey]
226
-
227
- * Add support for a system-wide capistrano config file [Mike Bailey]
228
-
229
- * Make cold_deploy call update instead of deploy (to avoid invoking the restart task).
230
-
231
- * Make the touch command run by update_code set the TZ to UTC, for consistent setting of asset timestamps. [NeilW]
232
-
233
- * Fix off-by-one bug in show_tasks width-computation [NeilW]
234
-
235
-
236
- *1.3.1* (January 5, 2007)
237
-
238
- * Fix connection problems when using gateways [Ezra Zygmuntowicz]
239
-
240
-
241
- *1.3.0* (December 23, 2006)
242
-
243
- * Deprecate rake integration in favor of invoking `cap' directly [Jamis Buck]
244
-
245
- * Make sure the CVS module references the repository explicitly in cvs_log [weyus@att.net]
246
-
247
- * Remove trace messages when loading a file [Jamis Buck]
248
-
249
- * Cleaner error messages for authentication failures and command errors [Jamis Buck]
250
-
251
- * Added support for ~/.caprc, also -x and -c switches. [Jamis Buck]
252
-
253
- * Updated migrate action to use db:migrate task in Rails instead of the deprecated migrate task [DHH]
254
-
255
- * Allow SSH user and port to be encoded in the hostname strings [Ezra Zygmuntowicz]
256
-
257
- * Fixed that new checkouts were not group-writable [DHH, Jamis Buck]
258
-
259
- * Fixed that cap setup would use 755 on the deploy_to and shared directory roots instead of 775 [DHH]
260
-
261
- * Don't run the cleanup task on servers marked no_release [Jamis Buck]
262
-
263
- * Fix typo in default_io_proc so it correctly checks the stream parameter to see if it is the error stream [Stephen Haberman]
264
-
265
- * Make sure assets in images, javascripts, and stylesheets are touched after updating the code, to ensure the asset timestamping feature of rails works correctly [Jamis Buck]
266
-
267
- * Added warning if password is prompted for and termios is not installed [John Labovitz]
268
-
269
- * Added :as option to sudo, so you can specify who the command is executed as [Mark Imbriaco]
270
-
271
-
272
- *1.2.0* (September 14, 2006)
273
-
274
- * Add experimental 'shell' task [Jamis Buck]
275
-
276
- * Display file for external configurations, rather than inspected proc. [Jamis Buck]
277
-
278
- * Connect to multiple servers in parallel, rather than serially. [Jamis Buck]
279
-
280
- * Add SCM module for Mercurial (closes #4150) [Matthew Elder]
281
-
282
- * Remove unused line in SCM::Base (closes #5619) [chris@seagul.co.uk]
283
-
284
- * More efficient "svn log" usage (closes #5620) [Anatol Pomozov]
285
-
286
- * Better support for key passphrases in the SVN module (closes #5920) [llasram@gmail.com]
287
-
288
- * Fix missing default for :local in cvs.rb (closes #3645) [jeremy@hinegardner.org]
289
-
290
- * Fix awkward spacing in gemspec file (closes #3888) [grant@antiflux.org]
291
-
292
- * Add support for :sudo variable to specify path to sudo (closes #4578) [timothee.peignier@tryphon.org]
293
-
294
- * Make previous_release return nil if there are no previous releases (closes #4959) [bdabney@cavoksolutions.com]
295
-
296
- * Uncache releases list after update_code is called so that newly released dir is included (closes #3766) [Jamis Buck]
297
-
298
- * Allow the subversion scm to accept HTTPS certificates (closes #4792) [Jamis Buck]
299
-
300
- * Make sure rollbacks occur within the scope of the task that triggered them [Jamis Buck]
301
-
302
- * Fixed the default recipe to work with setups that haven't yet gone pids [DHH]
303
-
304
- * Symlink and setup for shared/pids to tmp/pids [DHH]
305
-
306
- * Fix some incorrect usage text (closes #4507) [gerry_shaw@yahoo.com]
307
-
308
- * Added Actor#stream method that makes it easy to create cross-server streams [DHH]. Example:
309
-
310
- desc "Run a tail on multiple log files at the same time"
311
- task :tail_fcgi, :roles => :app do
312
- stream "tail -f #{shared_path}/log/fastcgi.crash.log"
313
- end
314
-
315
- * Make update_code and symlink a macro task under the name "update" for easy of deploy to servers that does not run fcgis [DHH]
316
-
317
- * Changed setup, update_code, rollback_code, and symlink to work on all servers instead of only those in the :app, :web, and :db roles. A server can opt out of being part of the release deployment by setting :no_release => true [DHH]
318
-
319
- * Added support for :except on task declarations as the opposite of :only [DHH]. Example:
320
-
321
- role :app, "192.168.0.2"
322
- role :file, "192.168.0.3", :no_release => true
323
-
324
- task :symlink, :except => { :no_release => true } do
325
- on_rollback { run "ln -nfs #{previous_release} #{current_path}" }
326
- run "ln -nfs #{current_release} #{current_path}"
327
- end
328
-
329
- cap symlink # will not run on 192.168.0.3
330
-
331
- * Deprecate the -r/--recipe switch in favor of -f/--file (for more make/rake-like semantics) [Jamis Buck]
332
-
333
- * Fix gemspec to include a dependency on rake 0.7 [Jamis Buck]
334
-
335
- * Added respect for ENV["HOSTS"] that'll be used instead of the roles specified in the task definition [DHH]. Example:
336
-
337
- HOSTS=192.168.0.1 cap setup # one-off setup for that server, doesn't need to be prespecified in the recipes file
338
-
339
- * Added respect for ENV["ROLES"] that'll be used instead of the roles specified in the task definition [DHH]. Example:
340
-
341
- task :setup, :roles => [ :app, :web, :db ]
342
- # normally this would run every where
343
- end
344
-
345
- ROLES=app cap setup # this will only run for the app role, overwritting the default declaration
346
-
347
- * Added :hosts option to task definition that allows you to specify cross-cutting tasks [DHH]. Example:
348
-
349
- task :setup, :hosts => [ "06.example.com", "01.example.com" ] do
350
- # this task will happen on 06 and 01 regardless of which roles they belong to
351
- end
352
-
353
- * Fix operator precedence problem in script for touching the revisions.log #3223 [jason.garber@emu.edu]
354
-
355
-
356
- *1.1.0* (March 6th, 2006)
357
-
358
- * Simplify the generated capistrano.rake file, and make it easier to customize
359
-
360
- * Use rake-like command-line semantics ("cap deploy", in addition to "cap -a deploy")
361
-
362
- * Rename to capistrano
363
-
364
- * Make the generated capistrano.rake file use rake namespaces, and include all default tasks
365
-
366
- * Look for config/deploy.rb, capfile, and Capfile by default
367
-
368
-
369
- *1.0.1* (February 20th, 2006)
370
-
371
- * Fix broken switchtower_invoke function in switchtower.rake (missing require statement)
372
-
373
-
374
- *1.0.0* (Feburary 18th, 2006)
375
-
376
- * Make CVS module's :local value default to "."
377
-
378
- * Add "invoke" task for executing one-off commands
379
-
380
- * Make port selection smarter for gateway connections
381
-
382
- * Add extension mechanism for custom ST operations and third-party task libraries
383
-
384
- * Make ST rails rake tasks more configurable
385
-
386
- * Add Actor#current_task and simplify Task#servers
387
-
388
- * Add Actor#connect! method for working around lazy connection establishing
389
-
390
- * Make sure IO::TRUNC is specified for Net::SFTP uploads (#3510)
391
-
392
- * Add branch support to CVS [jeremy@hinegardner.org] (#3596)
393
-
394
- * Add bazaar-ng SCM module [Damien Merenne]
395
-
396
- * Add optional :svn_username and :svn_password variables
397
-
398
- * Allow Proc-valued variables to be set more conveniently (set(:foo) { "bar" })
399
-
400
- * Add perforce SCM module [Richard McMahon]
401
-
402
- * Add bazaar (v1) SCM module [Edd Dumbill] (#3533)
403
-
404
- * Fix stftime format string used in CVS module to be Windows-compatible (fixes #3383)
405
-
406
- * Add an better error when a task is run and no servers match the required conditions
407
-
408
- * Add default spinner and cold_deploy tasks, and spinner_user variable
409
-
410
- * Changed restart_via variable to (boolean) use_sudo
411
-
412
- * Only chmod when the revisions.log file is first created
413
-
414
- * Make UPPERCASE variables work
415
-
416
- * Added rails_env variable (defaults to production) for use by tasks that employ the RAILS_ENV environment variable
417
-
418
- * Added Actor.default_io_proc
419
-
420
- * Set :actor key on SSH channel instances
421
-
422
-
423
- *0.10.0* (January 2nd, 2006)
424
-
425
- * Handle ssh password prompts like "someone's password:"
426
-
427
- * Make CLI#echo available as a class method.
428
-
429
- * Add CLI#with_echo.
430
-
431
- * Make the default password prompt available as a class method.
432
-
433
- # Add documentation for the CLI class.
434
-
435
- * Add a sanity check to make sure the correct versions of Net::SSH and Net::SFTP are installed.
436
-
437
- * Added a cleanup task to remove unused releases from the deployment directory
438
-
439
- * Allow password to be reentered on sudo if it was entered incorrectly
440
-
441
- * Use && as the command separator for the checkouts, so that errors are caught early.
442
-
443
- * Ping each SSH connection every 1s during command processing so that long-running commands don't cause the connection to timeout.
444
-
445
- * Add a 0.01s sleep during the command loop so that the CPU doesn't go ballistic while ST is doing its thing.
446
-
447
- * Add :restart_via variable for specifying whether restart ought to use :sudo (default, use sudo)
448
-
449
- * Use SFTP for file transfers (if available).
450
-
451
- * Add an "update_current" task that will do an svn up on the current release
452
-
453
- * Use the :checkout variable to determine what operation to use for svn checkouts (instead of co, like "export").
454
-
455
- * The Rails rake tasks now load ST directly, instead of invoking it via system
456
-
457
- * Added ssh_options variable to configure the SSH connection parameters #2734 [jerrett@bravenet.com]
458
-
459
- * Require Net::SSH 1.0.5
460
-
461
-
462
- *0.9.0* (October 18th, 2005)
463
-
464
- * Use process reaper instead of custom reap script for restarting
465
-
466
- * Use -S switch to set variables before reading recipe files #2242
467
-
468
- * Have setup.rb create a switchtower.cmd file on Win32 platforms #2402
469
-
470
- * Add diff_from_last_deploy to the rails switchtower rakefile template
471
-
472
- * Add diff_from_last_deploy task (currently only works with subversion)
473
-
474
- * Add deploy_with_migrations task.
475
-
476
- * Make the migrate task more customizable.
477
-
478
- * If no password is given with the -p switch, prompt for password immediately.
479
-
480
- * Do not install a switchtower stub in the script directory. Assume the switchtower executable is in the path.
481
-
482
- * Remove trailing newlines from commands to prevent trailing backslash #2141
483
-
484
- * Default parameters work correctly with the generator #2218 [Scott Barron]
485
-
486
- * Attempt to require 'rubygems' explicitly when running the switchtower utility #2134
487
-
488
- * Make default tasks work only on app/db/web roles, so that additional roles may be created for boxes with specific needs without needing to (for instance) deploy the app to those boxes
489
-
490
- * Default the application name to "Application" when using --apply-to
491
-
492
- * Show the help screen instead of an error when no arguments are given
493
-
494
- * Make SwitchTower easier to invoke programmatically via SwitchTower::CLI
495
-
496
- * Specify the revision to release via the :revision variable (defaults to latest revision)
497
-
498
- * Allow variables to be set via the cli using the -s switch
499
-
500
- * Log checkouts to a "revisions.log" file
501
-
502
- * Changed behavior of checkout to use the timestamp as the release name, instead of the revision number
503
-
504
- * Added CVS module (very very experimental!)
505
-
506
- * Works with public keys now, for passwordless deployment
507
-
508
- * Subversion module recognizes the password prompt for HTTP authentication
509
-
510
- * Preserve +x on scripts when using darcs #1929 [Scott Barron]
511
-
512
- * When executing multiline commands, use a backslash to escape the newline
data/MIT-LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2005-2007 Jamis Buck <jamis@37signals.com>
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.
data/README DELETED
@@ -1,43 +0,0 @@
1
- = Capistrano
2
-
3
- Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH. It uses a simple DSL (borrowed in part from Rake, http://rake.rubyforge.org/) that allows you to define _tasks_, which may be applied to machines in certain roles. It also supports tunneling connections via some gateway machine to allow operations to be performed behind VPN's and firewalls.
4
-
5
- Capistrano was originally designed to simplify and automate deployment of web applications to distributed environments, and originally came bundled with a set of tasks designed for deploying Rails applications. The deployment tasks are now (as of Capistrano 2.0) opt-in and require clients to explicitly put
6
- "load 'deploy'" in their recipes.
7
-
8
- == Dependencies
9
-
10
- * Net::SSH and Net::SFTP (http://net-ssh.rubyforge.org)
11
- * Needle (via Net::SSH)
12
- * HighLine (http://highline.rubyforge.org)
13
-
14
- If you want to run the tests, you'll also need to have the following dependencies installed:
15
-
16
- * Mocha (http://mocha.rubyforge.org)
17
-
18
- == Assumptions
19
-
20
- Capistrano is "opinionated software", which means it has very firm ideas about how things ought to be done, and tries to force those ideas on you. Some of the assumptions behind these opinions are:
21
-
22
- * You are using SSH to access the remote servers.
23
- * You either have the same password to all target machines, or you have public keys in place to allow passwordless access to them.
24
-
25
- Do not expect these assumptions to change.
26
-
27
- == Usage
28
-
29
- In general, you'll use Capistrano as follows:
30
-
31
- * Create a recipe file ("capfile" or "Capfile").
32
- * Use the +cap+ script to execute your recipe.
33
-
34
- Use the +cap+ script as follows:
35
-
36
- cap sometask
37
-
38
- By default, the script will look for a file called one of +capfile+ or +Capfile+. The +someaction+ text indicates which task to execute. You can do "cap -h" to see all the available options and "cap -T" to see all the available tasks.
39
-
40
- == KNOWN ISSUES
41
-
42
- * Using "put" to upload a file to two or more hosts when a gateway is in effect has a good chance of crashing with a "corrupt mac detected" error. This is due to a bug in Net::SSH.
43
- * Running commands may rarely hang inexplicably. This appears to be specific only to certain platforms. Most people will never see this behavior.
data/examples/sample.rb DELETED
@@ -1,14 +0,0 @@
1
- # set :user, "flippy"
2
- # set :password, "hello-flippy"
3
- # set :gateway, "gateway.example.com"
4
-
5
- role :web, "web1.example.com"
6
- role :app, "app1.example.com", "app2.example.com"
7
-
8
- desc <<-DESC
9
- This is a sample task. It is only intended to be used as a demonstration of \
10
- how you can define your own tasks.
11
- DESC
12
- task :sample_task, :roles => :app do
13
- run "ls -l"
14
- end
@@ -1,45 +0,0 @@
1
- module Capistrano
2
- class Callback
3
- attr_reader :source, :options, :only, :except
4
-
5
- def initialize(source, options={})
6
- @source = source
7
- @options = options
8
- @only = Array(options[:only]).map { |v| v.to_s }
9
- @except = Array(options[:except]).map { |v| v.to_s }
10
- end
11
-
12
- def applies_to?(task)
13
- if task && only.any?
14
- return only.include?(task.fully_qualified_name)
15
- elsif task && except.any?
16
- return !except.include?(task.fully_qualified_name)
17
- else
18
- return true
19
- end
20
- end
21
- end
22
-
23
- class ProcCallback < Callback
24
- def call
25
- source.call
26
- end
27
- end
28
-
29
- class TaskCallback < Callback
30
- attr_reader :config
31
-
32
- def initialize(config, source, options={})
33
- super(source, options)
34
- @config = config
35
- end
36
-
37
- def call
38
- config.find_and_execute_task(source)
39
- end
40
-
41
- def applies_to?(task)
42
- super && (task.nil? || task.fully_qualified_name != source.to_s)
43
- end
44
- end
45
- end