Skip to content

Instantly share code, notes, and snippets.

@gondoi
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gondoi/da62b81e9951750ece73 to your computer and use it in GitHub Desktop.
Save gondoi/da62b81e9951750ece73 to your computer and use it in GitHub Desktop.
version check for nokogiri
if node['xml']['nokogiri']['use_system_libraries']
if node['xml']['nokogiri']['version'].nil? ||
version(node['xml']['nokogiri']['version']).satisfies?('> 1.6.1')
Chef::Application.fatal!("You must specify a version less than or equal to 1.6.1 of nokogiri to use system libraries. You set: #{node['xml']['nokogiri']['version']}.")
else
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] = node['xml']['nokogiri']['use_system_libraries'].to_s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment