ruby-macrodroid 0.9.18 → 0.9.19

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
  SHA256:
3
- metadata.gz: 98e47dfdd0c7a7f5eabe5a942e3d1ad19cbacbb8cdac3de74b301e51a6e9dbdc
4
- data.tar.gz: 462bf9fa2ffdb85fc51b93448c1a43b9469bd81bbec42a34549fdde9518a07ef
3
+ metadata.gz: b5b0e328f9ba62c9217cfc9dcce286b3d450953d77eef32ba00c7fd1bf07d3d7
4
+ data.tar.gz: d8e6c46d8fc8b4a3185ab9b1a0da3a6937e1aabf43a152e6c238b1187455c0db
5
5
  SHA512:
6
- metadata.gz: e8e4d4e23d498cd394739002b387907209015e06fea55facfdccdd7983e72cf72372bf152427767388ca8c3ee031dfbbe7ff69be964e210025d54ac60be6e0ed
7
- data.tar.gz: c8150eccb7ba454409f7ab6d56a7418f9508050c6ee76021c0508b21b1203529e5fce79ff9dfd1aeadfab0f3aced27d95c2def9151517d3bc4eff32ba8e1d6b0
6
+ metadata.gz: 11f4918c738e8e42d78f0d5acc2b04994b45848d5d56010dc6c3f89f6c1a05ea24166cd95aaeca736a09d2b0990874cbdfdd8dba8f9548d999e5c50bae2e9dba
7
+ data.tar.gz: '09d9a30e0c8799ae2cb68acccc3d505a6f8cbe04a6206c28d0584e2b3f16b26b92b394ea24f137bfb576b8df5574a50aed3d32a09b03fe311e4427ddfab7bd3f'
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -797,7 +797,7 @@ class SetAirplaneModeAction < ConnectivityAction
797
797
 
798
798
  state = ['On', 'Off', 'Toggle'][@h[:state]]
799
799
  @s = 'Airplane Mode ' + state
800
- super(colour: colour)
800
+ super()
801
801
 
802
802
  end
803
803
 
@@ -819,34 +819,20 @@ class SetWifiAction < ConnectivityAction
819
819
 
820
820
  end
821
821
 
822
- def to_s(colour: false, indent: 0)
823
- action = @h[:state] == 0 ? 'Enable' : 'Disable'
824
- action + ' Wifi'
822
+ def to_s(colour: false, indent: 0)
823
+
824
+ @s = if @h[:state] <= 2 then
825
+ state = %w(Enable Disable Toggle)[@h[:state]]
826
+ state + ' Wifi'
827
+ else
828
+ "Connected to Network\n%s" % @h[:ssid]
829
+ end
830
+
831
+ super()
825
832
  end
826
833
 
827
834
  end
828
835
 
829
- # Category: Connectivity
830
- #
831
- class SetBluetoothAction < ConnectivityAction
832
-
833
- def initialize(h={})
834
-
835
- options = {
836
- device_name: '',
837
- state: 0
838
- }
839
-
840
- super(options.merge h)
841
-
842
- end
843
-
844
- def to_s(colour: false, indent: 0)
845
- 'SetBluetoothAction ' + @h.inspect
846
- end
847
-
848
- alias to_summary to_s
849
- end
850
836
 
851
837
  # Category: Connectivity
852
838
  #
@@ -855,6 +841,8 @@ class SetBluetoothAction < ConnectivityAction
855
841
  def initialize(h={})
856
842
 
857
843
  options = {
844
+
845
+ device_address: '',
858
846
  device_name: '',
859
847
  state: 1
860
848
  }
@@ -864,7 +852,21 @@ class SetBluetoothAction < ConnectivityAction
864
852
  end
865
853
 
866
854
  def to_s(colour: false, indent: 0)
867
- 'SetBluetoothAction ' + @h.inspect
855
+
856
+ @s = if @h[:state] <= 2 then
857
+
858
+ state = %w(Enable Disable Toggle)[@h[:state]]
859
+ state + ' Bluetooth'
860
+
861
+ else
862
+
863
+ state = @h[:state] == 3 ? 'Connect' : 'Disconnect'
864
+ state + ' Audio Device' + "\n" + @h[:device_name]
865
+
866
+ end
867
+
868
+ super()
869
+
868
870
  end
869
871
 
870
872
  alias to_summary to_s
@@ -2223,16 +2225,18 @@ class ControlMediaAction < MediaAction
2223
2225
  }.merge h2
2224
2226
 
2225
2227
  else
2226
- {}
2228
+ {
2229
+ send_media_player_commands: true,
2230
+ simulate_media_button: false
2231
+ }
2227
2232
  end
2228
2233
  end
2229
2234
  #puts 'h: ' + h.inspect
2230
2235
 
2231
2236
  options = {
2232
- application_name: "Google Play Music", option: "Play/Pause",
2233
- package_name: "com.google.android.music",
2234
- send_media_player_commands: false,
2235
- simulate_media_button: true,
2237
+ option: "Play/Pause",
2238
+ send_media_player_commands: true,
2239
+ simulate_media_button: false,
2236
2240
  }
2237
2241
 
2238
2242
  super(options.merge h)
@@ -2245,6 +2249,8 @@ class ControlMediaAction < MediaAction
2245
2249
 
2246
2250
  if @h[:simulate_media_button] then
2247
2251
  @s += "\nSimulate Media Button (%s)" % @h[:application_name]
2252
+ else
2253
+ @s += "\nSimulate Audio Button"
2248
2254
  end
2249
2255
 
2250
2256
  super()
@@ -41,6 +41,27 @@ class ActionsNlp
41
41
 
42
42
  # -- Connectivity ------------------------------------------------------
43
43
 
44
+ get /^Airplane Mode (On|Off|Toggle)/i do |state|
45
+
46
+ index = %w(on off toggle).index state.downcase
47
+ [SetAirplaneModeAction, {state: index }]
48
+
49
+ end
50
+
51
+ get /^(Enable|Disable|Toggle) Bluetooth/i do |state|
52
+
53
+ index = %w(enable disable toggle).index state.downcase
54
+ [SetBluetoothAction, {state: index }]
55
+
56
+ end
57
+
58
+ get /^(Connect|Disconnect) Audio Device/i do |state|
59
+
60
+ index = %w(connect disconnect).index(state.downcase) + 3
61
+ [SetBluetoothAction, {state: index }]
62
+
63
+ end
64
+
44
65
  get /^(Enable|Disable) HotSpot/i do |state|
45
66
  enable, state = if state.downcase == 'enable' then
46
67
  [true, 0]
@@ -50,6 +71,19 @@ class ActionsNlp
50
71
  [SetHotspotAction, {turn_wifi_on: enable, state: state }]
51
72
  end
52
73
 
74
+ get /^(Enable|Disable|Toggle) Wifi/i do |state|
75
+
76
+ index = %w(enable disable toggle).index state.downcase
77
+ [SetWifiAction, {state: index }]
78
+
79
+ end
80
+
81
+ get /^Connect to Network$/i do
82
+
83
+ [SetWifiAction, {state: 4 }]
84
+
85
+ end
86
+
53
87
  # e.g. message popup: hello world!
54
88
  get /^(?:message popup|popup message): (.*)/i do |msg|
55
89
  [ToastAction, {msg: msg}]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-macrodroid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.18
4
+ version: 0.9.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -11,31 +11,31 @@ cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
14
- YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkxMDI3MjEyNDA0WhcN
15
- MjAxMDI2MjEyNDA0WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
- cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDGFPay
17
- XYuML5FESMa8WAbhZyaUhuUMxkOuMAQCEvZoB/aNyVE2Ho1yNLwzmJNO3t5ne7YO
18
- Q4kRP6/9r76ghiR43XJGhrMicgxL8QC3GmQtJl9KOSiAibzMcya+4hNjF99nqTKf
19
- 0IbVLz8omiskIbgMMxnLxx8hr4t1cUBW/PXkjufqtzTob+KQEESQeXkQYAjbnnME
20
- 0+x0LL8Bi1OiLVAK3b2rMzt8onNmSwvYvfPAXrBcTJczsUrCSgiGHkQYGyK8StnE
21
- 5NaCGOxXObiiyJ/PVEh+kn7R1y9C3Ugprf81qEWg6fsazlFl+JpyCdWphmo/J2Hd
22
- 7oXa+MxCrZRCRo3Z2Avz54tyXukyq4W5CWuceuucBG/vnAKSoqm69pWGhjhVFDzF
23
- BWxmV2iDrU06g+sWXVHWEGGQURyZBl/2ue0rzeaZYFEuLOTN9JRMMwqTNb9S6A0d
24
- nLhZkSiHCe7levTBK9tN1zRdqYXb/hj3iZpkIejYMRQaqxdX1sJcvqzijDcCAwEA
25
- AaOBijCBhzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUYKFwpZGg
26
- MIpWf2U87TzYBDvorjMwJgYDVR0RBB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Ay1q1HMyemsBUJk5h
37
37
  -----END CERTIFICATE-----
38
- date: 2020-10-25 00:00:00.000000000 Z
38
+ date: 2020-10-26 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: glw
metadata.gz.sig CHANGED
Binary file