capistrano 3.4.1 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -5
  3. data/.rubocop.yml +49 -0
  4. data/.travis.yml +5 -4
  5. data/CHANGELOG.md +72 -9
  6. data/CONTRIBUTING.md +61 -93
  7. data/DEVELOPMENT.md +122 -0
  8. data/Gemfile +2 -2
  9. data/LICENSE.txt +1 -1
  10. data/README.md +121 -43
  11. data/RELEASING.md +16 -0
  12. data/Rakefile +4 -1
  13. data/bin/cap +1 -1
  14. data/capistrano.gemspec +16 -21
  15. data/features/doctor.feature +11 -0
  16. data/features/step_definitions/assertions.rb +17 -17
  17. data/features/step_definitions/cap_commands.rb +0 -1
  18. data/features/step_definitions/setup.rb +12 -8
  19. data/features/support/env.rb +5 -5
  20. data/features/support/remote_command_helpers.rb +8 -6
  21. data/features/support/vagrant_helpers.rb +5 -4
  22. data/issue_template.md +21 -0
  23. data/lib/Capfile +5 -1
  24. data/lib/capistrano/all.rb +9 -10
  25. data/lib/capistrano/application.rb +36 -26
  26. data/lib/capistrano/configuration.rb +56 -41
  27. data/lib/capistrano/configuration/empty_filter.rb +9 -0
  28. data/lib/capistrano/configuration/filter.rb +18 -47
  29. data/lib/capistrano/configuration/host_filter.rb +30 -0
  30. data/lib/capistrano/configuration/null_filter.rb +9 -0
  31. data/lib/capistrano/configuration/plugin_installer.rb +33 -0
  32. data/lib/capistrano/configuration/question.rb +10 -7
  33. data/lib/capistrano/configuration/role_filter.rb +30 -0
  34. data/lib/capistrano/configuration/server.rb +22 -23
  35. data/lib/capistrano/configuration/servers.rb +6 -7
  36. data/lib/capistrano/configuration/variables.rb +136 -0
  37. data/lib/capistrano/defaults.rb +13 -3
  38. data/lib/capistrano/deploy.rb +1 -1
  39. data/lib/capistrano/doctor.rb +5 -0
  40. data/lib/capistrano/doctor/environment_doctor.rb +19 -0
  41. data/lib/capistrano/doctor/gems_doctor.rb +45 -0
  42. data/lib/capistrano/doctor/output_helpers.rb +79 -0
  43. data/lib/capistrano/doctor/variables_doctor.rb +66 -0
  44. data/lib/capistrano/dotfile.rb +1 -2
  45. data/lib/capistrano/dsl.rb +12 -14
  46. data/lib/capistrano/dsl/env.rb +11 -42
  47. data/lib/capistrano/dsl/paths.rb +12 -13
  48. data/lib/capistrano/dsl/stages.rb +2 -4
  49. data/lib/capistrano/dsl/task_enhancements.rb +5 -7
  50. data/lib/capistrano/framework.rb +1 -1
  51. data/lib/capistrano/git.rb +17 -9
  52. data/lib/capistrano/hg.rb +4 -4
  53. data/lib/capistrano/i18n.rb +24 -24
  54. data/lib/capistrano/immutable_task.rb +29 -0
  55. data/lib/capistrano/install.rb +1 -1
  56. data/lib/capistrano/plugin.rb +95 -0
  57. data/lib/capistrano/scm.rb +7 -20
  58. data/lib/capistrano/setup.rb +19 -5
  59. data/lib/capistrano/svn.rb +9 -5
  60. data/lib/capistrano/tasks/console.rake +4 -8
  61. data/lib/capistrano/tasks/deploy.rake +75 -62
  62. data/lib/capistrano/tasks/doctor.rake +19 -0
  63. data/lib/capistrano/tasks/framework.rake +13 -14
  64. data/lib/capistrano/tasks/git.rake +10 -11
  65. data/lib/capistrano/tasks/hg.rake +7 -7
  66. data/lib/capistrano/tasks/install.rake +14 -15
  67. data/lib/capistrano/tasks/svn.rake +7 -7
  68. data/lib/capistrano/templates/Capfile +3 -3
  69. data/lib/capistrano/templates/deploy.rb.erb +6 -5
  70. data/lib/capistrano/upload_task.rb +1 -1
  71. data/lib/capistrano/version.rb +1 -1
  72. data/lib/capistrano/version_validator.rb +4 -6
  73. data/spec/integration/dsl_spec.rb +286 -239
  74. data/spec/integration_spec_helper.rb +3 -5
  75. data/spec/lib/capistrano/application_spec.rb +22 -14
  76. data/spec/lib/capistrano/configuration/empty_filter_spec.rb +17 -0
  77. data/spec/lib/capistrano/configuration/filter_spec.rb +82 -84
  78. data/spec/lib/capistrano/configuration/host_filter_spec.rb +61 -0
  79. data/spec/lib/capistrano/configuration/null_filter_spec.rb +17 -0
  80. data/spec/lib/capistrano/configuration/question_spec.rb +12 -16
  81. data/spec/lib/capistrano/configuration/role_filter_spec.rb +64 -0
  82. data/spec/lib/capistrano/configuration/server_spec.rb +102 -110
  83. data/spec/lib/capistrano/configuration/servers_spec.rb +124 -141
  84. data/spec/lib/capistrano/configuration_spec.rb +150 -61
  85. data/spec/lib/capistrano/doctor/environment_doctor_spec.rb +44 -0
  86. data/spec/lib/capistrano/doctor/gems_doctor_spec.rb +61 -0
  87. data/spec/lib/capistrano/doctor/output_helpers_spec.rb +47 -0
  88. data/spec/lib/capistrano/doctor/variables_doctor_spec.rb +79 -0
  89. data/spec/lib/capistrano/dsl/paths_spec.rb +58 -50
  90. data/spec/lib/capistrano/dsl/task_enhancements_spec.rb +62 -32
  91. data/spec/lib/capistrano/dsl_spec.rb +6 -8
  92. data/spec/lib/capistrano/git_spec.rb +35 -7
  93. data/spec/lib/capistrano/hg_spec.rb +14 -5
  94. data/spec/lib/capistrano/immutable_task_spec.rb +31 -0
  95. data/spec/lib/capistrano/plugin_spec.rb +84 -0
  96. data/spec/lib/capistrano/scm_spec.rb +6 -7
  97. data/spec/lib/capistrano/svn_spec.rb +40 -14
  98. data/spec/lib/capistrano/upload_task_spec.rb +7 -7
  99. data/spec/lib/capistrano/version_validator_spec.rb +37 -45
  100. data/spec/lib/capistrano_spec.rb +2 -3
  101. data/spec/spec_helper.rb +8 -8
  102. data/spec/support/Vagrantfile +9 -10
  103. data/spec/support/tasks/database.rake +3 -3
  104. data/spec/support/tasks/fail.rake +4 -3
  105. data/spec/support/tasks/failed.rake +2 -2
  106. data/spec/support/tasks/plugin.rake +6 -0
  107. data/spec/support/tasks/root.rake +4 -4
  108. data/spec/support/test_app.rb +31 -30
  109. metadata +93 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69ec5d772357af1d69b41f723ae4e21cdd4da62f
