lita-poll 1.0.0 → 1.0.1

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: a511e94ce5c62bb96ceeb489ca3fcafe84c327d6
4
- data.tar.gz: 304e9b757437ca92237a4589bb2090a146687508
3
+ metadata.gz: e95ca628bcd95e09d55a7b3f7ad6fb50010d65fd
4
+ data.tar.gz: e36cd4ade813e7daa1e705840313f98ca0762f4e
5
5
  SHA512:
6
- metadata.gz: 05caa1b67b770a5b0aa074d7be02a98f9c7dab2db87ab740c082577c0236e31860ddd642a1c601af0d2672ea8c86a472db65df51745f783222e0c9fa41042d9b
7
- data.tar.gz: d14b14a7d66890fb64bf00d3d7d2f807ef958d419aea69cca6937e8b9afc7121720f2279c1fb117667a70ef1411bde9ed27d0b8ac74de73f78f02df4d9aabada
6
+ metadata.gz: 4b21154eafd2c2cb9bce025467109b035921a732c8634457481266a1bbd46c0494a86044bd3473d27596532ccfacc8844eec870a4811bad78031988cf9d3e11e
7
+ data.tar.gz: 37329aea6401158078f04dbc971b8b9517df28945e2f454bdd0cc15f9c07a1e5cc4d78575a199ff17db9bb06410e34b143368bad09ce8a97e400c89341826085
data/README.md CHANGED
@@ -9,6 +9,27 @@ Add lita-poll to your Lita instance's Gemfile:
9
9
  ``` ruby
10
10
  gem "lita-poll"
11
11
  ```
12
+
13
+ ## Usage
14
+
15
+ Poll commands are prefixed with 'poll'.
16
+
17
+ Created topics are given a 3-hex id and stored in redis.
18
+
19
+ The following commands are available to all users:
20
+
21
+ * poll list - List existing polls
22
+ * poll make [topic] - Create a new poll on [topic]
23
+ * poll option [pollId] [option] - Add [option] to poll with [pollId]
24
+ * poll info [pollId] - Shows information on poll with [pollId]
25
+ * poll vote [pollId] [optNum] - Vote for [optNum] on poll with [pollId]
26
+ * poll tally [pollId] - Tally poll with [pollId]
27
+
28
+ The following commands are only available to members of the poll_admins group:
29
+
30
+ * poll clear - Clear existing polls
31
+ * poll complete [pollId] - End poll with [pollId]
32
+
12
33
  ## License
13
34
 
14
35
  [MIT](http://opensource.org/licenses/MIT)
@@ -31,7 +31,7 @@ class Poll
31
31
  @options.push(opt)
32
32
  end
33
33
 
34
- def valid_vote(optNum)
34
+ def valid_vote?(optNum)
35
35
  optNum-1 < @options.length
36
36
  end
37
37
 
@@ -30,7 +30,7 @@ module Lita
30
30
 
31
31
  route /^poll make (.+)$/, :make, help: {
32
32
  t("help.make.usage") => t("help.make.description")
33
- }, restrict_to: "poll_admins"
33
+ }
34
34
  def make(response)
35
35
  made = Poll.new(response.matches.pop[0])
36
36
  redis.set(made.id, made.to_json)
data/lita-poll.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-poll"
3
- spec.version = "1.0.0"
3
+ spec.version = "1.0.1"
4
4
  spec.authors = ["Michael Chua"]
5
5
  spec.email = ["chua.mbt@gmail.com"]
6
6
  spec.summary = %q{Plugin that enables polling functionality for a lita bot.}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-poll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chua
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-05 00:00:00.000000000 Z
11
+ date: 2014-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita