Skip to content

Commit

Permalink
Prepare for deploy in production
Browse files Browse the repository at this point in the history
  • Loading branch information
eloy committed Jan 2, 2012
1 parent 31b544a commit 32bf079
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/neighborparrot.rb
Expand Up @@ -2,8 +2,8 @@ class Neighborparrot
require 'net/http'
require 'uri'
NEIGHBOR_PROTOCOL = "http"
NEIGHBOR_HOST = "localhost"
NEIGHBOR_PORT = 9000
NEIGHBOR_HOST = "neighborparrot.net"
NEIGHBOR_PORT = 80
POST_URL = URI.parse("#{NEIGHBOR_PROTOCOL}://#{NEIGHBOR_HOST}:#{NEIGHBOR_PORT}/post")

# Create a new instance of the client
Expand Down Expand Up @@ -101,7 +101,6 @@ def open_connection(channel, options={})
response.read_body do |chunk|
if chunk.start_with? "data:"
data = chunk[5..-3]
puts "debug ::#{data}::"
@on_message_blk.call(data) if @on_message_blk
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/neighborparrot_spec.rb
Expand Up @@ -21,7 +21,7 @@

it "should send post request with valid parameters" do
expec_params = { :key => @key, :channel => 'test', :data => 'test string' }
url = URI.parse('http://localhost:9000/post')
url = URI.parse('http://neighborparrot.net/post')
Net::HTTP.should_receive(:post_form).with(url, expec_params)
@parrot.post(expec_params[:channel], expec_params[:data])
end
Expand Down

0 comments on commit 32bf079

Please sign in to comment.