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: 3fdc72cff4e3b1b64ace692f41abacc3987be3f7
4
- data.tar.gz: e2e59630942b1067627f2b373b01d74e460e46c6
3
+ metadata.gz: 3e5b029ac779d47ff507e317a6cf81cff535234c
4
+ data.tar.gz: e555cf4fb696e6a492b7714b901615c8fd3890f3
5
5
  SHA512:
6
- metadata.gz: 152baa10985ed73ff436dfa62b4f5111453ea3e5b3bd3a09ddb0a8057a21edde8ece9411387afc729fa311363325d81f11191f60911857c27ea5d457a9b8564a
7
- data.tar.gz: 2cd1e98713bde6c720479fad5ef4ad82d868c74780f63294e63d35a56aa767e699fb2800955f0faa3766c8b7d44881a5a4d3e46ce3c0993f0d74d63a018116ff
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 'concerto-hardware', :path => '/path/to/concerto-hardware'
4
+ gem 'concerto_hardware', :path => '/path/to/concerto_hardware'
5
5
 
6
6
  To create the proper migrations, use:
7
- rails generate concerto-hardware
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
@@ -1,3 +1,3 @@
1
1
  module ConcertoHardware
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
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.6
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-12 00:00:00.000000000 Z
11
+ date: 2014-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails