turntabler 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/lib/turntabler/connection.rb +3 -3
- data/lib/turntabler/resource.rb +1 -1
- data/lib/turntabler/version.rb +1 -1
- metadata +4 -3
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# master
|
2
2
|
|
3
|
+
## 0.3.4 / 2013-07-11
|
4
|
+
|
5
|
+
* Fix heartbeat responses not being sent properly resulting in periodic disconnects
|
6
|
+
* Fix Resource initialization not working on Ruby 2.0
|
7
|
+
|
3
8
|
## 0.3.3 / 2013-03-18
|
4
9
|
|
5
10
|
* Fix Preferences#update not validating options properly
|
@@ -98,7 +98,7 @@ module Turntabler
|
|
98
98
|
private
|
99
99
|
# Publishes the given params to the web socket
|
100
100
|
def publish_to_socket(params)
|
101
|
-
message = params.to_json
|
101
|
+
message = params.is_a?(String) ? params : params.to_json
|
102
102
|
data = "~m~#{message.length}~m~#{message}"
|
103
103
|
@socket.send(data)
|
104
104
|
end
|
@@ -155,9 +155,9 @@ module Turntabler
|
|
155
155
|
case response
|
156
156
|
when /no_session/
|
157
157
|
{'command' => 'no_session'}
|
158
|
-
when
|
158
|
+
when /(~h~[0-9]+)/
|
159
159
|
# Send the heartbeat command back to the server
|
160
|
-
|
160
|
+
publish_to_socket($1)
|
161
161
|
{'command' => 'heartbeat'}
|
162
162
|
else
|
163
163
|
JSON.parse(response)
|
data/lib/turntabler/resource.rb
CHANGED
@@ -130,7 +130,7 @@ module Turntabler
|
|
130
130
|
if attribute == 'metadata'
|
131
131
|
self.attributes = value
|
132
132
|
else
|
133
|
-
__send__("#{attribute}=", value) if respond_to?("#{attribute}=")
|
133
|
+
__send__("#{attribute}=", value) if respond_to?("#{attribute}=", true)
|
134
134
|
end
|
135
135
|
end
|
136
136
|
end
|
data/lib/turntabler/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turntabler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: em-synchrony
|
@@ -190,8 +190,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
requirements: []
|
192
192
|
rubyforge_project:
|
193
|
-
rubygems_version: 1.8.
|
193
|
+
rubygems_version: 1.8.24
|
194
194
|
signing_key:
|
195
195
|
specification_version: 3
|
196
196
|
summary: Turntable.FM API for Ruby
|
197
197
|
test_files: []
|
198
|
+
has_rdoc:
|