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

Cookstyle Bot Auto Corrections with Cookstyle 7.31.1 #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
#
# Author:: Partner Engineering <[email protected]>
# Copyright (c) 2016, Chef Software, Inc. <[email protected]>
# Copyright:: (c) 2016, Chef Software, Inc. <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions attributes/aws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
credential_file = ::File.join(cred_dir, 'credentials')

TIMESTAMP = Time.now.strftime('%Y_%m_%d_%H_%M_%S').freeze
INVALID_AMI_NAME_CHARACTERS = /[^\w\(\)\.\-\/]/
INVALID_AMI_NAME_CHARACTERS = %r{[^\w\(\)\.\-/]}

def normalize_name(name)
# Append timestamp
Expand Down Expand Up @@ -72,5 +72,5 @@ def normalize_name(name)
'license_type' => 'BYOL',
'free_node_count' => 10,
'product_code' => '363g20l00p8t6jcrb3z79yl3f'
),
),
}
2 changes: 1 addition & 1 deletion attributes/azure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'free_node_count' => 5,
}

creds = Chef::DataBagItem.load('marketplace_image', 'publishing_credentials')
creds = data_bag_item('marketplace_image', 'publishing_credentials')

azure_builder_config = {
'name' => 'azure_automate_BYOL',
Expand Down
2 changes: 1 addition & 1 deletion attributes/gce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'project_id' => 'chef-marketplace-dev',
'source_image' => 'centos-7-v20160126',
'zone' => 'us-central1-a',
'ssh_username' => 'marketplace' # required on CentOS
'ssh_username' => 'marketplace', # required on CentOS
}

default['marketplace_image']['gce']['aio']['products'] =
Expand Down
16 changes: 8 additions & 8 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
#
# Author:: Partner Engineering <[email protected]>
# Copyright (c) 2016, Chef Software, Inc. <[email protected]>
# Copyright:: (c) 2016, Chef Software, Inc. <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,10 +39,10 @@ def enabled_image_names
end

def aws_products
[
node['marketplace_image']['aws']['public']['automate'],
node['marketplace_image']['aws']['public_byol']['automate']
]
[
node['marketplace_image']['aws']['public']['automate'],
node['marketplace_image']['aws']['public_byol']['automate'],
]
end

def enabled_aws_builders
Expand All @@ -68,7 +68,7 @@ def enabled_aws_image_names

def azure_products
[
node['marketplace_image']['azure']['automate']
node['marketplace_image']['azure']['automate'],
]
end

Expand Down Expand Up @@ -132,7 +132,7 @@ def use_current_repo?
end
end

Chef::Recipe.send(:include, MarketplaceImageCookbook::Helpers)
Chef::Provider.send(:include, MarketplaceImageCookbook::Helpers)
Chef::DSL::Recipe.send(:include, MarketplaceImageCookbook::Helpers)
Chef::DSL::Recipe.send(:include, MarketplaceImageCookbook::Helpers)
Chef::Resource.send(:include, MarketplaceImageCookbook::Helpers)
Chef::ResourceDefinition.send(:include, MarketplaceImageCookbook::Helpers)
3 changes: 1 addition & 2 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name 'marketplace_image'
maintainer 'Chef Partner Engineering'
maintainer_email '[email protected]'
license 'Apache 2.0'
license 'Apache-2.0'
description 'Installs/Configures marketplace_image'
long_description 'Installs/Configures marketplace_image'
version '0.5.0'

chef_version '>=12.19'
Expand Down
4 changes: 2 additions & 2 deletions recipes/_packer.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# frozen_string_literal: true
apt_update 'update' do
action :update
only_if { node['platform_family'] == 'debian' }
only_if { platform_family?('debian') }
end

include_recipe 'packman::default'

bash 'ulimit -n unlimited' do
not_if { node['platform_family'] == 'debian' }
not_if { platform_family?('debian') }
end

creds = data_bag_item('marketplace_image', 'publishing_credentials')
Expand Down