Enable frozen string across project (#1319)

Turn on frozen string support in all files by using a comment to avoid
enabling across dependencies where it may not work.

Fixes: #1177
This commit is contained in:
Darragh Bailey
2021-06-30 13:27:03 +01:00
committed by GitHub
parent 6dac9c9054
commit 18ebb9d9ed
91 changed files with 220 additions and 46 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'simplecov'
require 'simplecov-lcov'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
##
# A simple extension of the Proc class that supports setting a custom binding
# and evaluates everything in the Proc using the new binding.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'ostruct'
require 'pathname'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'fog/libvirt'
shared_context 'libvirt' do

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require "rspec/expectations/version"
#
# Taken from https://github.com/cucumber/aruba/blob/main/lib/aruba/matchers/file/have_file_content.rb

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
shared_context 'unit' do

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
shared_context 'temporary_dir' do
around do |example|
Dir.mktmpdir("rspec-") do |dir|

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'support/sharedcontext'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'support/sharedcontext'
require 'support/libvirt_context'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'support/sharedcontext'
require 'support/libvirt_context'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'support/sharedcontext'
require 'support/libvirt_context'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'support/sharedcontext'
require 'support/libvirt_context'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'support/sharedcontext'
require 'support/libvirt_context'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'json'
require 'support/sharedcontext'
@@ -77,7 +79,7 @@ describe VagrantPlugins::ProviderLibvirt::Action::HandleBoxImage do
]
}
allow(env[:machine]).to receive_message_chain("box.directory.join") do |arg|
'/test/'.concat(arg.to_s)
'/test/' + arg.to_s
end
end
@@ -197,7 +199,7 @@ describe VagrantPlugins::ProviderLibvirt::Action::HandleBoxImage do
],
]}
allow(env[:machine]).to receive_message_chain("box.directory.join") do |arg|
'/test/'.concat(arg.to_s)
'/test/' + arg.to_s
end
allow(status).to receive(:success?).and_return(true)
allow(Open3).to receive(:capture3).with('qemu-img', 'info', '--output=json', '/test/box.img').and_return([
@@ -334,7 +336,7 @@ describe VagrantPlugins::ProviderLibvirt::Action::HandleBoxImage do
]
}
allow(env[:machine]).to receive_message_chain("box.directory.join") do |arg|
'/test/'.concat(arg.to_s)
'/test/' + arg.to_s
end
end
@@ -354,7 +356,7 @@ describe VagrantPlugins::ProviderLibvirt::Action::HandleBoxImage do
allow(env[:machine]).to receive_message_chain("box.version") { '1.1.1' }
allow(env[:machine]).to receive_message_chain("box.metadata") { box_metadata }
allow(env[:machine]).to receive_message_chain("box.directory.join") do |arg|
'/test/'.concat(arg.to_s)
'/test/' + arg.to_s
end
allow(status).to receive(:success?).and_return(true)
allow(Open3).to receive(:capture3).with('qemu-img', 'info', "--output=json", '/test/box.img').and_return([

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'support/sharedcontext'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe VagrantPlugins::ProviderLibvirt::Action::SetNameOfDomain do

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'support/sharedcontext'
require 'support/libvirt_context'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'vagrant-libvirt/action/wait_till_up'
require 'vagrant-libvirt/errors'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'support/binding_proc'
require 'spec_helper'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'support/sharedcontext'
require 'vagrant-libvirt/config'

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require 'vagrant-libvirt/util/byte_number'