Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESOURCE-540 remove frozen string literal from inspec azure #702

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ dev/
.rakeTasks
.DS_Store
coverage
bin/inspec
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'faraday'
Expand Down
12 changes: 5 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

require 'bundler'
require 'bundler/gem_helper'
require 'rake/testtask'
Expand All @@ -12,13 +10,13 @@ require_relative 'lib/environment_file'

RuboCop::RakeTask.new

FIXTURE_DIR = "#{Dir.pwd}/test/fixtures"
TERRAFORM_DIR = 'terraform'
FIXTURE_DIR = "#{Dir.pwd}/test/fixtures".freeze
TERRAFORM_DIR = 'terraform'.freeze
REQUIRED_ENVS = %w{AZURE_CLIENT_ID AZURE_CLIENT_SECRET AZURE_TENANT_ID AZURE_SUBSCRIPTION_ID}.freeze
INTEGRATION_DIR = 'test/integration/verify'
TF_PLAN_FILE_NAME = 'inspec-azure.plan'
INTEGRATION_DIR = 'test/integration/verify'.freeze
TF_PLAN_FILE_NAME = 'inspec-azure.plan'.freeze
TF_PLAN_FILE = File.join(TERRAFORM_DIR, TF_PLAN_FILE_NAME)
ATTRIBUTES_FILE_NAME = ''
ATTRIBUTES_FILE_NAME = ''.freeze

task default: :test
desc 'Testing tasks'
Expand Down
3 changes: 1 addition & 2 deletions libraries/backend/azure_connection.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
require 'backend/helpers'

# Client class to manage the Azure REST API connection.
Expand All @@ -16,7 +15,7 @@ class AzureConnection
@@provider_details = {}

# This will be included in headers for statistical purposes.
INSPEC_USER_AGENT = 'pid-18d63047-6cdf-4f34-beed-62f01fc73fc2'
INSPEC_USER_AGENT = 'pid-18d63047-6cdf-4f34-beed-62f01fc73fc2'.freeze

# @return [String] the resource management endpoint url
attr_reader :resource_manager_endpoint_url
Expand Down
1 change: 0 additions & 1 deletion libraries/backend/azure_require.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
require 'backend/azure_connection'
require 'backend/azure_environment'
require 'backend/azure_security_rules_helpers'
Expand Down
1 change: 0 additions & 1 deletion libraries/backend/helpers.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
require 'backend/azure_environment'

# TODO: This file should be updated at every release.
Expand Down
1 change: 0 additions & 1 deletion test/integration/verify/controls/azurerm_locks.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
resource_group = input('resource_group', value: nil)
resource_name = input('windows_vm_name', value: nil)
resource_type = 'Microsoft.Compute/virtualMachines'
Expand Down