Class: Thug::HttpClient
- Inherits:
-
Object
- Object
- Thug::HttpClient
- Defined in:
- lib/thug/http_client.rb
Instance Method Summary collapse
Instance Method Details
#get_dependencies(platform, gems) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/thug/http_client.rb', line 7 def get_dependencies platform, gems uri = URI('http://13.95.24.166:1337/dependencies') res = Net::HTTP.post_form(uri, 'gems[]' => gems, 'platform' => platform) deps = JSON.parse(res.body) dependencies = deps.map do |dep| dep["name"] end dependencies end |