up with convention, down with case. pubsubhubbub now adhears to ruby caseing, rather than its own name weirdness
This commit is contained in:
parent
5609422a7b
commit
49b172f192
5 changed files with 5 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ module Jobs
|
||||||
@queue = :http_service
|
@queue = :http_service
|
||||||
|
|
||||||
def self.perform(sender_public_url)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# the COPYRIGHT file.
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
|
|
||||||
class PubSubHubbub
|
class Pubsubhubbub
|
||||||
H = {"User-Agent" => "PubSubHubbub Ruby", "Content-Type" => "application/x-www-form-urlencoded"}
|
H = {"User-Agent" => "PubSubHubbub Ruby", "Content-Type" => "application/x-www-form-urlencoded"}
|
||||||
|
|
||||||
def initialize(hub, options={})
|
def initialize(hub, options={})
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
require 'lib/pubsubhubbub'
|
require 'lib/pubsubhubbub'
|
||||||
|
|
||||||
describe PubSubHubbub do
|
describe Pubsubhubbub do
|
||||||
before do
|
before do
|
||||||
RestClient.unstub!(:post)
|
RestClient.unstub!(:post)
|
||||||
end
|
end
|
||||||
|
|
@ -24,7 +24,7 @@ describe PubSubHubbub do
|
||||||
body = {'hub.url' => feed, 'hub.mode' => 'publish'}
|
body = {'hub.url' => feed, 'hub.mode' => 'publish'}
|
||||||
|
|
||||||
stub_request(:post, "http://hubzord.com/").to_return(:status => [202, 'you are awesome'])
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ describe Jobs::PublishToHub do
|
||||||
m = mock()
|
m = mock()
|
||||||
|
|
||||||
m.should_receive(:publish).with(url)
|
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)
|
Jobs::PublishToHub.perform(url)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ RSpec.configure do |config|
|
||||||
|
|
||||||
config.before(:each) do
|
config.before(:each) do
|
||||||
I18n.locale = :en
|
I18n.locale = :en
|
||||||
EventMachine::HttpRequest.stub!(:new).and_return(FakeHttpRequest.new(:success))
|
|
||||||
RestClient.stub!(:post).and_return(FakeHttpRequest.new(:success))
|
RestClient.stub!(:post).and_return(FakeHttpRequest.new(:success))
|
||||||
|
|
||||||
DatabaseCleaner.clean
|
DatabaseCleaner.clean
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue