Skip to content

Commit

Permalink
Add SQLite support on CentOS 5
Browse files Browse the repository at this point in the history
  • Loading branch information
zuazo committed Sep 23, 2015
1 parent 06bbda9 commit b3dc45e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions test/unit/recipes/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
Expand Down

0 comments on commit b3dc45e

Please sign in to comment.