Rename to volume_args
This commit is contained in:
@@ -10,7 +10,7 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
||||
"--name", config.service_with_version,
|
||||
*rails_master_key_arg,
|
||||
*role.env_args,
|
||||
*config.volumes,
|
||||
*config.volume_args,
|
||||
*role.label_args,
|
||||
config.absolute_image,
|
||||
role.cmd
|
||||
@@ -44,7 +44,7 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
||||
("-it" if interactive),
|
||||
*rails_master_key_arg,
|
||||
*config.env_args,
|
||||
*config.volumes,
|
||||
*config.volume_args,
|
||||
config.service_with_version,
|
||||
*command
|
||||
end
|
||||
@@ -55,7 +55,7 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
||||
"--rm",
|
||||
*rails_master_key_arg,
|
||||
*config.env_args,
|
||||
*config.volumes,
|
||||
*config.volume_args,
|
||||
config.absolute_image,
|
||||
*command
|
||||
end
|
||||
|
||||
@@ -87,7 +87,7 @@ class Mrsk::Configuration
|
||||
end
|
||||
end
|
||||
|
||||
def volumes
|
||||
def volume_args
|
||||
if config.volumes.present?
|
||||
config.volumes.map { |volume| "--volume #{volume}" }
|
||||
else
|
||||
@@ -119,7 +119,7 @@ class Mrsk::Configuration
|
||||
env_args: env_args,
|
||||
ssh_options: ssh_options,
|
||||
builder: config.builder,
|
||||
volumes: volumes
|
||||
volume_args: volume_args
|
||||
}.compact
|
||||
end
|
||||
|
||||
|
||||
@@ -134,8 +134,8 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
assert_equal "456", @config.master_key
|
||||
end
|
||||
|
||||
test "volumes" do
|
||||
assert_equal ["--volume /local/path:/container/path"], @config.volumes
|
||||
test "volume_args" do
|
||||
assert_equal ["--volume /local/path:/container/path"], @config.volume_args
|
||||
end
|
||||
|
||||
test "erb evaluation of yml config" do
|
||||
@@ -162,6 +162,6 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
test "to_h" do
|
||||
assert_equal({ :roles=>["web"], :hosts=>["1.1.1.1", "1.1.1.2"], :primary_host=>"1.1.1.1", :version=>"missing", :repository=>"dhh/app", :absolute_image=>"dhh/app:missing", :service_with_version=>"app-missing", :env_args=>["-e", "REDIS_URL=redis://x/y"], :ssh_options=>{:user=>"root", :auth_methods=>["publickey"]}, :volumes=>["--volume /local/path:/container/path"] }, @config.to_h)
|
||||
assert_equal({ :roles=>["web"], :hosts=>["1.1.1.1", "1.1.1.2"], :primary_host=>"1.1.1.1", :version=>"missing", :repository=>"dhh/app", :absolute_image=>"dhh/app:missing", :service_with_version=>"app-missing", :env_args=>["-e", "REDIS_URL=redis://x/y"], :ssh_options=>{:user=>"root", :auth_methods=>["publickey"]}, :volume_args=>["--volume /local/path:/container/path"] }, @config.to_h)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user