Module: Geminabox::RubygemsDependency

Defined in:
lib/geminabox/rubygems_dependency.rb

Class Method Summary collapse

Class Method Details

.for(*gems) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/geminabox/rubygems_dependency.rb', line 9

def for(*gems)

  url = [
    rubygems_uri,
    '?gems=',
    gems.map(&:to_s).join(',')
  ].join
  body = HTTPClient.get_content(url)
  JSON.parse(body)
end

.rubygems_uriObject



20
21
22
# File 'lib/geminabox/rubygems_dependency.rb', line 20

def rubygems_uri
  "https://bundler.rubygems.org/api/v1/dependencies.json"
end