concerto_hardware 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e5b029ac779d47ff507e317a6cf81cff535234c
|
4
|
+
data.tar.gz: e555cf4fb696e6a492b7714b901615c8fd3890f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62594594cfa2a92502262894578ba90cdf99b04c692e7b16c1bcd207abb3a573db80b85ddbc6b6a7b26ed9381de1383611fd796bbfe44ecc7b957c174e3e3b2e
|
7
|
+
data.tar.gz: 5969ec4a9c47dd55aab1429d70e7305fd68177bff4432223721eaa4e659b42b33c79847c40bcd5add1969d9233a4cbbad74cbbf2513150bd5afbbafb3cfbecd0
|
data/README.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
A Rails Engine for managing Bandshell-powered Concerto hardware
|
2
2
|
|
3
3
|
To use this engine, add the following to the Concerto Gemfile:
|
4
|
-
gem '
|
4
|
+
gem 'concerto_hardware', :path => '/path/to/concerto_hardware'
|
5
5
|
|
6
6
|
To create the proper migrations, use:
|
7
|
-
rails generate
|
7
|
+
rails generate concerto_hardware
|
@@ -33,13 +33,16 @@ class PlayersController < ApplicationController
|
|
33
33
|
raise ActiveRecord::RecordNotFound, "Couldn't find an authenticated screen."
|
34
34
|
else
|
35
35
|
@player = Player.find_by_screen_id!(current_screen.id)
|
36
|
+
@player.ip_address = request.remote_ip if @player
|
36
37
|
end
|
37
38
|
end
|
38
39
|
auth!
|
39
40
|
|
41
|
+
@player.save if @player.ip_address_changed?
|
42
|
+
|
40
43
|
respond_to do |format|
|
41
44
|
format.html # show.html.erb
|
42
|
-
format.json { render :json => @player
|
45
|
+
format.json { render :json => @player}
|
43
46
|
end
|
44
47
|
end
|
45
48
|
|
@@ -165,5 +165,17 @@ module ConcertoHardware
|
|
165
165
|
end
|
166
166
|
end
|
167
167
|
|
168
|
+
def polling_interval
|
169
|
+
return ConcertoConfig[:poll_interval].to_i
|
170
|
+
end
|
171
|
+
|
172
|
+
|
173
|
+
def as_json(options)
|
174
|
+
json = super(options)
|
175
|
+
json["screen_on_off"] = ActiveSupport::JSON.decode(self.screen_on_off)
|
176
|
+
json["polling_interval"] = self.polling_interval
|
177
|
+
json
|
178
|
+
end
|
179
|
+
|
168
180
|
end # class Player
|
169
181
|
end # module ConcertoHardware
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concerto_hardware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Concerto Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|