lita-onewheel-automatic-pancake 0.3.1 → 0.5.0
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: db3891496d832ccf555804df3ef93200b22811de
|
4
|
+
data.tar.gz: 2bf7c20e89560c609b21912f7412f685cb57acc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82dc00d92daf3d6b74eeefee53e80049f77cd1841c1d470b2227d095b1debf7bfe6fe703deb8292e2dacbb953b730c240e0b9435b98acbecc0ac12497f3c10ee
|
7
|
+
data.tar.gz: 3152cbb36ca20acec81d79fa41173fc28f12fe1738332eec545ee2b10f7a9f03ce3c37899b8520886831825d2c2a5a6fa9711fbe4c61e4eb39acb6b41df2ae6b
|
@@ -25,6 +25,11 @@ module Lita
|
|
25
25
|
command: true,
|
26
26
|
help: {'vol down' => 'Turn it down!'}
|
27
27
|
|
28
|
+
route /^vol (\d+)/i,
|
29
|
+
:vol_change,
|
30
|
+
command: true,
|
31
|
+
help: {'vol 80%' => 'Set volume to 80%.'}
|
32
|
+
|
28
33
|
route /^playtube (.*)$/i,
|
29
34
|
:youtube,
|
30
35
|
command: true,
|
@@ -46,11 +51,19 @@ module Lita
|
|
46
51
|
end
|
47
52
|
|
48
53
|
def vol_up(response)
|
49
|
-
|
54
|
+
3.times do |i|
|
55
|
+
RestClient.post "#{config.pancake_server}/vol/up", {}
|
56
|
+
end
|
50
57
|
end
|
51
58
|
|
52
59
|
def vol_down(response)
|
53
|
-
|
60
|
+
3.times do |i|
|
61
|
+
RestClient.post "#{config.pancake_server}/vol/down", {}
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def vol_change(response)
|
66
|
+
RestClient.post "#{config.pancake_server}/vol/#{response.matches[0][0]}", {}
|
54
67
|
end
|
55
68
|
|
56
69
|
def youtube(response)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-onewheel-automatic-pancake'
|
3
|
-
spec.version = '0.
|
3
|
+
spec.version = '0.5.0'
|
4
4
|
spec.authors = ['Andrew Kreps']
|
5
5
|
spec.email = ['andrew.kreps@gmail.com']
|
6
6
|
spec.description = %q{Lita interface to Automatic Pancake.}
|
@@ -2,6 +2,10 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Lita::Handlers::OnewheelAutomaticPancake, lita_handler: true do
|
4
4
|
it { is_expected.to route_command('play x') }
|
5
|
+
it { is_expected.to route_command('playtube x') }
|
6
|
+
it { is_expected.to route_command('vol up') }
|
7
|
+
it { is_expected.to route_command('vol down') }
|
8
|
+
it { is_expected.to route_command('vol 50') }
|
5
9
|
|
6
10
|
# before do
|
7
11
|
# mock = File.open('spec/fixtures/baileys.html').read
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-onewheel-automatic-pancake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kreps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|