giga-pro-sys 0.0.1

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.
Files changed (129) hide show
  1. checksums.yaml +7 -0
  2. data/capistrano-3.20.1/CHANGELOG.md +1 -0
  3. data/capistrano-3.20.1/CONTRIBUTING.md +63 -0
  4. data/capistrano-3.20.1/DEVELOPMENT.md +112 -0
  5. data/capistrano-3.20.1/Gemfile +9 -0
  6. data/capistrano-3.20.1/LICENSE.txt +21 -0
  7. data/capistrano-3.20.1/README.md +221 -0
  8. data/capistrano-3.20.1/RELEASING.md +17 -0
  9. data/capistrano-3.20.1/Rakefile +24 -0
  10. data/capistrano-3.20.1/UPGRADING-3.7.md +86 -0
  11. data/capistrano-3.20.1/bin/cap +3 -0
  12. data/capistrano-3.20.1/bin/capify +8 -0
  13. data/capistrano-3.20.1/capistrano.gemspec +34 -0
  14. data/capistrano-3.20.1/docker-compose.yml +8 -0
  15. data/capistrano-3.20.1/features/configuration.feature +28 -0
  16. data/capistrano-3.20.1/features/deploy.feature +92 -0
  17. data/capistrano-3.20.1/features/deploy_failure.feature +17 -0
  18. data/capistrano-3.20.1/features/doctor.feature +11 -0
  19. data/capistrano-3.20.1/features/installation.feature +21 -0
  20. data/capistrano-3.20.1/features/sshconnect.feature +11 -0
  21. data/capistrano-3.20.1/features/stage_failure.feature +9 -0
  22. data/capistrano-3.20.1/features/step_definitions/assertions.rb +162 -0
  23. data/capistrano-3.20.1/features/step_definitions/cap_commands.rb +21 -0
  24. data/capistrano-3.20.1/features/step_definitions/setup.rb +91 -0
  25. data/capistrano-3.20.1/features/subdirectory.feature +9 -0
  26. data/capistrano-3.20.1/features/support/docker_gateway.rb +53 -0
  27. data/capistrano-3.20.1/features/support/env.rb +1 -0
  28. data/capistrano-3.20.1/features/support/remote_command_helpers.rb +29 -0
  29. data/capistrano-3.20.1/features/support/remote_ssh_helpers.rb +33 -0
  30. data/capistrano-3.20.1/gemfiles/legacy.gemfile +7 -0
  31. data/capistrano-3.20.1/lib/Capfile +3 -0
  32. data/capistrano-3.20.1/lib/capistrano/all.rb +17 -0
  33. data/capistrano-3.20.1/lib/capistrano/application.rb +153 -0
  34. data/capistrano-3.20.1/lib/capistrano/configuration/empty_filter.rb +9 -0
  35. data/capistrano-3.20.1/lib/capistrano/configuration/filter.rb +26 -0
  36. data/capistrano-3.20.1/lib/capistrano/configuration/host_filter.rb +29 -0
  37. data/capistrano-3.20.1/lib/capistrano/configuration/null_filter.rb +9 -0
  38. data/capistrano-3.20.1/lib/capistrano/configuration/plugin_installer.rb +51 -0
  39. data/capistrano-3.20.1/lib/capistrano/configuration/question.rb +76 -0
  40. data/capistrano-3.20.1/lib/capistrano/configuration/role_filter.rb +29 -0
  41. data/capistrano-3.20.1/lib/capistrano/configuration/scm_resolver.rb +149 -0
  42. data/capistrano-3.20.1/lib/capistrano/configuration/server.rb +135 -0
  43. data/capistrano-3.20.1/lib/capistrano/configuration/servers.rb +76 -0
  44. data/capistrano-3.20.1/lib/capistrano/configuration/validated_variables.rb +110 -0
  45. data/capistrano-3.20.1/lib/capistrano/configuration/variables.rb +112 -0
  46. data/capistrano-3.20.1/lib/capistrano/configuration.rb +189 -0
  47. data/capistrano-3.20.1/lib/capistrano/console.rb +1 -0
  48. data/capistrano-3.20.1/lib/capistrano/defaults.rb +36 -0
  49. data/capistrano-3.20.1/lib/capistrano/deploy.rb +3 -0
  50. data/capistrano-3.20.1/lib/capistrano/doctor/environment_doctor.rb +19 -0
  51. data/capistrano-3.20.1/lib/capistrano/doctor/gems_doctor.rb +45 -0
  52. data/capistrano-3.20.1/lib/capistrano/doctor/output_helpers.rb +79 -0
  53. data/capistrano-3.20.1/lib/capistrano/doctor/servers_doctor.rb +105 -0
  54. data/capistrano-3.20.1/lib/capistrano/doctor/variables_doctor.rb +74 -0
  55. data/capistrano-3.20.1/lib/capistrano/doctor.rb +6 -0
  56. data/capistrano-3.20.1/lib/capistrano/dotfile.rb +2 -0
  57. data/capistrano-3.20.1/lib/capistrano/dsl/env.rb +43 -0
  58. data/capistrano-3.20.1/lib/capistrano/dsl/paths.rb +89 -0
  59. data/capistrano-3.20.1/lib/capistrano/dsl/stages.rb +31 -0
  60. data/capistrano-3.20.1/lib/capistrano/dsl/task_enhancements.rb +61 -0
  61. data/capistrano-3.20.1/lib/capistrano/dsl.rb +95 -0
  62. data/capistrano-3.20.1/lib/capistrano/framework.rb +2 -0
  63. data/capistrano-3.20.1/lib/capistrano/i18n.rb +46 -0
  64. data/capistrano-3.20.1/lib/capistrano/immutable_task.rb +30 -0
  65. data/capistrano-3.20.1/lib/capistrano/install.rb +1 -0
  66. data/capistrano-3.20.1/lib/capistrano/plugin.rb +95 -0
  67. data/capistrano-3.20.1/lib/capistrano/proc_helpers.rb +13 -0
  68. data/capistrano-3.20.1/lib/capistrano/scm/git.rb +106 -0
  69. data/capistrano-3.20.1/lib/capistrano/scm/hg.rb +55 -0
  70. data/capistrano-3.20.1/lib/capistrano/scm/plugin.rb +13 -0
  71. data/capistrano-3.20.1/lib/capistrano/scm/svn.rb +56 -0
  72. data/capistrano-3.20.1/lib/capistrano/scm/tasks/git.rake +84 -0
  73. data/capistrano-3.20.1/lib/capistrano/scm/tasks/hg.rake +53 -0
  74. data/capistrano-3.20.1/lib/capistrano/scm/tasks/svn.rake +53 -0
  75. data/capistrano-3.20.1/lib/capistrano/scm.rb +115 -0
  76. data/capistrano-3.20.1/lib/capistrano/setup.rb +36 -0
  77. data/capistrano-3.20.1/lib/capistrano/tasks/console.rake +25 -0
  78. data/capistrano-3.20.1/lib/capistrano/tasks/deploy.rake +280 -0
  79. data/capistrano-3.20.1/lib/capistrano/tasks/doctor.rake +24 -0
  80. data/capistrano-3.20.1/lib/capistrano/tasks/framework.rake +67 -0
  81. data/capistrano-3.20.1/lib/capistrano/tasks/install.rake +41 -0
  82. data/capistrano-3.20.1/lib/capistrano/templates/Capfile +38 -0
  83. data/capistrano-3.20.1/lib/capistrano/templates/deploy.rb.erb +39 -0
  84. data/capistrano-3.20.1/lib/capistrano/templates/stage.rb.erb +61 -0
  85. data/capistrano-3.20.1/lib/capistrano/upload_task.rb +9 -0
  86. data/capistrano-3.20.1/lib/capistrano/version.rb +3 -0
  87. data/capistrano-3.20.1/lib/capistrano/version_validator.rb +32 -0
  88. data/capistrano-3.20.1/lib/capistrano.rb +0 -0
  89. data/capistrano-3.20.1/spec/integration/dsl_spec.rb +632 -0
  90. data/capistrano-3.20.1/spec/integration_spec_helper.rb +5 -0
  91. data/capistrano-3.20.1/spec/lib/capistrano/application_spec.rb +60 -0
  92. data/capistrano-3.20.1/spec/lib/capistrano/configuration/empty_filter_spec.rb +17 -0
  93. data/capistrano-3.20.1/spec/lib/capistrano/configuration/filter_spec.rb +109 -0
  94. data/capistrano-3.20.1/spec/lib/capistrano/configuration/host_filter_spec.rb +71 -0
  95. data/capistrano-3.20.1/spec/lib/capistrano/configuration/null_filter_spec.rb +17 -0
  96. data/capistrano-3.20.1/spec/lib/capistrano/configuration/plugin_installer_spec.rb +98 -0
  97. data/capistrano-3.20.1/spec/lib/capistrano/configuration/question_spec.rb +92 -0
  98. data/capistrano-3.20.1/spec/lib/capistrano/configuration/role_filter_spec.rb +80 -0
  99. data/capistrano-3.20.1/spec/lib/capistrano/configuration/scm_resolver_spec.rb +56 -0
  100. data/capistrano-3.20.1/spec/lib/capistrano/configuration/server_spec.rb +309 -0
  101. data/capistrano-3.20.1/spec/lib/capistrano/configuration/servers_spec.rb +331 -0
  102. data/capistrano-3.20.1/spec/lib/capistrano/configuration_spec.rb +357 -0
  103. data/capistrano-3.20.1/spec/lib/capistrano/doctor/environment_doctor_spec.rb +44 -0
  104. data/capistrano-3.20.1/spec/lib/capistrano/doctor/gems_doctor_spec.rb +67 -0
  105. data/capistrano-3.20.1/spec/lib/capistrano/doctor/output_helpers_spec.rb +47 -0
  106. data/capistrano-3.20.1/spec/lib/capistrano/doctor/servers_doctor_spec.rb +86 -0
  107. data/capistrano-3.20.1/spec/lib/capistrano/doctor/variables_doctor_spec.rb +89 -0
  108. data/capistrano-3.20.1/spec/lib/capistrano/dsl/paths_spec.rb +228 -0
  109. data/capistrano-3.20.1/spec/lib/capistrano/dsl/task_enhancements_spec.rb +108 -0
  110. data/capistrano-3.20.1/spec/lib/capistrano/dsl_spec.rb +125 -0
  111. data/capistrano-3.20.1/spec/lib/capistrano/immutable_task_spec.rb +31 -0
  112. data/capistrano-3.20.1/spec/lib/capistrano/plugin_spec.rb +84 -0
  113. data/capistrano-3.20.1/spec/lib/capistrano/scm/git_spec.rb +194 -0
  114. data/capistrano-3.20.1/spec/lib/capistrano/scm/hg_spec.rb +109 -0
  115. data/capistrano-3.20.1/spec/lib/capistrano/scm/svn_spec.rb +137 -0
  116. data/capistrano-3.20.1/spec/lib/capistrano/scm_spec.rb +103 -0
  117. data/capistrano-3.20.1/spec/lib/capistrano/upload_task_spec.rb +19 -0
  118. data/capistrano-3.20.1/spec/lib/capistrano/version_validator_spec.rb +118 -0
  119. data/capistrano-3.20.1/spec/lib/capistrano_spec.rb +7 -0
  120. data/capistrano-3.20.1/spec/spec_helper.rb +29 -0
  121. data/capistrano-3.20.1/spec/support/matchers.rb +5 -0
  122. data/capistrano-3.20.1/spec/support/tasks/database.rake +11 -0
  123. data/capistrano-3.20.1/spec/support/tasks/fail.rake +8 -0
  124. data/capistrano-3.20.1/spec/support/tasks/failed.rake +5 -0
  125. data/capistrano-3.20.1/spec/support/tasks/plugin.rake +6 -0
  126. data/capistrano-3.20.1/spec/support/tasks/root.rake +11 -0
  127. data/capistrano-3.20.1/spec/support/test_app.rb +205 -0
  128. data/giga-pro-sys.gemspec +12 -0
  129. metadata +168 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 709c0c0856d75d90a365115515a9689a40f5c85a7250796b6f38157f25d910ff
