Method: AdobeCRX::Client#install_package

Defined in:
lib/adobe_crx/client.rb

#install_package(path) ⇒ Object



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/adobe_crx/client.rb', line 83

def install_package(path)
  req = Net::HTTP::Post.new("/crx/packmgr/service/.json#{path}?cmd=install")
  req.basic_auth(@username, @password)
  result = Hash.new
  Net::HTTP.start(@host, @port) do |http|
    http.read_timeout = 500
    response = http.request(req)
    result.merge! JSON.parse(response.body)
  end
  result
end