savant-scenes 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/src/SceneManager.rb +54 -33
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9a9b583febd68125774253935e34fecc64ead4849da89582c1550ac26c831e78
|
4
|
+
data.tar.gz: d02852ca0739a348d8ff4a7fbcc3843dc446af90cfc2da79b4356ba57296df82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a52654ffb95eefb5e34823fb42e4e6d7229d4e474801e244ada5af5be504e8a9f1572712fc97c999424d79244a8c0f17e8f16a50375c71f83e6d3e936fafe75
|
7
|
+
data.tar.gz: ec880bdd7db5c68aff6552f3ffb95e578f18f6c2754729d0a3bcfc1a61f037567b5f77d8d0ed7f824f4e11f5025651a5e548f0db3b80d4f7cac4fe13acd4192a
|
data/bin/src/SceneManager.rb
CHANGED
@@ -46,7 +46,7 @@ class SceneManager
|
|
46
46
|
text.include?("@") && text.include?(".") && text.split(/[@,.]/).length == 3 && suffix.chr == "."
|
47
47
|
}
|
48
48
|
|
49
|
-
#Validate id change to allow it to be copied for
|
49
|
+
#Validate id change to allow it to be copied for Blueprint entry, but not actually changed
|
50
50
|
@listviewSavantScenes.renderer(:id).validate_block = Proc.new { |text, model_sym, row, view|
|
51
51
|
text == "this is never going to validate"
|
52
52
|
}
|
@@ -122,7 +122,7 @@ class SceneManager
|
|
122
122
|
def savantVersion?(ip)
|
123
123
|
begin
|
124
124
|
@builder["labelHostInfo"].label = ""
|
125
|
-
Net::SSH.start(ip, @login, :password => @password, :
|
125
|
+
Net::SSH.start(ip, @login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
126
126
|
#Check host type and update sclibridge location
|
127
127
|
ssh.open_channel do |ch, success|
|
128
128
|
ch.exec("uname")
|
@@ -144,15 +144,15 @@ class SceneManager
|
|
144
144
|
if @scliBridge == "~/Applications/RacePointMedia/sclibridge "
|
145
145
|
ssh.open_channel do |ch, success|
|
146
146
|
|
147
|
-
ch.exec("plutil -p 'library/application support/racepointmedia/
|
147
|
+
ch.exec("plutil -p 'library/application support/racepointmedia/rpmSystemInfo.plist'")
|
148
148
|
ch.on_data do |ch, data|
|
149
|
-
|
150
|
-
x = data.split(%q{"
|
149
|
+
|
150
|
+
x = data.split(%q{"RPMSystemName" => "})
|
151
151
|
x = x[1].split(%q{"})
|
152
152
|
@savantHostName = x[0]
|
153
153
|
@str = @scliBridge + "readstate \'" + @savantHostName + ".SoftwareVersion\'"
|
154
154
|
@savantHostVersion = ssh.exec!(@str)
|
155
|
-
|
155
|
+
|
156
156
|
end
|
157
157
|
ch.on_extended_data do |ch, type, data|
|
158
158
|
alert "Error: #{data.inspect}"
|
@@ -161,25 +161,47 @@ class SceneManager
|
|
161
161
|
ssh.loop
|
162
162
|
#parse the scscredentials.plist from the smart host to get host name and then version
|
163
163
|
elsif @scliBridge == "source ~/.zshrc && /usr/local/bin/sclibridge "
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
@str = @scliBridge + "readstate \'" + @savantHostName + ".SoftwareVersion\'"
|
174
|
-
@savantHostVersion = ssh.exec!(@str)
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
ch.on_extended_data do |ch, type, data|
|
179
|
-
alert "Error: #{data.inspect}"
|
180
|
-
end
|
164
|
+
# test to see if remote files exist and transfer them if they do
|
165
|
+
fileExists = ssh.exec!("[ -f 'GNUstep/Library/ApplicationSupport/RacePointMedia/rpmSystemInfo.plist' ] && echo 'true' || echo 'false'")
|
166
|
+
unless fileExists == 'false'
|
167
|
+
ssh.scp.download!('GNUstep/Library/ApplicationSupport/RacePointMedia/rpmSystemInfo.plist', '/tmp/')
|
168
|
+
x = `plutil -p /tmp/RPMSystemInfo.plist`
|
169
|
+
x = x.split(%q{"RPMSystemName" => "})
|
170
|
+
x = x[1].split(%q{"})
|
171
|
+
@savantHostName = x[0]
|
172
|
+
@str = @scliBridge + "readstate \'" + @savantHostName + ".SoftwareVersion\'"
|
181
173
|
end
|
182
|
-
ssh.
|
174
|
+
@savantHostVersion = ssh.exec!(@str)
|
175
|
+
if @savantHostVersion.include?("Deallocating")
|
176
|
+
tmpArray = @savantHostVersion.split("\n")
|
177
|
+
@savantHostVersion = tmpArray[2].chomp
|
178
|
+
end
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
# ssh.open_channel do |ch, success|
|
185
|
+
# ch.exec("strings 'GNUstep/Library/ApplicationSupport/RacePointMedia/rpmSystemInfo.plist'")
|
186
|
+
# ch.on_data do |ch, data|
|
187
|
+
# puts data
|
188
|
+
#
|
189
|
+
# x = data.split("RPMUserDefinedName</key>")
|
190
|
+
# puts x
|
191
|
+
# x = x[1].split(%q{</string>})
|
192
|
+
# x = x[0].split(%q{<string>})
|
193
|
+
# @savantHostName = x[1]
|
194
|
+
#
|
195
|
+
# @str = @scliBridge + "readstate \'" + @savantHostName + ".SoftwareVersion\'"
|
196
|
+
# @savantHostVersion = ssh.exec!(@str)
|
197
|
+
# \
|
198
|
+
# end
|
199
|
+
#
|
200
|
+
# ch.on_extended_data do |ch, type, data|
|
201
|
+
# alert "Error: #{data.inspect}"
|
202
|
+
# end
|
203
|
+
# end
|
204
|
+
# ssh.loop
|
183
205
|
|
184
206
|
end
|
185
207
|
end
|
@@ -196,7 +218,7 @@ class SceneManager
|
|
196
218
|
end
|
197
219
|
end
|
198
220
|
|
199
|
-
#Enter key scans for
|
221
|
+
#Enter key scans for host from IP address field
|
200
222
|
def savantURL__key_press_event(view, evt)
|
201
223
|
return unless evt.keyval == 65293
|
202
224
|
buttonScanHost__clicked()
|
@@ -223,7 +245,7 @@ class SceneManager
|
|
223
245
|
begin
|
224
246
|
savantVersion?(@savantURL)
|
225
247
|
@listviewSavantScenes.model.clear
|
226
|
-
Net::SSH.start(@savantURL, @login, :password => @password, :
|
248
|
+
Net::SSH.start(@savantURL, @login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
227
249
|
# test to see if remote files exist and transfer them if they do
|
228
250
|
fileExists = ssh.exec!("[ -f #{@dis} ] && echo 'true' || echo 'false'")
|
229
251
|
unless fileExists == 'false'
|
@@ -265,7 +287,7 @@ class SceneManager
|
|
265
287
|
#Transfer database from tmp folder to remote host
|
266
288
|
def updateDatabase()
|
267
289
|
begin
|
268
|
-
Net::SSH.start(@savantURL, @login, :password => @password, :
|
290
|
+
Net::SSH.start(@savantURL, @login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
269
291
|
fileExists = ssh.exec!("[ -f #{@dis} ] && echo 'true' || echo 'false'")
|
270
292
|
unless fileExists == 'false'
|
271
293
|
ssh.scp.upload!('/tmp/dashboard.sqlite', @dis.chomp("dashboard.sqlite"))
|
@@ -291,7 +313,7 @@ class SceneManager
|
|
291
313
|
if row[:modify]
|
292
314
|
@str = @scliBridge + "activateScene \'" + row[:scene] + "\' \'" + row[:id] + "\' \'" + row[:user] + "\'"
|
293
315
|
begin
|
294
|
-
Net::SSH.start(@savantURL, @login, :password => @password, :
|
316
|
+
Net::SSH.start(@savantURL, @login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
295
317
|
ssh.exec!(@str)
|
296
318
|
alert("Scene activated: #{row[:scene]}", :parent => self)
|
297
319
|
end
|
@@ -338,7 +360,6 @@ class SceneManager
|
|
338
360
|
stm.bind_param 3, id
|
339
361
|
stm.execute
|
340
362
|
stm.close
|
341
|
-
|
342
363
|
count += 1
|
343
364
|
end
|
344
365
|
updateDatabase()
|
@@ -411,7 +432,7 @@ class SceneManager
|
|
411
432
|
#Check that folder contains correct files
|
412
433
|
if File.file?(backupDir + "/dashboard.sqlite")
|
413
434
|
begin
|
414
|
-
Net::SSH.start(@savantURL, @login, :password => @password, :
|
435
|
+
Net::SSH.start(@savantURL, @login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
415
436
|
# test to see if remote folder exists, if so, transfer files and restart harbridge
|
416
437
|
dirExists = ssh.exec!("[ -d #{@dis.chomp("dashboard.sqlite")} ] && echo 'true' || echo 'false'")
|
417
438
|
if dirExists
|
@@ -438,7 +459,7 @@ class SceneManager
|
|
438
459
|
backupDir = File.dirname(backupDir)
|
439
460
|
end
|
440
461
|
begin
|
441
|
-
Net::SSH.start(@savantURL, @login, :password => @password, :
|
462
|
+
Net::SSH.start(@savantURL, @login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
442
463
|
# test to see if remote files exist and transfer them if they do
|
443
464
|
fileExists = ssh.exec!("[ -f #{@dis} ] && echo 'true' || echo 'false'")
|
444
465
|
unless fileExists == 'false'
|
@@ -497,7 +518,7 @@ class SceneManager
|
|
497
518
|
@builder["windowLoading"].show
|
498
519
|
begin
|
499
520
|
@listviewAdvanced.model.clear
|
500
|
-
Net::SSH.start(@savantURL, @login, :password => @password, :
|
521
|
+
Net::SSH.start(@savantURL, @login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
501
522
|
# test to see if remote files exist and transfer them if they do
|
502
523
|
if @scliBridge == "~/Applications/RacePointMedia/sclibridge "
|
503
524
|
@dis = "/Users/RPM/Library/Application Support/RacePointMedia/statusfiles/eventHistory.sqlite"
|
@@ -538,7 +559,7 @@ class SceneManager
|
|
538
559
|
@builder["windowLoading"].show
|
539
560
|
begin
|
540
561
|
@listviewAdvanced.model.clear
|
541
|
-
Net::SSH.start(@savantURL, @login, :password => @password, :
|
562
|
+
Net::SSH.start(@savantURL, @login, :password => @password, :verify_host_key => :never, :timeout => 3) do |ssh|
|
542
563
|
# test to see if remote files exist and transfer them if they do
|
543
564
|
if @scliBridge == "~/Applications/RacePointMedia/sclibridge "
|
544
565
|
@dis = "/Users/RPM/Library/Application Support/RacePointMedia/statusfiles/eventHistory.sqlite"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: savant-scenes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Miller
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir:
|
10
10
|
- bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-12-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sqlite3
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project: nowarning
|
143
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.7.7
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Savant Scene Manager
|