lws 7.0.4 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/lwsconsole +5 -1
- data/lib/lws/apps/digital_signage.rb +7 -86
- data/lib/lws/apps/presence.rb +23 -0
- data/lib/lws/version.rb +1 -1
- data/test/digital_signage_test.rb +1 -61
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca97b318aafa9eebf65739961fc21606737681dd78931fca722c3c7c34435991
|
4
|
+
data.tar.gz: dc6bca591ac0693177b6c48d6eea5a6e89ca8253db2631b7414acb2831dee8c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5e06ecdea4c3ed065ec65ba68239fe0d8e4823f92335ff1c27d59cdb0706c613a2d642ea81c508a5ac2bd5d149c79f4b774b066503ed154bff0028240fab34f
|
7
|
+
data.tar.gz: a54b2b41fbff167874b7a360752735f85b42f5d58357110af507b1e728382d2fcbfa0e67522eca838d7ef80161d8af92bd4e30981c00ce6db87fd40b4f1edfdd
|
data/bin/lwsconsole
CHANGED
@@ -134,7 +134,11 @@ end
|
|
134
134
|
|
135
135
|
# Set up Pry
|
136
136
|
FileUtils.mkdir_p("#{ENV['HOME']}/.local/share/LeftClick")
|
137
|
-
Pry.config.
|
137
|
+
if Pry.config.history_file
|
138
|
+
Pry.config.history_file = "#{ENV['HOME']}/.local/share/LeftClick/lws_history"
|
139
|
+
else
|
140
|
+
Pry.config.history.file = "#{ENV['HOME']}/.local/share/LeftClick/lws_history"
|
141
|
+
end
|
138
142
|
Pry.config.prompt_name = PROG_NAME
|
139
143
|
|
140
144
|
# Print an LWS setup summary
|
@@ -802,8 +802,8 @@ module LWS::DigitalSignage
|
|
802
802
|
attribute :configuration_id
|
803
803
|
|
804
804
|
# @!attribute feedbacks
|
805
|
-
# @return [
|
806
|
-
|
805
|
+
# @return [Hash{String=>String}] a mapping of player feedback key/values
|
806
|
+
attribute :feedbacks
|
807
807
|
|
808
808
|
# @!attribute [r] health_percentage
|
809
809
|
# @return [Fixnum] the health of the player (percentage)
|
@@ -871,7 +871,7 @@ module LWS::DigitalSignage
|
|
871
871
|
attribute :release_channel_id
|
872
872
|
|
873
873
|
# @!attribute requests
|
874
|
-
# @return [Array<Player::
|
874
|
+
# @return [Array<Player::Request>] the requests for the player
|
875
875
|
has_many :requests, class_name: "LWS::DigitalSignage::Player::Request"
|
876
876
|
|
877
877
|
# @!attribute screenshots
|
@@ -890,6 +890,10 @@ module LWS::DigitalSignage
|
|
890
890
|
# @return ["unknown", "good", "warning", "bad"] the player status
|
891
891
|
attribute :status
|
892
892
|
|
893
|
+
# @!attribute status_reason [r]
|
894
|
+
# @return [String] the reason for the current player status
|
895
|
+
attribute :status_reason
|
896
|
+
|
893
897
|
# @!attribute tags
|
894
898
|
# @return [Array<Player::Tag>] the tags of the player
|
895
899
|
has_many :tags, class_name: "LWS::DigitalSignage::Player::Tag"
|
@@ -1040,75 +1044,6 @@ module LWS::DigitalSignage
|
|
1040
1044
|
attribute :value
|
1041
1045
|
end
|
1042
1046
|
|
1043
|
-
# = The player feedback class
|
1044
|
-
#
|
1045
|
-
# @note
|
1046
|
-
# This class is only used within the context of the {Player} class.
|
1047
|
-
class Player::Feedback < LWS::Generic::Model
|
1048
|
-
use_api LWS::DigitalSignage.api
|
1049
|
-
uri "players/:player_id/feedbacks(/:id)"
|
1050
|
-
|
1051
|
-
# @!attribute player
|
1052
|
-
# @return [Player] the player the feedback is originating from
|
1053
|
-
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
1054
|
-
|
1055
|
-
# @!attribute player_id
|
1056
|
-
# @return [Integer] the ID of the player the feedback is originating from
|
1057
|
-
attribute :player_id
|
1058
|
-
|
1059
|
-
# @!attribute release
|
1060
|
-
# @return [Player::Os::Branch::Release] the player OS branch release the
|
1061
|
-
# feedback is related to
|
1062
|
-
# FIXME: Missing branch_id field in LWS
|
1063
|
-
belongs_to :release, class_name: "LWS::DigitalSignage::Player::Os::Branch::Release",
|
1064
|
-
uri: "player/os/branches/:branch_id/releases/:id"
|
1065
|
-
|
1066
|
-
# @!attribute release_id
|
1067
|
-
# @return [Integer] the ID of the player OS branch release the feedback
|
1068
|
-
# is related to
|
1069
|
-
|
1070
|
-
# @!attribute results
|
1071
|
-
# @return [Array<Player::Feedback::Result>] the results of the player feedback
|
1072
|
-
# FIXME: Chained associations don't work yet in Spyke (#89)
|
1073
|
-
has_many :results, class_name: "LWS::DigitalSignage::Player::Feedback::Result",
|
1074
|
-
uri: "players/:player_id/feedbacks/:feedback_id/results(/:id)"
|
1075
|
-
end
|
1076
|
-
|
1077
|
-
# = The player feedback result class
|
1078
|
-
#
|
1079
|
-
# @note
|
1080
|
-
# This class is only used within the context of the {Player::Feedback}
|
1081
|
-
# class.
|
1082
|
-
class Player::Feedback::Result < LWS::Generic::Model
|
1083
|
-
use_api LWS::DigitalSignage.api
|
1084
|
-
uri "players/:player_id/feedbacks/:feedback_id/results(/:id)"
|
1085
|
-
|
1086
|
-
# @!attribute feedback
|
1087
|
-
# @return [Player::Feedback] the player feedback the result is a part of
|
1088
|
-
belongs_to :feedback, class_name: "LWS::DigitalSignage::Player::Feedback",
|
1089
|
-
uri: "players/:player_id/feedbacks/:id"
|
1090
|
-
|
1091
|
-
# @!attribute feedback_id
|
1092
|
-
# @return [Player::Feedback] the ID of the player feedback the result is a part of
|
1093
|
-
attribute :feedback_id
|
1094
|
-
|
1095
|
-
# @!attribute key
|
1096
|
-
# @return [String] the key of the player feedback result
|
1097
|
-
attribute :key
|
1098
|
-
|
1099
|
-
# @!attribute player
|
1100
|
-
# @return [Player] the player the feedback result is for
|
1101
|
-
belongs_to :player, class_name: "LWS::DigitalSignage::Player"
|
1102
|
-
|
1103
|
-
# @!attribute player_id
|
1104
|
-
# @return [Integer] the ID of the player the feedback result is for
|
1105
|
-
attribute :player_id
|
1106
|
-
|
1107
|
-
# @!attribute value
|
1108
|
-
# @return [String] the value of the player feedback result
|
1109
|
-
attribute :value
|
1110
|
-
end
|
1111
|
-
|
1112
1047
|
# = The player log class
|
1113
1048
|
#
|
1114
1049
|
# @note
|
@@ -1632,20 +1567,6 @@ module LWS::DigitalSignage
|
|
1632
1567
|
# @return [String, nil] the optional argument for the player request
|
1633
1568
|
attribute :argument
|
1634
1569
|
|
1635
|
-
# @!attribute feedback
|
1636
|
-
# This field should be set once the action has been processed (see
|
1637
|
-
# {#processed}) and the action is +"send_feedback"+.
|
1638
|
-
#
|
1639
|
-
# @return [Player::Feedback, nil] the player feedback as a response to the
|
1640
|
-
# action request +"send_status"+
|
1641
|
-
belongs_to :feedback, class_name: "LWS::DigitalSignage::Player::Feedback",
|
1642
|
-
uri: "players/:player_id/feedbacks/:id"
|
1643
|
-
|
1644
|
-
# @!attribute feedback_id
|
1645
|
-
# @return [Integer, nil] the ID of the player feedback as a response to the
|
1646
|
-
# action request +"send_status"+
|
1647
|
-
attribute :feedback_id
|
1648
|
-
|
1649
1570
|
# @!attribute log
|
1650
1571
|
# This field should be set once the action has been processed (see
|
1651
1572
|
# {#processed}) and the action is +"send_logs"+.
|
data/lib/lws/apps/presence.rb
CHANGED
@@ -133,6 +133,14 @@ module LWS::Presence
|
|
133
133
|
# the presence status to set people to when checking in
|
134
134
|
attribute :checkin_status
|
135
135
|
|
136
|
+
# @!attribute checkout_alter_status
|
137
|
+
# @return ["available", "unavailable", "maintenance_cleaning",
|
138
|
+
# "maintenance_technical", "permanent_available",
|
139
|
+
# "permanent_unavailable", "permanent_maintenance_cleaning",
|
140
|
+
# "permanent_maintenance_technical", nil] the status to set the
|
141
|
+
# location to when someone checks out
|
142
|
+
attribute :checkout_alter_status
|
143
|
+
|
136
144
|
# @!attribute checkout_location
|
137
145
|
# @return [Location, nil] the location to move people to when they
|
138
146
|
# are checked out
|
@@ -232,6 +240,13 @@ module LWS::Presence
|
|
232
240
|
# @return [Array<Reader>] the (RFID/code/ID/...) readers linked to this location
|
233
241
|
has_many :readers
|
234
242
|
|
243
|
+
# @!attribute status
|
244
|
+
# @return ["available", "unavailable", "maintenance_cleaning",
|
245
|
+
# "maintenance_technical", "permanent_available",
|
246
|
+
# "permanent_unavailable", "permanent_maintenance_cleaning",
|
247
|
+
# "permanent_maintenance_technical"] the status of the location
|
248
|
+
attribute :status
|
249
|
+
|
235
250
|
# @!attribute time_zone
|
236
251
|
# @return [String] the time zone of the location
|
237
252
|
attribute :time_zone
|
@@ -458,6 +473,14 @@ module LWS::Presence
|
|
458
473
|
# @return [Integer] the ID of the location the person is located at
|
459
474
|
attribute :location_id
|
460
475
|
|
476
|
+
# @!attribute location_status_change_permissions
|
477
|
+
# @return [Array<"available", "unavailable", "maintenance_cleaning",
|
478
|
+
# "maintenance_technical", "permanent_available",
|
479
|
+
# "permanent_unavailable", "permanent_maintenance_cleaning",
|
480
|
+
# "permanent_maintenance_technical">] the location statuses the person
|
481
|
+
# will clear to available on check-in
|
482
|
+
attribute :location_status_change_permissions
|
483
|
+
|
461
484
|
# @!attribute long
|
462
485
|
# @return [Float, nil] the exact longitude of the person's location
|
463
486
|
attribute :long
|
data/lib/lws/version.rb
CHANGED
@@ -530,64 +530,6 @@ class TestDigitalSignagePlayerConfigurationSetting < MiniTest::Test
|
|
530
530
|
|
531
531
|
end
|
532
532
|
|
533
|
-
class TestDigitalSignagePlayerFeedback < MiniTest::Test
|
534
|
-
|
535
|
-
include LWS::DigitalSignage
|
536
|
-
|
537
|
-
def setup
|
538
|
-
@player = Player.find(1)
|
539
|
-
# Player feedbacks only exist as child objects of players
|
540
|
-
@player_feedback = @player.feedbacks.first
|
541
|
-
end
|
542
|
-
|
543
|
-
def test_valid
|
544
|
-
refute_nil(@player_feedback)
|
545
|
-
assert_instance_of(Player::Feedback, @player_feedback)
|
546
|
-
refute_nil(@player_feedback.id)
|
547
|
-
end
|
548
|
-
|
549
|
-
def test_valid_associations
|
550
|
-
assert_instance_of(Player, @player_feedback.player)
|
551
|
-
assert_equal(@player, @player_feedback.player)
|
552
|
-
# FIXME: Missing branch_id field in LWS
|
553
|
-
#assert_instance_of(Player::Os::Branch::Release, @player_feedback.release)
|
554
|
-
# FIXME: Chained associations don't work yet in Spyke (#89)
|
555
|
-
#assert_instance_of(Player::Feedback::Result, @player_feedback.results.first)
|
556
|
-
end
|
557
|
-
|
558
|
-
end
|
559
|
-
|
560
|
-
class TestDigitalSignagePlayerFeedbackResult < MiniTest::Test
|
561
|
-
|
562
|
-
include LWS::DigitalSignage
|
563
|
-
|
564
|
-
def setup
|
565
|
-
@player = Player.find(1)
|
566
|
-
# Player feedbacks only exist as decendant objects of players
|
567
|
-
@player_feedback = @player.feedbacks.all.first
|
568
|
-
# Player feedback results only exist as decendant objects of player
|
569
|
-
# feedbacks
|
570
|
-
# FIXME: Chained associations don't work yet in Spyke (#89)
|
571
|
-
#@player_feedback_result = @player_feedback.results.first
|
572
|
-
end
|
573
|
-
|
574
|
-
# FIXME: Chained associations don't work yet in Spyke (#89)
|
575
|
-
#def test_valid
|
576
|
-
# refute_nil(@player_feedback_result)
|
577
|
-
# assert_instance_of(Player::Feedback::Result, @player_feedback_result)
|
578
|
-
# refute_nil(@player_feedback_result.id)
|
579
|
-
#end
|
580
|
-
|
581
|
-
# FIXME: Chained associations don't work yet in Spyke (#89)
|
582
|
-
#def test_valid_associations
|
583
|
-
# assert_instance_of(Player, @player_feedback_result.player)
|
584
|
-
# assert_equal(@player, @player_feedback_result.player)
|
585
|
-
# assert_instance_of(Player::Feedback, @player_feedback_result.feedback)
|
586
|
-
# assert_equal(@player_feedback, @player_feedback_result.feedback)
|
587
|
-
#end
|
588
|
-
|
589
|
-
end
|
590
|
-
|
591
533
|
class TestDigitalSignagePlayerLog < MiniTest::Test
|
592
534
|
|
593
535
|
include LWS::DigitalSignage
|
@@ -930,9 +872,7 @@ class TestDigitalSignagePlayerRequest < MiniTest::Test
|
|
930
872
|
assert_equal(@player, @player_request.player)
|
931
873
|
# FIXME: Chained associations don't work yet in Spyke (#89)
|
932
874
|
#if @player_request.processed
|
933
|
-
# if @player_request.
|
934
|
-
# assert_instance_of(Player::Feedback, @player_request.feedback)
|
935
|
-
# elsif @player_request.log.present?
|
875
|
+
# if @player_request.log.present?
|
936
876
|
# assert_instance_of(Player::Log, @player_request.log)
|
937
877
|
# elsif @player_request.screenshot.present?
|
938
878
|
# assert_instance_of(Player::Screenshot, @player_request.screenshot)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0
|
4
|
+
version: 7.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LeftClick B.V.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday_middleware
|