4
- data.tar.gz: c5fbbbc5d594f7959d836144fa31cfbf671df610
3
+ metadata.gz: 997bdc47eec05054270bbd80c9d5e44fb142c7ad
4
+ data.tar.gz: 82ae85408f7e67427b2cffccc95c2fe33c834288
5
5
  SHA512:
6
- metadata.gz: ab6ff6ef7b481d3268b44b0b5e63c683888501471bd4b1bd45a9881067bcb0c606245b3eeb8522ec184b632179811ad5507e3a82eecf51634251a23596e7d9fe
7
- data.tar.gz: 85907284c746b0e35478d6cd725faea3d9b1c3724821ea2d3159979c1d09a46bbcd7a7e917667a4fa79411e73147f54e45c06e692686d1f7a2b1e78a6370b390
6
+ metadata.gz: 3a3314345dc42f3eb9c26c9eb249bf20281d4e57944c19b7e04f97597daac149a858c5eddda45958b9304323d3fa36722d845699c704345724993d100efd3117
7
+ data.tar.gz: b16b26b8b29ea8a82bbd61850595807f9a045f7d3a3fb66330ce7fb4b00fd6775747a482a1eb3cec3c1ecdb9604487fe7b509f1884d23d39fbe1464a2399d0ad
data/.gitignore CHANGED
@@ -1,10 +1,15 @@
1
1
  *.gem
