Last active
August 29, 2015 14:02
-
-
Save gondoi/da62b81e9951750ece73 to your computer and use it in GitHub Desktop.
version check for nokogiri
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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