lita-bingo 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/bingo.yml +54 -1
- data/lib/lita-bingo.rb +2 -1
- data/lib/lita/handlers/bingo/oops.rb +20 -0
- data/lita-bingo.gemspec +1 -1
- data/locales/en.yml +5 -1
- data/locales/zh-TW.yml +5 -1
- data/spec/lita/handlers/bingo/oops_spec.rb +12 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebc3b003d92b92953f735bea71fd3fe219d36bc8
|
4
|
+
data.tar.gz: a2fb89bfaceeb4c19f4b70e3af6c214b1d831aab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97f776b1d9ae6b257a477d97ac5fa49a95066c064561f09884e8b403b40ea56854bfa6f8a57dc241a1a522e119c5ecae06c91b93f4ca32fd7152c0350f0e96e6
|
7
|
+
data.tar.gz: 20fee194ff85f00c70c47c07dabcc9f332c573c82c4c522f3db66247d0107cb1edd0f0b6846b34a914cf50cf6ca51b828729ba38dd48210389426ff16c75a360
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Coverage Status](https://img.shields.io/coveralls/SammyLin/lita-bingo.svg)](https://coveralls.io/r/SammyLin/lita-bingo?branch=master)
|
4
4
|
[![Travis CI](https://travis-ci.org/SammyLin/lita-bingo.svg)](https://travis-ci.org/SammyLin/lita-bingo)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/lita-bingo.svg)](http://badge.fury.io/rb/lita-bingo)
|
5
6
|
|
6
7
|
**lita-bingo** is a handler for [Lita](https://github.com/jimmycuadra/lita)
|
7
8
|
that outputs random funny formats text (using the
|
data/bingo.yml
CHANGED
@@ -91,4 +91,57 @@ bingo:
|
|
91
91
|
- 我只是不會用軟體
|
92
92
|
- 三個月前第一版好像比較好
|
93
93
|
- 圖自己上網找
|
94
|
-
- 原設計說這就是原始檔
|
94
|
+
- 原設計說這就是原始檔
|
95
|
+
oops:
|
96
|
+
reply1:
|
97
|
+
- 客戶那邊的
|
98
|
+
- 對方的
|
99
|
+
- 隔壁部門的
|
100
|
+
- 樓下公司的
|
101
|
+
- 負責這個需求的
|
102
|
+
- 提出這個方案的
|
103
|
+
- 大門進來第三個右轉後走到底的
|
104
|
+
- 我們的
|
105
|
+
- 還不知道是哪邊的
|
106
|
+
- 合作的
|
107
|
+
- 支援的
|
108
|
+
- 配合的
|
109
|
+
reply2:
|
110
|
+
- PM
|
111
|
+
- SA
|
112
|
+
- RD
|
113
|
+
- OP
|
114
|
+
- 業務
|
115
|
+
- 聯絡窗口
|
116
|
+
- 設計師
|
117
|
+
- 外包
|
118
|
+
- 駐點工程師
|
119
|
+
- 警衛先生
|
120
|
+
- 人資
|
121
|
+
- 行政
|
122
|
+
- 工程師
|
123
|
+
- PQA
|
124
|
+
- Call Center
|
125
|
+
- 總機
|
126
|
+
- 掃地阿姨
|
127
|
+
reply3:
|
128
|
+
- 突然請病假
|
129
|
+
- 電腦壞掉了
|
130
|
+
- 臨時改了需求
|
131
|
+
- 一直沒說清楚
|
132
|
+
- 原來想的跟我們不一樣
|
133
|
+
- 根本就狀況外
|
134
|
+
- 一問三不知
|
135
|
+
- 滯留在機場回不來
|
136
|
+
- 還在路上塞車
|
137
|
+
- 吃壞肚子
|
138
|
+
- 昨晚喝太多宿醉
|
139
|
+
- 沒搭上高鐵
|
140
|
+
- 說版本跟我們不一樣
|
141
|
+
- 認為提案要全部重寫
|
142
|
+
- 一整個擺爛
|
143
|
+
- 都沒跟我講
|
144
|
+
- 執意要我們上這個版本
|
145
|
+
- 沒做過測試
|
146
|
+
- 給錯合約了
|
147
|
+
- 退回要我們再修改
|
data/lib/lita-bingo.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
module Lita
|
2
|
+
module Lita::Handlers::Bingo
|
3
|
+
class Oops < Lita::Handler
|
4
|
+
include LoadBingo
|
5
|
+
|
6
|
+
route(/出包|理由|oops/i, :oops, command: true, help: {
|
7
|
+
t("help.oops_key") => t("help.oops_value")
|
8
|
+
})
|
9
|
+
|
10
|
+
def oops(response)
|
11
|
+
reply1 = bingo(:oops, :reply1)
|
12
|
+
reply2 = bingo(:oops, :reply2)
|
13
|
+
reply3 = bingo(:oops, :reply3)
|
14
|
+
|
15
|
+
response.reply "#{reply1}#{reply2}#{reply3}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
Lita.register_handler(Oops)
|
19
|
+
end
|
20
|
+
end
|
data/lita-bingo.gemspec
CHANGED
data/locales/en.yml
CHANGED
@@ -12,4 +12,8 @@ en:
|
|
12
12
|
designer:
|
13
13
|
help:
|
14
14
|
designer_key: "SAY 設計師 or designer"
|
15
|
-
designer_value: "Random Format TEXT using bingo"
|
15
|
+
designer_value: "Random Format TEXT using bingo"
|
16
|
+
oops:
|
17
|
+
help:
|
18
|
+
oops_key: "SAY 理由 or 出包 or oops"
|
19
|
+
oops_value: "Radom Format TEXT using bingo"
|
data/locales/zh-TW.yml
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Lita::Handlers::Bingo::Oops, lita_handler: true do
|
4
|
+
it { is_expected.to route_command("oops!").to(:oops) }
|
5
|
+
it { is_expected.to route_command("找理由").to(:oops) }
|
6
|
+
it { is_expected.to route_command("出包了").to(:oops) }
|
7
|
+
it "should return a random string" do
|
8
|
+
send_command("oops")
|
9
|
+
expect(replies.last).to be_an_instance_of(String)
|
10
|
+
expect(replies.last.length).to be >= 3
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-bingo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sammy Lin
|
@@ -126,12 +126,14 @@ files:
|
|
126
126
|
- lib/lita/handlers/bingo/designer.rb
|
127
127
|
- lib/lita/handlers/bingo/engineer.rb
|
128
128
|
- lib/lita/handlers/bingo/load_bingo.rb
|
129
|
+
- lib/lita/handlers/bingo/oops.rb
|
129
130
|
- lib/lita/handlers/bingo/overtime.rb
|
130
131
|
- lita-bingo.gemspec
|
131
132
|
- locales/en.yml
|
132
133
|
- locales/zh-TW.yml
|
133
134
|
- spec/lita/handlers/bingo/designer_spec.rb
|
134
135
|
- spec/lita/handlers/bingo/engineer_spec.rb
|
136
|
+
- spec/lita/handlers/bingo/oops_spec.rb
|
135
137
|
- spec/lita/handlers/bingo/overtime_spec.rb
|
136
138
|
- spec/spec_helper.rb
|
137
139
|
homepage: https://github.com/SammyLin/lita-bingo
|
@@ -162,6 +164,7 @@ summary: Lita Bindo handler
|
|
162
164
|
test_files:
|
163
165
|
- spec/lita/handlers/bingo/designer_spec.rb
|
164
166
|
- spec/lita/handlers/bingo/engineer_spec.rb
|
167
|
+
- spec/lita/handlers/bingo/oops_spec.rb
|
165
168
|
- spec/lita/handlers/bingo/overtime_spec.rb
|
166
169
|
- spec/spec_helper.rb
|
167
170
|
has_rdoc:
|