lita-enhance 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/enhance.rb +1 -11
- data/lib/lita-enhance.rb +5 -0
- data/lita-enhance.gemspec +1 -1
- data/spec/lita/handlers/enhance_spec.rb +11 -0
- data/templates/enhance.erb +1 -0
- data/templates/enhance.hipchat.erb +1 -0
- data/templates/enhance.slack.erb +1 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bab760c36e5ebb11ec2c0773f6de3c1096fc1582
|
4
|
+
data.tar.gz: 4139bbccc64e710503d0aec21d2b8b13ba0f87bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cdec5118bd90e90fa50427da94bd33e243bd76db7cbb067ec755928b094cce0bc5fa745129b2b92139d356935e6336c4fde8644f0971205d2397d3afb727b67
|
7
|
+
data.tar.gz: ae27a421db43c6cd1134297942257e154670c508ce79a477ba23b305d366e80c6102b652ec3a794ad0e25bbba16a620d206fdf042315112a4e36691e0d802f25
|
@@ -114,7 +114,7 @@ module Lita
|
|
114
114
|
enhanced_message = session.enhance!(blurry_string, level)
|
115
115
|
|
116
116
|
if enhanced_message != blurry_string
|
117
|
-
response.reply(
|
117
|
+
response.reply(render_template('enhance', message: enhanced_message))
|
118
118
|
else
|
119
119
|
response.reply(no_change(t 'enhance.nothing_to_enhance'))
|
120
120
|
end
|
@@ -191,16 +191,6 @@ module Lita
|
|
191
191
|
message
|
192
192
|
end
|
193
193
|
end
|
194
|
-
|
195
|
-
# Attempts to render the message using a monospaced font via adapter specific messaging
|
196
|
-
def mono(message)
|
197
|
-
case adapter
|
198
|
-
when :hipchat
|
199
|
-
"/quote #{message}"
|
200
|
-
else
|
201
|
-
message
|
202
|
-
end
|
203
|
-
end
|
204
194
|
end
|
205
195
|
|
206
196
|
|
data/lib/lita-enhance.rb
CHANGED
data/lita-enhance.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "lita-enhance"
|
3
|
-
spec.version = "0.9.
|
3
|
+
spec.version = "0.9.2"
|
4
4
|
spec.authors = ["Doug Barth"]
|
5
5
|
spec.email = ["doug@pagerduty.com"]
|
6
6
|
spec.description = %q{A Lita handler that enhances text by replacing opaque machine identifiers with that machine's hostname}
|
@@ -101,6 +101,17 @@ describe Lita::Handlers::Enhance, lita_handler: true do
|
|
101
101
|
expect(replies).to include('I could not find anything to enhance')
|
102
102
|
end
|
103
103
|
|
104
|
+
describe 'under Slack' do
|
105
|
+
before do
|
106
|
+
robot.config.robot.adapter = :slack
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'should format the response with a code block' do
|
110
|
+
send_command('enhance 54.214.188.37')
|
111
|
+
expect(replies).to include('```*box01*```')
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
104
115
|
describe 'under HipChat' do
|
105
116
|
before do
|
106
117
|
robot.config.robot.adapter = :hipchat
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= @message %>
|
@@ -0,0 +1 @@
|
|
1
|
+
/quote <%= @message %>
|
@@ -0,0 +1 @@
|
|
1
|
+
```<%= @message %>```
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-enhance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Barth
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
@@ -123,6 +123,9 @@ files:
|
|
123
123
|
- spec/lita/handlers/enhance/session_spec.rb
|
124
124
|
- spec/lita/handlers/enhance_spec.rb
|
125
125
|
- spec/spec_helper.rb
|
126
|
+
- templates/enhance.erb
|
127
|
+
- templates/enhance.hipchat.erb
|
128
|
+
- templates/enhance.slack.erb
|
126
129
|
homepage: https://github.com/PagerDuty/lita-enhance
|
127
130
|
licenses:
|
128
131
|
- MIT
|