firetower 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ == 0.0.9 / 2011-07-06
2
+
3
+ * 1 minor enhancement
4
+ * support for playing sounds (zmoazeni, #5)
5
+
1
6
  == 0.0.8 / 2011-07-06
2
7
 
3
8
  * 2 bug fixes
@@ -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
@@ -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]
@@ -1 +1 @@
1
- 0.0.8
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: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 8
10
- version: 0.0.8
9
+ - 9
10
+ version: 0.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Avdi Grimm