Skip to content

Commit

Permalink
okjson
Browse files Browse the repository at this point in the history
  • Loading branch information
wuputah committed Oct 4, 2012
1 parent ff2cee5 commit a3e0c57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'rbconfig'
%w[ json rest-client ].each do |gem_name|
%w[ rest-client ].each do |gem_name|
begin
require gem_name
rescue LoadError
Expand Down
3 changes: 2 additions & 1 deletion lib/heroku/command/extended/certs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require "heroku/command/certs" unless defined? Heroku::Command::Certs
require "vendor/heroku/okjson"

class Heroku::Command::Certs
SSL_DOCTOR = RestClient::Resource.new(ENV["SSL_DOCTOR_URL"] || "https://ssl-doctor.herokuapp.com/")
Expand Down Expand Up @@ -82,7 +83,7 @@ def post_to_ssl_doctor(path, action_text = nil)

def read_crt_and_key_through_ssl_doctor(action_text = nil)
crt_and_key = post_to_ssl_doctor("resolve-chain-and-key", action_text)
JSON.parse(crt_and_key).values_at("pem", "key")
Heroku::OkJson.decode(crt_and_key).values_at("pem", "key")
end

def read_crt_through_ssl_doctor(action_text = nil)
Expand Down

0 comments on commit a3e0c57

Please sign in to comment.