lita-butt 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/README.md +1 -0
- data/circle.yml +10 -0
- data/lib/lita/handlers/butt.rb +9 -2
- data/lita-butt.gemspec +1 -1
- data/spec/lita/handlers/butt_spec.rb +12 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 567f3ea8c7f992c3c9b1cf53cc14a4904c6dbd9c
|
4
|
+
data.tar.gz: a62ece66162d1723eb5c9020e6655ea87065e551
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc5ae23ae64e98c379f06df097b8be0e2e4660643af0632562b7ffbb7c7a3a7ab0dec65aeb7fb73bd99c4fc8d6901d40455ec2d50a06bfc45ec984784c3a9df6
|
7
|
+
data.tar.gz: 05f65f2b1d3c37d893d1badbf1edd58cbdd959b0eddb0e3a4078cf0910ebe4c4cde93b6d36e50cd9d6514cbec125b466cd02e9198868b37db135c54a162303b4
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
[![Build Status](https://travis-ci.org/nickpegg/lita-butt.svg?branch=master)](https://travis-ci.org/nickpegg/lita-butt)
|
2
|
+
[![CircleCI](https://circleci.com/gh/nickpegg/lita-butt.svg?style=svg)](https://circleci.com/gh/nickpegg/lita-butt)
|
2
3
|
[![Coverage Status](https://coveralls.io/repos/github/nickpegg/lita-butt/badge.svg?branch=master)](https://coveralls.io/github/nickpegg/lita-butt?branch=master)
|
3
4
|
|
4
5
|
# lita-butt
|
data/circle.yml
ADDED
data/lib/lita/handlers/butt.rb
CHANGED
@@ -3,13 +3,20 @@ module Lita
|
|
3
3
|
# s/chatbot/chatbutt/
|
4
4
|
class Butt < Handler
|
5
5
|
# insert handler code here
|
6
|
-
route(/^b(u*)tt/, :butt, help: { 'butt' => '(_)_)' })
|
6
|
+
route(/^b(u*)tt(s?)/, :butt, help: { 'butt' => '(_)_)' })
|
7
7
|
|
8
8
|
def butt(response)
|
9
9
|
groups = response.matches.first
|
10
10
|
width = groups.first.size
|
11
11
|
|
12
|
-
|
12
|
+
bottom = '_' * width
|
13
|
+
butt = "(#{bottom})#{bottom})"
|
14
|
+
|
15
|
+
if groups.last == 's'
|
16
|
+
response.reply [butt, butt].join ' '
|
17
|
+
else
|
18
|
+
response.reply butt
|
19
|
+
end
|
13
20
|
end
|
14
21
|
|
15
22
|
Lita.register_handler(self)
|
data/lita-butt.gemspec
CHANGED
@@ -8,12 +8,12 @@ describe Lita::Handlers::Butt, lita_handler: true do
|
|
8
8
|
it { is_expected.to route('buuuuuutt').to(:butt) }
|
9
9
|
|
10
10
|
describe '#butt' do
|
11
|
-
it '
|
11
|
+
it 'replies with a butt' do
|
12
12
|
send_message 'butt'
|
13
13
|
expect(replies.last).to eq '(_)_)'
|
14
14
|
end
|
15
15
|
|
16
|
-
it '
|
16
|
+
it 'replies with a big ol butt' do
|
17
17
|
send_message 'buuuuuuuuuutt'
|
18
18
|
expect(replies.last).to eq '(__________)__________)'
|
19
19
|
end
|
@@ -22,5 +22,15 @@ describe Lita::Handlers::Butt, lita_handler: true do
|
|
22
22
|
send_message 'btt'
|
23
23
|
expect(replies.last).to eq '())'
|
24
24
|
end
|
25
|
+
|
26
|
+
it 'replies with multiple butts' do
|
27
|
+
send_message 'butts'
|
28
|
+
expect(replies.last).to eq '(_)_) (_)_)'
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'replies with multiple big butts' do
|
32
|
+
send_message 'buuuuutts'
|
33
|
+
expect(replies.last).to eq '(_____)_____) (_____)_____)'
|
34
|
+
end
|
25
35
|
end
|
26
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-butt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Pegg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
@@ -149,6 +149,7 @@ files:
|
|
149
149
|
- Gemfile
|
150
150
|
- README.md
|
151
151
|
- Rakefile
|
152
|
+
- circle.yml
|
152
153
|
- lib/lita-butt.rb
|
153
154
|
- lib/lita/handlers/butt.rb
|
154
155
|
- lita-butt.gemspec
|
@@ -175,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
176
|
version: '0'
|
176
177
|
requirements: []
|
177
178
|
rubyforge_project:
|
178
|
-
rubygems_version: 2.
|
179
|
+
rubygems_version: 2.5.1
|
179
180
|
signing_key:
|
180
181
|
specification_version: 4
|
181
182
|
summary: Lita Handler to print ASCII butts. Inspired by some silliness in Yelp's chatbot
|