Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Gemcutter: The next step in gem hosting

Gemcutter: The next step in gem hosting

Not satisfied by RubyGem hosts? Say hello to Gemcutter and prepare for awesome gem hosting. Learn about this open source effort to improve gem hosting and watch a live demo of the site.

Given at RubyConf 2010.


Nick Quaranto

January 12, 2012


  1. the next step in gem hosting nick quaranto


  3. the gemcutter saga: new moon

  4. Now, this is a story all about how My gem

    host got flipped-turned upside down
  5. 5th year SE & CS major at RIT bills fan

    rubyist at heroku @qrush litanyagainstfear.com
  6. http://next.heroku.com

  7. > demo history motivation tech other features on deck

  8. demo > history motivation tech other features on deck

  9. january: jekyll may: railsconf august: launch? october: transition

  10. gemcutter.org == gems.rubyforge.org == rubygems.org

  11. demo history > motivation tech other features on deck

  12. None
  13. the default host project approval php

  14. None
  15. the new hotness forked gems hasmygembuiltyet.org

  16. accessible info publisher api open source

  17. demo history motivation > tech other features on deck

  18. None
  19. class VaultObject < AWS::S3::S3Object set_current_bucket_to "gemcutter_production" end VaultObject.store("gems/awesome-1.0.0.gem", data, options)

  20. None
  21. # app/metal/hostess.rb class Hostess < Sinatra::Default get "/specs.4.8.gz" do content_type('application/x-gzip')

    serve(current_path) end end
  22. require File.join('vendor', 'bundler_gems', 'environment') require File.join('config', 'environment') use Rack::Static, :urls

    => ["/index.html", "/favicon.ico", "/images", "/stylesheets"], :root => "public/maintenance" use Hostess use Rack::Maintenance, :file => File.join('public', 'maintenance', 'index.html') run Sinatra::Application
  23. None
  24. # lib/rubygems_plugin.rb Gem::CommandManager.instance.register_command :push # lib/commands/push_command.rb class Gem::Commands::PushCommand < Gem::Command

    def execute send_gem end end
  25. None
  26. class Gemcutter def save write_gem Delayed::Job.enqueue self notify("Successfully registered gem.",

    200) end def perform update_index end end
  27. testing

  28. shoulda factory_girl rr cucumber

  29. Feature: Push Gems In order to share code with the

    world A rubygem developer Should be able to push gems up to Gemcutter Scenario: User pushes new gem Given I am signed up and confirmed as "email@person.com/password" And I have a gem "RGem" with version "1.2.3" And I have an api key for "email@person.com/password" When I push the gem "RGem-1.2.3.gem" with my api key And I visit the gem page for "RGem" Then I should see "RGem" And I should see "1.2.3"
  30. demo history motivation tech > other features on deck

  31. prerelease versions Gem::Specification.new do |s| s.name = "jekyll" s.version =

    "0.6.0-pre" end
  32. development dependencies Gem::Specification.new do |s| s.name = "jekyll" s.add_development_dependency("shoulda", "2.10.2")

  33. linking to outside resources Gem::Specification.new do |s| s.name = "jekyll"

    s.links[:code] = "http://github.com/qrush/jekyll" s.links[:docs] = "http://rdoc.info/projects/qrush/jekyll" end
  34. demo history motivation tech other features > on deck

  35. rdoc.info + YARD

  36. None
  37. READMEs/search

  38. gem forking: you.gemcutter.org

  39. this is our gem host now let's make it awesome!

  40. thanks you! thoughtbot github heroku ruby central

  41. gemcutter.org github.com/qrush/gemcutter irc.freenode.net #gemcutter