mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Fix Style/SpaceInsideHashLiteralBraces
This commit is contained in:
parent
8553b65599
commit
0439a2325e
3 changed files with 9 additions and 9 deletions
|
@ -14,8 +14,8 @@ task :install do
|
|||
|
||||
mkdir_p deploy_dir
|
||||
|
||||
entries = [{:template => deploy_rb, :file => config_dir.join("deploy.rb")}]
|
||||
entries += envs.split(",").map { |stage| {:template => stage_rb, :file => deploy_dir.join("#{stage}.rb")} }
|
||||
entries = [{ :template => deploy_rb, :file => config_dir.join("deploy.rb") }]
|
||||
entries += envs.split(",").map { |stage| { :template => stage_rb, :file => deploy_dir.join("#{stage}.rb") } }
|
||||
|
||||
entries.each do |entry|
|
||||
if File.exist?(entry[:file])
|
||||
|
|
|
@ -580,12 +580,12 @@ describe Capistrano::DSL do
|
|||
|
||||
it "retrieves properties for a single role as a set" do
|
||||
rps = dsl.role_properties(:app)
|
||||
expect(rps).to eq(Set[{ :hostname => "example3.com", :role => :app}])
|
||||
expect(rps).to eq(Set[{ :hostname => "example3.com", :role => :app }])
|
||||
end
|
||||
|
||||
it "retrieves properties for multiple roles as a set" do
|
||||
rps = dsl.role_properties(:app, :web)
|
||||
expect(rps).to eq(Set[{ :hostname => "example3.com", :role => :app},{ :hostname => "example1.com", :role => :web, :port => 80},{ :hostname => "example2.com", :role => :web, :port => 81}])
|
||||
expect(rps).to eq(Set[{ :hostname => "example3.com", :role => :app },{ :hostname => "example1.com", :role => :web, :port => 80 },{ :hostname => "example2.com", :role => :web, :port => 81 }])
|
||||
end
|
||||
|
||||
it "yields the properties for a single role" do
|
||||
|
|
|
@ -79,7 +79,7 @@ module Capistrano
|
|||
end
|
||||
|
||||
context "properties contains roles" do
|
||||
let(:properties) { {:roles => [:clouds]} }
|
||||
let(:properties) { { :roles => [:clouds] } }
|
||||
|
||||
it "adds the roles" do
|
||||
expect(server.roles.first).to eq :clouds
|
||||
|
@ -87,7 +87,7 @@ module Capistrano
|
|||
end
|
||||
|
||||
context "properties contains user" do
|
||||
let(:properties) { {:user => "tomc"} }
|
||||
let(:properties) { { :user => "tomc" } }
|
||||
|
||||
it "sets the user" do
|
||||
expect(server.user).to eq "tomc"
|
||||
|
@ -99,7 +99,7 @@ module Capistrano
|
|||
end
|
||||
|
||||
context "properties contains port" do
|
||||
let(:properties) { {:port => 2222} }
|
||||
let(:properties) { { :port => 2222 } }
|
||||
|
||||
it "sets the port" do
|
||||
expect(server.port).to eq 2222
|
||||
|
@ -107,7 +107,7 @@ module Capistrano
|
|||
end
|
||||
|
||||
context "properties contains key" do
|
||||
let(:properties) { {:key => "/key"} }
|
||||
let(:properties) { { :key => "/key" } }
|
||||
|
||||
it "adds the key" do
|
||||
expect(server.keys).to include "/key"
|
||||
|
@ -115,7 +115,7 @@ module Capistrano
|
|||
end
|
||||
|
||||
context "properties contains password" do
|
||||
let(:properties) { {:password => "supersecret"} }
|
||||
let(:properties) { { :password => "supersecret" } }
|
||||
|
||||
it "adds the key" do
|
||||
expect(server.password).to eq "supersecret"
|
||||
|
|
Loading…
Reference in a new issue