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,
|
"--name", config.service_with_version,
|
||||||
*rails_master_key_arg,
|
*rails_master_key_arg,
|
||||||
*role.env_args,
|
*role.env_args,
|
||||||
*config.volumes,
|
*config.volume_args,
|
||||||
*role.label_args,
|
*role.label_args,
|
||||||
config.absolute_image,
|
config.absolute_image,
|
||||||
role.cmd
|
role.cmd
|
||||||
@@ -44,7 +44,7 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
|||||||
("-it" if interactive),
|
("-it" if interactive),
|
||||||
*rails_master_key_arg,
|
*rails_master_key_arg,
|
||||||
*config.env_args,
|
*config.env_args,
|
||||||
*config.volumes,
|
*config.volume_args,
|
||||||
config.service_with_version,
|
config.service_with_version,
|
||||||
*command
|
*command
|
||||||
end
|
end
|
||||||
@@ -55,7 +55,7 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
|||||||
"--rm",
|
"--rm",
|
||||||
*rails_master_key_arg,
|
*rails_master_key_arg,
|
||||||
*config.env_args,
|
*config.env_args,
|
||||||
*config.volumes,
|
*config.volume_args,
|
||||||
config.absolute_image,
|
config.absolute_image,
|
||||||
*command
|
*command
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class Mrsk::Configuration
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def volumes
|
def volume_args
|
||||||
if config.volumes.present?
|
if config.volumes.present?
|
||||||
config.volumes.map { |volume| "--volume #{volume}" }
|
config.volumes.map { |volume| "--volume #{volume}" }
|
||||||
else
|
else
|
||||||
@@ -119,7 +119,7 @@ class Mrsk::Configuration
|
|||||||
env_args: env_args,
|
env_args: env_args,
|
||||||
ssh_options: ssh_options,
|
ssh_options: ssh_options,
|
||||||
builder: config.builder,
|
builder: config.builder,
|
||||||
volumes: volumes
|
volume_args: volume_args
|
||||||
}.compact
|
}.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -134,8 +134,8 @@ class ConfigurationTest < ActiveSupport::TestCase
|
|||||||
assert_equal "456", @config.master_key
|
assert_equal "456", @config.master_key
|
||||||
end
|
end
|
||||||
|
|
||||||
test "volumes" do
|
test "volume_args" do
|
||||||
assert_equal ["--volume /local/path:/container/path"], @config.volumes
|
assert_equal ["--volume /local/path:/container/path"], @config.volume_args
|
||||||
end
|
end
|
||||||
|
|
||||||
test "erb evaluation of yml config" do
|
test "erb evaluation of yml config" do
|
||||||
@@ -162,6 +162,6 @@ class ConfigurationTest < ActiveSupport::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
test "to_h" do
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user