mina 1.2.3 → 1.2.5

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 (125) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +26 -0
  3. data/.gitignore +0 -1
  4. data/.rspec +1 -1
  5. data/.rubocop.yml +28 -1126
  6. data/CHANGELOG.md +126 -3
  7. data/Gemfile +2 -0
  8. data/Gemfile.lock +73 -0
  9. data/Rakefile +2 -0
  10. data/Readme.md +8 -12
  11. data/bin/mina +2 -0
  12. data/data/deploy.rb +10 -6
  13. data/docs/3rd_party_plugins.md +3 -0
  14. data/docs/assets/images/mina.png +0 -0
  15. data/docs/cookbook.md +1 -1
  16. data/docs/default_plugins.md +5 -5
  17. data/docs/how_mina_works.md +3 -3
  18. data/lib/Minafile +1 -0
  19. data/lib/mina/application.rb +45 -35
  20. data/lib/mina/backend/local.rb +2 -0
  21. data/lib/mina/backend/remote.rb +3 -1
  22. data/lib/mina/commands.rb +10 -7
  23. data/lib/mina/configuration.rb +6 -3
  24. data/lib/mina/dsl.rb +2 -2
  25. data/lib/mina/helpers/internal.rb +9 -9
  26. data/lib/mina/helpers/output.rb +5 -3
  27. data/lib/mina/runner/exec.rb +2 -0
  28. data/lib/mina/runner/pretty.rb +25 -19
  29. data/lib/mina/runner/printer.rb +2 -0
  30. data/lib/mina/runner/system.rb +2 -0
  31. data/lib/mina/runner.rb +9 -10
  32. data/lib/mina/version.rb +3 -1
  33. data/lib/mina/windows_patches.rb +4 -2
  34. data/lib/mina.rb +4 -3
  35. data/mina.gemspec +8 -7
  36. data/spec/configs/default.rb +8 -0
  37. data/spec/configs/dsl.rb +55 -0
  38. data/spec/configs/e2e.rb +25 -0
  39. data/spec/e2e/docker-compose.yml +21 -0
  40. data/spec/e2e/e2e_run.sh +11 -0
  41. data/spec/e2e/e2e_spec.rb +35 -0
  42. data/spec/e2e/ssh +27 -0
  43. data/spec/e2e/ssh.pub +1 -0
  44. data/spec/lib/mina/application_spec.rb +94 -35
  45. data/spec/lib/mina/backend/local_spec.rb +5 -2
  46. data/spec/lib/mina/backend/remote_spec.rb +5 -3
  47. data/spec/lib/mina/commands_spec.rb +7 -7
  48. data/spec/lib/mina/configuration_spec.rb +63 -3
  49. data/spec/lib/mina/dsl_spec.rb +94 -0
  50. data/spec/lib/mina/helpers/internal_spec.rb +89 -11
  51. data/spec/lib/mina/helpers/output_spec.rb +13 -10
  52. data/spec/lib/mina/runner/exec_spec.rb +19 -0
  53. data/spec/lib/mina/runner/pretty_spec.rb +17 -0
  54. data/spec/lib/mina/runner/printer_spec.rb +19 -0
  55. data/spec/lib/mina/runner/system_spec.rb +19 -0
  56. data/spec/lib/mina/runner_spec.rb +6 -10
  57. data/spec/spec_helper.rb +33 -14
  58. data/spec/support/outputs/bundle_clean.txt +2 -2
  59. data/spec/support/outputs/chruby_with_env.txt +7 -0
  60. data/spec/support/outputs/chruby_without_env.txt +2 -0
  61. data/spec/support/outputs/debug_configuration_variables.txt +11 -0
  62. data/spec/support/outputs/dsl_deploy.txt +4 -0
  63. data/spec/support/outputs/dsl_in_path.txt +1 -0
  64. data/spec/support/outputs/dsl_local_run.txt +5 -0
  65. data/spec/support/outputs/dsl_on.txt +6 -0
  66. data/spec/support/outputs/dsl_remote_run.txt +5 -0
  67. data/spec/support/outputs/dsl_reset.txt +2 -0
  68. data/spec/support/outputs/e2e_deploy_after_setup.txt +1 -0
  69. data/spec/support/outputs/e2e_deploy_without_setup.txt +1 -0
  70. data/spec/support/outputs/e2e_setup.txt +1 -0
  71. data/spec/support/outputs/environment.txt +1 -0
  72. data/spec/support/outputs/git_clone.txt +1 -1
  73. data/spec/support/outputs/git_clone_commit.txt +1 -1
  74. data/spec/support/outputs/git_ensure_pushed.txt +15 -0
  75. data/spec/support/outputs/rails_assets_precompile_force_precompile.txt +2 -0
  76. data/spec/support/outputs/rails_assets_precompile_outside_deploy_block.txt +1 -0
  77. data/spec/support/outputs/rails_assets_precompile_with_diff.txt +7 -0
  78. data/spec/support/outputs/rails_console.txt +1 -0
  79. data/spec/support/outputs/rails_db_migrate_force_migrate.txt +2 -0
  80. data/spec/support/outputs/rails_db_migrate_outside_deploy_block.txt +1 -0
  81. data/spec/support/outputs/rails_db_migrate_with_diff.txt +7 -0
  82. data/spec/support/outputs/rails_log.txt +1 -0
  83. data/spec/support/outputs/rails_with_arguments.txt +1 -0
  84. data/spec/support/outputs/rails_without_arguments.txt +1 -0
  85. data/spec/support/outputs/rake_with_arguments.txt +1 -0
  86. data/spec/support/outputs/rake_without_arguments.txt +1 -0
  87. data/spec/support/outputs/rbenv_load.txt +9 -1
  88. data/spec/support/outputs/rvm_use_with_env.txt +8 -0
  89. data/spec/support/outputs/rvm_use_without_env.txt +2 -0
  90. data/spec/support/outputs/rvm_wrapper_with_arguments.txt +8 -0
  91. data/spec/support/outputs/rvm_wrapper_without_arguments.txt +2 -0
  92. data/spec/support/outputs/ry_with_env.txt +13 -0
  93. data/spec/support/outputs/ry_without_env.txt +13 -0
  94. data/spec/support/outputs/ssh.txt +1 -0
  95. data/spec/support/outputs/ssh_keyscan_domain.txt +3 -0
  96. data/spec/support/rake_example_group.rb +23 -19
  97. data/spec/tasks/bundler_spec.rb +6 -0
  98. data/spec/tasks/chruby_spec.rb +29 -0
  99. data/spec/tasks/default_spec.rb +79 -7
  100. data/spec/tasks/deploy_spec.rb +6 -0
  101. data/spec/tasks/git_spec.rb +12 -0
  102. data/spec/tasks/init_spec.rb +13 -4
  103. data/spec/tasks/rails_spec.rb +126 -15
  104. data/spec/tasks/rbenv_spec.rb +15 -0
  105. data/spec/tasks/rvm_spec.rb +51 -0
  106. data/spec/tasks/ry_spec.rb +43 -0
  107. data/tasks/mina/bundler.rb +7 -5
  108. data/tasks/mina/chruby.rb +7 -5
  109. data/tasks/mina/default.rb +19 -12
  110. data/tasks/mina/deploy.rb +27 -25
  111. data/tasks/mina/git.rb +28 -15
  112. data/tasks/mina/install.rb +9 -0
  113. data/tasks/mina/rails.rb +29 -27
  114. data/tasks/mina/rbenv.rb +8 -6
  115. data/tasks/mina/rvm.rb +13 -11
  116. data/tasks/mina/ry.rb +11 -11
  117. data/test_env/config/deploy.rb +9 -8
  118. metadata +69 -37
  119. data/spec/support/outputs/chruby.txt +0 -9
  120. data/spec/support/outputs/console.txt +0 -1
  121. data/spec/support/outputs/log.txt +0 -1
  122. data/spec/support/outputs/rails_db_migrate.txt +0 -1
  123. data/spec/support/outputs/rvm_use.txt +0 -1
  124. data/spec/support/outputs/ry.txt +0 -15
  125. data/spec/tasks/ruby_managers_spec.rb +0 -33
