lita-isolita 0.1.3 → 0.1.4

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: 2ba9bf3be2f11190df40eb02719f4335f314aa81
4
- data.tar.gz: 1f9b99ad773969d56d44c4cae6ea8b7fa196f0fd
3
+ metadata.gz: 04ad787d04e590f8a0ba561cfaadcfc3ae35753c
4
+ data.tar.gz: cd26753e5364bdb7db276709fd92aa1dbbb5169f
5
5
  SHA512:
6
- metadata.gz: 782b55675cdf36692b506a546d816bd38ea9ca2e4d5dc7749070583a03824184c36d4217dff2cefc8c02d1d5e1df6c1f16f3ff48e39c07db278af35b67229ca6
7
- data.tar.gz: d4d688a08caf7c6c7b233216f869bc02f2cbc82f9beb6d2cb6a67a5770460fc49c5c1b9c5b1d0d23794535420f7346c9e30cfe9614a25b610e596cac71154f21
6
+ metadata.gz: 768032d53130553e15133bac0a1d69c70c895938f45ef3169baabf31021ec653ccc34e9463745e0cd0a8b132f1322dbbddd374cb8fd12c1d5c957bb0e2990d31
7
+ data.tar.gz: b182080052c2a7767107604cc6cd818dbdcdb521e262c2037bd905c07354d47eba31748348cf735175e3de5846da2c3446e023821e415824d026724080b53f8f
@@ -1,19 +1,33 @@
1
1
  module Lita
2
2
  module Handlers
3
3
  class Isolita < Handler
4
- route(/^(fuck).*/i, :mind_your_manners)
4
+ route(/^(fuck).*/i, :mind_your_manners, help: {
5
+ "Fuck you" => "Advises to clean up your language."
6
+ })
5
7
 
6
8
  def mind_your_manners(response)
7
9
  reply_to_name = response.user.metadata['mention_name'].nil? ?
8
10
  "#{response.user.name}" :
9
11
  "#{response.user.metadata['mention_name']}"
10
- replies = [
12
+ mind_manners = [
11
13
  "Mind your manners #{reply_to_name}..",
12
14
  "You better wash out that dirty mouth #{reply_to_name}!",
13
15
  "That is just unprofessional, #{reply_to_name}.",
14
- "Your mother wouldn't like to hear you say that, #{reply_to_name}."
16
+ "Your mother wouldn't like to hear you say that, #{reply_to_name}.",
17
+ "Quite the potty mouth on you, #{reply_to_name}..",
18
+ "Good manners are made up of petty sacrifices, #{reply_to_name}.",
19
+ "Does saying that make you more mature, #{reply_to_name}?",
20
+ "Rude."
15
21
  ]
16
- response.reply replies.sample
22
+ response.reply mind_manners.sample
23
+ end
24
+
25
+ route(/^(show response json).*/i, :print_reply, help: {
26
+ "show response json" => "Prints out bot response in json"
27
+ })
28
+
29
+ def print_reply(response)
30
+ response.reply_privately response
17
31
  end
18
32
 
19
33
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-isolita"
3
- spec.version = "0.1.3"
3
+ spec.version = "0.1.4"
4
4
  spec.authors = ["Chris Mikelson"]
5
5
  spec.email = ["chrismikelson@gmail.com"]
6
6
  spec.description = "Make Lita do more work"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-isolita
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Mikelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita