firetower 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/bin/firetower +17 -0
- data/lib/firetower/account.rb +10 -0
- data/version.txt +1 -1
- metadata +3 -3
data/History.txt
CHANGED
data/bin/firetower
CHANGED
@@ -30,6 +30,7 @@ Main do
|
|
30
30
|
"#{program} say 'hello, Campfire'",
|
31
31
|
"#{program} say subdomain=mycompany room='Watercooler' 'hello room'",
|
32
32
|
"echo 'hello, Campfire' | #{program} say",
|
33
|
+
"#{program} play live",
|
33
34
|
"#{program} paste '2+2 => 4'",
|
34
35
|
"#{program} paste subdomain=mycompany room='Watercooler' 'foobar'",
|
35
36
|
"#{program} paste --from=sel",
|
@@ -98,6 +99,22 @@ Main do
|
|
98
99
|
end
|
99
100
|
end
|
100
101
|
|
102
|
+
mode :play do
|
103
|
+
description "Play a sound in a campfire chat room"
|
104
|
+
mixin :address
|
105
|
+
argument :sound do
|
106
|
+
required
|
107
|
+
attr
|
108
|
+
end
|
109
|
+
|
110
|
+
def run
|
111
|
+
with_session do |session|
|
112
|
+
room = selected_room(session)
|
113
|
+
room.account.play!(room.name, sound)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
101
118
|
mode :say do
|
102
119
|
description "Say something in a campfire chat room"
|
103
120
|
mixin :address
|
data/lib/firetower/account.rb
CHANGED
@@ -45,6 +45,16 @@ module Firetower
|
|
45
45
|
}
|
46
46
|
})
|
47
47
|
end
|
48
|
+
|
49
|
+
def play!(room_name, text)
|
50
|
+
room_id = rooms[room_name].id
|
51
|
+
session.post(subdomain, "/room/#{room_id}/speak.json", {
|
52
|
+
'message' => {
|
53
|
+
'body' => text,
|
54
|
+
'type' => 'SoundMessage'
|
55
|
+
}
|
56
|
+
})
|
57
|
+
end
|
48
58
|
|
49
59
|
def join!(room_name)
|
50
60
|
room = rooms[room_name]
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firetower
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Avdi Grimm
|