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.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +26 -0
- data/.gitignore +0 -1
- data/.rspec +1 -1
- data/.rubocop.yml +28 -1126
- data/CHANGELOG.md +126 -3
- data/Gemfile +2 -0
- data/Gemfile.lock +73 -0
- data/Rakefile +2 -0
- data/Readme.md +8 -12
- data/bin/mina +2 -0
- data/data/deploy.rb +10 -6
- data/docs/3rd_party_plugins.md +3 -0
- data/docs/assets/images/mina.png +0 -0
- data/docs/cookbook.md +1 -1
- data/docs/default_plugins.md +5 -5
- data/docs/how_mina_works.md +3 -3
- data/lib/Minafile +1 -0
- data/lib/mina/application.rb +45 -35
- data/lib/mina/backend/local.rb +2 -0
- data/lib/mina/backend/remote.rb +3 -1
- data/lib/mina/commands.rb +10 -7
- data/lib/mina/configuration.rb +6 -3
- data/lib/mina/dsl.rb +2 -2
- data/lib/mina/helpers/internal.rb +9 -9
- data/lib/mina/helpers/output.rb +5 -3
- data/lib/mina/runner/exec.rb +2 -0
- data/lib/mina/runner/pretty.rb +25 -19
- data/lib/mina/runner/printer.rb +2 -0
- data/lib/mina/runner/system.rb +2 -0
- data/lib/mina/runner.rb +9 -10
- data/lib/mina/version.rb +3 -1
- data/lib/mina/windows_patches.rb +4 -2
- data/lib/mina.rb +4 -3
- data/mina.gemspec +8 -7
- data/spec/configs/default.rb +8 -0
- data/spec/configs/dsl.rb +55 -0
- data/spec/configs/e2e.rb +25 -0
- data/spec/e2e/docker-compose.yml +21 -0
- data/spec/e2e/e2e_run.sh +11 -0
- data/spec/e2e/e2e_spec.rb +35 -0
- data/spec/e2e/ssh +27 -0
- data/spec/e2e/ssh.pub +1 -0
- data/spec/lib/mina/application_spec.rb +94 -35
- data/spec/lib/mina/backend/local_spec.rb +5 -2
- data/spec/lib/mina/backend/remote_spec.rb +5 -3
- data/spec/lib/mina/commands_spec.rb +7 -7
- data/spec/lib/mina/configuration_spec.rb +63 -3
- data/spec/lib/mina/dsl_spec.rb +94 -0
- data/spec/lib/mina/helpers/internal_spec.rb +89 -11
- data/spec/lib/mina/helpers/output_spec.rb +13 -10
- data/spec/lib/mina/runner/exec_spec.rb +19 -0
- data/spec/lib/mina/runner/pretty_spec.rb +17 -0
- data/spec/lib/mina/runner/printer_spec.rb +19 -0
- data/spec/lib/mina/runner/system_spec.rb +19 -0
- data/spec/lib/mina/runner_spec.rb +6 -10
- data/spec/spec_helper.rb +33 -14
- data/spec/support/outputs/bundle_clean.txt +2 -2
- data/spec/support/outputs/chruby_with_env.txt +7 -0
- data/spec/support/outputs/chruby_without_env.txt +2 -0
- data/spec/support/outputs/debug_configuration_variables.txt +11 -0
- data/spec/support/outputs/dsl_deploy.txt +4 -0
- data/spec/support/outputs/dsl_in_path.txt +1 -0
- data/spec/support/outputs/dsl_local_run.txt +5 -0
- data/spec/support/outputs/dsl_on.txt +6 -0
- data/spec/support/outputs/dsl_remote_run.txt +5 -0
- data/spec/support/outputs/dsl_reset.txt +2 -0
- data/spec/support/outputs/e2e_deploy_after_setup.txt +1 -0
- data/spec/support/outputs/e2e_deploy_without_setup.txt +1 -0
- data/spec/support/outputs/e2e_setup.txt +1 -0
- data/spec/support/outputs/environment.txt +1 -0
- data/spec/support/outputs/git_clone.txt +1 -1
- data/spec/support/outputs/git_clone_commit.txt +1 -1
- data/spec/support/outputs/git_ensure_pushed.txt +15 -0
- data/spec/support/outputs/rails_assets_precompile_force_precompile.txt +2 -0
- data/spec/support/outputs/rails_assets_precompile_outside_deploy_block.txt +1 -0
- data/spec/support/outputs/rails_assets_precompile_with_diff.txt +7 -0
- data/spec/support/outputs/rails_console.txt +1 -0
- data/spec/support/outputs/rails_db_migrate_force_migrate.txt +2 -0
- data/spec/support/outputs/rails_db_migrate_outside_deploy_block.txt +1 -0
- data/spec/support/outputs/rails_db_migrate_with_diff.txt +7 -0
- data/spec/support/outputs/rails_log.txt +1 -0
- data/spec/support/outputs/rails_with_arguments.txt +1 -0
- data/spec/support/outputs/rails_without_arguments.txt +1 -0
- data/spec/support/outputs/rake_with_arguments.txt +1 -0
- data/spec/support/outputs/rake_without_arguments.txt +1 -0
- data/spec/support/outputs/rbenv_load.txt +9 -1
- data/spec/support/outputs/rvm_use_with_env.txt +8 -0
- data/spec/support/outputs/rvm_use_without_env.txt +2 -0
- data/spec/support/outputs/rvm_wrapper_with_arguments.txt +8 -0
- data/spec/support/outputs/rvm_wrapper_without_arguments.txt +2 -0
- data/spec/support/outputs/ry_with_env.txt +13 -0
- data/spec/support/outputs/ry_without_env.txt +13 -0
- data/spec/support/outputs/ssh.txt +1 -0
- data/spec/support/outputs/ssh_keyscan_domain.txt +3 -0
- data/spec/support/rake_example_group.rb +23 -19
- data/spec/tasks/bundler_spec.rb +6 -0
- data/spec/tasks/chruby_spec.rb +29 -0
- data/spec/tasks/default_spec.rb +79 -7
- data/spec/tasks/deploy_spec.rb +6 -0
- data/spec/tasks/git_spec.rb +12 -0
- data/spec/tasks/init_spec.rb +13 -4
- data/spec/tasks/rails_spec.rb +126 -15
- data/spec/tasks/rbenv_spec.rb +15 -0
- data/spec/tasks/rvm_spec.rb +51 -0
- data/spec/tasks/ry_spec.rb +43 -0
- data/tasks/mina/bundler.rb +7 -5
- data/tasks/mina/chruby.rb +7 -5
- data/tasks/mina/default.rb +19 -12
- data/tasks/mina/deploy.rb +27 -25
- data/tasks/mina/git.rb +28 -15
- data/tasks/mina/install.rb +9 -0
- data/tasks/mina/rails.rb +29 -27
- data/tasks/mina/rbenv.rb +8 -6
- data/tasks/mina/rvm.rb +13 -11
- data/tasks/mina/ry.rb +11 -11
- data/test_env/config/deploy.rb +9 -8
- metadata +69 -37
- data/spec/support/outputs/chruby.txt +0 -9
- data/spec/support/outputs/console.txt +0 -1
- data/spec/support/outputs/log.txt +0 -1
- data/spec/support/outputs/rails_db_migrate.txt +0 -1
- data/spec/support/outputs/rvm_use.txt +0 -1
- data/spec/support/outputs/ry.txt +0 -15
- data/spec/tasks/ruby_managers_spec.rb +0 -33
data/tasks/mina/rails.rb
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'mina/deploy'
|
|
2
4
|
require 'mina/bundler'
|
|
3
5
|
|
|
4
6
|
set :rails_env, 'production'
|
|
5
|
-
set :bundle_prefix, -> { %
|
|
7
|
+
set :bundle_prefix, -> { %(RAILS_ENV="#{fetch(:rails_env)}" #{fetch(:bundle_bin)} exec) }
|
|
6
8
|
set :rake, -> { "#{fetch(:bundle_prefix)} rake" }
|
|
7
9
|
set :rails, -> { "#{fetch(:bundle_prefix)} rails" }
|
|
8
10
|
set :compiled_asset_path, 'public/assets'
|
|
@@ -14,8 +16,8 @@ set :shared_dirs, fetch(:shared_dirs, []).push('log', 'tmp/cache', fetch(:compil
|
|
|
14
16
|
desc 'Starts an interactive console.'
|
|
15
17
|
task :console do
|
|
16
18
|
set :execution_mode, :exec
|
|
17
|
-
in_path
|
|
18
|
-
command %
|
|
19
|
+
in_path fetch(:current_path) do
|
|
20
|
+
command %(#{fetch(:rails)} console)
|
|
19
21
|
end
|
|
20
22
|
end
|
|
21
23
|
|
|
@@ -23,7 +25,7 @@ desc 'Tail log from server'
|
|
|
23
25
|
task :log do
|
|
24
26
|
set :execution_mode, :exec
|
|
25
27
|
in_path "#{fetch(:shared_path)}/log" do
|
|
26
|
-
command %
|
|
28
|
+
command %(tail -f #{fetch(:rails_env)}.log)
|
|
27
29
|
end
|
|
28
30
|
end
|
|
29
31
|
|
|
@@ -32,72 +34,72 @@ namespace :rails do
|
|
|
32
34
|
task :db_migrate do
|
|
33
35
|
ensure!(:deploy_block, message: "Can't be run outside deploy do block. Please use mina 'rake[db_migrate]' instead")
|
|
34
36
|
if fetch(:force_migrate)
|
|
35
|
-
comment %
|
|
36
|
-
command %
|
|
37
|
+
comment %(Migrating database)
|
|
38
|
+
command %(#{fetch(:rake)} db:migrate)
|
|
37
39
|
else
|
|
38
40
|
command check_for_changes_script(
|
|
39
41
|
at: fetch(:migration_dirs),
|
|
40
|
-
skip: %
|
|
41
|
-
changed: %
|
|
42
|
-
#{echo_cmd("#{fetch(:rake)} db:migrate")}
|
|
42
|
+
skip: %(echo "-----> DB migrations unchanged; skipping DB migration"),
|
|
43
|
+
changed: %(echo "-----> Migrating database"
|
|
44
|
+
#{echo_cmd("#{fetch(:rake)} db:migrate")})
|
|
43
45
|
), quiet: true
|
|
44
46
|
end
|
|
45
47
|
end
|
|
46
48
|
|
|
47
49
|
desc 'Create database'
|
|
48
50
|
task :db_create do
|
|
49
|
-
comment %
|
|
50
|
-
command %
|
|
51
|
+
comment %(Creating database)
|
|
52
|
+
command %(#{fetch(:rake)} db:create)
|
|
51
53
|
end
|
|
52
54
|
|
|
53
55
|
desc 'Rollback database'
|
|
54
56
|
task :db_rollback do
|
|
55
|
-
comment %
|
|
56
|
-
command %
|
|
57
|
+
comment %(Rollbacking database)
|
|
58
|
+
command %(#{fetch(:rake)} db:rollback)
|
|
57
59
|
end
|
|
58
60
|
|
|
59
61
|
desc 'Precompiles assets (skips if nothing has changed since the last release).'
|
|
60
62
|
task :assets_precompile do
|
|
61
63
|
ensure!(:deploy_block, message: "Can't be run outside deploy do block. Please use mina 'rake[assets_precompile]' instead")
|
|
62
64
|
if fetch(:force_asset_precompile)
|
|
63
|
-
comment %
|
|
64
|
-
command %
|
|
65
|
+
comment %(Precompiling asset files)
|
|
66
|
+
command %(#{fetch(:rake)} assets:precompile)
|
|
65
67
|
else
|
|
66
68
|
command check_for_changes_script(
|
|
67
69
|
at: fetch(:asset_dirs),
|
|
68
|
-
skip: %
|
|
69
|
-
changed: %
|
|
70
|
-
#{echo_cmd "#{fetch(:rake)} assets:precompile"}
|
|
70
|
+
skip: %(echo "-----> Skipping asset precompilation"),
|
|
71
|
+
changed: %(echo "-----> Precompiling asset files"
|
|
72
|
+
#{echo_cmd "#{fetch(:rake)} assets:precompile"})
|
|
71
73
|
), quiet: true
|
|
72
74
|
end
|
|
73
75
|
end
|
|
74
76
|
|
|
75
77
|
desc 'Clear older assets'
|
|
76
78
|
task :assets_clean do
|
|
77
|
-
comment %
|
|
78
|
-
command %
|
|
79
|
+
comment %(Removing older assets)
|
|
80
|
+
command %(#{fetch(:rake)} assets:clean)
|
|
79
81
|
end
|
|
80
82
|
|
|
81
83
|
desc 'DB schema load'
|
|
82
84
|
task :db_schema_load do
|
|
83
|
-
comment %
|
|
84
|
-
command %
|
|
85
|
+
comment %(DB schema load)
|
|
86
|
+
command %(#{fetch(:rake)} db:schema:load)
|
|
85
87
|
end
|
|
86
88
|
end
|
|
87
89
|
|
|
88
90
|
def check_for_changes_script(options)
|
|
89
91
|
diffs = options[:at].map do |path|
|
|
90
|
-
%
|
|
92
|
+
%(diff -qrN "#{fetch(:current_path)}/#{path}" "./#{path}" 2>/dev/null)
|
|
91
93
|
end.join(' && ')
|
|
92
94
|
|
|
93
|
-
%
|
|
95
|
+
%(
|
|
94
96
|
if #{diffs}
|
|
95
97
|
then
|
|
96
98
|
#{options[:skip]}
|
|
97
99
|
else
|
|
98
100
|
#{options[:changed]}
|
|
99
101
|
fi
|
|
100
|
-
|
|
102
|
+
)
|
|
101
103
|
end
|
|
102
104
|
|
|
103
105
|
# Macro used later by :rails, :rake, etc
|
|
@@ -107,10 +109,10 @@ make_run_task = lambda { |name, example|
|
|
|
107
109
|
|
|
108
110
|
arguments = args[:arguments]
|
|
109
111
|
unless arguments
|
|
110
|
-
puts %
|
|
112
|
+
puts %(You need to provide arguments. Try: mina "#{name}[#{example}]")
|
|
111
113
|
exit 1
|
|
112
114
|
end
|
|
113
|
-
in_path
|
|
115
|
+
in_path fetch(:current_path) do
|
|
114
116
|
command %(#{fetch(name)} #{arguments})
|
|
115
117
|
end
|
|
116
118
|
end
|
data/tasks/mina/rbenv.rb
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
set :rbenv_path, '$HOME/.rbenv'
|
|
2
4
|
|
|
3
5
|
task :'rbenv:load' do
|
|
4
|
-
comment %
|
|
5
|
-
command %
|
|
6
|
-
command %
|
|
7
|
-
command %
|
|
6
|
+
comment %(Loading rbenv)
|
|
7
|
+
command %(export RBENV_ROOT="#{fetch(:rbenv_path)}")
|
|
8
|
+
command %(export PATH="#{fetch(:rbenv_path)}/bin:$PATH")
|
|
9
|
+
command %(
|
|
8
10
|
if ! which rbenv >/dev/null; then
|
|
9
11
|
echo "! rbenv not found"
|
|
10
12
|
echo "! If rbenv is installed, check your :rbenv_path setting."
|
|
11
13
|
exit 1
|
|
12
14
|
fi
|
|
13
|
-
|
|
15
|
+
)
|
|
14
16
|
command %{eval "$(rbenv init -)"}
|
|
15
17
|
end
|
data/tasks/mina/rvm.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
set :rvm_use_path, '$HOME/.rvm/scripts/rvm'
|
|
2
4
|
|
|
3
5
|
task :'rvm:use', :env do |_, args|
|
|
@@ -7,33 +9,33 @@ task :'rvm:use', :env do |_, args|
|
|
|
7
9
|
exit 1
|
|
8
10
|
end
|
|
9
11
|
|
|
10
|
-
comment %
|
|
11
|
-
command %
|
|
12
|
+
comment %(Using RVM environment \\\"#{args[:env]}\\\")
|
|
13
|
+
command %(
|
|
12
14
|
if [[ ! -s "#{fetch(:rvm_use_path)}" ]]; then
|
|
13
15
|
echo "! Ruby Version Manager not found"
|
|
14
16
|
echo "! If RVM is installed, check your :rvm_use_path setting."
|
|
15
17
|
exit 1
|
|
16
18
|
fi
|
|
17
|
-
|
|
18
|
-
command %
|
|
19
|
-
command %
|
|
19
|
+
)
|
|
20
|
+
command %(source #{fetch(:rvm_use_path)})
|
|
21
|
+
command %(rvm use "#{args[:env]}" --create)
|
|
20
22
|
end
|
|
21
23
|
|
|
22
24
|
task :'rvm:wrapper', :env, :name, :bin do |_, args|
|
|
23
25
|
unless args[:env] && args[:name] && args[:bin]
|
|
24
|
-
puts "Task 'rvm:wrapper' needs an RVM environment name,
|
|
26
|
+
puts "Task 'rvm:wrapper' needs an RVM environment name, a wrapper name and the binary name as arguments"
|
|
25
27
|
puts "Example: invoke :'rvm:wrapper', 'ruby-1.9.2@myapp,myapp,unicorn_rails'"
|
|
26
28
|
exit 1
|
|
27
29
|
end
|
|
28
30
|
|
|
29
|
-
comment %
|
|
30
|
-
command %
|
|
31
|
+
comment %(creating RVM wrapper "#{args[:name]}_#{args[:bin]}" using \\"#{args[:env]}\\")
|
|
32
|
+
command %(
|
|
31
33
|
if [[ ! -s "#{fetch(:rvm_use_path)}" ]]; then
|
|
32
34
|
echo "! Ruby Version Manager not found"
|
|
33
35
|
echo "! If RVM is installed, check your :rvm_use_path setting."
|
|
34
36
|
exit 1
|
|
35
37
|
fi
|
|
36
|
-
|
|
37
|
-
command %
|
|
38
|
-
command %
|
|
38
|
+
)
|
|
39
|
+
command %(source #{fetch(:rvm_use_path)})
|
|
40
|
+
command %(rvm wrapper #{args[:env]} #{args[:name]} #{args[:bin]} || exit 1)
|
|
39
41
|
end
|
data/tasks/mina/ry.rb
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
set :ry_path, '$HOME/.local'
|
|
2
4
|
|
|
3
5
|
task :ry, :env do |_, args|
|
|
4
|
-
unless args[:env]
|
|
5
|
-
puts "Task 'ry' without argument will use default Ruby version."
|
|
6
|
-
end
|
|
6
|
+
puts "Task 'ry' without argument will use default Ruby version." unless args[:env]
|
|
7
7
|
|
|
8
|
-
comment %
|
|
9
|
-
comment %
|
|
8
|
+
comment %(ry to version: \\"#{args[:env] || '**not specified**'}\\")
|
|
9
|
+
comment %(Loading ry)
|
|
10
10
|
|
|
11
|
-
command %
|
|
11
|
+
command %(
|
|
12
12
|
if [[ ! -e "#{fetch(:ry_path)}/bin" ]]; then
|
|
13
13
|
echo "! ry not found"
|
|
14
14
|
echo "! If ry is installed, check your :ry_path setting."
|
|
15
15
|
exit 1
|
|
16
16
|
fi
|
|
17
|
-
|
|
18
|
-
command %
|
|
17
|
+
)
|
|
18
|
+
command %(export PATH="#{fetch(:ry_path)}/bin:$PATH")
|
|
19
19
|
command %{eval "$(ry setup)"}
|
|
20
|
-
command %
|
|
21
|
-
command %
|
|
20
|
+
command %(RY_RUBY="#{args[:env]}")
|
|
21
|
+
command %(
|
|
22
22
|
if [ -n "$RY_RUBY" ]; then
|
|
23
23
|
#{echo_cmd 'ry use $RY_RUBY'} || exit 1
|
|
24
24
|
fi
|
|
25
|
-
|
|
25
|
+
)
|
|
26
26
|
end
|
data/test_env/config/deploy.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# # NOTE:
|
|
2
4
|
# # Yes, you can deploy this project. It will deploy into the ./deploy/
|
|
3
5
|
# # directory. The commands have been stubbed, so it's harmless. No rails or
|
|
@@ -23,11 +25,10 @@ require 'mina/rvm'
|
|
|
23
25
|
require 'mina/rbenv'
|
|
24
26
|
require 'mina/chruby'
|
|
25
27
|
require 'pry'
|
|
26
|
-
#
|
|
27
28
|
|
|
28
29
|
set :domain, 'localhost'
|
|
29
30
|
set :deploy_to, "#{Dir.pwd}/deploy"
|
|
30
|
-
set :repository,
|
|
31
|
+
set :repository, Mina.root_path.to_s
|
|
31
32
|
set :shared_paths, ['config/database.yml', 'log']
|
|
32
33
|
set :keep_releases, 2
|
|
33
34
|
|
|
@@ -49,7 +50,7 @@ task :deploy do
|
|
|
49
50
|
invoke :'deploy:cleanup'
|
|
50
51
|
|
|
51
52
|
on :launch do
|
|
52
|
-
comment %
|
|
53
|
+
comment %(in launch)
|
|
53
54
|
end
|
|
54
55
|
end
|
|
55
56
|
end
|
|
@@ -57,17 +58,17 @@ end
|
|
|
57
58
|
desc 'Task description'
|
|
58
59
|
task :test do
|
|
59
60
|
run :remote do
|
|
60
|
-
comment %
|
|
61
|
+
comment %(PWD)
|
|
61
62
|
in_path('/Users') do
|
|
62
|
-
command %
|
|
63
|
+
command %(ls -al)
|
|
63
64
|
end
|
|
64
65
|
on :after do
|
|
65
|
-
command %
|
|
66
|
+
command %(pwd)
|
|
66
67
|
end
|
|
67
68
|
end
|
|
68
69
|
|
|
69
70
|
run :local do
|
|
70
|
-
command %
|
|
71
|
+
command %(ls -al)
|
|
71
72
|
end
|
|
72
73
|
end
|
|
73
74
|
|
|
@@ -75,7 +76,7 @@ desc 'Fails test'
|
|
|
75
76
|
task :fail do
|
|
76
77
|
run :remote do
|
|
77
78
|
run :local do
|
|
78
|
-
command
|
|
79
|
+
command 'pwd'
|
|
79
80
|
end
|
|
80
81
|
end
|
|
81
82
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mina
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stjepan Hadjić
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -25,35 +25,21 @@ dependencies:
|
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: pry
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: 1.3.4
|
|
34
|
-
type: :runtime
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - "~>"
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: 1.3.4
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: rspec
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - "~>"
|
|
31
|
+
- - ">="
|
|
46
32
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
33
|
+
version: '0'
|
|
48
34
|
type: :development
|
|
49
35
|
prerelease: false
|
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
37
|
requirements:
|
|
52
|
-
- - "
|
|
38
|
+
- - ">="
|
|
53
39
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
40
|
+
version: '0'
|
|
55
41
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
42
|
+
name: rspec
|
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
|
58
44
|
requirements:
|
|
59
45
|
- - ">="
|
|
@@ -67,7 +53,7 @@ dependencies:
|
|
|
67
53
|
- !ruby/object:Gem::Version
|
|
68
54
|
version: '0'
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
56
|
+
name: rubocop
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
|
72
58
|
requirements:
|
|
73
59
|
- - ">="
|
|
@@ -81,7 +67,7 @@ dependencies:
|
|
|
81
67
|
- !ruby/object:Gem::Version
|
|
82
68
|
version: '0'
|
|
83
69
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
70
|
+
name: rubocop-rspec
|
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
|
86
72
|
requirements:
|
|
87
73
|
- - ">="
|
|
@@ -95,7 +81,7 @@ dependencies:
|
|
|
95
81
|
- !ruby/object:Gem::Version
|
|
96
82
|
version: '0'
|
|
97
83
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
84
|
+
name: simplecov
|
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
|
100
86
|
requirements:
|
|
101
87
|
- - ">="
|
|
@@ -117,12 +103,14 @@ extensions: []
|
|
|
117
103
|
extra_rdoc_files: []
|
|
118
104
|
files:
|
|
119
105
|
- ".codeclimate.yml"
|
|
106
|
+
- ".github/workflows/ci.yml"
|
|
120
107
|
- ".github_changelog_generator"
|
|
121
108
|
- ".gitignore"
|
|
122
109
|
- ".rspec"
|
|
123
110
|
- ".rubocop.yml"
|
|
124
111
|
- CHANGELOG.md
|
|
125
112
|
- Gemfile
|
|
113
|
+
- Gemfile.lock
|
|
126
114
|
- LICENSE
|
|
127
115
|
- PRE_1_CHANGELOG.md
|
|
128
116
|
- Rakefile
|
|
@@ -132,6 +120,7 @@ files:
|
|
|
132
120
|
- data/deploy.sh.erb
|
|
133
121
|
- docs/3rd_party_plugins.md
|
|
134
122
|
- docs/Readme.md
|
|
123
|
+
- docs/assets/images/mina.png
|
|
135
124
|
- docs/cookbook.md
|
|
136
125
|
- docs/default_plugins.md
|
|
137
126
|
- docs/deploying.md
|
|
@@ -158,47 +147,91 @@ files:
|
|
|
158
147
|
- lib/mina/version.rb
|
|
159
148
|
- lib/mina/windows_patches.rb
|
|
160
149
|
- mina.gemspec
|
|
150
|
+
- spec/configs/default.rb
|
|
151
|
+
- spec/configs/dsl.rb
|
|
152
|
+
- spec/configs/e2e.rb
|
|
153
|
+
- spec/e2e/docker-compose.yml
|
|
154
|
+
- spec/e2e/e2e_run.sh
|
|
155
|
+
- spec/e2e/e2e_spec.rb
|
|
156
|
+
- spec/e2e/ssh
|
|
157
|
+
- spec/e2e/ssh.pub
|
|
161
158
|
- spec/lib/mina/application_spec.rb
|
|
162
159
|
- spec/lib/mina/backend/local_spec.rb
|
|
163
160
|
- spec/lib/mina/backend/remote_spec.rb
|
|
164
161
|
- spec/lib/mina/commands_spec.rb
|
|
165
162
|
- spec/lib/mina/configuration_spec.rb
|
|
163
|
+
- spec/lib/mina/dsl_spec.rb
|
|
166
164
|
- spec/lib/mina/helpers/internal_spec.rb
|
|
167
165
|
- spec/lib/mina/helpers/output_spec.rb
|
|
166
|
+
- spec/lib/mina/runner/exec_spec.rb
|
|
167
|
+
- spec/lib/mina/runner/pretty_spec.rb
|
|
168
|
+
- spec/lib/mina/runner/printer_spec.rb
|
|
169
|
+
- spec/lib/mina/runner/system_spec.rb
|
|
168
170
|
- spec/lib/mina/runner_spec.rb
|
|
169
171
|
- spec/spec_helper.rb
|
|
170
172
|
- spec/support/outputs/bundle_clean.txt
|
|
171
173
|
- spec/support/outputs/bundle_install.txt
|
|
172
|
-
- spec/support/outputs/
|
|
173
|
-
- spec/support/outputs/
|
|
174
|
+
- spec/support/outputs/chruby_with_env.txt
|
|
175
|
+
- spec/support/outputs/chruby_without_env.txt
|
|
176
|
+
- spec/support/outputs/debug_configuration_variables.txt
|
|
174
177
|
- spec/support/outputs/deploy_cleanup.txt
|
|
175
178
|
- spec/support/outputs/deploy_force_unlock.txt
|
|
176
179
|
- spec/support/outputs/deploy_link_shared_paths.txt
|
|
180
|
+
- spec/support/outputs/dsl_deploy.txt
|
|
181
|
+
- spec/support/outputs/dsl_in_path.txt
|
|
182
|
+
- spec/support/outputs/dsl_local_run.txt
|
|
183
|
+
- spec/support/outputs/dsl_on.txt
|
|
184
|
+
- spec/support/outputs/dsl_remote_run.txt
|
|
185
|
+
- spec/support/outputs/dsl_reset.txt
|
|
186
|
+
- spec/support/outputs/e2e_deploy_after_setup.txt
|
|
187
|
+
- spec/support/outputs/e2e_deploy_without_setup.txt
|
|
188
|
+
- spec/support/outputs/e2e_setup.txt
|
|
189
|
+
- spec/support/outputs/environment.txt
|
|
177
190
|
- spec/support/outputs/git_clone.txt
|
|
178
191
|
- spec/support/outputs/git_clone_commit.txt
|
|
192
|
+
- spec/support/outputs/git_ensure_pushed.txt
|
|
179
193
|
- spec/support/outputs/git_revision.txt
|
|
180
|
-
- spec/support/outputs/log.txt
|
|
181
194
|
- spec/support/outputs/rails_assets_clean.txt
|
|
182
195
|
- spec/support/outputs/rails_assets_precompile.txt
|
|
196
|
+
- spec/support/outputs/rails_assets_precompile_force_precompile.txt
|
|
197
|
+
- spec/support/outputs/rails_assets_precompile_outside_deploy_block.txt
|
|
198
|
+
- spec/support/outputs/rails_assets_precompile_with_diff.txt
|
|
199
|
+
- spec/support/outputs/rails_console.txt
|
|
183
200
|
- spec/support/outputs/rails_db_create.txt
|
|
184
|
-
- spec/support/outputs/
|
|
201
|
+
- spec/support/outputs/rails_db_migrate_force_migrate.txt
|
|
202
|
+
- spec/support/outputs/rails_db_migrate_outside_deploy_block.txt
|
|
203
|
+
- spec/support/outputs/rails_db_migrate_with_diff.txt
|
|
185
204
|
- spec/support/outputs/rails_db_rollback.txt
|
|
186
205
|
- spec/support/outputs/rails_db_schema_load.txt
|
|
206
|
+
- spec/support/outputs/rails_log.txt
|
|
207
|
+
- spec/support/outputs/rails_with_arguments.txt
|
|
208
|
+
- spec/support/outputs/rails_without_arguments.txt
|
|
209
|
+
- spec/support/outputs/rake_with_arguments.txt
|
|
210
|
+
- spec/support/outputs/rake_without_arguments.txt
|
|
187
211
|
- spec/support/outputs/rbenv_load.txt
|
|
188
212
|
- spec/support/outputs/rollback.txt
|
|
189
213
|
- spec/support/outputs/run.txt
|
|
190
|
-
- spec/support/outputs/
|
|
191
|
-
- spec/support/outputs/
|
|
214
|
+
- spec/support/outputs/rvm_use_with_env.txt
|
|
215
|
+
- spec/support/outputs/rvm_use_without_env.txt
|
|
216
|
+
- spec/support/outputs/rvm_wrapper_with_arguments.txt
|
|
217
|
+
- spec/support/outputs/rvm_wrapper_without_arguments.txt
|
|
218
|
+
- spec/support/outputs/ry_with_env.txt
|
|
219
|
+
- spec/support/outputs/ry_without_env.txt
|
|
192
220
|
- spec/support/outputs/setup.txt
|
|
221
|
+
- spec/support/outputs/ssh.txt
|
|
222
|
+
- spec/support/outputs/ssh_keyscan_domain.txt
|
|
193
223
|
- spec/support/outputs/ssh_keyscan_repo.txt
|
|
194
224
|
- spec/support/rake_example_group.rb
|
|
195
225
|
- spec/tasks/bundler_spec.rb
|
|
226
|
+
- spec/tasks/chruby_spec.rb
|
|
196
227
|
- spec/tasks/default_spec.rb
|
|
197
228
|
- spec/tasks/deploy_spec.rb
|
|
198
229
|
- spec/tasks/git_spec.rb
|
|
199
230
|
- spec/tasks/init_spec.rb
|
|
200
231
|
- spec/tasks/rails_spec.rb
|
|
201
|
-
- spec/tasks/
|
|
232
|
+
- spec/tasks/rbenv_spec.rb
|
|
233
|
+
- spec/tasks/rvm_spec.rb
|
|
234
|
+
- spec/tasks/ry_spec.rb
|
|
202
235
|
- tasks/mina/bundler.rb
|
|
203
236
|
- tasks/mina/chruby.rb
|
|
204
237
|
- tasks/mina/default.rb
|
|
@@ -214,7 +247,7 @@ homepage: https://github.com/mina-deploy/mina
|
|
|
214
247
|
licenses:
|
|
215
248
|
- MIT
|
|
216
249
|
metadata: {}
|
|
217
|
-
post_install_message:
|
|
250
|
+
post_install_message:
|
|
218
251
|
rdoc_options: []
|
|
219
252
|
require_paths:
|
|
220
253
|
- lib
|
|
@@ -230,9 +263,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
230
263
|
- !ruby/object:Gem::Version
|
|
231
264
|
version: '0'
|
|
232
265
|
requirements: []
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
signing_key:
|
|
266
|
+
rubygems_version: 3.2.3
|
|
267
|
+
signing_key:
|
|
236
268
|
specification_version: 4
|
|
237
269
|
summary: Blazing fast application deployment tool.
|
|
238
270
|
test_files: []
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
\(cd\ .*/deploy/current\ &&\ RAILS_ENV="production"\ bundle\ exec\ rails\ console\ &&\ cd\ -\)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
\(cd\ .*deploy/shared/log\ &&\ tail\ \-f\ production\.log\ &&\ cd\ -\)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
if\ diff\ \-qrN\ ".*deploy/current/db/migrate"\ "\./db/migrate"\ 2>/dev/null\s*then\s*echo\ "\-\-\-\-\->\ DB\ migrations\ unchanged;\ skipping\ DB\ migration"\s*else\s*echo\ "\-\-\-\-\->\ Migrating\ database"\s*RAILS_ENV="production"\ bundle\ exec\ rake\ db:migrate\s*fi
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
echo\ "\-\-\-\-\->\ Using\ RVM\ environment\ \\\"123\\\"\"\s*if\ \[\[\ !\ \-s\ "\$HOME/\.rvm/scripts/rvm"\ \]\];\ then\s*echo\ "!\ Ruby\ Version\ Manager\ not\ found"\s*echo\ "!\ If\ RVM\ is\ installed,\ check\ your\ :rvm_use_path\ setting\."\s*exit 1\s*fi\s*source\ \$HOME/\.rvm/scripts/rvm\n\s*rvm\ use\ \"123\"\ \-\-create
|
data/spec/support/outputs/ry.txt
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
echo "-----> Loading ry"
|
|
2
|
-
|
|
3
|
-
if [[ ! -e "$HOME/.local/bin" ]]; then
|
|
4
|
-
echo "! ry not found"
|
|
5
|
-
echo "! If ry is installed, check your :ry_path setting."
|
|
6
|
-
exit 1
|
|
7
|
-
fi
|
|
8
|
-
|
|
9
|
-
export PATH="$HOME/.local/bin:$PATH"
|
|
10
|
-
eval "$(ry setup)"
|
|
11
|
-
RY_RUBY=""
|
|
12
|
-
|
|
13
|
-
if [ -n "$RY_RUBY" ]; then
|
|
14
|
-
ry use $RY_RUBY || exit 1
|
|
15
|
-
fi
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
RSpec.describe 'ruby_managers', type: :rake do
|
|
4
|
-
describe 'ry' do
|
|
5
|
-
it 'ry' do
|
|
6
|
-
expect { invoke_all }.to output(output_file('ry')).to_stdout
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
describe 'rbenv:load' do
|
|
11
|
-
it 'rbenv:load' do
|
|
12
|
-
expect { invoke_all }.to output(output_file('rbenv_load')).to_stdout
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
describe 'chruby' do
|
|
17
|
-
it 'chruby' do
|
|
18
|
-
expect { invoke_all('123') }.to output(output_file('chruby')).to_stdout
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
describe 'rvm:use' do
|
|
23
|
-
it 'rvm:use' do
|
|
24
|
-
expect { invoke_all('123') }.to output(output_file('rvm_use')).to_stdout
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# describe 'rvm:wrapper' do
|
|
29
|
-
# it 'rails db migrate' do
|
|
30
|
-
# expect { invoke_all('123') }.to output('').to_stdout
|
|
31
|
-
# end
|
|
32
|
-
# end
|
|
33
|
-
end
|