up with convention, down with case. pubsubhubbub now adhears to ruby caseing, rather than its own name weirdness

This commit is contained in:
maxwell 2011-01-11 15:04:03 -08:00
parent 5609422a7b
commit 49b172f192
5 changed files with 5 additions and 6 deletions

View file

@ -8,7 +8,7 @@ module Jobs
@queue = :http_service
def self.perform(sender_public_url)
PubSubHubbub.new(AppConfig[:pubsub_server]).publish(sender_public_url)
Pubsubhubbub.new(AppConfig[:pubsub_server]).publish(sender_public_url)
end
end
end

View file

@ -3,7 +3,7 @@
# the COPYRIGHT file.
class PubSubHubbub
class Pubsubhubbub
H = {"User-Agent" => "PubSubHubbub Ruby", "Content-Type" => "application/x-www-form-urlencoded"}
def initialize(hub, options={})

View file

@ -5,7 +5,7 @@
require 'spec_helper'
require 'lib/pubsubhubbub'
describe PubSubHubbub do
describe Pubsubhubbub do
before do
RestClient.unstub!(:post)
end
@ -24,7 +24,7 @@ describe PubSubHubbub do
body = {'hub.url' => feed, 'hub.mode' => 'publish'}
stub_request(:post, "http://hubzord.com/").to_return(:status => [202, 'you are awesome'])
PubSubHubbub.new(hub).publish(feed).code.should == 202
Pubsubhubbub.new(hub).publish(feed).code.should == 202
end
end
end

View file

@ -11,7 +11,7 @@ describe Jobs::PublishToHub do
m = mock()
m.should_receive(:publish).with(url)
PubSubHubbub.should_receive(:new).with(AppConfig[:pubsub_server]).and_return(m)
Pubsubhubbub.should_receive(:new).with(AppConfig[:pubsub_server]).and_return(m)
Jobs::PublishToHub.perform(url)
end
end

View file

@ -29,7 +29,6 @@ RSpec.configure do |config|
config.before(:each) do
I18n.locale = :en
EventMachine::HttpRequest.stub!(:new).and_return(FakeHttpRequest.new(:success))
RestClient.stub!(:post).and_return(FakeHttpRequest.new(:success))
DatabaseCleaner.clean