2
2
  *.rbc
3
+ *.swp
3
4
  .bundle
4
5
  .config
6
+ .rspec
7
+ .rspec-local
8
+ .ruby-version
5
9
  .yardoc
6
10
  Gemfile.lock
7
11
  InstalledFiles
12
+ _site
8
13
  _yardoc
9
14
  coverage
10
15
  doc/
@@ -12,11 +17,8 @@ lib/bundler/man
12
17
  pkg
13
18
  rdoc
14
19
  spec/reports
20
+ tags
15
21
  test/tmp
16
22
  test/version_tmp
17
23
  tmp
18
- .rspec-local
19
- .ruby-version
20
- _site
21
- .rspec
22
- *.swp
24
+ vendor/
@@ -0,0 +1,49 @@
1
+ AllCops:
2
+ DisplayCopNames: true
3
+ DisplayStyleGuide: true
4
+ TargetRubyVersion: 2.0
5
+
6
+ Style/BarePercentLiterals:
7
+ EnforcedStyle: percent_q
8
+ Style/ClassAndModuleChildren:
9
+ Enabled: false
10
+ Style/DoubleNegation:
11
+ Enabled: false
12
+ Style/SpaceAroundEqualsInParameterDefault:
13
+ EnforcedStyle: no_space
14
+ Style/StringLiterals:
15
+ EnforcedStyle: double_quotes
16
+ Style/TrivialAccessors:
17
+ AllowPredicates: true
18
+ Style/PercentLiteralDelimiters:
19
+ Enabled: false
20
+ Style/SingleLineBlockParams:
21
+ Enabled: false
22
+ Style/ModuleFunction:
23
+ Enabled: false
24
+
25
+ # Enable someday
26
+ Style/Documentation:
27
+ Enabled: false
28
+
29
+ # Needs refactors
30
+ Metrics/PerceivedComplexity:
31
+ Enabled: false
32
+ Metrics/CyclomaticComplexity:
33
+ Enabled: false
34
+ Metrics/MethodLength:
35
+ Enabled: false
36
+ Style/PredicateName:
37
+ Enabled: false
38
+ Metrics/LineLength:
39
+ Enabled: false
40
+ Metrics/AbcSize:
41
+ Enabled: false
42
+ Style/PerlBackrefs:
43
+ Enabled: false
44
+ Metrics/ClassLength:
45
+ Enabled: false
46
+ Metrics/ModuleLength:
47
+ Enabled: false
48
+ Style/AccessorMethodName:
49
+ Enabled: false
@@ -1,10 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.0
4
- - 2.0.0
5
- - 1.9.3
3
+ - 2.3.0
4
+ - 2.2
5
+ - 2.1
6
+ - 2.0
6
7
  - rbx-2
7
- script: bundle exec rake spec
8
+ script: bundle exec rake spec rubocop
8
9
  install: bundle install --jobs=1
9
10
  cache: bundler
10
11
  branches:
@@ -4,14 +4,71 @@ Reverse Chronological Order:
4
4
 
5
5
  ## master
6
6
 