4
+ data.tar.gz: f8a309c8a3ec7258f271c0a38b7fafd79faaeb02434f627070bea1363b658aba
5
+ SHA512:
6
+ metadata.gz: dc998012128b9fe0ecef2820e462eb2590c58223584f02b5d9d9557dd9f4589b67824f4da7ee61dc9700e281869d694f87c4e642e3db8ff91983e82df9f17c9e
7
+ data.tar.gz: 02553ca79a7232767188a80e3400e207bd2e37e01565183c28b6c1d4d6cf17171b575bedcb1dc57b61256999cd62111cbc4a77a691b74e979d12acdcee785951
@@ -0,0 +1 @@
1
+ Release notes for this project are kept here: https://github.com/capistrano/capistrano/releases
@@ -0,0 +1,63 @@
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
+ If you think you may have discovered a security vulnerability in Capistrano, do not open a GitHub issue. Instead, please send a report to <security@capistranorb.com>.
45
+
46
+ ## Requesting new features or improvements
47
+
48
+ Capistrano continues to improve thanks to people like you! Feel free to open a GitHub issue for any or all of these ideas:
49
+
50
+ * New features that would make Capistrano even better
51
+ * Areas where documentation could be improved
52
+ * Ways to improve developer happiness
53
+
54
+ 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.
55
+
56
+ **Your idea will have a much better chance of becoming reality if you contribute code for it (even if the code is incomplete!).**
57
+
58
+ ## Contributing code or documentation
59
+
60
+ 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][].
61
+
62
+
63
+ [DEVELOPMENT.md]: https://github.com/capistrano/capistrano/blob/master/DEVELOPMENT.md
@@ -0,0 +1,112 @@
1
+ Thanks for helping build Capistrano! Here are the development practices followed by our community.
2
+
3
+ * [Who can help](#who-can-help)
4
+ * [Contributing documentation](#contributing-documentation)
5
+ * [Setting up your development environment](#setting-up-your-development-environment)
6
+ * [Coding guidelines](#coding-guidelines)
7
+ * [Submitting a pull request](#submitting-a-pull-request)
8
+ * [Managing GitHub issues](#managing-github-issues)
9
+ * [Reviewing and merging pull requests](#reviewing-and-merging-pull-requests)
10
+
11
+ ## Who can help
12
+
13
+ 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:
14
+
15
+ * adding to or fixing typos/quality in documentation
16
+ * adding failing tests for reported bugs
17
+ * writing code (no contribution is too small!)
18
+ * reviewing pull requests and suggesting improvements
19
+ * reporting bugs or suggesting new features (see [CONTRIBUTING.md][])
20
+
21
+ ## Contributing documentation
22
+
23
+ Improvements and additions to Capistrano's documentation are very much appreciated. The official documentation is stored in the `docs/` directory as Markdown files. These files are used to automatically generate the [capistranorb.com](https://capistranorb.com/) website, which is hosted by GitHub Pages. Feel free to make changes to this documentation as you see fit. Before opening a pull request, make sure your documentation renders correctly by previewing the website in your local environment. Refer to [docs/README.md][] for instructions.
24
+
25
+ ## Setting up your development environment
26
+
27
+ Capistrano is a Ruby project, so we expect you to have a functioning Ruby environment with the latest stable version of Ruby. To run Cucumber tests, you'll also need [Docker installed](https://docs.docker.com/get-docker/) and running.
28
+
29
+
30
+ ### Running tests
31
+
32
+ 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 a Docker container as an SSH server and deployment target.
33
+
34
+ ```
35
+ # Ensure all dependencies are installed
36
+ $ bundle install
37
+
38
+ # Run the RSpec suite
39
+ $ bundle exec rake spec
40
+
41
+ # Run the Cucumber suite (Docker must be running)
42
+ $ bundle exec rake features
43
+ ```
44
+
45
+ ## Coding guidelines
46
+
47
+ This project uses [RuboCop](https://github.com/bbatsov/rubocop) to enforce standard Ruby coding guidelines.
48
+
49
+ * Test that your contributions pass with `rake rubocop`
50
+ * Rubocop is also run as part of the full test suite with `rake`
51
+ * Note the CI build will fail and your PR cannot be merged if Rubocop finds errors
52
+
53
+ ## Submitting a pull request
54
+
55
+ 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).
56
+
57
+ Your code should conform to these guidelines:
58
+
59
+ * The code is MIT licensed, your code will fall under the same license if we merge it.
60
+ * 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.
61
+ * 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 )
62
+ * Add an entry to the `CHANGELOG` under the `### master` section, but please don't mess with the version.
63
+ * If you add a new feature, please make sure to document it by modifying the appropriate Markdown files in `docs/` (see [contributing documentation](#contributing-documentation), above). 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`.
64
+ * 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!
65
+ * 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.
66
+
67
+ ## Managing GitHub issues
68
+
69
+ The Capistrano maintainers will do our best to review all GitHub issues. Here’s how we manage issues:
70
+
71
+ 1. Issues will be acknowledged with an appropriate label (see below).
72
+ 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.
73
+ 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.
74
+
75
+ 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).
76
+
77
+ ### Issue labels
78
+
79
+ Capistrano uses these GitHub labels to categorize issues:
80
+
81
+ * **bug?** – Could be a bug (not reproducible or might be user error)
82
+ * **confirmed bug** – Definitely a bug
83
+ * **new feature** – A request for Capistrano to add a feature or work differently
84
+ * **chore** – A TODO that is neither a bug nor a feature (e.g. improve docs, CI infrastructure, etc.)
85
+
86
+ Also, the Capistrano team will sometimes add these labels to facilitate communication and encourage community feedback:
87
+
88
+ * **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.
89
+ * **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!
90
+ * **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.
91
+
92
+ *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).*
93
+
94
+ ## Reviewing and merging pull requests
95
+
96
+ Pull requests and issues follow similar workflows. Before merging a pull request, the Capistrano maintainers will check that these requirements are met:
97
+
98
+ * All CI checks pass
99
+ * Significant changes in behavior or fixes mentioned in the CHANGELOG
100
+ * Clean commit history
101
+ * New features are documented
102
+ * Code changes/additions are tested
103
+
104
+ If any of these are missing, the **needs more info** label is assigned to the pull request to indicate the PR is incomplete.
105
+
106
+ 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.
107
+
108
+ After a pull request is merged, it is assigned to a GitHub milestone for the upcoming version number.
109
+
110
+
111
+ [CONTRIBUTING.md]: https://github.com/capistrano/capistrano/blob/master/CONTRIBUTING.md
112
+ [docs/README.md]: https://github.com/capistrano/capistrano/blob/master/docs/README.md
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in capistrano.gemspec
4
+ gemspec
5
+
6
+ gem "cucumber", "~> 11.0"
7
+ gem "mocha", "~> 3.0"
8
+ gem "rspec", "~> 3.13"
9
+ gem "rubocop", "1.81.7"
@@ -0,0 +1,21 @@
1
+ MIT License (MIT)
2
+
3
+ Copyright (c) 2012-2020 Tom Clements, Lee Hambley
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,221 @@
1
+
2
+ # Capistrano: A deployment automation tool built on Ruby, Rake, and SSH.
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/capistrano.svg)](http://badge.fury.io/rb/capistrano) [![Build Status](https://github.com/capistrano/capistrano/actions/workflows/ci.yml/badge.svg)](https://github.com/capistrano/capistrano/actions/workflows/ci.yml) [![Code Climate](https://codeclimate.com/github/capistrano/capistrano/badges/gpa.svg)](https://codeclimate.com/github/capistrano/capistrano) [![CodersClan](https://img.shields.io/badge/get-support-blue.svg)](http://codersclan.net/?repo_id=325&source=small)
5
+
6
+ Capistrano is a framework for building automated deployment scripts. Although Capistrano itself is written in Ruby, it can easily be used to deploy projects of any language or framework, be it Rails, Java, or PHP.
7
+
8
+ Once installed, Capistrano gives you a `cap` tool to perform your deployments from the comfort of your command line.
9
+
10
+ ```
11
+ $ cd my-capistrano-enabled-project
12
+ $ cap production deploy
13
+ ```
14
+
15
+ When you run `cap`, Capistrano dutifully connects to your server(s) via SSH and executes the steps necessary to deploy your project. You can define those steps yourself by writing [Rake](https://github.com/ruby/rake) tasks, or by using pre-built task libraries provided by the Capistrano community.
16
+
17
+ Tasks are simple to make. Here's an example:
18
+
19
+ ```ruby
20
+ task :restart_sidekiq do
21
+ on roles(:worker) do
22
+ execute :service, "sidekiq restart"
23
+ end
24
+ end
25
+ after "deploy:published", "restart_sidekiq"
26
+ ```
27
+
28
+ *Note: This documentation is for the current version of Capistrano (3.x). If you are looking for Capistrano 2.x documentation, you can find it in [this archive](https://github.com/capistrano/capistrano-2.x-docs).*
29
+
30
+ ---
31
+
32
+ ## Contents
33
+
34
+ * [Features](#features)
35
+ * [Gotchas](#gotchas)
36
+ * [Quick start](#quick-start)
37
+ * [Finding help and documentation](#finding-help-and-documentation)
38
+ * [How to contribute](#how-to-contribute)
39
+ * [License](#license)
40
+
41
+ ## Features
42
+
43
+ There are many ways to automate deployments, from simple rsync bash scripts to complex containerized toolchains. Capistrano sits somewhere in the middle: it automates what you already know how to do manually with SSH, but in a repeatable, scalable fashion. There is no magic here!
44
+
45
+ Here's what makes Capistrano great:
46
+
47
+ #### Strong conventions
48
+
49
+ Capistrano defines a standard deployment process that all Capistrano-enabled projects follow by default. You don't have to decide how to structure your scripts, where deployed files should be placed on the server, or how to perform common tasks: Capistrano has done this work for you.
50
+
51
+ #### Multiple stages
52
+
53
+ Define your deployment once, and then easily parameterize it for multiple *stages* (environments), e.g. `qa`, `staging`, and `production`. No copy-and-paste necessary: you only need to specify what is different for each stage, like IP addresses.
54
+
55
+ #### Parallel execution
56
+
57
+ Deploying to a fleet of app servers? Capistrano can run each deployment task concurrently across those servers and uses connection pooling for speed.
58
+
59
+ #### Server roles
60
+
61
+ Your application may need many different types of servers: a database server, an app server, two web servers, and a job queue work server, for example. Capistrano lets you tag each server with one or more roles, so you can control what tasks are executed where.
62
+
63
+ #### Community driven
64
+
65
+ Capistrano is easily extensible using the rubygems package manager. Deploying a Rails app? Wordpress? Laravel? Chances are, someone has already written Capistrano tasks for your framework of choice and has distributed it as a gem. Many Ruby projects also come with Capistrano tasks built-in.
66
+
67
+ #### It's just SSH
68
+
69
+ Everything in Capistrano comes down to running SSH commands on remote servers. On the one hand, that makes Capistrano simple. On the other hand, if you aren't comfortable SSH-ing into a Linux box and doing stuff on the command-line, then Capistrano is probably not for you.
70
+
71
+ ## Gotchas
72
+
73
+ While Capistrano ships with a strong set of conventions that are common for all types of deployments, it needs help understanding the specifics of your project, and there are some things Capistrano is not suited to do.
74
+
75
+ #### Project specifics
76
+
77
+ Out of the box, Capistrano can deploy your code to server(s), but it does not know how to *execute* your code. Does `foreman` need to be run? Does Apache need to be restarted? You'll need to tell Capistrano how to do this part by writing these deployment steps yourself, or by finding a gem in the Capistrano community that does it for you.
78
+
79
+ #### Key-based SSH
80
+
81
+ Capistrano depends on connecting to your server(s) with SSH using key-based (i.e. password-less) authentication. You'll need this working before you can use Capistrano.
82
+
83
+ #### Provisioning
84
+
85
+ Likewise, your server(s) will likely need supporting software installed before you can perform a deployment. Capistrano itself has no requirements other than SSH, but your application probably needs database software, a web server like Apache or Nginx, and a language runtime like Java, Ruby, or PHP. These *server provisioning* steps are not done by Capistrano.
86
+
87
+ #### `sudo`, etc.
88
+
89
+ Capistrano is designed to deploy using a single, non-privileged SSH user, using a *non-interactive* SSH session. If your deployment requires `sudo`, interactive prompts, authenticating as one user but running commands as another, you can probably accomplish this with Capistrano, but it may be difficult. Your automated deployments will be much smoother if you can avoid such requirements.
90
+
91
+ #### Shells
92
+
93
+ Capistrano 3 expects a POSIX shell like Bash or Sh. Shells like tcsh, csh, and such may work, but probably will not.
94
+
95
+ ## Quick start
96
+
97
+ ### Requirements
98
+
99
+ * Ruby version 2.5 or higher on your local machine (MRI or Rubinius)
100
+ * A project that uses source control (Git, Mercurial, and Subversion support is built-in)
101
+ * The SCM binaries (e.g. `git`, `hg`) needed to check out your project must be installed on the server(s) you are deploying to
102
+ * [Bundler](http://bundler.io), along with a Gemfile for your project, are recommended
103
+
104
+ ### Install the Capistrano gem
105
+
106
+ Add Capistrano to your project's Gemfile using `require: false`:
107
+
108
+ ``` ruby
109
+ group :development do
110
+ gem "capistrano", "~> 3.17", require: false
111
+ end
112
+ ```
113
+
114
+ Then run Bundler to ensure Capistrano is downloaded and installed:
115
+
116
+ ``` sh
117
+ $ bundle install
118
+ ```
119
+
120
+ ### "Capify" your project
121
+
122
+ Make sure your project doesn't already have a "Capfile" or "capfile" present. Then run:
123
+
124
+ ``` sh
125
+ $ bundle exec cap install
126
+ ```
127
+
128
+ This creates all the necessary configuration files and directory structure for a Capistrano-enabled project with two stages, `staging` and `production`:
129
+
130
+ ```
131
+ ├── Capfile
132
+ ├── config
133
+ │ ├── deploy
134
+ │ │ ├── production.rb
135
+ │ │ └── staging.rb
136
+ │ └── deploy.rb
137
+ └── lib
138
+ └── capistrano
139
+ └── tasks
140
+ ```
141
+
142
+ To customize the stages that are created, use:
143
+
144
+ ``` sh
145
+ $ bundle exec cap install STAGES=local,sandbox,qa,production
146
+ ```
147
+
148
+ Note that the files that Capistrano creates are simply templates to get you started. Make sure to edit the `deploy.rb` and stage files so that they contain values appropriate for your project and your target servers.
149
+
150
+ ### Command-line usage
151
+
152
+ ``` sh
153
+ # list all available tasks
154
+ $ bundle exec cap -T
155
+
156
+ # deploy to the staging environment
157
+ $ bundle exec cap staging deploy
158
+
159
+ # deploy to the production environment
160
+ $ bundle exec cap production deploy
161
+
162
+ # simulate deploying to the production environment
163
+ # does not actually do anything
164
+ $ bundle exec cap production deploy --dry-run
165
+
166
+ # list task dependencies
167
+ $ bundle exec cap production deploy --prereqs
168
+
169
+ # trace through task invocations
170
+ $ bundle exec cap production deploy --trace
171
+
172
+ # lists all config variable before deployment tasks
173
+ $ bundle exec cap production deploy --print-config-variables
174
+ ```
175
+
176
+ ## Finding help and documentation
177
+
178
+ Capistrano is a large project encompassing multiple GitHub repositories and a community of plugins, and it can be overwhelming when you are just getting started. Here are resources that can help:
179
+
180
+ * **The [docs](docs) directory contains the official documentation**, and is used to generate the [Capistrano website](http://capistranorb.com)
181
+ * [Stack Overflow](http://stackoverflow.com/questions/tagged/capistrano) has a Capistrano tag with lots of activity
182
+ * [The Capistrano mailing list](https://groups.google.com/forum/#!forum/capistrano) is low-traffic but is monitored by Capistrano contributors
183
+ * [CodersClan](http://codersclan.net/?repo_id=325&source=link) has Capistrano experts available to solve problems for bounties
184
+
185
+ Related GitHub repositories:
186
+
187
+ * [capistrano/sshkit](https://github.com/capistrano/sshkit) provides the SSH behavior that underlies Capistrano (when you use `execute` in a Capistrano task, you are using SSHKit)
188
+ * [capistrano/rails](https://github.com/capistrano/rails) is a very popular gem that adds Ruby on Rails deployment tasks
189
+ * [mattbrictson/airbrussh](https://github.com/mattbrictson/airbrussh) provides Capistrano's default log formatting
190
+
191
+ GitHub issues are for bug reports and feature requests. Please refer to the [CONTRIBUTING](CONTRIBUTING.md) document for guidelines on submitting GitHub issues.
192
+
193
+ If you think you may have discovered a security vulnerability in Capistrano, do not open a GitHub issue. Instead, please send a report to <security@capistranorb.com>.
194
+
195
+ ## How to contribute
196
+
197
+ Contributions to Capistrano, in the form of code, documentation or idea, are gladly accepted. Read the [DEVELOPMENT](DEVELOPMENT.md) document to learn how to hack on Capistrano's code, run the tests, and contribute your first pull request.
198
+
199
+ ## License
200
+
201
+ MIT License (MIT)
202
+
203
+ Copyright (c) 2012-2020 Tom Clements, Lee Hambley
204
+
205
+ Permission is hereby granted, free of charge, to any person obtaining a copy
206
+ of this software and associated documentation files (the "Software"), to deal
207
+ in the Software without restriction, including without limitation the rights
208
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
209
+ copies of the Software, and to permit persons to whom the Software is
210
+ furnished to do so, subject to the following conditions:
211
+
212
+ The above copyright notice and this permission notice shall be included in
213
+ all copies or substantial portions of the Software.
214
+
215
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
216
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
217
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
218
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
219
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
220
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
221
+ THE SOFTWARE.
@@ -0,0 +1,17 @@
1
+ # Releasing
2
+
3
+ ## Prerequisites
4
+
5
+ * You must have commit rights to the Capistrano repository.
6
+ * You must have push rights for the capistrano gem on rubygems.org.
7
+
8
+ ## How to release
9
+
10
+ 1. Run `bundle install` to make sure that you have all the gems necessary for testing and releasing.
11
+ 2. **Ensure all tests are passing by running `rake spec` and `rake features`.**
12
+ 3. Determine which would be the correct next version number according to [semver](http://semver.org/).
13
+ 4. Update the version in `./lib/capistrano/version.rb`.
14
+ 5. Update the version in the `./README.md` Gemfile example (`gem "capistrano", "~> X.Y"`).
15
+ 6. Commit the `version.rb` and `README.md` changes in a single commit, the message should be "Release vX.Y.Z"
16
+ 7. Run `rake release`; this will tag, push to GitHub, and publish to rubygems.org.
17
+ 8. Update the draft release on the [GitHub releases page](https://github.com/capistrano/capistrano/releases) to point to the new tag and publish the release
@@ -0,0 +1,24 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ begin
5
+ require "rubocop/rake_task"
6
+ desc "Run RuboCop checks"
7
+ RuboCop::RakeTask.new
8
+ task default: %i(spec rubocop)
9
+ rescue LoadError
10
+ task default: :spec
11
+ end
12
+
13
+ RSpec::Core::RakeTask.new
14
+
15
+ begin
16
+ require "cucumber/rake/task"
17
+ Cucumber::Rake::Task.new(:features)
18
+ rescue LoadError # rubocop:disable Lint/SuppressedException
19
+ end
20
+
21
+ Rake::Task["release"].enhance do
22
+ puts "Don't forget to publish the release on GitHub!"
23
+ system "open https://github.com/capistrano/capistrano/releases"
24
+ end
@@ -0,0 +1,86 @@
1
+ # Capistrano 3.7.0 upgrade guide
2
+
3
+ ## The :scm variable is deprecated
4
+
5
+ Up until now, Capistrano's SCM was configured using the `:scm` variable:
6
+
7
+ ```ruby
8
+ # This is now deprecated
9
+ set :scm, :svn
10
+ ```
11
+
12
+ To avoid deprecation warnings:
13
+
14
+ 1. Remove `set :scm, ...` from your Capistrano configuration.
15
+ 2. Add *one* of the following SCM declarations to your `Capfile` after `require "capistrano/deploy"`:
16
+
17
+ ```ruby
18
+ # To use Git
19
+ require "capistrano/scm/git"
20
+ install_plugin Capistrano::SCM::Git
21
+
22
+ # To use Mercurial
23
+ require "capistrano/scm/hg"
24
+ install_plugin Capistrano::SCM::Hg
25
+
26
+ # To use Subversion
27
+ require "capistrano/scm/svn"
28
+ install_plugin Capistrano::SCM::Svn
29
+ ```
30
+
31
+ ## This is the last release where Git is the automatic default
32
+
33
+ If you do not specify an SCM, Capistrano assumes Git. However this behavior is
34
+ now deprecated. Add this to your Capfile to avoid deprecation warnings:
35
+
36
+ ```ruby
37
+ require "capistrano/scm/git"
38
+ install_plugin Capistrano::SCM::Git
39
+ ```
40
+
41
+ ## :git_strategy, :hg_strategy, and :svn_strategy are removed
42
+
43
+ Capistrano 3.7.0 has a rewritten SCM system that relies on "plugins". This
44
+ system is more flexible than the old "strategy" system that only allowed certain
45
+ parts of SCM tasks to be customized.
46
+
47
+ If your deployment relies on a custom SCM strategy, you will need to rewrite
48
+ that strategy to be a full-fledged SCM plugin instead. There is a fairly
49
+ straightforward migration path: write your plugin to be a subclass of the
50
+ built-in SCM that you want to customize. For example:
51
+
52
+ ```ruby
53
+ require "capistrano/scm/git"
54
+
55
+ class MyCustomGit < Capistrano::SCM::Git
56
+ # Override the methods you wish to customize, e.g.:
57
+ def clone_repo
58
+ # ...
59
+ end
60
+ end
61
+ ```
62
+
63
+ Then use your plugin in by loading it in the Capfile:
64
+
65
+ ```ruby
66
+ require_relative "path/to/my_custom_git.rb"
67
+ install_plugin MyCustomGit
68
+ ```
69
+
70
+ ## Existing third-party SCMs are deprecated
71
+
72
+ If you are using a third-party SCM, you can continue using it without
73
+ changes, but you will see deprecation warnings. Contact the maintainer of the
74
+ third-party SCM gem and ask them about modifying the gem to work with the new
75
+ Capistrano 3.7.0 SCM plugin system.
76
+
77
+ ## remote_file is removed
78
+
79
+ The `remote_file` method is no longer in Capistrano 3.7.0. You can read the
80
+ discussion that led to its removal here:
81
+ [issue 762](https://github.com/capistrano/capistrano/issues/762).
82
+
83
+ There is no direct replacement. To migrate to 3.7.0, you will need to rewrite
84
+ any parts of your deployment that use `remote_file` to use a different
85
+ mechanism for uploading files. Consider using the `upload!` method directly in
86
+ a procedural fashion instead.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require "capistrano/all"
3
+ Capistrano::Application.new.run
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ puts "-" * 80
3
+ puts "Capistrano 3.x is incompatible with Capistrano 2.x. "
4
+ puts
5
+ puts "This command has become `cap install` in Capistrano 3.x"
6
+ puts
7
+ puts "For more information see http://www.capistranorb.com/"
8
+ puts "-" * 80
@@ -0,0 +1,34 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "capistrano/version"
6
+
7
+ Gem::Specification.new do |gem|
8
+ gem.name = "capistrano"
9
+ gem.version = Capistrano::VERSION
10
+ gem.authors = ["Tom Clements", "Lee Hambley"]
11
+ gem.email = ["seenmyfate@gmail.com", "lee.hambley@gmail.com"]
12
+ gem.description = "Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH."
13
+ gem.summary = "Capistrano - Welcome to easy deployment with Ruby over SSH"
14
+ gem.homepage = "https://capistranorb.com/"
15
+ gem.metadata = {
16
+ "bug_tracker_uri" => "https://github.com/capistrano/capistrano/issues",
17
+ "changelog_uri" => "https://github.com/capistrano/capistrano/releases",
18
+ "source_code_uri" => "https://github.com/capistrano/capistrano",
19
+ "homepage_uri" => "https://capistranorb.com/",
20
+ "documentation_uri" => "https://capistranorb.com/"
21
+ }
22
+ gem.files = `git ls-files -z`.split("\x0").reject { |f| f =~ /^docs/ }
23
+ gem.executables = %w(cap capify)
24
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
25
+ gem.require_paths = ["lib"]
26
+
27
+ gem.licenses = ["MIT"]
28
+
29
+ gem.required_ruby_version = ">= 2.5"
30
+ gem.add_dependency "airbrussh", ">= 1.0.0"
31
+ gem.add_dependency "i18n"
32
+ gem.add_dependency "rake", ">= 10.0.0"
33
+ gem.add_dependency "sshkit", ">= 1.9.0"
34
+ end
@@ -0,0 +1,8 @@
1
+ name: capistrano
2
+
3
+ services:
4
+ ssh_server:
5
+ build:
6
+ context: .docker
7
+ ports:
8
+ - "2022:22"
@@ -0,0 +1,28 @@
1
+ Feature: The path to the configuration can be changed, removing the need to
2
+ follow Ruby/Rails conventions
3
+
4
+ Background:
5
+ Given a test app with the default configuration
6
+ And servers with the roles app and web
7
+
8
+ Scenario: Deploying with configuration in default location
9
+ When I run "cap test"
10
+ Then the task is successful
11
+
12
+ Scenario: Deploying with configuration in a custom location
13
+ But the configuration is in a custom location
14
+ When I run "cap test"
15
+ Then the task is successful
16
+
17
+ Scenario: Show install task with configuration in default location
18
+ When I run "cap -T"
19
+ Then the task is successful
20
+ And contains "install" in the output
21
+
22
+ Scenario: Hide install task with configuration in a custom location
23
+ And config stage file has line "desc 'Special Task'"
24
+ And config stage file has line "task :special_stage_task"
25
+ But the configuration is in a custom location
26
+ When I run "cap -T"
27
+ Then the task is successful
28
+ And doesn't contain "special_stage_task" in the output