mina 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +11 -3
  3. data/.gitignore +0 -1
  4. data/.rspec +1 -1
  5. data/.rubocop.yml +28 -1126
  6. data/CHANGELOG.md +89 -8
  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 +6 -4
  13. data/docs/3rd_party_plugins.md +1 -0
  14. data/docs/assets/images/mina.png +0 -0
  15. data/docs/default_plugins.md +1 -1
  16. data/docs/how_mina_works.md +2 -2
  17. data/lib/Minafile +1 -0
  18. data/lib/mina/application.rb +45 -35
  19. data/lib/mina/backend/local.rb +2 -0
  20. data/lib/mina/backend/remote.rb +3 -1
  21. data/lib/mina/commands.rb +10 -7
  22. data/lib/mina/configuration.rb +6 -3
  23. data/lib/mina/dsl.rb +2 -2
  24. data/lib/mina/helpers/internal.rb +8 -8
  25. data/lib/mina/helpers/output.rb +5 -3
  26. data/lib/mina/runner/exec.rb +2 -0
  27. data/lib/mina/runner/pretty.rb +25 -19
  28. data/lib/mina/runner/printer.rb +2 -0
  29. data/lib/mina/runner/system.rb +2 -0
  30. data/lib/mina/runner.rb +9 -10
  31. data/lib/mina/version.rb +3 -1
  32. data/lib/mina/windows_patches.rb +4 -2
  33. data/lib/mina.rb +4 -3
  34. data/mina.gemspec +8 -7
  35. data/spec/configs/default.rb +8 -0
  36. data/spec/configs/dsl.rb +55 -0
  37. data/spec/configs/e2e.rb +25 -0
  38. data/spec/e2e/docker-compose.yml +21 -0
  39. data/spec/e2e/e2e_run.sh +11 -0
  40. data/spec/e2e/e2e_spec.rb +35 -0
  41. data/spec/e2e/ssh +27 -0
  42. data/spec/e2e/ssh.pub +1 -0
  43. data/spec/lib/mina/application_spec.rb +94 -35
  44. data/spec/lib/mina/backend/local_spec.rb +5 -2
  45. data/spec/lib/mina/backend/remote_spec.rb +5 -3
  46. data/spec/lib/mina/commands_spec.rb +7 -7
  47. data/spec/lib/mina/configuration_spec.rb +63 -3
  48. data/spec/lib/mina/dsl_spec.rb +94 -0
  49. data/spec/lib/mina/helpers/internal_spec.rb +88 -10
  50. data/spec/lib/mina/helpers/output_spec.rb +13 -10
  51. data/spec/lib/mina/runner/exec_spec.rb +19 -0
  52. data/spec/lib/mina/runner/pretty_spec.rb +17 -0
  53. data/spec/lib/mina/runner/printer_spec.rb +19 -0
  54. data/spec/lib/mina/runner/system_spec.rb +19 -0
  55. data/spec/lib/mina/runner_spec.rb +6 -10
  56. data/spec/spec_helper.rb +33 -14
  57. data/spec/support/outputs/bundle_clean.txt +2 -2
  58. data/spec/support/outputs/chruby_with_env.txt +7 -0
  59. data/spec/support/outputs/chruby_without_env.txt +2 -0
  60. data/spec/support/outputs/debug_configuration_variables.txt +11 -0
  61. data/spec/support/outputs/dsl_deploy.txt +4 -0
  62. data/spec/support/outputs/dsl_in_path.txt +1 -0
  63. data/spec/support/outputs/dsl_local_run.txt +5 -0
  64. data/spec/support/outputs/dsl_on.txt +6 -0
  65. data/spec/support/outputs/dsl_remote_run.txt +5 -0
  66. data/spec/support/outputs/dsl_reset.txt +2 -0
  67. data/spec/support/outputs/e2e_deploy_after_setup.txt +1 -0
  68. data/spec/support/outputs/e2e_deploy_without_setup.txt +1 -0
  69. data/spec/support/outputs/e2e_setup.txt +1 -0
  70. data/spec/support/outputs/environment.txt +1 -0
  71. data/spec/support/outputs/git_ensure_pushed.txt +15 -0
  72. data/spec/support/outputs/rails_assets_precompile_force_precompile.txt +2 -0
  73. data/spec/support/outputs/rails_assets_precompile_outside_deploy_block.txt +1 -0
  74. data/spec/support/outputs/rails_assets_precompile_with_diff.txt +7 -0
  75. data/spec/support/outputs/rails_console.txt +1 -0
  76. data/spec/support/outputs/rails_db_migrate_force_migrate.txt +2 -0
  77. data/spec/support/outputs/rails_db_migrate_outside_deploy_block.txt +1 -0
  78. data/spec/support/outputs/rails_db_migrate_with_diff.txt +7 -0
  79. data/spec/support/outputs/rails_log.txt +1 -0
  80. data/spec/support/outputs/rails_with_arguments.txt +1 -0
  81. data/spec/support/outputs/rails_without_arguments.txt +1 -0
  82. data/spec/support/outputs/rake_with_arguments.txt +1 -0
  83. data/spec/support/outputs/rake_without_arguments.txt +1 -0
  84. data/spec/support/outputs/rbenv_load.txt +9 -1
  85. data/spec/support/outputs/rvm_use_with_env.txt +8 -0
  86. data/spec/support/outputs/rvm_use_without_env.txt +2 -0
  87. data/spec/support/outputs/rvm_wrapper_with_arguments.txt +8 -0
  88. data/spec/support/outputs/rvm_wrapper_without_arguments.txt +2 -0
  89. data/spec/support/outputs/ry_with_env.txt +13 -0
  90. data/spec/support/outputs/ry_without_env.txt +13 -0
  91. data/spec/support/outputs/ssh.txt +1 -0
  92. data/spec/support/outputs/ssh_keyscan_domain.txt +3 -0
  93. data/spec/support/rake_example_group.rb +23 -19
  94. data/spec/tasks/bundler_spec.rb +6 -0
  95. data/spec/tasks/chruby_spec.rb +29 -0
  96. data/spec/tasks/default_spec.rb +79 -7
  97. data/spec/tasks/deploy_spec.rb +6 -0
  98. data/spec/tasks/git_spec.rb +12 -0
  99. data/spec/tasks/init_spec.rb +13 -4
  100. data/spec/tasks/rails_spec.rb +126 -15
  101. data/spec/tasks/rbenv_spec.rb +15 -0
  102. data/spec/tasks/rvm_spec.rb +51 -0
  103. data/spec/tasks/ry_spec.rb +43 -0
  104. data/tasks/mina/bundler.rb +7 -5
  105. data/tasks/mina/chruby.rb +7 -5
  106. data/tasks/mina/default.rb +19 -12
  107. data/tasks/mina/deploy.rb +26 -24
  108. data/tasks/mina/git.rb +28 -16
  109. data/tasks/mina/install.rb +3 -1
  110. data/tasks/mina/rails.rb +29 -27
  111. data/tasks/mina/rbenv.rb +8 -6
  112. data/tasks/mina/rvm.rb +13 -11
  113. data/tasks/mina/ry.rb +11 -11
  114. data/test_env/config/deploy.rb +9 -8
  115. metadata +64 -32
  116. data/spec/support/outputs/chruby.txt +0 -9
  117. data/spec/support/outputs/console.txt +0 -1
  118. data/spec/support/outputs/log.txt +0 -1
  119. data/spec/support/outputs/rails_db_migrate.txt +0 -1
  120. data/spec/support/outputs/rvm_use.txt +0 -1
  121. data/spec/support/outputs/ry.txt +0 -15
  122. data/spec/tasks/ruby_managers_spec.rb +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc88a947e07838f640dab1f4d01c29626e749f1404f700c92a398bb226809f85
