diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 120e05d..cffb3d7 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,16 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2017-02-23 16:58:35 +0100 using RuboCop version 0.39.0. +# on 2017-08-01 10:49:49 -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: 6 +# Configuration parameters: CountComments, ExcludedMethods. +BlockLength: + Max: 62 + # Offense count: 5 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: nested, compact diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 31c90b5..0000000 --- a/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -## THIS GEMFILE IS DEPRECATED AND WILL BE REMOVED AFTER THE NEXT RELEASE -## THERE WON'T BE ANY UPDATES TO THIS FILE DURING THIS RELEASE CYCLE -## WE SWITCHED TO CHEFDK AS THE BUNDLE FOR THE NEEDED GEMS - -source 'https://rubygems.org' - -gem 'chef', '~> 11.18.6' -gem 'json', '<= 1.7.7' # chef 11 dependency -gem 'berkshelf', '~> 3.2.1' -gem 'hashie', '~> 2.0' -gem 'chefspec', '~> 4.0.0' -gem 'rspec', '~> 3.0.0' -gem 'foodcritic', '~> 4.0' -gem 'rubocop', '~> 0.29.1' diff --git a/attributes/default.rb b/attributes/default.rb index e570601..4e3e2eb 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -21,6 +21,6 @@ # Set to some text value if you want templated config files # to contain a custom banner at the top of the written file default['openstack']['db']['custom_template_banner'] = ' -# This file autogenerated by Chef -# Do not edit, changes will be overwritten +# This file is autogenerated by Chef. +# Do not edit. Your changes will be overwritten! ' diff --git a/metadata.rb b/metadata.rb index 467e2ed..c671b48 100755 --- a/metadata.rb +++ b/metadata.rb @@ -1,11 +1,9 @@ -name 'openstack-ops-database' -maintainer 'openstack-chef' +name 'openstack-ops-database' +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-ops-database' if respond_to?(:source_url) -license 'Apache 2.0' -description 'Provides the shared database configuration for Chef for OpenStack.' -version '15.0.0' +license 'Apache 2.0' +description 'Provides the shared database configuration for Chef for OpenStack.' +version '15.0.0' recipe 'client', 'Installs client packages for the database used by the deployment.' recipe 'server', 'Installs and configures server packages for the database used by the deployment.' @@ -21,10 +19,15 @@ recipe 'openstack-db', 'Creates necessary tables, users, and grants for OpenStac supports os end -depends 'mariadb', '~> 0.3.3' -depends 'percona', '~> 0.16.1' -depends 'mysql', '~> 8.2' -depends 'mysql2_chef_gem', '~> 1.1' -depends 'postgresql', '~> 5.1' -depends 'database', '~> 6.1' depends 'openstack-common', '>= 15.0.0' + +depends 'database', '~> 6.1' +depends 'mariadb', '~> 1.5' +depends 'mysql', '~> 8.2' +depends 'mysql2_chef_gem', '~> 2.0' +depends 'percona', '~> 0.16.1' +depends 'postgresql', '~> 5.1' + +issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url) +source_url 'https://github.com/openstack/cookbook-openstack-ops-database' if respond_to?(:source_url) +chef_version '>= 12.5' if respond_to?(:chef_version) diff --git a/recipes/mariadb-client.rb b/recipes/mariadb-client.rb index 77ad1dd..db0b836 100644 --- a/recipes/mariadb-client.rb +++ b/recipes/mariadb-client.rb @@ -19,9 +19,8 @@ node.override['mariadb']['install']['prefer_os_package'] = true include_recipe 'mariadb::client' -mysql2_chef_gem 'default' do - provider Chef::Provider::Mysql2ChefGem::Mariadb - gem_version '0.4.4' +mysql2_chef_gem_mariadb 'default' do + gem_version '0.4.5' action :install end diff --git a/recipes/mysql-client.rb b/recipes/mysql-client.rb index adf1d83..4afc307 100644 --- a/recipes/mysql-client.rb +++ b/recipes/mysql-client.rb @@ -34,7 +34,7 @@ when 'rhel' end mysql2_chef_gem 'default' do - gem_version '0.4.4' + gem_version '0.4.5' action :install end diff --git a/spec/mariadb-client_spec.rb b/spec/mariadb-client_spec.rb index 1380c8d..a5fa127 100644 --- a/spec/mariadb-client_spec.rb +++ b/spec/mariadb-client_spec.rb @@ -16,11 +16,6 @@ describe 'openstack-ops-database::mariadb-client' do expect(chef_run).to include_recipe('mariadb::client') end - it 'install mysql2 gem package' do - expect(chef_run).to install_mysql2_chef_gem('default') - .with(provider: Chef::Provider::Mysql2ChefGem::Mariadb) - end - it 'installs mariadb python client packages' do expect(chef_run).to install_package('python-mysqldb') end diff --git a/spec/postgresql-server_spec.rb b/spec/postgresql-server_spec.rb index 3ed566f..785f3bd 100644 --- a/spec/postgresql-server_spec.rb +++ b/spec/postgresql-server_spec.rb @@ -19,7 +19,8 @@ describe 'openstack-ops-database::postgresql-server' do it 'includes postgresql recipes' do expect(chef_run).to include_recipe( - 'openstack-ops-database::postgresql-client') + 'openstack-ops-database::postgresql-client' + ) expect(chef_run).to include_recipe('postgresql::server') end end diff --git a/spec/server_spec.rb b/spec/server_spec.rb index 9640a50..d06513d 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -21,7 +21,8 @@ describe 'openstack-ops-database::server' do node.set['postgresql']['password']['postgres'] = 'postgres_password' expect(chef_run).to include_recipe( - 'openstack-ops-database::postgresql-server') + 'openstack-ops-database::postgresql-server' + ) end end end