mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
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:
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'simplecov'
|
||||
require 'simplecov-lcov'
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'ostruct'
|
||||
require 'pathname'
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'fog/libvirt'
|
||||
|
||||
shared_context 'libvirt' do
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
shared_context 'unit' do
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
shared_context 'temporary_dir' do
|
||||
around do |example|
|
||||
Dir.mktmpdir("rspec-") do |dir|
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'support/sharedcontext'
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'support/sharedcontext'
|
||||
require 'support/libvirt_context'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'support/sharedcontext'
|
||||
require 'support/libvirt_context'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'support/sharedcontext'
|
||||
require 'support/libvirt_context'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'support/sharedcontext'
|
||||
require 'support/libvirt_context'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'support/sharedcontext'
|
||||
require 'support/libvirt_context'
|
||||
|
||||
@@ -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([
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'support/sharedcontext'
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe VagrantPlugins::ProviderLibvirt::Action::SetNameOfDomain do
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'support/sharedcontext'
|
||||
require 'support/libvirt_context'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'vagrant-libvirt/action/wait_till_up'
|
||||
require 'vagrant-libvirt/errors'
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'support/binding_proc'
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'support/sharedcontext'
|
||||
|
||||
require 'vagrant-libvirt/config'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
require 'vagrant-libvirt/util/byte_number'
|
||||
|
||||
Reference in New Issue
Block a user