Reordered metadata.rb for readability, satisfy foodcritic/rubocop

Change-Id: Ib1a753696982f2e3cce133bd6bd56c4c8fa25bc5
This commit is contained in:
Samuel Cassiba 2017-08-17 10:09:41 -04:00
parent def587e618
commit df79bb4fe9
4 changed files with 25 additions and 18 deletions

View File

@ -1,11 +1,16 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2017-02-23 16:58:37 +0100 using RuboCop version 0.39.0.
# on 2017-08-17 17:38:41 -0400 using RuboCop version 0.47.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 7
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 109
# Offense count: 2
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: nested, compact

View File

@ -1,13 +1,10 @@
# encoding: UTF-8
name 'openstack-orchestration'
maintainer 'openstack-chef'
name 'openstack-orchestration'
maintainer 'openstack-chef'
maintainer_email 'openstack-dev@lists.openstack.org'
issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
source_url 'https://github.com/openstack/cookbook-openstack-orchestration' if respond_to?(:source_url)
license 'Apache 2.0'
description 'Installs and configures the Heat Service'
license 'Apache 2.0'
description 'Installs and configures the Heat Service'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '15.0.0'
version '15.0.0'
%w(ubuntu redhat centos).each do |os|
supports os
@ -16,3 +13,7 @@ end
depends 'openstack-common', '>= 15.0.0'
depends 'openstack-identity', '>= 15.0.0'
depends 'openstackclient'
issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
source_url 'https://github.com/openstack/cookbook-openstack-orchestration' if respond_to?(:source_url)
chef_version '>= 12.5' if respond_to?(:chef_version)

View File

@ -105,14 +105,14 @@ heat_conf_options = merge_config_options 'orchestration'
directory '/etc/heat' do
owner node['openstack']['orchestration']['user']
group node['openstack']['orchestration']['group']
mode 00750
mode 0o0750
action :create
end
directory '/etc/heat/environment.d' do
owner node['openstack']['orchestration']['user']
group node['openstack']['orchestration']['group']
mode 00750
mode 0o0750
action :create
end
@ -121,7 +121,7 @@ template '/etc/heat/heat.conf' do
cookbook 'openstack-common'
owner node['openstack']['orchestration']['user']
group node['openstack']['orchestration']['group']
mode 00640
mode 0o0640
variables(
service_config: heat_conf_options
)
@ -131,7 +131,7 @@ template '/etc/heat/environment.d/default.yaml' do
source 'default.yaml.erb'
owner node['openstack']['orchestration']['user']
group node['openstack']['orchestration']['group']
mode 00644
mode 0o0644
end
execute 'heat-manage db_sync' do

View File

@ -94,7 +94,7 @@ shared_examples 'expects to create heat directories' do
expect(chef_run).to create_directory('/etc/heat').with(
owner: 'heat',
group: 'heat',
mode: 0750
mode: 0o750
)
end
@ -102,7 +102,7 @@ shared_examples 'expects to create heat directories' do
expect(chef_run).to create_directory('/etc/heat/environment.d').with(
owner: 'heat',
group: 'heat',
mode: 0750
mode: 0o750
)
end
end
@ -115,7 +115,7 @@ shared_examples 'expects to create heat conf' do
expect(chef_run).to create_template(file.name).with(
owner: 'heat',
group: 'heat',
mode: 0640
mode: 0o640
)
end
@ -173,7 +173,8 @@ shared_examples 'expects to create heat conf' do
it 'sets database connection value' do
expect(chef_run).to render_config_file(file.name).with_section_content(
'database', %r{^connection = mysql://heat:heat@127.0.0.1:3306/heat\?charset=utf8$})
'database', %r{^connection = mysql\+pymysql://heat:heat@127.0.0.1:3306/heat\?charset=utf8$}
)
end
end
@ -239,7 +240,7 @@ shared_examples 'expects to create heat default.yaml' do
expect(chef_run).to create_template(file.name).with(
owner: 'heat',
group: 'heat',
mode: 0644
mode: 0o644
)
end
end