soccer-quiz 0.1.7 → 0.1.8
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 +1 -1
- data/bin/quiz +0 -9
- data/lib/quiz/cli.rb +7 -3
- data/lib/quiz/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8451366700e6128a2d2a19f200ca3799d6026cfecd33d48c2e8b69131e273be
|
4
|
+
data.tar.gz: 108dac5404326f18046d22bace9d01f4b9b0f5de26fd993d2735f908267b0b8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1965c577e21ed64e69a9241d40710885221054622fffbf9c6d9935b6500615547bc78d0c176fa2fb49d7dfd53a43ca6eaf06d369ec76061f3f70d458d72fae7b
|
7
|
+
data.tar.gz: 2e2a39cc7f0b2ece8de8c04bc7c1ad431802f25c36f82d45a909dc774d35e340ed4f71a4c30b86ec5192cd2fc77e53b4295924166add6590ff97378edd4675b4
|
data/Gemfile.lock
CHANGED
data/bin/quiz
CHANGED
@@ -1,12 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'quiz' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
2
|
require_relative '../lib/quiz'
|
12
3
|
Quiz::CLI.new.call
|
data/lib/quiz/cli.rb
CHANGED
@@ -64,7 +64,7 @@ class Quiz::CLI
|
|
64
64
|
instace_for_answers = objects.select{|item|item.year == random_year}
|
65
65
|
|
66
66
|
answer_for_how_many = objects.select{|item|item.winner == random_winner}.size
|
67
|
-
|
67
|
+
answer_for_how_many
|
68
68
|
winner = instace_for_answers[0].winner
|
69
69
|
|
70
70
|
host = instace_for_answers[0].host
|
@@ -97,8 +97,8 @@ class Quiz::CLI
|
|
97
97
|
"Who was the host in #{year} world cup?",
|
98
98
|
"#{team} won the World cup final in #{year}. Who was the runner-up?",
|
99
99
|
"How many world cup #{team} has won?",
|
100
|
-
"Who won the champion
|
101
|
-
"#{team} won the Champion
|
100
|
+
"Who won the champion league in #{year}?",
|
101
|
+
"#{team} won the Champion league final in #{year}. Who was the runner-up?",
|
102
102
|
"Who hosted champion league final in #{year}?",
|
103
103
|
"Who won the balon d'Or in #{year}?",
|
104
104
|
"How many balon de'or #{team} has won?",
|
@@ -137,6 +137,10 @@ class Quiz::CLI
|
|
137
137
|
else puts "Sorry you failed. you score #{points} of 10 points."
|
138
138
|
end
|
139
139
|
Quiz::CLI.clear
|
140
|
+
Quiz::CHAMPIONLEAGUE.all.clear
|
141
|
+
Quiz::Worldcup.all.clear
|
142
|
+
Quiz::BALONDOR.all.clear
|
143
|
+
|
140
144
|
end
|
141
145
|
|
142
146
|
|
data/lib/quiz/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soccer-quiz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yarvin Hernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|