A gem that takes string input for X509 certificates and attempts to reformat
them into a valid certificate. This gem extends the core String class to add
the .to_cert
and .to_cert!
methods through the CertMunger module.
Add this line to your application's Gemfile:
# Ruby 2.0+:
gem 'cert_munger', '~> 1.0'
# Ruby 1.9 support:
gem 'cert_munger', '~> 0.2'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cert_munger
# Use CertMunger on any string:
new_cert = "<invalidly formatted cert string>".to_cert
# Or a string read from a file (one or multiple lines):
bad_cert = File.read('malformed_cert_to_parse')
bad_cert.to_cert!
- Fork it ( https://github.com/stevenhaddox/cert_munger/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Ensure your changes have tests
- Run the test suite (
bundle exec rake
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request