Return repo url in the api

Brian Smith's Avatar

Brian Smith

17 Jul, 2010 05:18 AM

Currently, on most pages, there is a link to the repo for the project, I'm guessing from the gemspec. However, the api current does not return this in the repsonse. Shouldn't the api response for the gem basically be a dump of the gemspec?

  1. Support Staff 1 Posted by Nick Quaranto on 17 Jul, 2010 04:08 PM

    Nick Quaranto's Avatar

    Yeah, we have an open request for adding linksets to the API:

    http://github.com/rubygems/gemcutter/issues#issue/175

    Having a more serious, versioned gemspec api would be nice too, but the rubygems server already kind of does that.

    http://rubygems.org/quick/Marshal.4.8/rails-2.3.8.gemspec.rz

    But yeah, we could have something like

    http://rubygems.org/api/v1/gemspec/rails-2.3.8

    Feel free to open up an issue or get hacking on it :)

  2. Support Staff 2 Posted by Nick Quaranto on 17 Jul, 2010 06:16 PM

    Nick Quaranto's Avatar

    Updating this here so everyone can see it :)

    % irb -rubygems -ropen-uri
    >> Marshal.load(Gem.inflate(open("http://rubygems.org/quick/Marshal.4.8/rails-2.3.8.gemspec.rz").read))
    => #<Gem::Specification:0x10140f2e8 @files=[], @platform="ruby", ...
    
  3. Support Staff 3 Posted by Nick Quaranto on 17 Jul, 2010 06:17 PM

    Nick Quaranto's Avatar

    It's definitely a horrible API. If you really need info from that gemspec that we're not providing, let's figure out how to do it better.

  4. Support Staff 4 Posted by Nick Quaranto on 17 Jul, 2010 08:16 PM

    Nick Quaranto's Avatar

    The linkset data is now returned in the API, just merged that patch in.

  5. Nick Quaranto closed this discussion on 17 Jul, 2010 08:16 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac