mina 1.2.3 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: dd2e33c131a0bfb0c0f3a00cc075cf8223946f97
4
- data.tar.gz: 7b2bf61f316e5f8eb054f3c969f935567142f7ca
2
+ SHA256:
3
+ metadata.gz: 9d7c0f66492d5e20116a2dd841f88c71d7da484b90a55af54b1bc0451e91c58c
4
+ data.tar.gz: 854d54d25c751912e8d15aae9656a8a30cd3870c3e02bf9c6a168df703cb1281
5
5
  SHA512:
6
- metadata.gz: e30988b3d133b9ac564b38cd723959ecb0ad7c70ef84489cb45621c8357245c97434168c50650eae0df30523fe394b9de7b431de5ca63e683a5f456d49e2216c
7
- data.tar.gz: e4c14e1741fb77d0cfff12fa087ee99599641ceccb9cf6b9522ed73041972730e8fc199c24ddf263a089d44188a4c3a4d9cf67cacaec1b14701dc44e10356f58
6
+ metadata.gz: bb490bcdca4bf384b2cd951c7b7620250b2b33c0a4bdbe52a07d679c8176a8d73edbdabb76724aa32b876a8d8496830bcf46403595cce28281bcf959a5b298e9
7
+ data.tar.gz: 1232a9dcd1c20e523dd2b1f1a36157f706efdfa4ea0ad0b4356dfb3d359d974847a966388c7370e92e51a33476f0a6295df7d994223ae26730d926164b934a6d
@@ -0,0 +1,26 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ paths-ignore:
5
+ - 'docs/**'
6
+ - '**.md'
7
+ jobs:
8
+ test:
9
+ name: Ruby ${{ matrix.ruby }} (${{ matrix.os }})
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ os: [ubuntu-latest, macos-latest]
14
+ ruby: [2.6, 2.7, '3.0', 3.1, 3.2, jruby-head]
15
+ runs-on: ${{ matrix.os }}
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby }}
21
+ bundler-cache: true
22
+ - run: bundle exec rubocop
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