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

Open
wants to merge 1 commit into
base: master
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
1 change: 0 additions & 1 deletion Berksfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
source 'https://supermarket.chef.io'

metadata
Expand Down
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

source 'https://rubygems.org'

gem 'berkshelf', '~> 6.3'
Expand Down
32 changes: 15 additions & 17 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
# encoding: utf-8

# Guardfile

guard :rubocop do
watch(/.+\.rb$/)
watch(/(?:.+\/)?\.rubocop\.yml$/) { |m| File.dirname(m[0]) }
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end

guard :foodcritic, cookbook_paths: '.', cli: '-f any --tags ~FC023' do
watch(/attributes\/.+\.rb$/)
watch(/providers\/.+\.rb$/)
watch(/recipes\/.+\.rb$/)
watch(/resources\/.+\.rb$/)
watch(%r{attributes/.+\.rb$})
watch(%r{providers/.+\.rb$})
watch(%r{recipes/.+\.rb$})
watch(%r{resources/.+\.rb$})
watch(/metadata.rb/)
end

guard :rspec do
watch(/^spec\/.+_spec\.rb$/)
watch(/^(recipes)\/(.+)\.rb$/) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^(recipes)/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
end

guard :kitchen, all_on_start: false do
watch(/test\/.+/)
watch(/^recipes\/(.+)\.rb$/)
watch(/^attributes\/(.+)\.rb$/)
watch(/^files\/(.+)/)
watch(/^templates\/(.+)/)
watch(/^providers\/(.+)\.rb/)
watch(/^resources\/(.+)\.rb/)
watch(%r{test/.+})
watch(%r{^recipes/(.+)\.rb$})
watch(%r{^attributes/(.+)\.rb$})
watch(%r{^files/(.+)})
watch(%r{^templates/(.+)})
watch(%r{^providers/(.+)\.rb})
watch(%r{^resources/(.+)\.rb})
end
7 changes: 3 additions & 4 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# encoding: utf-8
#
# Cookbook Name:: nginx-hardening
# Cookbook:: nginx-hardening
# Attributes:: default
#
# Copyright 2014, Dominik Richter
# Copyright 2014, Deutsche Telekom AG
# Copyright:: 2014, Dominik Richter
# Copyright:: 2014, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
7 changes: 3 additions & 4 deletions attributes/hardening.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# encoding: utf-8
#
# Cookbook Name:: nginx-hardening
# Cookbook:: nginx-hardening
# Attributes:: default
#
# Copyright 2014, Dominik Richter
# Copyright 2014, Deutsche Telekom AG
# Copyright:: 2014, Dominik Richter
# Copyright:: 2014, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 3 additions & 5 deletions libraries/nginx_options.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# encoding: utf-8

# Cookbook Name:: nginx-hardening
# Cookbook:: nginx-hardening
# Library:: nginx_options
#
# Copyright 2014, Dominik Richter
# Copyright 2014, Deutsche Telekom AG
# Copyright:: 2014, Dominik Richter
# Copyright:: 2014, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 1 addition & 7 deletions metadata.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# encoding: utf-8
#
# Copyright 2014, Deutsche Telekom AG
# Copyright:: 2014, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -20,7 +19,6 @@
maintainer_email '[email protected]'
license 'Apache-2.0'
description 'Configures nginx hardening'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))

version '3.0.0'

Expand All @@ -32,10 +30,6 @@
supports 'centos', '>= 6.6'

depends 'nginx', '>= 7.0'
depends 'openssl'

recipe 'nginx-hardening::default', 'configures nginx for hardening'
recipe 'nginx-hardening::upgrades', 'upgrades dependencies of nginx for hardening'

source_url 'https://github.com/dev-sec/chef-nginx-hardening'
issues_url 'https://github.com/dev-sec/chef-nginx-hardening/issues'
Expand Down
11 changes: 5 additions & 6 deletions recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# encoding: utf-8
#
# Cookbook Name:: nginx-hardening
# Cookbook:: nginx-hardening
# Recipe:: default.rb
#
# Copyright 2014, Dominik Richter
# Copyright 2014, Deutsche Telekom AG
# Copyright:: 2014, Dominik Richter
# Copyright:: 2014, Deutsche Telekom AG
#
# 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,7 +18,7 @@
# limitations under the License.
#

include_recipe('nginx-hardening::minimize_access')
include_recipe 'nginx-hardening::minimize_access'

node.default['nginx-hardening']['options']['ssl_dhparam'] = ::File.join((node['nginx-hardening']['certificates_dir'] || node['nginx']['dir']), 'dh2048.pem')
options = node['nginx-hardening']['options'].to_hash
Expand Down Expand Up @@ -62,5 +61,5 @@

execute 'generate_dh_group' do
command "openssl dhparam -out #{node['nginx-hardening']['options']['ssl_dhparam']} #{node['nginx-hardening']['dh-size']}"
not_if { File.exist?(node['nginx-hardening']['options']['ssl_dhparam']) }
not_if { ::File.exist?(node['nginx-hardening']['options']['ssl_dhparam']) }
end
5 changes: 2 additions & 3 deletions recipes/minimize_access.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# encoding: utf-8
#
# Cookbook Name: nginx-hardening
# Cookbook:: Name: nginx-hardening
# Recipe: minimize_access
#
# Copyright 2014, Deutsche Telekom AG
# Copyright:: 2014, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
7 changes: 3 additions & 4 deletions recipes/upgrades.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# encoding: utf-8
#
# Cookbook Name:: nginx-hardening
# Cookbook:: nginx-hardening
# Recipe:: default.rb
#
# Copyright 2015, Edmund Haselwanter
# Copyright 2015, Deutsche Telekom AG
# Copyright:: 2015, Edmund Haselwanter
# Copyright:: 2015, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions spec/recipes/default_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# encoding: UTF-8
#
# Copyright 2014, Deutsche Telekom AG
# Copyright:: 2014, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
6 changes: 2 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# encoding: utf-8

# Copyright 2014, Dominik Richter
# Copyright 2014, Deutsche Telekom AG
# Copyright:: 2014, Dominik Richter
# Copyright:: 2014, Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down