hlockey-cli 4.1 → 5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20dbbe21705cef26f25805ff8ff5e00093b6cae75b631b5285a03524401b80a9
4
- data.tar.gz: e7858da88ee692700c1a47dd2496ba9b533e3e9c69d86cbfa144ef9eb825455b
3
+ metadata.gz: b43d6b271156dc226e7171abb4690d03af944d97c3a1896f35898618b7814b65
4
+ data.tar.gz: 4f6152b2bb108900d0fcb806fb702538e4e2c31f0b26811c6c9f6f84271659ff
5
5
  SHA512:
6
- metadata.gz: '09539eff948b07b8c1674f6ad55eac92eb388738bdc3db8fa936b08e122668e5fc22242c1d228f6b621013aca534547f94a991936dbd5443fa2f3af7f31cfc40'
7
- data.tar.gz: c374e0f96b827d21ec6777fc168474b876aae83ea2e03ade519d7f105be3d0ca26e5cb81668ea49f469aa465dd2e6c9970cdb60a841e3152e8bd4064e9330ec9
6
+ metadata.gz: 321c2ca771842035ccfe138ccff87709c1ae33ed5729947becd34809c6720cbd68b62d0fb14c45eaf77f1226b66df36599c4687265f7c3635be4546367092082
7
+ data.tar.gz: 74fe7e7ea7746b8cfcd33a327af55931b5142b9ec99ce5f39d408baecd347c695e26071f7196570847cf1e820388e418d04a02addef18dfbb7b8f86b54cb7771
@@ -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 { |game| game.to_s + "\n Weather: #{game.weather}" }
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
- team.roster.each do |pos, player|
53
- puts(" #{Hlockey::Team.pos_name(pos)}:\n #{player}")
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.stat_strings.each do |key, value|
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
@@ -1,3 +1,3 @@
1
1
  module HlockeyCLI
2
- VERSION = "4.1".freeze
2
+ VERSION = "5".freeze
3
3
  end
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.1'
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-07-05 00:00:00.000000000 Z
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: '4'
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: '4'
26
+ version: '5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: paint
29
29
  requirement: !ruby/object:Gem::Requirement