data/CHANGELOG.md CHANGED
@@ -1,6 +1,113 @@
1
- # Change Log
1
+ # Changelog
2
+
3
+ ## [v1.2.4](https://github.com/mina-deploy/mina/tree/v1.2.4) (2021-08-10)
4
+
5
+ [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.2.3...v1.2.4)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Make `in_path` tolerate "directory doesn't exist" case [\#587](https://github.com/mina-deploy/mina/issues/587)
10
+ - Different behavior of environment task with 0.3.8 and 1.0.6 [\#505](https://github.com/mina-deploy/mina/issues/505)
11
+
12
+ **Closed issues:**
13
+
14
+ - Mina deploy failed with Rails and Vue? [\#659](https://github.com/mina-deploy/mina/issues/659)
15
+ - Running "mina deploy" failed when "Precompiling asset files", without any detailed error info [\#658](https://github.com/mina-deploy/mina/issues/658)
16
+ - Stuck on "Fetching new git commits" [\#654](https://github.com/mina-deploy/mina/issues/654)
17
+ - remote: Repository not found. fatal: Authentication failed for 'https://:@github.com/usre\_name/repo.git/' [\#649](https://github.com/mina-deploy/mina/issues/649)
18
+ - Error ""The directory 'X' does not exist on the server", run 'mina setup' first! [\#648](https://github.com/mina-deploy/mina/issues/648)
19
+ - git clone "/app/scm" [\#647](https://github.com/mina-deploy/mina/issues/647)
20
+ - fatal: destination path '.' already exists and is not an empty directory. [\#646](https://github.com/mina-deploy/mina/issues/646)
21
+ - Unable to run any rails command in the project server folder [\#645](https://github.com/mina-deploy/mina/issues/645)
22
+ - Is this project alive? [\#642](https://github.com/mina-deploy/mina/issues/642)
23
+ - Why need run\(local\) do block? [\#638](https://github.com/mina-deploy/mina/issues/638)
24
+ - mina init overrides config/deploy.rb [\#634](https://github.com/mina-deploy/mina/issues/634)
25
+ - What's the role of "on :launch do" part of deploy.rb [\#631](https://github.com/mina-deploy/mina/issues/631)
26
+ - Are there release notes for 1.0 [\#630](https://github.com/mina-deploy/mina/issues/630)
27
+ - ArgumentError: invalid byte sequence in US-ASCII when deploying using GitLab CI with Docker [\#629](https://github.com/mina-deploy/mina/issues/629)
28
+ - Git SHA information on deploy or rollback [\#626](https://github.com/mina-deploy/mina/issues/626)
29
+ - \(Doc\) 0 downtime deploy example in Mina document? [\#619](https://github.com/mina-deploy/mina/issues/619)
30
+ - ENV is not loading in production [\#617](https://github.com/mina-deploy/mina/issues/617)
31
+ - how to add `config/database.yml` to shared\_path without an error [\#614](https://github.com/mina-deploy/mina/issues/614)
32
+ - Deploy without using current/shared/releases? [\#613](https://github.com/mina-deploy/mina/issues/613)
33
+ - mina deploy fails [\#612](https://github.com/mina-deploy/mina/issues/612)
34
+ - Feature: Force precompile for webpacker [\#610](https://github.com/mina-deploy/mina/issues/610)
35
+ - SSH Connection [\#608](https://github.com/mina-deploy/mina/issues/608)
36
+ - Connection to closed after mina setup [\#607](https://github.com/mina-deploy/mina/issues/607)
37
+ - NameError: undefined local variable or method `user' for main:Object [\#606](https://github.com/mina-deploy/mina/issues/606)
38
+ - node\_modules in shared\_paths [\#604](https://github.com/mina-deploy/mina/issues/604)
39
+ - mina deploy rails 5.2.0.beta2 [\#602](https://github.com/mina-deploy/mina/issues/602)
40
+ - sudo systemctl restart apache2 [\#598](https://github.com/mina-deploy/mina/issues/598)
41
+ - I got a 'extconf.rb failed' error when mina bundle install [\#597](https://github.com/mina-deploy/mina/issues/597)
42
+ - Is it possible to view or output the generated bash script? [\#596](https://github.com/mina-deploy/mina/issues/596)
43
+ - mina deploy throws error - bundle: command not found ! ERROR: Deploy failed. [\#594](https://github.com/mina-deploy/mina/issues/594)
44
+ - Could you add back set\_default? [\#588](https://github.com/mina-deploy/mina/issues/588)
45
+ - Mina setup doesn't symlink the current folder [\#571](https://github.com/mina-deploy/mina/issues/571)
46
+ - mina deploy Could not locate Gemfile [\#552](https://github.com/mina-deploy/mina/issues/552)
47
+ - SSH to GitLab repository problem [\#533](https://github.com/mina-deploy/mina/issues/533)
48
+ - Does a full bundle install every time [\#516](https://github.com/mina-deploy/mina/issues/516)
49
+ - assets:precompile failed, but deploy succeeded [\#504](https://github.com/mina-deploy/mina/issues/504)
50
+ - Could not find rack-cors-0.4.0 in any of the sources [\#500](https://github.com/mina-deploy/mina/issues/500)
51
+
52
+ **Merged pull requests:**
53
+
54
+ - Test suite CI [\#673](https://github.com/mina-deploy/mina/pull/673) ([lovro-bikic](https://github.com/lovro-bikic))
55
+ - Fixes \#634 [\#650](https://github.com/mina-deploy/mina/pull/650) ([NBuhinicek](https://github.com/NBuhinicek))
56
+ - Fix minor typo in documentation [\#641](https://github.com/mina-deploy/mina/pull/641) ([chartrandf](https://github.com/chartrandf))
57
+ - Update cookbook.md [\#637](https://github.com/mina-deploy/mina/pull/637) ([oliveiradanielm](https://github.com/oliveiradanielm))
58
+ - Update default\_plugins.md [\#635](https://github.com/mina-deploy/mina/pull/635) ([mpearce](https://github.com/mpearce))
59
+ - Update deploy.rb [\#628](https://github.com/mina-deploy/mina/pull/628) ([Ajmal](https://github.com/Ajmal))
60
+ - Added link to mina multideploy plugin [\#627](https://github.com/mina-deploy/mina/pull/627) ([volkov-sergey](https://github.com/volkov-sergey))
61
+ - Add Thinking Sphinx plugin link [\#624](https://github.com/mina-deploy/mina/pull/624) ([airled](https://github.com/airled))
62
+ - Typo 'everyting' [\#599](https://github.com/mina-deploy/mina/pull/599) ([wafiq](https://github.com/wafiq))
63
+ - allow user to overwrite deploy\_script [\#595](https://github.com/mina-deploy/mina/pull/595) ([kuboon](https://github.com/kuboon))
64
+ - Fixes \#506. Problem with git submodules and no master based branches. [\#593](https://github.com/mina-deploy/mina/pull/593) ([platbr](https://github.com/platbr))
65
+ - Fix doc typos. [\#591](https://github.com/mina-deploy/mina/pull/591) ([pweldon](https://github.com/pweldon))
66
+ - Allow setting a custom deploy script [\#585](https://github.com/mina-deploy/mina/pull/585) ([wpolicarpo](https://github.com/wpolicarpo))
67
+
68
+ ## [v1.2.3](https://github.com/mina-deploy/mina/tree/v1.2.3) (2017-11-22)
69
+
70
+ [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.2.2...v1.2.3)
71
+
72
+ **Closed issues:**
73
+
74
+ - Task :environment not valid any longer [\#583](https://github.com/mina-deploy/mina/issues/583)
75
+
76
+ **Merged pull requests:**
77
+
78
+ - Fix empty stage queue [\#592](https://github.com/mina-deploy/mina/pull/592) ([fsuste](https://github.com/fsuste))
79
+ - fix typo [\#584](https://github.com/mina-deploy/mina/pull/584) ([MatzFan](https://github.com/MatzFan))
80
+
81
+ ## [v1.2.2](https://github.com/mina-deploy/mina/tree/v1.2.2) (2017-10-13)
82
+
83
+ [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.2.1...v1.2.2)
84
+
85
+ **Implemented enhancements:**
86
+
87
+ - Add shared folders validations [\#559](https://github.com/mina-deploy/mina/issues/559)
88
+
89
+ **Closed issues:**
90
+
91
+ - prepend environments when run outside run block [\#576](https://github.com/mina-deploy/mina/issues/576)
92
+ - rails:assets\_precompile from cache [\#494](https://github.com/mina-deploy/mina/issues/494)
93
+
94
+ **Merged pull requests:**
95
+
96
+ - Remove spec for now, unitl \#579 [\#580](https://github.com/mina-deploy/mina/pull/580) ([d4be4st](https://github.com/d4be4st))
97
+ - Add folder validation for symlinking [\#578](https://github.com/mina-deploy/mina/pull/578) ([d4be4st](https://github.com/d4be4st))
98
+ - Resolves \#576 [\#577](https://github.com/mina-deploy/mina/pull/577) ([d4be4st](https://github.com/d4be4st))
99
+ - Remote environment in deploy example [\#573](https://github.com/mina-deploy/mina/pull/573) ([ozgg](https://github.com/ozgg))
100
+
101
+ ## [v1.2.1](https://github.com/mina-deploy/mina/tree/v1.2.1) (2017-10-02)
102
+
103
+ [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.2.0...v1.2.1)
104
+
105
+ **Closed issues:**
106
+
107
+ - Deploy does not work since version 1.2.0 [\#572](https://github.com/mina-deploy/mina/issues/572)
2
108
 
3
109
  ## [v1.2.0](https://github.com/mina-deploy/mina/tree/v1.2.0) (2017-09-29)
110
+
4
111
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.1.1...v1.2.0)
5
112
 
6
113
  **Fixed bugs:**
@@ -8,9 +115,11 @@
8
115
  - Fix keyscan\_domain task [\#570](https://github.com/mina-deploy/mina/issues/570)
9
116
 
10
117
  ## [v1.1.1](https://github.com/mina-deploy/mina/tree/v1.1.1) (2017-09-29)
118
+
11
119
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.1.0...v1.1.1)
12
120
 
13
121
  ## [v1.1.0](https://github.com/mina-deploy/mina/tree/v1.1.0) (2017-09-29)
122
+
14
123
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.7...v1.1.0)
15
124
 
16
125
  **Implemented enhancements:**
@@ -49,6 +158,7 @@
49
158
  - Add skip-existing option to example rbenv install [\#527](https://github.com/mina-deploy/mina/pull/527) ([sunny](https://github.com/sunny))
50
159
 
51
160
  ## [v1.0.7](https://github.com/mina-deploy/mina/tree/v1.0.7) (2017-09-08)
161
+
52
162
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.6...v1.0.7)
53
163
 
54
164
  **Closed issues:**
@@ -86,12 +196,15 @@
86
196
  - Add mina-hanami [\#495](https://github.com/mina-deploy/mina/pull/495) ([mgrachev](https://github.com/mgrachev))
87
197
 
88
198
  ## [v1.0.6](https://github.com/mina-deploy/mina/tree/v1.0.6) (2016-12-15)
199
+
89
200
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.5...v1.0.6)
90
201
 
91
202
  ## [v1.0.5](https://github.com/mina-deploy/mina/tree/v1.0.5) (2016-12-15)
203
+
92
204
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.4...v1.0.5)
93
205
 
94
206
  ## [v1.0.4](https://github.com/mina-deploy/mina/tree/v1.0.4) (2016-12-15)
207
+
95
208
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.3...v1.0.4)
96
209
 
97
210
  **Implemented enhancements:**
@@ -124,6 +237,7 @@
124
237
  - Restore previous path after in\_path block [\#478](https://github.com/mina-deploy/mina/pull/478) ([sobrinho](https://github.com/sobrinho))
125
238
 
126
239
  ## [v1.0.3](https://github.com/mina-deploy/mina/tree/v1.0.3) (2016-11-08)
240
+
127
241
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.2...v1.0.3)
128
242
 
129
243
  **Closed issues:**
@@ -149,6 +263,7 @@
149
263
  - Allow to overwrite existing :shared\_files with the symlink to shared \(fixes \#452\) [\#455](https://github.com/mina-deploy/mina/pull/455) ([ralfebert](https://github.com/ralfebert))
150
264
 
151
265
  ## [v1.0.2](https://github.com/mina-deploy/mina/tree/v1.0.2) (2016-10-12)
266
+
152
267
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.0...v1.0.2)
153
268
 
154
269
  **Fixed bugs:**
@@ -174,6 +289,7 @@
174
289
  - Fix rvm:use task [\#444](https://github.com/mina-deploy/mina/pull/444) ([devvmh](https://github.com/devvmh))
175
290
 
176
291
  ## [v1.0.0](https://github.com/mina-deploy/mina/tree/v1.0.0) (2016-09-27)
292
+
177
293
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.0.rc2...v1.0.0)
178
294
 
179
295
  **Closed issues:**
@@ -182,9 +298,11 @@
182
298
  - Support for nvm [\#440](https://github.com/mina-deploy/mina/issues/440)
183
299
 
184
300
  ## [v1.0.0.rc2](https://github.com/mina-deploy/mina/tree/v1.0.0.rc2) (2016-09-19)
301
+
185
302
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.0.rc1...v1.0.0.rc2)
186
303
 
187
304
  ## [v1.0.0.rc1](https://github.com/mina-deploy/mina/tree/v1.0.0.rc1) (2016-09-19)
305
+
188
306
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.0.beta5...v1.0.0.rc1)
189
307
 
190
308
  **Implemented enhancements:**
@@ -212,6 +330,7 @@
212
330
  - strip whitespace from commands by default [\#427](https://github.com/mina-deploy/mina/pull/427) ([devvmh](https://github.com/devvmh))
213
331
 
214
332
  ## [v1.0.0.beta5](https://github.com/mina-deploy/mina/tree/v1.0.0.beta5) (2016-08-30)
333
+
215
334
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.0.beta4...v1.0.0.beta5)
216
335
 
217
336
  **Closed issues:**
@@ -219,9 +338,11 @@
219
338
  - How to do a proper finish hook? [\#425](https://github.com/mina-deploy/mina/issues/425)
220
339
 
221
340
  ## [v1.0.0.beta4](https://github.com/mina-deploy/mina/tree/v1.0.0.beta4) (2016-08-28)
341
+
222
342
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.0.beta3...v1.0.0.beta4)
223
343
 
224
344
  ## [v1.0.0.beta3](https://github.com/mina-deploy/mina/tree/v1.0.0.beta3) (2016-08-28)
345
+
225
346
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.0.beta2...v1.0.0.beta3)
226
347
 
227
348
  **Implemented enhancements:**
@@ -243,12 +364,13 @@
243
364
  **Merged pull requests:**
244
365
 
245
366
  - change docs about invoking rvm:use with arguments [\#413](https://github.com/mina-deploy/mina/pull/413) ([devvmh](https://github.com/devvmh))
246
- - add Rbenv and RVM notes [\#412](https://github.com/mina-deploy/mina/pull/412) ([pinewong](https://github.com/pinewong))
367
+ - add Rbenv and RVM notes [\#412](https://github.com/mina-deploy/mina/pull/412) ([songhuangcn](https://github.com/songhuangcn))
247
368
  - fix issues with rbenv:load [\#411](https://github.com/mina-deploy/mina/pull/411) ([devvmh](https://github.com/devvmh))
248
369
  - ensure git pushed function - code props to @fgarcia [\#410](https://github.com/mina-deploy/mina/pull/410) ([devvmh](https://github.com/devvmh))
249
370
  - fix infinite loop in suggested default config [\#409](https://github.com/mina-deploy/mina/pull/409) ([devvmh](https://github.com/devvmh))
250
371
 
251
372
  ## [v1.0.0.beta2](https://github.com/mina-deploy/mina/tree/v1.0.0.beta2) (2016-07-30)
373
+
252
374
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v1.0.0.beta1...v1.0.0.beta2)
253
375
 
254
376
  **Implemented enhancements:**
@@ -322,6 +444,7 @@
322
444
  - Feature/configuration dsl [\#398](https://github.com/mina-deploy/mina/pull/398) ([vr4b4c](https://github.com/vr4b4c))
323
445
 
324
446
  ## [v1.0.0.beta1](https://github.com/mina-deploy/mina/tree/v1.0.0.beta1) (2016-06-30)
447
+
325
448
  [Full Changelog](https://github.com/mina-deploy/mina/compare/v0.3.8...v1.0.0.beta1)
326
449
 
327
450
  **Closed issues:**
@@ -343,4 +466,4 @@
343
466
 
344
467
 
345
468
 
346
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
469
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in mina.gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,73 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mina (1.2.5)
5
+ rake
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ coderay (1.1.3)
12
+ diff-lcs (1.4.4)
13
+ docile (1.4.0)
14
+ method_source (1.0.0)
15
+ parallel (1.20.1)
16
+ parser (3.0.2.0)
17
+ ast (~> 2.4.1)
18
+ pry (0.14.1)
19
+ coderay (~> 1.1)
20
+ method_source (~> 1.0)
21
+ rainbow (3.0.0)
22
+ rake (13.0.6)
23
+ regexp_parser (2.1.1)
24
+ rexml (3.2.5)
25
+ rspec (3.10.0)
26
+ rspec-core (~> 3.10.0)
27
+ rspec-expectations (~> 3.10.0)
28
+ rspec-mocks (~> 3.10.0)
29
+ rspec-core (3.10.1)
30
+ rspec-support (~> 3.10.0)
31
+ rspec-expectations (3.10.1)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.10.0)
34
+ rspec-mocks (3.10.2)
35
+ diff-lcs (>= 1.2.0, < 2.0)
36
+ rspec-support (~> 3.10.0)
37
+ rspec-support (3.10.2)
38
+ rubocop (1.19.1)
39
+ parallel (~> 1.10)
40
+ parser (>= 3.0.0.0)
41
+ rainbow (>= 2.2.2, < 4.0)
42
+ regexp_parser (>= 1.8, < 3.0)
43
+ rexml
44
+ rubocop-ast (>= 1.9.1, < 2.0)
45
+ ruby-progressbar (~> 1.7)
46
+ unicode-display_width (>= 1.4.0, < 3.0)
47
+ rubocop-ast (1.10.0)
48
+ parser (>= 3.0.1.1)
49
+ rubocop-rspec (2.4.0)
50
+ rubocop (~> 1.0)
51
+ rubocop-ast (>= 1.1.0)
52
+ ruby-progressbar (1.11.0)
53
+ simplecov (0.21.2)
54
+ docile (~> 1.1)
55
+ simplecov-html (~> 0.11)
56
+ simplecov_json_formatter (~> 0.1)
57
+ simplecov-html (0.12.3)
58
+ simplecov_json_formatter (0.1.3)
59
+ unicode-display_width (2.0.0)
60
+
61
+ PLATFORMS
62
+ ruby
63
+
64
+ DEPENDENCIES
65
+ mina!
66
+ pry
67
+ rspec
68
+ rubocop
69
+ rubocop-rspec
70
+ simplecov
71
+
72
+ BUNDLED WITH
73
+ 2.3.13
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
data/Readme.md CHANGED
@@ -1,11 +1,8 @@
1
1
  # Mina
2
2
 
3
- [![Code Climate](https://codeclimate.com/github/mina-deploy/mina/badges/gpa.svg)](https://codeclimate.com/github/mina-deploy/mina)
4
- [![Test Coverage](https://codeclimate.com/github/mina-deploy/mina/badges/coverage.svg)](https://codeclimate.com/github/mina-deploy/mina/coverage)
5
- [![Build Status](https://semaphoreci.com/api/v1/d4be4st/mina/branches/master/shields_badge.svg)](https://semaphoreci.com/d4be4st/mina)
6
3
  [![Gem Version](https://badge.fury.io/rb/mina.svg)](https://badge.fury.io/rb/mina)
7
4
 
8
- ![mina](https://photos.infinum.co/store/5273935c5deeabda0e98c943db2a7ade)
5
+ ![mina](/docs/assets/images/mina.png?raw=true)
9
6
 
10
7
  Really fast deployer and server automation tool.
11
8
 
@@ -18,18 +15,17 @@ Mina works really fast because it's a deploy Bash script generator. It
18
15
  generates an entire procedure as a Bash script and runs it remotely in the
19
16
  server.
20
17
 
21
- Compare this to the likes of [Capistrano](https://github.com/capistrano/capistrano), where it opens an SSH connection and runs each command in sequence
22
- , Mina only creates a SSH session and sends *one* command.
18
+ Compare this to the likes of [Capistrano](https://github.com/capistrano/capistrano), where it opens an SSH connection and runs each command in sequence, Mina only creates a SSH session and sends *one* command.
23
19
 
24
20
  $ gem install mina
25
21
  $ mina init
26
22
 
27
- Mina requires ruby 2.0.0 or greater. For older please use [0.3.8 version](https://github.com/mina-deploy/mina/blob/v0.3.8/)
23
+ Mina requires ruby 2.0.0 or greater. For older versions of Ruby, please use [0.3.8 version](https://github.com/mina-deploy/mina/blob/v0.3.8/).
28
24
 
29
25
  Documentation
30
26
  ----------------
31
27
 
32
- For quick start check out [Getting starting guide](docs/getting_started.md)
28
+ For quick start check out [Getting started guide](docs/getting_started.md)
33
29
 
34
30
  For migrating your current 0.3.x deploy scripts, please look at the [migrating guide](docs/migrating.md)
35
31
 
@@ -39,7 +35,7 @@ If you are missing some plugins check the [3rd party plugins doc](docs/3rd_party
39
35
 
40
36
  For other documentation please visit the [docs](docs)
41
37
 
42
- Licence
38
+ License
43
39
  ----------------
44
40
 
45
41
  Released under the [MIT License](https://www.opensource.org/licenses/mit-license.php).
@@ -47,8 +43,8 @@ Released under the [MIT License](https://www.opensource.org/licenses/mit-license
47
43
  Credits
48
44
  ----------------
49
45
 
50
- Mina is maintained and sponsored by [Infinum](https://infinum.co).
46
+ Mina is maintained and sponsored by [Infinum](https://infinum.com).
51
47
 
52
- You can reach us on twitter [Stef](https://twitter.com/_Beast_) & [Infinum](https://twitter.com/infinumco)
48
+ You can reach us on twitter [Stef](https://twitter.com/_Beast_) & [Infinum](https://twitter.com/infinum).
53
49
 
54
- ![](https://assets.infinum.co/assets/brand-logo-9e079bfa1875e17c8c1f71d1fee49cf0.svg) © 2016 Infinum.
50
+ © 2021 Infinum
data/bin/mina CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  require 'mina'
3
5
 
4
6
  Mina::Application.new.run
data/data/deploy.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'mina/rails'
2
4
  require 'mina/git'
3
5
  # require 'mina/rbenv' # for rbenv support. (https://rbenv.org)
@@ -34,16 +36,18 @@ task :remote_environment do
34
36
  # invoke :'rbenv:load'
35
37
 
36
38
  # For those using RVM, use this to load an RVM version@gemset.
37
- # invoke :'rvm:use', 'ruby-1.9.3-p125@default'
39
+ # invoke :'rvm:use', 'ruby-2.5.3@default'
38
40
  end
39
41
 
40
42
  # Put any custom commands you need to run at setup
41
43
  # All paths in `shared_dirs` and `shared_paths` will be created on their own.
42
44
  task :setup do
43
- # command %{rbenv install 2.3.0 --skip-existing}
45
+ # command %{rbenv install 2.5.3 --skip-existing}
46
+ # command %{rvm install ruby-2.5.3}
47
+ # command %{gem install bundler}
44
48
  end
45
49
 
46
- desc "Deploys the current version to the server."
50
+ desc 'Deploys the current version to the server.'
47
51
  task :deploy do
48
52
  # uncomment this line to make sure you pushed your local branch to the remote origin
49
53
  # invoke :'git:ensure_pushed'
@@ -59,13 +63,13 @@ task :deploy do
59
63
 
60
64
  on :launch do
61
65
  in_path(fetch(:current_path)) do
62
- command %{mkdir -p tmp/}
63
- command %{touch tmp/restart.txt}
66
+ command %(mkdir -p tmp/)
67
+ command %(touch tmp/restart.txt)
64
68
  end
65
69
  end
66
70
  end
67
71
 
68
- # you can use `run :local` to run tasks on local machine before of after the deploy scripts
72
+ # you can use `run :local` to run tasks on local machine before or after the deploy scripts
69
73
  # run(:local){ say 'done' }
70
74
  end
71
75
 
@@ -32,5 +32,8 @@
32
32
  * [mina-systemd](https://github.com/alexkojin/mina-systemd)
33
33
  * [mina-tail](https://github.com/modomoto/mina-tail)
34
34
  * [mina-unicorn](https://github.com/openteam/mina-unicorn)
35
+ * [mina-unicorn_systemd](https://github.com/coezbek/mina-unicorn_systemd)
35
36
  * [mina-whenever](https://github.com/mina-deploy/mina-whenever)
36
37
  * [mina-lock](https://github.com/lorenzosinisi/mina-lock)
38
+ * [mina-thinking-sphinx](https://github.com/airled/mina-thinking-sphinx)
39
+ * [mina-multideploy](https://github.com/codica2/mina-multideploy)
Binary file
data/docs/cookbook.md CHANGED
@@ -34,7 +34,7 @@ $ mina production deploy
34
34
  ```
35
35
  task :deploy do
36
36
  run(:local) do
37
- comamnd "scp config/application.yml #{fetch(:user)}@#{fetch(:domain)}:#{fetch(:shared_path)}/config/application.yml"
37
+ command "scp config/application.yml #{fetch(:user)}@#{fetch(:domain)}:#{fetch(:shared_path)}/config/application.yml"
38
38
  end
39
39
 
40
40
  deploy do
@@ -1,6 +1,6 @@
1
1
  # Default Plugins
2
2
 
3
- `mina` comes with a variaty of plugins for you to use out of the box. As `mina` is primarely written in ruby and for rails, it has
3
+ `mina` comes with a variety of plugins for you to use out of the box. As `mina` is primarely written in ruby and for rails, it has
4
4
  ruby plugins, but it can be used to deploy any other application (static, js, php, etc)
5
5
 
6
6
  To use a plugin you only need to require it in your `deploy.rb`. Most of the plugins come with a set of their
@@ -32,7 +32,7 @@ require 'mina/default'
32
32
  :domain #=> nil
33
33
  :port #=> 22
34
34
  :deploy_to #=> nil
35
- :execution_mode #=> :pretty ## Can be [:exec, :pretty, :pritner, :system]
35
+ :execution_mode #=> :pretty ## Can be [:exec, :pretty, :printer, :system]
36
36
  ```
37
37
 
38
38
  ### Execution mode
@@ -63,7 +63,7 @@ loads:
63
63
  :shared_path #=> "#{fetch(:deploy_to)}/shared"
64
64
  :current_path #=> "#{fetch(:deploy_to)}/current"
65
65
  :lock_file #=> 'deploy.lock'
66
- :deploy_script #=> 'data/deploy.sh.erb'
66
+ :deploy_script #=> Mina.root_path('data/deploy.sh.erb')
67
67
  :keep_releases #=> 5
68
68
  :version_scheme #=> :sequence ## Can be [:sequence, :datetime]
69
69
  :shared_dirs #=> []
@@ -129,9 +129,9 @@ loads:
129
129
  git:ensure_pushed #=> Ensures local repository is pushed to remote
130
130
  ```
131
131
 
132
- ## Bunlder
132
+ ## Bundler
133
133
  ``` ruby
134
- require 'mina/bunlder'
134
+ require 'mina/bundler'
135
135
  ```
136
136
  loads:
137
137
  - `mina/default`
@@ -139,7 +139,7 @@ Folder | Description
139
139
  `current` | folders is a symbolic link to the current release (does not have to be the lastest one)
140
140
  `releases` | folder conains your last `keep_releases` releases
141
141
  `scm` | folder contains information about your version controll (git, svn, ...)
142
- `shared` | folder cotinas folders and files that are kept between releaes (logs, uploads, configs, ...)
142
+ `shared` | folder contains folders and files that are kept between releases (logs, uploads, configs, ...)
143
143
  `tmp` | folder contains temporary build folders
144
144
 
145
145
  ## Features
@@ -152,11 +152,11 @@ Mode | Description
152
152
  -----|------------
153
153
  `:exec` | It uses [Kernel#exec](http://ruby-doc.org/core-2.4.2/Kernel.html#method-i-exec) to run your script. This means that it will execute and exit and won't run any other tasks. This is useful for tasks such as [`mina console`](https://github.com/mina-deploy/mina/blob/master/tasks/mina/rails.rb#L15)
154
154
  `:system` | It uses [Kernel#system](http://ruby-doc.org/core-2.4.2/Kernel.html#method-i-system) to run your script.
155
- `:pretty` | It uses [Open4#popen4](https://github.com/ahoward/open4/blob/master/lib/open4.rb#L33) to run your script. This mode pretty prints stdout and stderr and colors it. This the default mode for most of the default tasks.
155
+ `:pretty` | It uses [Open3#popen3](https://ruby-doc.org/stdlib-3.0.0/libdoc/open3/rdoc/Open3.html#method-c-popen3) to run your script. This mode pretty prints stdout and stderr and colors it. This the default mode for most of the default tasks.
156
156
  `:printer` | It uses [Kernel#puts](http://ruby-doc.org/core-2.4.2/Kernel.html#method-i-puts) to run your script. This is used when `simulate` flag is set so it only prints out the generated script
157
157
 
158
158
  #### WARNING
159
- `:pretty` mode is using Popen4. In this mode STDIN is efectivly disabled. This means that any kind of inputs won't be forwarded to remote host. If you have a need for password input please use `:system` mode
159
+ `:pretty` mode is using popen3. In this mode STDIN is efectivly disabled. This means that any kind of inputs won't be forwarded to remote host. If you have a need for password input please use `:system` mode
160
160
 
161
161
  ### Backends
162
162
 
data/lib/Minafile CHANGED
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'mina/install'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Mina
2
4
  class Application < Rake::Application
3
5
  include Configuration::DSL
@@ -11,24 +13,27 @@ module Mina
11
13
  'mina'
12
14
  end
13
15
 
14
- def run
16
+ # :nocov:
17
+ def run(*args)
15
18
  Rake.application = self
16
- super
19
+ super(*args)
17
20
  end
21
+ # :nocov:
18
22
 
19
23
  def sort_options(options)
20
- not_applicable_to_mina = %w(quiet silent verbose dry-run)
21
- options.reject! do |(switch, *)|
22
- switch =~ /--#{Regexp.union(not_applicable_to_mina)}/
23
- end
24
+ options_not_applicable_to_mina = /--#{Regexp.union(['quiet', 'silent', 'verbose', 'dry-run'])}/
24
25
 
25
- super.push(version, verbose, simulate, debug_configuration_variables, no_report_time)
26
+ mina_options = options.reject { |(switch, *)| switch =~ options_not_applicable_to_mina }
27
+ mina_options += [version, verbose, simulate, debug_configuration_variables, no_report_time]
28
+
29
+ super(mina_options)
26
30
  end
27
31
 
28
32
  def top_level_tasks
29
33
  return @top_level_tasks if @top_level_tasks.include?('init')
30
- @top_level_tasks << :debug_configuration_variables
31
- @top_level_tasks << :run_commands
34
+
35
+ @top_level_tasks << 'debug_configuration_variables'
36
+ @top_level_tasks << 'run_commands'
32
37
  end
33
38
 
34
39
  private
@@ -38,48 +43,53 @@ module Mina
38
43
  end
39
44
 
40
45
  def version
41
- ['--version', '-V',
42
- 'Display the program version.',
43
- lambda do |_value|
44
- puts "Mina, version v#{Mina::VERSION}"
45
- exit
46
- end
46
+ [
47
+ '--version', '-V',
48
+ 'Display the program version.',
49
+ lambda do |_value|
50
+ puts "Mina, version v#{Mina::VERSION}"
51
+ exit
52
+ end
47
53
  ]
48
54
  end
49
55
 
50
56
  def verbose
51
- ['--verbose', '-v',
52
- 'Print more info',
53
- lambda do |_value|
54
- set(:verbose, true)
55
- end
57
+ [
58
+ '--verbose', '-v',
59
+ 'Print a command before its execution.',
60
+ lambda do |_value|
61
+ set(:verbose, true)
62
+ end
56
63
  ]
57
64
  end
58
65
 
59
66
  def simulate
60
- ['--simulate', '-s',
61
- 'Do a simulate run without executing actions',
62
- lambda do |_value|
63
- set(:simulate, true)
64
- end
67
+ [
68
+ '--simulate', '-s',
69
+ 'Run a simulation. All commands will be printed but not executed.',
70
+ lambda do |_value|
71
+ set(:simulate, true)
72
+ end
65
73
  ]
66
74
  end
67
75
 
68
76
  def debug_configuration_variables
69
- ['--debug-configuration-variables', '-d',
70
- 'Display the defined config variables before runnig the tasks.',
71
- lambda do |_value|
72
- set(:debug_configuration_variables, true)
73
- end
77
+ [
78
+ '--debug-configuration-variables', '-d',
79
+ 'Display configuration variables.',
80
+ lambda do |_value|
81
+ set(:debug_configuration_variables, true)
82
+ end
74
83
  ]
75
84
  end
76
85
 
77
86
  def no_report_time
78
- ['--no-report-time', nil,
79
- 'Skip time reporting',
80
- lambda do |_value|
81
- set(:skip_report_time, true)
82
- end
87
+ [
88
+ '--no-report-time', nil,
89
+ "Don't report execution time.",
90
+ lambda do |_value|
91
+ set(:skip_report_time, true)
92
+ end
83
93
  ]
84
94
  end
85
95
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Mina
2
4
  module Backend
3
5
  class Local