




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

# app/metal/hostess.rb
class Hostess < Sinatra::Default
get "/specs.4.8.gz" do
content_type('application/x-gzip')
serve(current_path)
end
end
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

# 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

class Gemcutter
def save
write_gem
Delayed::Job.enqueue self
notify("Successfully registered gem.", 200)
end
def perform
update_index
end
end

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"
Gem::Specification.new do |s|
s.name = "jekyll"
s.version = "0.6.0-pre"
end
Gem::Specification.new do |s|
s.name = "jekyll"
s.add_development_dependency("shoulda", "2.10.2")
end
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



