Created
May 2, 2013 02:17
-
-
Save TheNotary/5499752 to your computer and use it in GitHub Desktop.
This file contains 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
require 'yaml' | |
require 'open-uri' | |
URL = "https://github.com/TheNotary/the_notarys_linux_mint_postinstall_configuration" | |
def valid_yaml_string?(yaml) | |
!!YAML.load(yaml) | |
rescue Exception => e | |
STDERR.puts e.message | |
return false | |
end | |
puts valid_yaml_string?(open(URL).read) | |
# http://stackoverflow.com/questions/16329059/ruby-check-if-valid-yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment