Skip to content

Commit 69dea96

Browse files
committed
Use consistent spacing and ()
1 parent c254087 commit 69dea96

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

src/bosh-director-core/lib/bosh/director/core/templates/template_blob_cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Bosh::Director::Core::Templates
22
class TemplateBlobCache
33
def self.with_fresh_cache
4-
cache = new()
4+
cache = new
55
yield cache
66
ensure
77
cache.clean_cache!

src/bosh-director/lib/bosh/director/deployment_plan/network_parser/name_servers_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class NameServersParser
55

66
include ValidationHelper
77

8-
def initialize()
8+
def initialize
99
dns_config = Config.dns || {}
1010
@include_power_dns_server_addr = !!Config.dns_db
1111
@default_server = dns_config['server']

src/bosh-director/lib/bosh/director/manifest/manifest.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def self.load_from_hash(manifest_hash, manifest_text, cloud_configs, runtime_con
1616
load_manifest(manifest_hash, manifest_text, consolidated_cloud_config, consolidated_runtime_config, options)
1717
end
1818

19-
def self.generate_empty_manifest()
19+
def self.generate_empty_manifest
2020
consolidated_runtime_config = Bosh::Director::RuntimeConfig::RuntimeConfigsConsolidator.new([])
2121
load_manifest({}, '{}', nil, consolidated_runtime_config, resolve_interpolation: false)
2222
end

src/bosh-director/spec/unit/api/controllers/deployments_controller_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def manifest_with_errand(deployment_name='errand')
312312
it 'does not skip draining' do
313313
expect_any_instance_of(DeploymentManager)
314314
.to receive(:create_deployment)
315-
.with(anything(), anything(), anything(), anything(), anything(), hash_excluding('skip_drain'), anything())
315+
.with(anything, anything, anything, anything, anything, hash_excluding('skip_drain'), anything)
316316
.and_return(OpenStruct.new(:id => 1))
317317
post '/', spec_asset('test_conf.yaml'), { 'CONTENT_TYPE' => 'text/yaml' }
318318
expect(last_response).to be_redirect
@@ -323,7 +323,7 @@ def manifest_with_errand(deployment_name='errand')
323323
it 'skips draining' do
324324
expect_any_instance_of(DeploymentManager)
325325
.to receive(:create_deployment)
326-
.with(anything(), anything(), anything(), anything(), anything(), hash_including('skip_drain' => '*'), anything())
326+
.with(anything, anything, anything, anything, anything, hash_including('skip_drain' => '*'), anything)
327327
.and_return(OpenStruct.new(:id => 1))
328328
post '/?skip_drain=*', spec_asset('test_conf.yaml'), { 'CONTENT_TYPE' => 'text/yaml' }
329329
expect(last_response).to be_redirect
@@ -334,7 +334,7 @@ def manifest_with_errand(deployment_name='errand')
334334
it 'skips draining' do
335335
expect_any_instance_of(DeploymentManager)
336336
.to receive(:create_deployment)
337-
.with(anything(), anything(), anything(), anything(), anything(), hash_including('skip_drain' => 'job_one,job_two'), anything())
337+
.with(anything, anything, anything, anything, anything, hash_including('skip_drain' => 'job_one,job_two'), anything)
338338
.and_return(OpenStruct.new(:id => 1))
339339
post '/?skip_drain=job_one,job_two', spec_asset('test_conf.yaml'), { 'CONTENT_TYPE' => 'text/yaml' }
340340
expect(last_response).to be_redirect
@@ -345,7 +345,7 @@ def manifest_with_errand(deployment_name='errand')
345345
it 'passes the parameter' do
346346
expect_any_instance_of(DeploymentManager)
347347
.to receive(:create_deployment)
348-
.with(anything(), anything(), anything(), anything(), anything(), hash_including('fix' => true), anything())
348+
.with(anything, anything, anything, anything, anything, hash_including('fix' => true), anything)
349349
.and_return(OpenStruct.new(:id => 1))
350350
post '/?fix=true', spec_asset('test_conf.yaml'), {'CONTENT_TYPE' => 'text/yaml'}
351351
expect(last_response).to be_redirect
@@ -396,7 +396,7 @@ def manifest_with_errand(deployment_name='errand')
396396
it 'calls create deployment with deployment name' do
397397
expect_any_instance_of(DeploymentManager)
398398
.to receive(:create_deployment)
399-
.with(anything(), anything(), anything(), anything(), deployment, hash_excluding('skip_drain'), anything())
399+
.with(anything, anything, anything, anything, deployment, hash_excluding('skip_drain'), anything)
400400
.and_return(OpenStruct.new(:id => 1))
401401
post '/', spec_asset('test_manifest.yml'), { 'CONTENT_TYPE' => 'text/yaml' }
402402
expect(last_response).to be_redirect
@@ -407,15 +407,15 @@ def manifest_with_errand(deployment_name='errand')
407407
it 'to false' do
408408
expect_any_instance_of(DeploymentManager)
409409
.to receive(:create_deployment)
410-
.with(anything(), anything(), anything(), anything(), deployment, hash_including('new' => false), anything())
410+
.with(anything, anything, anything, anything, deployment, hash_including('new' => false), anything)
411411
.and_return(OpenStruct.new(:id => 1))
412412
post '/', spec_asset('test_manifest.yml'), { 'CONTENT_TYPE' => 'text/yaml' }
413413
end
414414

415415
it 'to true' do
416416
expect_any_instance_of(DeploymentManager)
417417
.to receive(:create_deployment)
418-
.with(anything(), anything(), anything(), anything(), anything(), hash_including('new' => true), anything())
418+
.with(anything, anything, anything, anything, anything, hash_including('new' => true), anything)
419419
.and_return(OpenStruct.new(:id => 1))
420420
Models::Deployment.first.delete
421421
post '/', spec_asset('test_manifest.yml'), { 'CONTENT_TYPE' => 'text/yaml' }
@@ -426,7 +426,7 @@ def manifest_with_errand(deployment_name='errand')
426426
it 'passes the parameter' do
427427
expect_any_instance_of(DeploymentManager)
428428
.to receive(:create_deployment)
429-
.with(anything(), anything(), anything(), anything(), anything(), hash_including('force_latest_variables' => true), anything())
429+
.with(anything, anything, anything, anything, anything, hash_including('force_latest_variables' => true), anything)
430430
.and_return(OpenStruct.new(:id => 1))
431431
post '/?force_latest_variables=true', spec_asset('test_conf.yaml'), {'CONTENT_TYPE' => 'text/yaml'}
432432
expect(last_response).to be_redirect

src/bosh-director/spec/unit/blobstore_client/azurestoragecli_blobstore_client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ module Bosh::Blobstore
6767
context 'when azure_storage_cli_config_path option is provided' do
6868
let(:azure_storage_cli_config_path) { Dir.tmpdir }
6969
let(:config_file_options) do
70-
options.merge (
70+
options.merge(
7171
{
7272
azure_storage_cli_config_path: azure_storage_cli_config_path,
7373
})

src/bosh-director/spec/unit/blobstore_client/base_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def redacted_credential_properties_list
246246
expect(logger).to receive(:debug).with("[blobstore] creating 'id' start: #{start_time}").ordered
247247
expect(subject).to receive(:create_file).ordered
248248
expect(logger).to receive(:debug).with("[blobstore] creating 'id' (took #{end_time - start_time})").ordered
249-
subject.create(File.new(Tempfile.new().path, 'r'), 'id')
249+
subject.create(File.new(Tempfile.new.path, 'r'), 'id')
250250
end
251251
end
252252

src/bosh-director/spec/unit/blobstore_client/gcscli_blobstore_client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module Bosh::Blobstore
7070
context 'when gcscli_config_path option is provided' do
7171
let(:gcscli_config_path) { Dir::tmpdir }
7272
let(:config_file_options) do
73-
options.merge (
73+
options.merge(
7474
{
7575
gcscli_config_path: gcscli_config_path
7676
})

src/bosh-director/spec/unit/blobstore_client/s3cli_blobstore_client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ module Bosh::Blobstore
9898
context 'when s3cli_config_path option is provided' do
9999
let(:s3cli_config_path) { Dir.tmpdir }
100100
let(:config_file_options) do
101-
options.merge (
101+
options.merge(
102102
{
103103
s3cli_config_path: s3cli_config_path,
104104
})

src/bosh-director/spec/unit/deployment_plan/network_parser/name_servers_parser_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Bosh::Director
44
module DeploymentPlan::NetworkParser
55
describe NameServersParser do
6-
subject(:name_servers_parser) { NameServersParser.new() }
6+
subject(:name_servers_parser) { NameServersParser.new }
77

88
it 'should return nil when there are no DNS servers' do
99
expect(name_servers_parser.parse('network', {})).to be_nil

src/bosh-director/spec/unit/jobs/helpers/package_deleter_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module Jobs::Helpers
88
let(:compiled_package_deleter) { CompiledPackageDeleter.new(blobstore, logger) }
99
let(:blobstore) { instance_double(Bosh::Blobstore::BaseClient) }
1010
before { allow(blobstore).to receive(:delete) }
11-
let(:release_version_1) { Models::ReleaseVersion.make() }
12-
let(:release_version_2) { Models::ReleaseVersion.make() }
11+
let(:release_version_1) { Models::ReleaseVersion.make }
12+
let(:release_version_2) { Models::ReleaseVersion.make }
1313
let(:package) { Models::Package.make(blobstore_id: 'package_blobstore_id') }
1414

1515
before do

0 commit comments

Comments
 (0)