poundie 0.1.1 → 0.1.2g

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/poundie/runner.rb +6 -3
  2. metadata +5 -4
@@ -8,9 +8,8 @@ module Poundie
8
8
  end
9
9
 
10
10
  def run
11
- url = URI.parse("http://#{@token}:x@streaming.campfirenow.com//room/#{room.id}/live.json")
12
- puts "Starting stream: #{url.inspect}"
13
- Yajl::HttpStream.get(url, :symbolize_keys => true) do |message|
11
+ room.join # We need to make sure we're in the room first
12
+ Yajl::HttpStream.get(room_uri, :symbolize_keys => true) do |message|
14
13
  Thread.new do
15
14
  plugins.each { |plugin| plugin.call(message) }
16
15
  end
@@ -25,6 +24,10 @@ module Poundie
25
24
  end
26
25
  end
27
26
 
27
+ def room_uri
28
+ URI.parse("http://#{@token}:x@streaming.campfirenow.com//room/#{room.id}/live.json")
29
+ end
30
+
28
31
  def room
29
32
  @room ||= campfire.rooms.detect { |r| r.name == @room_name }
30
33
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poundie
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease:
4
+ hash: 36
5
+ prerelease: 5
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ - g
11
+ version: 0.1.2g
11
12
  platform: ruby
12
13
  authors:
13
14
  - Pat Nakajima