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 #7

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 attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default['packman']['checksums'] = {
'1.1.0' => 'bd1eddfa114f7e6258ef3419613380297f1b4e438f5bae92f1177150519be934'
'1.1.0' => 'bd1eddfa114f7e6258ef3419613380297f1b4e438f5bae92f1177150519be934',
}
default['packman']['version'] = '1.1.0'
default['packman']['bin_dir'] = '/usr/local/bin'
Expand Down
2 changes: 1 addition & 1 deletion libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def add_local_shell_provisioner(provisioner)

def validate_type!
return if %w(shell local-shell file).include?(new_resource.type)
Chef::Application.fatal!("Invalid Packman type: '#{new_resource.type}' declared")
raise("Invalid Packman type: '#{new_resource.type}' declared")
end

def render_template(template_source, template_variables)
Expand Down
8 changes: 1 addition & 7 deletions libraries/packer_builder_provider.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -23,12 +23,6 @@ class PackerBuilder < Chef::Provider::LWRPBase

include PackmanCookbook::Helpers

use_inline_resources

def whyrun_supported?
true
end

action :create do
add_builder(new_resource.name, new_resource.options)
end
Expand Down
3 changes: 2 additions & 1 deletion libraries/packer_builder_resource.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -19,6 +19,7 @@ class Chef
class Resource
class PackerBuilder < Chef::Resource::LWRPBase
resource_name :packer_builder
provides :packer_builder

actions :create
default_action :create
Expand Down
8 changes: 1 addition & 7 deletions libraries/packer_post_processor_provider.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -23,12 +23,6 @@ class PackerPostProcessor < Chef::Provider::LWRPBase

include PackmanCookbook::Helpers

use_inline_resources

def whyrun_supported?
true
end

action :create do
add_post_processor(new_resource.type, new_resource.options)
end
Expand Down
3 changes: 2 additions & 1 deletion libraries/packer_post_processor_resource.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -21,6 +21,7 @@ class Chef
class Resource
class PackerPostProcessor < Chef::Resource::LWRPBase
resource_name :packer_post_processor
provides :packer_post_processor

actions :create
default_action :create
Expand Down
8 changes: 1 addition & 7 deletions libraries/packer_provisioner_provider.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -23,12 +23,6 @@ class PackerProvisioner < Chef::Provider::LWRPBase

include PackmanCookbook::Helpers

use_inline_resources

def whyrun_supported?
true
end

action :create do
add_provisioner
end
Expand Down
3 changes: 2 additions & 1 deletion libraries/packer_provisioner_resource.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -19,6 +19,7 @@ class Chef
class Resource
class PackerProvisioner < Chef::Resource::LWRPBase
resource_name :packer_provisioner
provides :packer_provisioner

actions :create
default_action :create
Expand Down
8 changes: 1 addition & 7 deletions libraries/packer_template_provider.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -23,12 +23,6 @@ class PackerTemplate < Chef::Provider::LWRPBase

include PackmanCookbook::Helpers

use_inline_resources

def whyrun_supported?
true
end

action :create do
create_packer_template
run_packer
Expand Down
3 changes: 2 additions & 1 deletion libraries/packer_template_resource.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -19,6 +19,7 @@ class Chef
class Resource
class PackerTemplate < Chef::Resource::LWRPBase
resource_name :packer_template
provides :packer_template

actions :create, :run
default_action :create
Expand Down
8 changes: 1 addition & 7 deletions libraries/packer_variable_provider.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -24,12 +24,6 @@ class PackerVariable < Chef::Provider::LWRPBase

include PackmanCookbook::Helpers

use_inline_resources

def whyrun_supported?
true
end

action :create do
add_variable(new_resource.key, new_resource.value)
end
Expand Down
3 changes: 2 additions & 1 deletion libraries/packer_variable_resource.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# 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 All @@ -21,6 +21,7 @@ class Chef
class Resource
class PackerVariable < Chef::Resource::LWRPBase
resource_name :packer_variable
provides :packer_variable

actions :create
default_action :create
Expand Down
3 changes: 1 addition & 2 deletions metadata.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name 'packman'
maintainer 'The Authors'
maintainer_email '[email protected]'
license 'all_rights'
license 'all rights reserved'
description 'Installs/Configures packman'
long_description 'Installs/Configures packman'
version '0.2.0'
4 changes: 2 additions & 2 deletions recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Cookbook Name:: packman
# Cookbook:: packman
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
# Copyright:: (c) 2016 The Authors, All Rights Reserved.

include_recipe 'packman::_packer_install'
4 changes: 2 additions & 2 deletions spec/unit/recipes/default_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Cookbook Name:: packman
# Cookbook:: packman
# Spec:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
# Copyright:: (c) 2016 The Authors, All Rights Reserved.

require 'spec_helper'

Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/cookbooks/test/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include_recipe "packman::default"
include_recipe 'packman::default'

packer_builder 'azure_test' do
options(
Expand All @@ -11,7 +11,7 @@
'client_secret' => 'P@ssw0rd!',
'subscription_id' => '1C2B75C1-74A5-472A-A729-7F8CEFC477F9',
'resource_group_name' => 'myResourceGroup',
'image_publisher'=> 'Canonical',
'image_publisher' => 'Canonical',
'image_offer' => 'UbuntuServer',
'image_sku' => '14.04.5-LTS',
'storage_account' => 'myimages',
Expand Down