4
- data.tar.gz: a030ea5cd4e664f3a845e1e0c48baaf7705a31c5b843ab2fbc7c1abf2609659b
3
+ metadata.gz: 9d7c0f66492d5e20116a2dd841f88c71d7da484b90a55af54b1bc0451e91c58c
4
+ data.tar.gz: 854d54d25c751912e8d15aae9656a8a30cd3870c3e02bf9c6a168df703cb1281
5
5
  SHA512:
6
- metadata.gz: 89d43287a0497147d9c2c3d483e129f674b46d2734ded7ec48c401ab66a3ac6a381204d853af4c885f25c32aca4df94499267862a87b52e260545f67fac0d328
7
- data.tar.gz: 36046004c36893b1855d98da30e3d6a23025e47fa8a4442103ed648bff23781f3fbe80f25a3f5feb6a13bdee84f0a34c4ab072a9aac8bedd4f4c348646d34ab4
6
+ metadata.gz: bb490bcdca4bf384b2cd951c7b7620250b2b33c0a4bdbe52a07d679c8176a8d73edbdabb76724aa32b876a8d8496830bcf46403595cce28281bcf959a5b298e9
7
+ data.tar.gz: 1232a9dcd1c20e523dd2b1f1a36157f706efdfa4ea0ad0b4356dfb3d359d974847a966388c7370e92e51a33476f0a6295df7d994223ae26730d926164b934a6d
@@ -1,13 +1,17 @@
1
1
  name: CI
2
- on: [push, pull_request]
2
+ on:
3
+ push:
4
+ paths-ignore:
5
+ - 'docs/**'
6
+ - '**.md'
3
7
  jobs:
4
8
  test:
5
9
  name: Ruby ${{ matrix.ruby }} (${{ matrix.os }})
6
10
  strategy:
7
11
  fail-fast: false
8
12
  matrix:
9
- os: [ubuntu-20.04, macos-10.15]
10
- ruby: [2.6, 2.7, 3.0]
13
+ os: [ubuntu-latest, macos-latest]
14
+ ruby: [2.6, 2.7, '3.0', 3.1, 3.2, jruby-head]
11
15
  runs-on: ${{ matrix.os }}
12
16
  steps:
13
17
  - uses: actions/checkout@v2
@@ -15,4 +19,8 @@ jobs:
15
19
  with:
16
20
  ruby-version: ${{ matrix.ruby }}
17
21
  bundler-cache: true
22
+ - run: bundle exec rubocop
18
23
  - run: bundle exec rspec
24
+ - name: E2E tests
25
+ if: ${{ success() && matrix.os != 'macos-latest' }}
26
+ run: bash spec/e2e/e2e_run.sh
data/.gitignore CHANGED
@@ -3,7 +3,6 @@ test_env/deploy
3
3
  .rvmrc
4
4
  .ruby-gemset
5
5
  .ruby-version
6
- Gemfile.lock
7
6
  pkg/
8
7
  support/helpers.md
9
8
  support/modules.md
data/.rspec CHANGED
@@ -1 +1 @@
1
- -c --order rand -t ~ssh
1
+ -c --order rand --tag ~e2e