hlockey-cli 4.1 → 6
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/lib/hlockey-cli/actions.rb +36 -9
- data/lib/hlockey-cli/version.rb +1 -1
- data/lib/hlockey-cli.rb +2 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82b17021900f182e2cdda4cd8c8a6d580de70d97bdd38e8cb41a6ca58cf35d2f
|
4
|
+
data.tar.gz: c387c380691a1d4c571ca7d75900ff3781589246ec2850e12974e4bf7963f50e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5aa3cced4e5faa0cb8ad19aef0c2e251ee08780b87d8aab7d18b9c19289bc25a3814988c8cf6d726fa6df3b5cb11aeb564f36d0eea6168a97b3ae81f47f6666
|
7
|
+
data.tar.gz: 6c642f5471cd0d1be7f563231a54ffd549db55e715607e5e46e338321470d967584baea7b0c616c833310ad78a49464acc044f428774b3d5b20803e896856b06
|
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,14 +57,19 @@ 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
|
-
team.
|
53
|
-
|
54
|
-
|
60
|
+
puts(" Evolutions: #{team.evolutions}")
|
61
|
+
puts(" Stadium:")
|
62
|
+
Hlockey::Utils.hash_display_keys(team.stadium.to_h).each do |key, val|
|
63
|
+
puts(" #{key}: #{val}")
|
64
|
+
end
|
65
|
+
team.roster_display.each do |pos, player|
|
66
|
+
puts(" #{pos}:\n #{player}")
|
67
|
+
put_info(player)
|
55
68
|
end
|
56
69
|
puts(" Shadows:")
|
57
70
|
team.shadows.each do |player|
|
58
71
|
puts(" #{player}")
|
59
|
-
|
72
|
+
put_info(player)
|
60
73
|
end
|
61
74
|
puts(" Wins: #{team.wins}")
|
62
75
|
puts(" Losses: #{team.losses}")
|
@@ -111,10 +124,24 @@ module HlockeyCLI
|
|
111
124
|
end
|
112
125
|
end
|
113
126
|
|
114
|
-
# @param player [Hlockey::Player]
|
115
|
-
def
|
116
|
-
player.
|
117
|
-
|
127
|
+
# @param player [Hlockey::Team::Player]
|
128
|
+
def put_info(player)
|
129
|
+
player.stat_display.each { |key, value| puts(" #{key}: #{value}") }
|
130
|
+
|
131
|
+
return if player.mods.empty?
|
132
|
+
|
133
|
+
puts(" Mods:")
|
134
|
+
player.mods.each do |mod|
|
135
|
+
mod_data = mod.to_data
|
136
|
+
|
137
|
+
if mod_data.is_a?(Array)
|
138
|
+
puts(" #{mod_data.first}")
|
139
|
+
puts(" #{mod.class::DESCRIPTION}")
|
140
|
+
mod_data[1..].each { puts(" With: #{_1}") }
|
141
|
+
else
|
142
|
+
puts(" #{mod_data}")
|
143
|
+
puts(" #{mod.class::DESCRIPTION}")
|
144
|
+
end
|
118
145
|
end
|
119
146
|
end
|
120
147
|
end
|
data/lib/hlockey-cli/version.rb
CHANGED
data/lib/hlockey-cli.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: '6'
|
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-12-30 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: '6'
|
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: '6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: paint
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.3'
|
41
41
|
description: Hlockey console application.
|
42
|
-
email:
|
42
|
+
email: lavender.perry@outlook.com
|
43
43
|
executables:
|
44
44
|
- hlockey
|
45
45
|
extensions: []
|
@@ -50,11 +50,11 @@ files:
|
|
50
50
|
- lib/hlockey-cli/actions.rb
|
51
51
|
- lib/hlockey-cli/user_selection.rb
|
52
52
|
- lib/hlockey-cli/version.rb
|
53
|
-
homepage: https://
|
53
|
+
homepage: https://hlockey.gay
|
54
54
|
licenses:
|
55
55
|
- LicenseRef-LICENSE.md
|
56
56
|
metadata:
|
57
|
-
source_code_uri: https://
|
57
|
+
source_code_uri: https://codeberg.org/LavenderPerry/hlockey
|
58
58
|
post_install_message:
|
59
59
|
rdoc_options: []
|
60
60
|
require_paths:
|
@@ -63,7 +63,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
63
|
requirements:
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
66
|
+
version: 3.1.0
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - ">="
|