freeswitcher 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,7 +40,6 @@ module FSR
40
40
  if error?
41
41
  reconnect_until_succeeding
42
42
  end
43
- before_session
44
43
  end
45
44
 
46
45
  def reconnect_until_succeeding
@@ -50,7 +49,6 @@ module FSR
50
49
  reconnect @host, @port
51
50
  else
52
51
  timer.cancel
53
- authorize_and_register_for_events
54
52
  end
55
53
  }
56
54
  end
@@ -58,6 +56,7 @@ module FSR
58
56
  def authorize_and_register_for_events
59
57
  FSR::Log.info "Connection established. Authorizing..."
60
58
  say("auth #{@auth}")
59
+ before_session
61
60
  end
62
61
 
63
62
  def before_session
@@ -75,7 +74,7 @@ module FSR
75
74
  when "command/reply"
76
75
  return handle_reply(header, content)
77
76
  when "text/event-plain"
78
- hash_content = headers_2_hash(content)
77
+ hash_content = headers_2_hash(content).merge(:body => content.split("\n\n",2)[1].to_s)
79
78
  when "text/event-json"
80
79
  require "json"
81
80
  hash_content = JSON.parse(content)
data/lib/fsr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module FSR
2
- VERSION = "0.5.8"
2
+ VERSION = "0.5.9"
3
3
  end
@@ -9,6 +9,9 @@ EM.spec_backend = EventMachine::Spec::Bacon
9
9
  class InboundListener < FSR::Listener::Inbound
10
10
  attr_accessor :custom_event
11
11
 
12
+ def post_init
13
+ before_session
14
+ end
12
15
  # Stub error? out, do this to force session establishment
13
16
  # Alternatively, you can
14
17
  # InboundListener.new.authorize_and_register_for_events
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 8
9
- version: 0.5.8
8
+ - 9
9
+ version: 0.5.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jayson Vaughn