Firstly, this gist is not anymore valid with 2.x versions. The default config is here: http://parsleyjs.org/doc/annotated-source/defaults.html
You could update above gist to make it works with new option config object, mainly, it would look to something similar to that:
window.ParsleyConfig = {
classHandler: function ( elem, isRadioOrCheckbox ) {
// specify where parsley error-success classes are set
return $(elem).parents(".form-group");
},
errorsWrapper: '<span class="help-block"></span>',
errorTemplate: '<span></span>'
};
Secondly, you need to define window.ParsleyConfig
before calling parsley.min.js
Please have a look to the documentation to understand how ParsleyConfig works and how you could use it to customize your whole Parsley behavior: http://parsleyjs.org/doc/index.html#psly-usage-global-configuration