barker 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/barker/guideline/llblauquiz/questions.yaml +300 -0
- data/lib/barker/guideline/llblauquiz.rb +28 -0
- data/lib/barker/guideline.rb +1 -0
- data/lib/barker/version.rb +1 -1
- data/test/unit/api/base_test.rb +27 -1
- data/test/unit/game_show_test.rb +4 -0
- data/test/unit/guideline/llblauquiz_test.rb +35 -0
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 41e016ccd200563a2993c58f566d15b291ccf1c6
|
|
4
|
+
data.tar.gz: e1d973b5aae19ce6215a0b2a74f59e73d1966bc7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 941fc697729b0f2eb9475b80fe29a22ec4e1099598fa743b8909f304bd9aabba829caff48f86f98a654ace3031ba03c1f1632b816848cf3d3f4e835e55d74159
|
|
7
|
+
data.tar.gz: 34e062f8e530bb2e88a585572b9b16b0d97de89cbe44c8392961c5d6fb779db707f36370a65668db7c4d777302d0dcc39aa84bd20384dca878ce54c143459c4c
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
barker (0.2.
|
|
4
|
+
barker (0.2.4)
|
|
5
5
|
activemodel
|
|
6
6
|
activesupport
|
|
7
7
|
thread_safe
|
|
@@ -33,7 +33,7 @@ GEM
|
|
|
33
33
|
simplecov-html (0.7.1)
|
|
34
34
|
simplecov-rcov (0.2.3)
|
|
35
35
|
simplecov (>= 0.4.1)
|
|
36
|
-
thread_safe (0.1.
|
|
36
|
+
thread_safe (0.1.2)
|
|
37
37
|
atomic
|
|
38
38
|
|
|
39
39
|
PLATFORMS
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
1:
|
|
2
|
+
label:
|
|
3
|
+
de: Wann ist der SuperCode nach Kauf einlösbar?
|
|
4
|
+
answers:
|
|
5
|
+
1:
|
|
6
|
+
correct: false
|
|
7
|
+
label:
|
|
8
|
+
de: 10 Minuten
|
|
9
|
+
2:
|
|
10
|
+
correct: true
|
|
11
|
+
label:
|
|
12
|
+
de: 30 Minuten
|
|
13
|
+
3:
|
|
14
|
+
correct: false
|
|
15
|
+
label:
|
|
16
|
+
de: 5 Minuten
|
|
17
|
+
4:
|
|
18
|
+
correct: false
|
|
19
|
+
label:
|
|
20
|
+
de: sofort
|
|
21
|
+
2:
|
|
22
|
+
label:
|
|
23
|
+
de: Wo kann man seit dem 1. Mai 2013 seinen SuperCode einlösen?
|
|
24
|
+
answers:
|
|
25
|
+
1:
|
|
26
|
+
correct: false
|
|
27
|
+
label:
|
|
28
|
+
de: In der e-va Lounge
|
|
29
|
+
2:
|
|
30
|
+
correct: false
|
|
31
|
+
label:
|
|
32
|
+
de: Auf der e-va Website
|
|
33
|
+
3:
|
|
34
|
+
correct: true
|
|
35
|
+
label:
|
|
36
|
+
de: Auf Facebook
|
|
37
|
+
4:
|
|
38
|
+
correct: false
|
|
39
|
+
label:
|
|
40
|
+
de: Direkt bei der Verkaufsstelle
|
|
41
|
+
3:
|
|
42
|
+
label:
|
|
43
|
+
de: Welche Geschenkkarte gibt es im e-va Sortiment?
|
|
44
|
+
answers:
|
|
45
|
+
1:
|
|
46
|
+
correct: true
|
|
47
|
+
label:
|
|
48
|
+
de: OBI-Geschenkkarte
|
|
49
|
+
2:
|
|
50
|
+
correct: false
|
|
51
|
+
label:
|
|
52
|
+
de: PayPal-Geschenkkarte
|
|
53
|
+
3:
|
|
54
|
+
correct: false
|
|
55
|
+
label:
|
|
56
|
+
de: Taxi-Geschenkkarte
|
|
57
|
+
4:
|
|
58
|
+
correct: false
|
|
59
|
+
label:
|
|
60
|
+
de: H&M-Geschenkkarte
|
|
61
|
+
4:
|
|
62
|
+
label:
|
|
63
|
+
de: Was kostet eine FYVE Sprach-Flatrate?
|
|
64
|
+
answers:
|
|
65
|
+
1:
|
|
66
|
+
correct: false
|
|
67
|
+
label:
|
|
68
|
+
de: 50 Euro
|
|
69
|
+
2:
|
|
70
|
+
correct: false
|
|
71
|
+
label:
|
|
72
|
+
de: 35 Euro
|
|
73
|
+
3:
|
|
74
|
+
correct: false
|
|
75
|
+
label:
|
|
76
|
+
de: 44 Euro
|
|
77
|
+
4:
|
|
78
|
+
correct: true
|
|
79
|
+
label:
|
|
80
|
+
de: 20 Euro
|
|
81
|
+
5:
|
|
82
|
+
label:
|
|
83
|
+
de: Welcher Berufsgruppe gehört das Testimonial von Fyve an?
|
|
84
|
+
answers:
|
|
85
|
+
1:
|
|
86
|
+
correct: true
|
|
87
|
+
label:
|
|
88
|
+
de: Krankenschwester
|
|
89
|
+
2:
|
|
90
|
+
correct: false
|
|
91
|
+
label:
|
|
92
|
+
de: Müllmann
|
|
93
|
+
3:
|
|
94
|
+
correct: false
|
|
95
|
+
label:
|
|
96
|
+
de: Lehrer
|
|
97
|
+
4:
|
|
98
|
+
correct: false
|
|
99
|
+
label:
|
|
100
|
+
de: Versicherungsvertreter
|
|
101
|
+
6:
|
|
102
|
+
label:
|
|
103
|
+
de: Welche vier Schwestern beantworten Deine Fragen zu FYVE?
|
|
104
|
+
answers:
|
|
105
|
+
1:
|
|
106
|
+
correct: false
|
|
107
|
+
label:
|
|
108
|
+
de: "Eva, Julia, Anna und Steffi"
|
|
109
|
+
2:
|
|
110
|
+
correct: true
|
|
111
|
+
label:
|
|
112
|
+
de: "Julia, Marie, Olga und Lucy"
|
|
113
|
+
3:
|
|
114
|
+
correct: false
|
|
115
|
+
label:
|
|
116
|
+
de: "Kate, Olga, Tanja und Maria"
|
|
117
|
+
4:
|
|
118
|
+
correct: false
|
|
119
|
+
label:
|
|
120
|
+
de: "Julia, Kim, Sophie und Eva"
|
|
121
|
+
7:
|
|
122
|
+
label:
|
|
123
|
+
de: Welches zusätzlich wählbares Tarif-Paket gibt es nicht bei FYVE?
|
|
124
|
+
answers:
|
|
125
|
+
1:
|
|
126
|
+
correct: false
|
|
127
|
+
label:
|
|
128
|
+
de: Minuten-Paket
|
|
129
|
+
2:
|
|
130
|
+
correct: false
|
|
131
|
+
label:
|
|
132
|
+
de: Surf-Paket
|
|
133
|
+
3:
|
|
134
|
+
correct: false
|
|
135
|
+
label:
|
|
136
|
+
de: SMS-Paket
|
|
137
|
+
4:
|
|
138
|
+
correct: true
|
|
139
|
+
label:
|
|
140
|
+
de: App-Paket
|
|
141
|
+
8:
|
|
142
|
+
label:
|
|
143
|
+
de: Wieviel muss man pro Minute und pro SMS in alle deutschen Netze bei FYVE zahlen?
|
|
144
|
+
answers:
|
|
145
|
+
1:
|
|
146
|
+
correct: false
|
|
147
|
+
label:
|
|
148
|
+
de: 20 Cent
|
|
149
|
+
2:
|
|
150
|
+
correct: false
|
|
151
|
+
label:
|
|
152
|
+
de: 50 Cent
|
|
153
|
+
3:
|
|
154
|
+
correct: true
|
|
155
|
+
label:
|
|
156
|
+
de: 9 Cent
|
|
157
|
+
4:
|
|
158
|
+
correct: false
|
|
159
|
+
label:
|
|
160
|
+
de: 15 Cent
|
|
161
|
+
9:
|
|
162
|
+
label:
|
|
163
|
+
de: Welches Netz nutzt man mit FYVE?
|
|
164
|
+
answers:
|
|
165
|
+
1:
|
|
166
|
+
correct: false
|
|
167
|
+
label:
|
|
168
|
+
de: E-Plus Netz
|
|
169
|
+
2:
|
|
170
|
+
correct: true
|
|
171
|
+
label:
|
|
172
|
+
de: Vodafone Netz
|
|
173
|
+
3:
|
|
174
|
+
correct: false
|
|
175
|
+
label:
|
|
176
|
+
de: O2 Netz
|
|
177
|
+
4:
|
|
178
|
+
correct: false
|
|
179
|
+
label:
|
|
180
|
+
de: Telekom Netz
|
|
181
|
+
10:
|
|
182
|
+
label:
|
|
183
|
+
de: Wofür ist die FYVE Micro-SIM-Karte?
|
|
184
|
+
answers:
|
|
185
|
+
1:
|
|
186
|
+
correct: true
|
|
187
|
+
label:
|
|
188
|
+
de: Für Smartphones und Tablets
|
|
189
|
+
2:
|
|
190
|
+
correct: false
|
|
191
|
+
label:
|
|
192
|
+
de: Für Digitalkameras
|
|
193
|
+
3:
|
|
194
|
+
correct: false
|
|
195
|
+
label:
|
|
196
|
+
de: Für Notebook und Surfstick
|
|
197
|
+
4:
|
|
198
|
+
correct: false
|
|
199
|
+
label:
|
|
200
|
+
de: Für MP3-Player
|
|
201
|
+
11:
|
|
202
|
+
label:
|
|
203
|
+
de: Für 9 Cent kann man ebenfalls in wie viele ausländische Festnetze telefonieren?
|
|
204
|
+
answers:
|
|
205
|
+
1:
|
|
206
|
+
correct: false
|
|
207
|
+
label:
|
|
208
|
+
de: 10
|
|
209
|
+
2:
|
|
210
|
+
correct: true
|
|
211
|
+
label:
|
|
212
|
+
de: 33
|
|
213
|
+
3:
|
|
214
|
+
correct: false
|
|
215
|
+
label:
|
|
216
|
+
de: 20
|
|
217
|
+
4:
|
|
218
|
+
correct: false
|
|
219
|
+
label:
|
|
220
|
+
de: 15
|
|
221
|
+
12:
|
|
222
|
+
label:
|
|
223
|
+
de: Aus wie vielen Tarif-Paketen kann man bei FYVE wählen?
|
|
224
|
+
answers:
|
|
225
|
+
1:
|
|
226
|
+
correct: false
|
|
227
|
+
label:
|
|
228
|
+
de: Aus über 3
|
|
229
|
+
2:
|
|
230
|
+
correct: false
|
|
231
|
+
label:
|
|
232
|
+
de: Aus über 5
|
|
233
|
+
3:
|
|
234
|
+
correct: false
|
|
235
|
+
label:
|
|
236
|
+
de: Aus über 7
|
|
237
|
+
4:
|
|
238
|
+
correct: true
|
|
239
|
+
label:
|
|
240
|
+
de: Aus über 10
|
|
241
|
+
13:
|
|
242
|
+
label:
|
|
243
|
+
de: FYVE ist die Lösung aus…?
|
|
244
|
+
answers:
|
|
245
|
+
1:
|
|
246
|
+
correct: false
|
|
247
|
+
label:
|
|
248
|
+
de: dem Tarifdschungel
|
|
249
|
+
2:
|
|
250
|
+
correct: false
|
|
251
|
+
label:
|
|
252
|
+
de: der Tarifhölle
|
|
253
|
+
3:
|
|
254
|
+
correct: true
|
|
255
|
+
label:
|
|
256
|
+
de: dem Tarifwahnsinn
|
|
257
|
+
4:
|
|
258
|
+
correct: false
|
|
259
|
+
label:
|
|
260
|
+
de: dem Tarifchaos
|
|
261
|
+
14:
|
|
262
|
+
label:
|
|
263
|
+
de: Welche Auflade-Wertstufen erhält man an e-va Stationen für FYVE?
|
|
264
|
+
answers:
|
|
265
|
+
1:
|
|
266
|
+
correct: true
|
|
267
|
+
label:
|
|
268
|
+
de: 15 und 25 Euro
|
|
269
|
+
2:
|
|
270
|
+
correct: false
|
|
271
|
+
label:
|
|
272
|
+
de: 15, 20 und 30 Euro
|
|
273
|
+
3:
|
|
274
|
+
correct: false
|
|
275
|
+
label:
|
|
276
|
+
de: 20 und 30 Euro
|
|
277
|
+
4:
|
|
278
|
+
correct: false
|
|
279
|
+
label:
|
|
280
|
+
de: 10, 20 und 30 Euro
|
|
281
|
+
15:
|
|
282
|
+
label:
|
|
283
|
+
de: Mit welchem Aufladeguthaben kann man die FYVE SIM-Karte aufladen?
|
|
284
|
+
answers:
|
|
285
|
+
1:
|
|
286
|
+
correct: true
|
|
287
|
+
label:
|
|
288
|
+
de: FYVE und Vodafone
|
|
289
|
+
2:
|
|
290
|
+
correct: false
|
|
291
|
+
label:
|
|
292
|
+
de: Telekom
|
|
293
|
+
3:
|
|
294
|
+
correct: false
|
|
295
|
+
label:
|
|
296
|
+
de: Lebara
|
|
297
|
+
4:
|
|
298
|
+
correct: false
|
|
299
|
+
label:
|
|
300
|
+
de: O2
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Barker
|
|
2
|
+
module Guideline
|
|
3
|
+
|
|
4
|
+
class Llblauquiz < Base
|
|
5
|
+
|
|
6
|
+
def quizzes
|
|
7
|
+
[Quiz.new(questions.sample(5))]
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def jokers
|
|
11
|
+
['fifty_fifty']
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def questions
|
|
15
|
+
Barker::Import::Yaml.process(path)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def round_time
|
|
19
|
+
35
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def path
|
|
23
|
+
File.expand_path "#{File.dirname(__FILE__)}/../../../lib/barker/guideline/llblauquiz/questions.yaml"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
end
|
data/lib/barker/guideline.rb
CHANGED
data/lib/barker/version.rb
CHANGED
data/test/unit/api/base_test.rb
CHANGED
|
@@ -119,7 +119,7 @@ module Barker
|
|
|
119
119
|
assert response.ok?
|
|
120
120
|
end
|
|
121
121
|
|
|
122
|
-
test "ask reset timer" do
|
|
122
|
+
test "llmcquiz ask reset timer" do
|
|
123
123
|
game_show_id = api.create(:guideline => :llmcquiz).game_show_id
|
|
124
124
|
candidate_id = 42
|
|
125
125
|
candidate_locale = 'de'
|
|
@@ -145,6 +145,32 @@ module Barker
|
|
|
145
145
|
assert_in_delta 35, response.time_left, 1
|
|
146
146
|
end
|
|
147
147
|
|
|
148
|
+
test "llblauquiz ask reset timer" do
|
|
149
|
+
game_show_id = api.create(:guideline => :llblauquiz).game_show_id
|
|
150
|
+
candidate_id = 42
|
|
151
|
+
candidate_locale = 'de'
|
|
152
|
+
|
|
153
|
+
api.join(game_show_id, candidate_id, candidate_locale)
|
|
154
|
+
api.start(game_show_id)
|
|
155
|
+
api.next_stage(game_show_id)
|
|
156
|
+
api.next_round(game_show_id)
|
|
157
|
+
|
|
158
|
+
response = api.ask(game_show_id, candidate_id)
|
|
159
|
+
assert_in_delta 35, response.time_left, 1
|
|
160
|
+
|
|
161
|
+
asked_at = Time.now + 5
|
|
162
|
+
|
|
163
|
+
Time.stubs(:now).returns(asked_at)
|
|
164
|
+
|
|
165
|
+
response = api.ask(game_show_id, candidate_id)
|
|
166
|
+
assert_in_delta 30, response.time_left, 1
|
|
167
|
+
|
|
168
|
+
Time.stubs(:now).returns(asked_at + 5)
|
|
169
|
+
|
|
170
|
+
response = api.ask(game_show_id, candidate_id, :reset_timer => true)
|
|
171
|
+
assert_in_delta 35, response.time_left, 1
|
|
172
|
+
end
|
|
173
|
+
|
|
148
174
|
test "answer" do
|
|
149
175
|
game_show_id = api.create(:guideline => :mock).game_show_id
|
|
150
176
|
candidate_id = 42
|
data/test/unit/game_show_test.rb
CHANGED
|
@@ -363,6 +363,10 @@ module Barker
|
|
|
363
363
|
assert_equal 35, Barker::GameShow.new(quizzes, candidates, :guideline => :llmcquiz).round_time
|
|
364
364
|
end
|
|
365
365
|
|
|
366
|
+
test "round_time llblauquiz" do
|
|
367
|
+
assert_equal 35, Barker::GameShow.new(quizzes, candidates, :guideline => :llblauquiz).round_time
|
|
368
|
+
end
|
|
369
|
+
|
|
366
370
|
private
|
|
367
371
|
|
|
368
372
|
let(:candidates) { FactoryGirl.build_list(:candidate, 2) }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
module Barker
|
|
4
|
+
module Guideline
|
|
5
|
+
class LlblauquizTest < Spec
|
|
6
|
+
|
|
7
|
+
test "one quiz with 5 random questions" do
|
|
8
|
+
assert_equal 1, guideline.quizzes.size
|
|
9
|
+
assert_equal 5, guideline.quizzes[0].questions.size
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
test "questions" do
|
|
13
|
+
assert_equal 15, guideline.questions.size
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
test "round_time" do
|
|
17
|
+
assert_equal 35, guideline.round_time
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
test "jokers" do
|
|
21
|
+
assert_equal ['fifty_fifty'], guideline.jokers
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
test "candidates" do
|
|
25
|
+
assert_equal [], guideline.candidates
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
let(:guideline) { Barker::Guideline::Llblauquiz.new }
|
|
31
|
+
let(:api) { Barker::Api::Base.new }
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: barker
|
|
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
|
- Jan Owiesniak
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-07-
|
|
11
|
+
date: 2013-07-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -163,6 +163,8 @@ files:
|
|
|
163
163
|
- lib/barker/game_show.rb
|
|
164
164
|
- lib/barker/guideline.rb
|
|
165
165
|
- lib/barker/guideline/base.rb
|
|
166
|
+
- lib/barker/guideline/llblauquiz.rb
|
|
167
|
+
- lib/barker/guideline/llblauquiz/questions.yaml
|
|
166
168
|
- lib/barker/guideline/llmcquiz.rb
|
|
167
169
|
- lib/barker/guideline/llmcquiz/questions.yaml
|
|
168
170
|
- lib/barker/guideline/mock.rb
|
|
@@ -211,6 +213,7 @@ files:
|
|
|
211
213
|
- test/unit/candidate_test.rb
|
|
212
214
|
- test/unit/game_show_test.rb
|
|
213
215
|
- test/unit/guideline/base_test.rb
|
|
216
|
+
- test/unit/guideline/llblauquiz_test.rb
|
|
214
217
|
- test/unit/guideline/llmcquiz_test.rb
|
|
215
218
|
- test/unit/guideline/mock_test.rb
|
|
216
219
|
- test/unit/import/yaml_test.rb
|
|
@@ -275,6 +278,7 @@ test_files:
|
|
|
275
278
|
- test/unit/candidate_test.rb
|
|
276
279
|
- test/unit/game_show_test.rb
|
|
277
280
|
- test/unit/guideline/base_test.rb
|
|
281
|
+
- test/unit/guideline/llblauquiz_test.rb
|
|
278
282
|
- test/unit/guideline/llmcquiz_test.rb
|
|
279
283
|
- test/unit/guideline/mock_test.rb
|
|
280
284
|
- test/unit/import/yaml_test.rb
|