From b3dc45ec6174efb76b8ae5b6e13a11804180b18a Mon Sep 17 00:00:00 2001 From: Xabier de Zuazo Date: Thu, 24 Sep 2015 01:09:12 +0200 Subject: [PATCH] Add SQLite support on CentOS 5 --- recipes/default.rb | 7 +------ test/unit/recipes/default_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/recipes/default.rb b/recipes/default.rb index 04bf799..81bed91 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -40,14 +40,9 @@ when 'rhel' if node['platform'] != 'amazon' && node['platform_version'].to_f < 7 php_pkgs = %w(php54w-gd php54w-mbstring php54w-xml php54w-intl samba-client) + php_pkgs << 'php54w-pdo' if dbtype == 'sqlite' php_pkgs << 'php54w-mysql' if dbtype == 'mysql' php_pkgs << 'php54w-pgsql' if dbtype == 'pgsql' - if dbtype == 'sqlite' - fail( - "SQLite database type not supported on #{node['platform']}"\ - " #{node['platform_version']}" - ) - end else php_pkgs = %w(php-gd php-mbstring php-xml php-intl samba-client) php_pkgs << 'php-pdo' if dbtype == 'sqlite' diff --git a/test/unit/recipes/default_spec.rb b/test/unit/recipes/default_spec.rb index 72b54e6..07d5181 100644 --- a/test/unit/recipes/default_spec.rb +++ b/test/unit/recipes/default_spec.rb @@ -225,14 +225,14 @@ 'centos@5.10' => { 'core' => %w(php54w-gd php54w-mbstring php54w-xml php54w-intl samba-client), - 'sqlite' => %w(), # Raises an exception + 'sqlite' => %w(php54w-pdo), 'mysql' => %w(php54w-mysql), 'pgsql' => %w(php54w-pgsql) }, 'centos@6.0' => { 'core' => %w(php54w-gd php54w-mbstring php54w-xml php54w-intl samba-client), - 'sqlite' => %w(), + 'sqlite' => %w(php54w-pdo), 'mysql' => %w(php54w-mysql), 'pgsql' => %w(php54w-pgsql) },