hlockey-cli 4 → 4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hlockey-cli/actions.rb +19 -7
- data/lib/hlockey-cli/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: 20dbbe21705cef26f25805ff8ff5e00093b6cae75b631b5285a03524401b80a9
|
4
|
+
data.tar.gz: e7858da88ee692700c1a47dd2496ba9b533e3e9c69d86cbfa144ef9eb825455b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09539eff948b07b8c1674f6ad55eac92eb388738bdc3db8fa936b08e122668e5fc22242c1d228f6b621013aca534547f94a991936dbd5443fa2f3af7f31cfc40'
|
7
|
+
data.tar.gz: c374e0f96b827d21ec6777fc168474b876aae83ea2e03ade519d7f105be3d0ca26e5cb81668ea49f469aa465dd2e6c9970cdb60a841e3152e8bd4064e9330ec9
|
data/lib/hlockey-cli/actions.rb
CHANGED
@@ -63,14 +63,26 @@ module HlockeyCLI
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
def election(
|
67
|
-
|
68
|
-
puts(
|
69
|
-
|
66
|
+
def election(league)
|
67
|
+
if league.start_time < Time.now
|
68
|
+
puts("Current election options\nGo to the website to vote.")
|
69
|
+
Hlockey::Data.election.each do |category, options|
|
70
|
+
puts(" #{category}")
|
71
|
+
options.each { |name, description| puts(" #{name}\n #{description}") }
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
election_results = Hlockey::Data.previous_election_results
|
76
|
+
puts("Previous election results\nvotes cast: #{election_results[:vote_amt]}")
|
77
|
+
election_results[:categories].each do |category, options|
|
78
|
+
puts(" #{category}")
|
79
|
+
options.each do |name, result|
|
80
|
+
puts(" #{name}\n #{result[:winner]}")
|
81
|
+
next if result[:most_votes].nil?
|
82
|
+
|
83
|
+
puts(" team with most votes: #{result[:most_votes]}")
|
84
|
+
end
|
70
85
|
end
|
71
|
-
# TODO: add an actual link to the website,
|
72
|
-
# probably should be from Hlockey lib data
|
73
|
-
puts("Go to the website to vote.")
|
74
86
|
end
|
75
87
|
|
76
88
|
def information(_)
|
data/lib/hlockey-cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hlockey-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '4'
|
4
|
+
version: '4.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lavender Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hlockey
|