From d58406548fa7bfd73c181dc9c97081e87e3f7d20 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 16 Jan 2016 00:07:42 +0000 Subject: [PATCH 1/1] Fix issues reported by new foodcritic --- cookbooks/mysql/providers/database.rb | 2 ++ cookbooks/mysql/providers/user.rb | 2 ++ cookbooks/nodejs/providers/package.rb | 2 ++ cookbooks/postgresql/providers/database.rb | 2 ++ cookbooks/postgresql/providers/execute.rb | 2 ++ cookbooks/postgresql/providers/extension.rb | 2 ++ cookbooks/postgresql/providers/table.rb | 2 ++ cookbooks/postgresql/providers/user.rb | 2 ++ 8 files changed, 16 insertions(+) diff --git a/cookbooks/mysql/providers/database.rb b/cookbooks/mysql/providers/database.rb index 345ef7e1e..0e7e9091a 100644 --- a/cookbooks/mysql/providers/database.rb +++ b/cookbooks/mysql/providers/database.rb @@ -17,6 +17,8 @@ # limitations under the License. # +use_inline_resources + def load_current_resource @mysql = Chef::MySQL.new diff --git a/cookbooks/mysql/providers/user.rb b/cookbooks/mysql/providers/user.rb index a966679af..c2f5e58d2 100644 --- a/cookbooks/mysql/providers/user.rb +++ b/cookbooks/mysql/providers/user.rb @@ -17,6 +17,8 @@ # limitations under the License. # +use_inline_resources + def load_current_resource @mysql = Chef::MySQL.new diff --git a/cookbooks/nodejs/providers/package.rb b/cookbooks/nodejs/providers/package.rb index 4c852732f..9d83f40ff 100644 --- a/cookbooks/nodejs/providers/package.rb +++ b/cookbooks/nodejs/providers/package.rb @@ -22,6 +22,8 @@ require "json" include Chef::Mixin::ShellOut +use_inline_resources + def load_current_resource @packages = JSON.parse(shell_out("npm list --global --json").stdout)["dependencies"] || {} diff --git a/cookbooks/postgresql/providers/database.rb b/cookbooks/postgresql/providers/database.rb index a3a7cbc07..998d2bed3 100644 --- a/cookbooks/postgresql/providers/database.rb +++ b/cookbooks/postgresql/providers/database.rb @@ -17,6 +17,8 @@ # limitations under the License. # +use_inline_resources + def load_current_resource @pg = Chef::PostgreSQL.new(new_resource.cluster) diff --git a/cookbooks/postgresql/providers/execute.rb b/cookbooks/postgresql/providers/execute.rb index 2b7bd5ff9..e15a493a0 100644 --- a/cookbooks/postgresql/providers/execute.rb +++ b/cookbooks/postgresql/providers/execute.rb @@ -17,6 +17,8 @@ # limitations under the License. # +use_inline_resources + def load_current_resource @pg = Chef::PostgreSQL.new(new_resource.cluster) diff --git a/cookbooks/postgresql/providers/extension.rb b/cookbooks/postgresql/providers/extension.rb index 81a976004..848b7630e 100644 --- a/cookbooks/postgresql/providers/extension.rb +++ b/cookbooks/postgresql/providers/extension.rb @@ -17,6 +17,8 @@ # limitations under the License. # +use_inline_resources + def load_current_resource @pg = Chef::PostgreSQL.new(new_resource.cluster) diff --git a/cookbooks/postgresql/providers/table.rb b/cookbooks/postgresql/providers/table.rb index b1dc67571..495bf8b71 100644 --- a/cookbooks/postgresql/providers/table.rb +++ b/cookbooks/postgresql/providers/table.rb @@ -17,6 +17,8 @@ # limitations under the License. # +use_inline_resources + def load_current_resource @pg = Chef::PostgreSQL.new(new_resource.cluster) @tables = @pg.tables(new_resource.database) diff --git a/cookbooks/postgresql/providers/user.rb b/cookbooks/postgresql/providers/user.rb index 4f21b4d29..5a1402d40 100644 --- a/cookbooks/postgresql/providers/user.rb +++ b/cookbooks/postgresql/providers/user.rb @@ -17,6 +17,8 @@ # limitations under the License. # +use_inline_resources + def load_current_resource @pg = Chef::PostgreSQL.new(new_resource.cluster) -- 2.43.2