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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b18f389f391cffd238d4cd5c587389ea50f09d77
4
- data.tar.gz: fa7574c76862098f2f5c70a6d0721621659be742
3
+ metadata.gz: ebc3b003d92b92953f735bea71fd3fe219d36bc8
4
+ data.tar.gz: a2fb89bfaceeb4c19f4b70e3af6c214b1d831aab
5
5
  SHA512:
6
- metadata.gz: 2e4a8f4f79c1b86202eb104313c971ced89b6c42831cc24f5e9b1df8354f1d393b84b9de15c295f4eabb9a96800d2b058e9887489da1728ab12496a5688437dc
7
- data.tar.gz: c74647da4602738cc87b7d3874b5f9223e095fb2a18488be2053da4379f483154e7b7facd05856737545fca794279489a6b30bc74e5e982656f2b613284c7fd1
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
+ - 退回要我們再修改
@@ -8,4 +8,5 @@ require "lita/handlers/bingo/load_bingo"
8
8
 
9
9
  require "lita/handlers/bingo/engineer"
10
10
  require "lita/handlers/bingo/overtime"
11
- require "lita/handlers/bingo/designer"
11
+ require "lita/handlers/bingo/designer"
12
+ require "lita/handlers/bingo/oops"
@@ -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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-bingo"
3
- spec.version = "0.2.3"
3
+ spec.version = "0.2.4"
4
4
  spec.authors = ["Sammy Lin"]
5
5
  spec.email = ["sammylintw@gmail.com"]
6
6
  spec.description = %q{A Lita handler that random formats text}
@@ -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"
@@ -13,4 +13,8 @@ zh-TW:
13
13
  designer:
14
14
  help:
15
15
  designer_key: "SAY 設計師 or designer"
16
- designer_value: "產生有關「設計人激怒器」的有趣的一句話"
16
+ designer_value: "產生有關「設計人激怒器」的有趣的一句話"
17
+ oops:
18
+ help:
19
+ oops_key: "SAY 理由 or 出包 or oops"
20
+ oops_value: "產生有關「專案出包理由產生器」的有趣的一句話"
@@ -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.3
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: