hlockey-cli 4.1 → 5
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 +16 -6
- data/lib/hlockey-cli/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b43d6b271156dc226e7171abb4690d03af944d97c3a1896f35898618b7814b65
|
4
|
+
data.tar.gz: 4f6152b2bb108900d0fcb806fb702538e4e2c31f0b26811c6c9f6f84271659ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 321c2ca771842035ccfe138ccff87709c1ae33ed5729947becd34809c6720cbd68b62d0fb14c45eaf77f1226b66df36599c4687265f7c3635be4546367092082
|
7
|
+
data.tar.gz: 74fe7e7ea7746b8cfcd33a327af55931b5142b9ec99ce5f39d408baecd347c695e26071f7196570847cf1e820388e418d04a02addef18dfbb7b8f86b54cb7771
|
data/lib/hlockey-cli/actions.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require("hlockey-cli/user_selection")
|
2
2
|
|
3
3
|
module HlockeyCLI
|
4
|
+
##
|
5
|
+
# Each action the CLI can do
|
4
6
|
module Actions
|
5
7
|
ACTIONS = %i[games standings team_info election information].freeze
|
6
8
|
|
@@ -13,7 +15,13 @@ module HlockeyCLI
|
|
13
15
|
|
14
16
|
chosen_game = HlockeyCLI.user_selection(
|
15
17
|
league.games,
|
16
|
-
str_process: proc
|
18
|
+
str_process: proc do |game|
|
19
|
+
<<~GAME
|
20
|
+
#{game}
|
21
|
+
Weather: #{game.weather}
|
22
|
+
Stadium: #{Hlockey::Message.color(game.stadium)}
|
23
|
+
GAME
|
24
|
+
end
|
17
25
|
)
|
18
26
|
return if chosen_game.nil?
|
19
27
|
|
@@ -49,8 +57,12 @@ module HlockeyCLI
|
|
49
57
|
(chosen_team.nil? ? league.teams : [chosen_team]).each do |team|
|
50
58
|
puts("#{team.emoji} #{team}")
|
51
59
|
puts("\"#{team.motto}\"")
|
52
|
-
|
53
|
-
|
60
|
+
puts(" Stadium:")
|
61
|
+
Hlockey::Utils.hash_display_keys(team.stadium.to_h).each do |key, val|
|
62
|
+
puts(" #{key}: #{val}")
|
63
|
+
end
|
64
|
+
team.roster_display.each do |pos, player|
|
65
|
+
puts(" #{pos}:\n #{player}")
|
54
66
|
put_stats(player)
|
55
67
|
end
|
56
68
|
puts(" Shadows:")
|
@@ -113,9 +125,7 @@ module HlockeyCLI
|
|
113
125
|
|
114
126
|
# @param player [Hlockey::Player]
|
115
127
|
def put_stats(player)
|
116
|
-
player.
|
117
|
-
puts(" #{key}: #{value}")
|
118
|
-
end
|
128
|
+
player.stat_display.each { |key, value| puts(" #{key}: #{value}") }
|
119
129
|
end
|
120
130
|
end
|
121
131
|
end
|
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
|
+
version: '5'
|
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-
|
11
|
+
date: 2023-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hlockey
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: paint
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|