7
- https://github.com/capistrano/capistrano/compare/v3.4.1...HEAD
8
-
9
- ## `3.4.1`
10
-
11
- https://github.com/capistrano/capistrano/compare/v3.4.0...v3.4.1
12
-
13
- * Fix compatibility with Rake 11.0 (backported from
14
- https://github.com/capistrano/capistrano/pull/1631) (@leehambley)
7
+ https://github.com/capistrano/capistrano/compare/v3.5.0...HEAD
8
+
9
+ ## `3.5.0`
10
+
11
+ https://github.com/capistrano/capistrano/compare/v3.4.1...v3.5.0
12
+
13
+ **You'll notice a big cosmetic change in this release: the default logging
14
+ format has been changed to
15
+ [Airbrussh](https://github.com/mattbrictson/airbrussh).** For more details on
16
+ what Airbrussh does
17
+ and how to configure it, visit the
18
+ [Airbrussh README](https://github.com/mattbrictson/airbrussh#readme).
19
+
20
+ * To opt out of the new format, simply add `set :format, :pretty` to switch to
21
+ the old default of Capistrano 3.4.0 and earlier.
22
+ * If you are already an Airbrussh user, note that the default configuration has
23
+ changed, and the syntax for configuring Airbrussh has changed as well.
24
+ [This simple upgrade guide](https://github.com/mattbrictson/airbrussh/blob/master/UPGRADING-CAP-3.5.md)
25
+ will walk you through it.
26
+
27
+ ### Potentially breaking changes:
28
+
29
+ * Drop support for Ruby 1.9.3 (Capistrano may still work with 1.9.3, but it is
30
+ no longer officially supported)
31
+ * Git version 1.6.3 or greater is now required
32
+ * Remove 'vendor/bundle' from default :linked_dirs (@ojab)
33
+ * Old versions of SSHKit (before 1.9.0) are no longer supported
34
+ * SHA1 hash of current git revision written to REVISION file is no longer abbreviated
35
+
36
+ ### New features:
37
+
38
+ * Added a `doctor` task that outputs helpful troubleshooting information. Try it like this: `cap production doctor`. (@mattbrictson)
39
+ * Added a `dry_run?` helper method
40
+ * `remove` DSL method for removing values like from arrays like `linked_dirs`
41
+ * `append` DSL method for pushing values like `linked_dirs`
42
+ [#1447](https://github.com/capistrano/capistrano/pull/1447),
43
+ [#1586](https://github.com/capistrano/capistrano/pull/1586)
44
+ * Added support for git shallow clone
45
+ * Added new runtime option `--print-config-variables` that inspect all defined config variables in order to assist development of new capistrano tasks (@gerardo-navarro)
46
+ * Prune dead tracking branches from git repositories while updating
47
+ * Added options to set username and password when using Subversion as SCM (@dsthode)
48
+ * Allow after() to refer to tasks that have not been loaded yet (@jcoglan)
49
+ * Allow use "all" as string for server filtering (@theist)
50
+ * Print a warning and abort if "load:defaults" is erroneously invoked after
51
+ capistrano is already loaded, e.g. when a plugin is loaded in `deploy.rb`
52
+ instead of `Capfile`. (@mattbrictson)
53
+ * Added option to set specific revision when using Subversion as SCM (@marcovtwout)
54
+ * Deduplicate list of linked directories
55
+ * Integration with Harrow.io (See http://capistranorb.com/documentation/harrow/) when running `cap install`
56
+
57
+ ### Fixes:
58
+
59
+ * Capistrano is now fully-compatible with Rake 11.0. (@mattbrictson)
60
+ * Fix filtering behaviour when using literal hostnames in on() block (@townsen)
61
+ * Allow dot in :application name (@marcovtwout)
62
+ * Fixed git-ssh permission error (@spight)
63
+
64
+ ### Other changes:
65
+
66
+ * Internal Rubocop cleanups.
67
+ * Removed the post-install message (@Kriechi)
68
+ * Refactor `Configuration::Filter` to use filtering strategies instead
69
+ of case statements (@cshaffer)
70
+ * Clean up rubocop lint warnings (@cshaffer)
71
+ * Ensure task invocation within after hooks is namespace aware (@thickpaddy)
15
72
 
16
73
  ## `3.4.0`
17
74
 
@@ -32,7 +89,7 @@ https://github.com/capistrano/capistrano/compare/v3.3.5...v3.4.0
32
89
  * Breaking Changes
33
90
  * Hosts with the same name are now consolidated into one irrespective of the
34
91
  user and port. This allows multiple declarations of a server to be made safely.
35
- The last declared properties will win. See capistrnorb.com Properties documentation
92
+ The last declared properties will win. See capistranorb.com Properties documentation
36
93
  for details.
37
94
  * Inside the on() block the host variable is now a copy of the host, so changes can be
38
95
  made within the block (such as dynamically overriding the user) that will not persist.
@@ -130,6 +187,12 @@ https://github.com/capistrano/capistrano/compare/v3.2.1...v3.3.3
130
187
  This allows roles to specify properties common to all servers and
131
188
  then for individual servers to modify them, keeping things DRY
132
189
 
190
+ * Enhancements (@Kriechi)
191
+ * Added validate method to DSL to allow validation of certain values
192
+ - validate values before assignment inside of `set(:key, value)`
193
+ - should raise a `Capistrano::ValidationError` if invalid
194
+ * Added default validation for Capistrano-specific variables
195
+
133
196
  Breaking Changes:
134
197
  * By using Ruby's noecho method introduced in Ruby version 1.9.3, we dropped support for Ruby versions prior to 1.9.3. See [issue #878](https://github.com/capistrano/capistrano/issues/878) and [PR #1112](https://github.com/capistrano/capistrano/pull/1112) for more information. (@kaikuchn)
135
198
  * Track (anonymous) statistics, see https://github.com/capistrano/stats. This breaks automated deployment on continuous integration servers until the `.capistrano/metrics` file is created (with content `full` to simulate a "yes") via the interactive prompt or manually.
@@ -1,93 +1,61 @@
1
- ## CONTRIBUTING
2
-
3
- **The issue tracker is intended exclusively for things that are genuine bugs,
4
- or improvements to the code.**
5
-
6
- If you have a user support query, or you suspect that you might just be holding
7
- it wrong, drop us a line at [the mailing list](https://groups.google.com/forum/#!forum/capistrano), [StackOverflow](http://stackoverflow.com/questions/tagged/capistrano) or at [CodersClan](http://codersclan.net/?repo_id=325&source=contributing). The
8
- mailing list is moderated to cut down on spam, so please be patient, if you use
9
- StackOverflow, make sure to tag your post with "Capistrano". (Not forgetting
10
- any other tags which might relate, rvm, rbenv, Ubuntu, etc.)
11
-
12
- If you have an urgent problem you can use [CodersClan](http://codersclan.net/?repo_id=325&source=contributing) to solve your problem quickly. CodersClan has a community of Capistrano experts dedicated to solve code problems for bounties.
13
-
14
- Wherever you post please be sure to include the version of Capistrano you are
15
- using, which versions of any plugins (*capistrano-rvm*, *capistrano-bundler*,
16
- etc.). Proper logs are vital, if you need to redact them, go ahead, but be
17
- careful not to remove anything important. Please take care to format logs and
18
- code correctly, ideally wrapped to a sane line length, and in a mono spaced
19
- font. This all helps us to gather a clear understanding of what is going wrong.
20
-
21
- **If you really think that you found a bug, or want to enquire about a feature,
22
- or send us a patch to add a feature, or fix a bug, please keep a few things in
23
- mind:**
24
-
25
- ## When Submitting An Issue:
26
-
27
- If you think there's a bug, please make sure it's really a bug in Capistrano.
28
- As Capistrano sits on the (sometimes rough) edges between SSH, Git, the
29
- network, Ruby, RVM, rbenv, chruby, Bundler, your Linux distribution, countless
30
- shell configuration files on your end, and the server… there's a good chance
31
- the problem lies somewhere else.
32
-
33
- Please make sure you have reviewed the FAQs at http://www.capistranorb.com/.
34
-
35
- It's really important to include as much information as possible, versions of
36
- everything involved, anything weird you might be doing that might be having
37
- side effects, include as much as you can in a [GitHub
38
- Gist](https://gist.github.com/) and link that from the issue, with tools such
39
- as Gist, we can link to individual lines and help work out what is going wrong.
40
-
41
- If you are an experienced Ruby programmer, take a few minutes to get our test
42
- suite running, and do what you can to get a test case written that fails, from
43
- there we can understand exactly what it takes to reproduce the issue (as it's
44
- documented with code)
45
-
46
- ## When Requesting a Feature:
47
-
48
- We can't make everyone happy all of the time, and we've been around the block
49
- well enough to know when something doesn't work well, or when your proposed fix
50
- might impact other things.
51
-
52
- We prefer to [start with
53
- "no"](https://gettingreal.37signals.com/ch05_Start_With_No.php), and help you
54
- find a better way to solve your problem, sometimes the solution is to [build
55
- faster
56
- horses](http://blog.cauvin.org/2010/07/henry-fords-faster-horse-quote.html),
57
- sometimes the solution is to work around it in a neat way that you didn't know
58
- existed.
59
-
60
- Please don't be offended if we say no, and don't be afraid to fight your
61
- corner, try and avoid being one of the [poisonous
62
- people](https://www.youtube.com/watch?v=Q52kFL8zVoM)
63
-
64
- ## Submitting A Pull Request:
65
-
66
- Pull requests are awesome, and if they arrive with decent tests, and conform to
67
- the guidelines below, we'll merge them in as soon as possible, we'll let you
68
- know which release we're planning them for (we adhere to
69
- [semver](http://semver.org/) so please don't be upset if we plan your changes
70
- for a later release)
71
-
72
- * The code is MIT licenced, your code will fall under the same license if we merge it.
73
- * We can't merge it without a [good commit
74
- message](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message).
75
- If you do this right, Github will use the commit message as the body of your
76
- pull request, double win.
77
- * If you are referencing an improvement to an existing issue (if we have not
78
- yet merged it )
79
- * Add an entry to the `CHANGELOG` under the `### master` section, but please
80
- don't mess with the version.
81
- * If you add a new feature, please make sure to document it, open a
82
- corresponding pull request in [the
83
- documentation](https://github.com/capistrano/documentation) and mention the
84
- code change pull request over there, and Github will link everything up. If
85
- it's a simple feature, or a new variable, or something changed, it may be
86
- appropriate simply to document it in the generated `Capfile` or `deploy.rb`, or
87
- in the `README`
88
- * Take care to squash your commit into one single commit with a good message, it
89
- saves us a lot of work in maintaining the CHANGELOG if we can generate it from
90
- the commit messages between the release tags!
91
- * Tests! It's tricky to test some parts of Capistrano, but do your best, it
92
- might just serve as a starting point for us to build a reliable test on top of,
93
- and help us understand where you are coming from.
1
+ **Hello and welcome!** Please look over this document before opening an issue or submitting a pull request to Capistrano.
2
+
3
+ * [If you’re looking for help or have a question](#if-youre-looking-for-help-or-have-a-question)
4
+ * [Reporting bugs](#reporting-bugs)
5
+ * [Requesting new features or improvements](#requesting-new-features-or-improvements)
6
+ * [Contributing code or documentation](#contributing-code-or-documentation)
7
+
8
+ ## If you’re looking for help or have a question
9
+
10
+ **Check [Stack Overflow](http://stackoverflow.com/questions/tagged/capistrano) first if you need help using Capistrano.** You are more likely to get a quick response at Stack Overflow for common Capistrano topics. Make sure to tag your post with `capistrano` and/or `capistrano3` (not forgetting any other tags which might relate: rvm, rbenv, Ubuntu, etc.)
11
+
12
+ If you have an urgent problem you can also try [CodersClan](http://codersclan.net/?repo_id=325&source=contributing), which has a community of Capistrano experts dedicated to solve code problems for bounties.
13
+
14
+ When posting to Stack Overflow or CodersClan, be sure to include relevant information:
15
+
16
+ * Capistrano version
17
+ * Plugins and versions (capistrano-rvm, capistrano-bundler, etc.)
18
+ * Logs and backtraces
19
+
20
+ If you think you’ve found a bug in Capistrano itself, then…
21
+
22
+ ## Reporting bugs
23
+
24
+ As much the Capistrano community tries to write good, well-tested code, bugs still happen. Sorry about that!
25
+
26
+ **In case you’ve run across an already-known issue, check the FAQs first on the [official Capistrano site](http://capistranorb.com).**
27
+
28
+ When opening a bug report, please include the output of the `cap <stage> doctor` task, e.g.:
29
+
30
+ ```
31
+ cap production doctor
32
+ ```
33
+
34
+ Also include in your report:
35
+
36
+ * Versions of Ruby, Capistrano, and any plugins you’re using (if `doctor` didn't already do this for you)
37
+ * A description of the troubleshooting steps you’ve taken
38
+ * Logs and backtraces
39
+ * Sections of your `deploy.rb` that may be relevant
40
+ * Any other unique aspects of your environment
41
+
42
+ If you are an experienced Ruby programmer, take a few minutes to get the Capistrano test suite running (see [DEVELOPMENT.md][]), and do what you can to get a test case written that fails. *This will be a huge help!*
43
+
44
+ ## Requesting new features or improvements
45
+
46
+ Capistrano continues to improve thanks to people like you! Feel free to open a GitHub issue for any or all of these ideas:
47
+
48
+ * New features that would make Capistrano even better
49
+ * Areas where documentation could be improved
50
+ * Ways to improve developer happiness
51
+
52
+ Generally speaking the maintainers are very conservative about adding new features, and we can’t guarantee that the community will agree with or implement your idea. Please don’t be offended if we say no! The Capistrano team will do our best to review all suggestions and at least weigh in with a comment or suggest a workaround, if applicable.
53
+
54
+ **Your idea will have a much better chance of becoming reality if you contribute code for it (even if the code is incomplete!).**
55
+
56
+ ## Contributing code or documentation
57
+
58
+ So you want to contribute to Capistrano? Awesome! We have a whole separate document just you. It explains our pull request workflow and walks you through setting up the development environment: [DEVELOPMENT.md][].
59
+
60
+
61
+ [DEVELOPMENT.md]: https://github.com/capistrano/capistrano/blob/master/DEVELOPMENT.md
@@ -0,0 +1,122 @@
1
+ Thanks for helping build Capistrano! Here are the development practices followed by our community.
2
+
3
+ * [Who can help](#who-can-help)
4
+ * [Setting up your development environment](#setting-up-your-development-environment)
5
+ * [Coding guidelines](#coding-guidelines)
6
+ * [Submitting a pull request](#submitting-a-pull-request)
7
+ * [Managing GitHub issues](#managing-github-issues)
8
+ * [Reviewing and merging pull requests](#reviewing-and-merging-pull-requests)
9
+
10
+ ## Who can help
11
+
12
+ Everyone can help improve Capistrano. There are ways to contribute even if you aren’t a Ruby programmer. Here’s what you can do to help the project:
13
+
14
+ * adding to or fixing typos/quality in documentation
15
+ * adding failing tests for reported bugs
16
+ * writing code (no contribution is too small!)
17
+ * reviewing pull requests and suggesting improvements
18
+ * reporting bugs or suggesting new features (see [CONTRIBUTING.md][])
19
+
20
+ ## Setting up your development environment
21
+
22
+ Capistrano is a Ruby project, so we expect you to have a functioning Ruby environment. To hack on Capistrano you will further need some specialized tools to run its test suite.
23
+
24
+ Make sure to install:
25
+
26
+ * [Bundler](https://bundler.io/) 1.10.5 (see note)
27
+ * [Vagrant](https://www.vagrantup.com/)
28
+ * [VirtualBox](https://www.virtualbox.org/wiki/Downloads) (or another [Vagrant-supported](https://docs.vagrantup.com/v2/getting-started/providers.html) VM host)
29
+
30
+ *Note: As of this writing (December 2015), Vagrant does not work with Bundler > 1.10.5. If you have multiple versions of Bundler installed, use the special underscore command-line argument to force a compatible version, like this: `bundle _1.10.5_ exec rake features`.*
31
+
32
+ ### Running tests
33
+
34
+ Capistrano has two test suites: an RSpec suite and a Cucumber suite. The RSpec suite handles quick feedback unit specs. The Cucumber suite is an integration suite that uses Vagrant to deploy to a real virtual server.
35
+
36
+ ```
37
+ # Ensure all dependencies are installed
38
+ $ bundle install
39
+
40
+ # Run the RSpec suite
41
+ $ bundle exec rake spec
42
+
43
+ # Run the Cucumber suite (requires Bundler 1.10.5)
44
+ $ bundle exec rake features
45
+
46
+ # Run the Cucumber suite and leave the VM running (faster for subsequent runs)
47
+ $ bundle exec rake features KEEP_RUNNING=1
48
+ ```
49
+
50
+ ### Report failing Cucumber features!
51
+
52
+ Currently, the Capistrano Travis build does *not* run the Cucumber suite. This means it is possible for a failing Cucumber feature to sneak in without being noticed by our continuous integration checks.
53
+
54
+ **If you come across a failing Cucumber feature, this is a bug.** Please report it by opening a GitHub issue. Or even better: do your best to fix the feature and submit a pull request!
55
+
56
+ ## Coding guidelines
57
+
58
+ This project uses [RuboCop](https://github.com/bbatsov/rubocop) to enforce standard Ruby coding guidelines.
59
+
60
+ * Test that your contributions pass with `rake rubocop`
61
+ * Rubocop is also run as part of the full test suite with `rake`
62
+ * Note the Travis build will fail and your PR cannot be merged if Rubocop finds errors
63
+
64
+ ## Submitting a pull request
65
+
66
+ Pull requests are awesome, and if they arrive with decent tests, and conform to the guidelines below, we'll merge them in as soon as possible, we'll let you know which release we're planning them for (we adhere to [semver](http://semver.org/) so please don't be upset if we plan your changes for a later release).
67
+
68
+ Your code should conform to these guidelines:
69
+
70
+ * The code is MIT licenced, your code will fall under the same license if we merge it.
71
+ * We can't merge it without a [good commit message](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message). If you do this right, Github will use the commit message as the body of your pull request, double win.
72
+ * If you are making an improvement/fix for an existing issue, make sure to mention the issue number (if we have not yet merged it )
73
+ * Add an entry to the `CHANGELOG` under the `### master` section, but please don't mess with the version.
74
+ * If you add a new feature, please make sure to document it, open a corresponding pull request in [the documentation](https://github.com/capistrano/documentation) and mention the code change pull request over there, and Github will link everything up. If it's a simple feature, or a new variable, or something changed, it may be appropriate simply to document it in the generated `Capfile` or `deploy.rb`, or in the `README`
75
+ * Take care to squash your commit into one single commit with a good message, it saves us a lot of work in maintaining the CHANGELOG if we can generate it from the commit messages between the release tags!
76
+ * Tests! It's tricky to test some parts of Capistrano, but do your best, it might just serve as a starting point for us to build a reliable test on top of, and help us understand where you are coming from.
77
+
78
+ ## Managing GitHub issues
79
+
80
+ The Capistrano maintainers will do our best to review all GitHub issues. Here’s how we manage issues:
81
+
82
+ 1. Issues will be acknowledged with an appropriate label (see below).
83
+ 2. Issues that are duplicates, spam, or irrelevant (e.g. wrong project), or are questions better suited for Stack Overflow (see [CONTRIBUTING.md][]) will be closed.
84
+ 3. Once an issue is fixed or resolved in an upcoming Capistrano release, it will be closed and assigned to a GitHub milestone for that upcoming version number.
85
+
86
+ The maintainers do not have time to fix every issue ourselves, but we will gladly accept pull requests, especially for issues labeled as "you can help" (see below).
87
+
88
+ ### Issue labels
89
+
90
+ Capistrano uses these GitHub labels to categorize issues:
91
+
92
+ * **bug?** – Could be a bug (not reproducible or might be user error)
93
+ * **confirmed bug** – Definitely a bug
94
+ * **new feature** – A request for Capistrano to add a feature or work differently
95
+ * **chore** – A TODO that is neither a bug nor a feature (e.g. improve docs, CI infrastructure, etc.)
96
+
97
+ Also, the Capistrano team will sometimes add these labels to facilitate communication and encourage community feedback:
98
+
99
+ * **discuss!** – The Capistrano team wants more feedback from the community on this issue; e.g. how a new feature should work, or whether a bug is serious or not.
100
+ * **you can help!** – We want the community to help by submitting a pull request to solve a bug or add a feature. If you are looking for ways to contribute to Capistrano, start here!
101
+ * **needs more info** – We need more info from the person who opened the issue; e.g. steps to reproduce a bug, clarification on a desired feature, etc.
102
+
103
+ *These labels were inspired by Daniel Doubrovkine’s [2014 Golden Gate Ruby Conference talk](http://confreaks.tv/videos/gogaruco2014-taking-over-someone-else-s-open-source-projects).*
104
+
105
+ ## Reviewing and merging pull requests
106
+
107
+ Pull requests and issues follow similar workflows. Before merging a pull request, the Capistrano maintainers will check that these requirements are met:
108
+
109
+ * All CI checks pass
110
+ * Significant changes in behavior or fixes mentioned in the CHANGELOG
111
+ * Clean commit history
112
+ * New features are documented
113
+ * Code changes/additions are tested
114
+
115
+ If any of these are missing, the **needs more info** label is assigned to the pull request to indicate the PR is incomplete.
116
+
117
+ Merging a pull request is a decision entrusted to the maintainers of the Capistrano project. Any maintainer is free to merge a pull request if they feel the PR meets the above requirements and is in the best interest of the Capistrano community.
118
+
119
+ After a pull request is merged, it is assigned to a GitHub milestone for the upcoming version number.
120
+
121
+
122
+ [CONTRIBUTING.md]: https://github.com/capistrano/capistrano/blob/master/CONTRIBUTING.md