fizzy-cli 0.4.1 → 0.5.0
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/CHANGELOG.md +8 -0
- data/lib/fizzy/cli/boards.rb +15 -0
- data/lib/fizzy/cli.rb +9 -7
- data/lib/fizzy/project_config.rb +2 -0
- data/lib/fizzy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe63e297523bda1dd7bf9a33e63500c79b69908f0beff894e9ac46c1417dcb50
|
|
4
|
+
data.tar.gz: 1a212a6743312655d388622c5af175325b61defcf8dd56076c29b1a2fa5b86e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e248468298d49a352c3ffe24542bee9fe5c4501487a970c4c365081ca8505423bcd90f0e8f0dafc42e05f88fbca917633cfab82b1e02b39202f9393f2bdfe1ed
|
|
7
|
+
data.tar.gz: 54322d6c4d43d3c528e83a124514d214d58501d4f7ee31378430af636893463c4dbb64f42ac25aa31f2a6231f7c07d09098f372560e508228dcdfbe8ece9d522
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [0.5.0] - 2026-02-22
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Cache boards in `.fizzy.yml` as `boards: { id: name }` hash for quick lookups without API calls
|
|
12
|
+
- `fizzy boards sync` command to refresh the cached boards list from the API
|
|
13
|
+
- `fizzy init` now automatically fetches and caches all boards during setup
|
|
14
|
+
- `ProjectConfig#boards` accessor for reading cached board data
|
|
15
|
+
|
|
8
16
|
## [0.4.1] - 2026-02-22
|
|
9
17
|
|
|
10
18
|
### Fixed
|
data/lib/fizzy/cli/boards.rb
CHANGED
|
@@ -56,6 +56,21 @@ module Fizzy
|
|
|
56
56
|
client.delete("boards/#{board_id}")
|
|
57
57
|
puts "Board #{board_id} deleted."
|
|
58
58
|
end
|
|
59
|
+
|
|
60
|
+
desc "sync", "Refresh boards cache in .fizzy.yml"
|
|
61
|
+
def sync
|
|
62
|
+
raise Thor::Error, "No .fizzy.yml found. Run: fizzy init" unless project_config.found?
|
|
63
|
+
|
|
64
|
+
boards = paginator.all("boards")
|
|
65
|
+
boards_hash = boards.to_h { |b| [b["id"], b["name"]] }
|
|
66
|
+
|
|
67
|
+
config = YAML.safe_load_file(project_config.path)
|
|
68
|
+
config = {} unless config.is_a?(Hash)
|
|
69
|
+
config["boards"] = boards_hash
|
|
70
|
+
|
|
71
|
+
File.write(project_config.path, YAML.dump(config))
|
|
72
|
+
say "Synced #{boards_hash.size} board(s) to #{project_config.path}"
|
|
73
|
+
end
|
|
59
74
|
end
|
|
60
75
|
end
|
|
61
76
|
end
|
data/lib/fizzy/cli.rb
CHANGED
|
@@ -32,7 +32,10 @@ module Fizzy
|
|
|
32
32
|
|
|
33
33
|
selected = pick_account
|
|
34
34
|
config = { "account" => selected["account_slug"] }
|
|
35
|
-
|
|
35
|
+
|
|
36
|
+
boards = fetch_boards(selected)
|
|
37
|
+
config["boards"] = boards.to_h { |b| [b["id"], b["name"]] } if boards.any?
|
|
38
|
+
config["board"] = pick_board(boards) if boards.any? && yes?("Set a default board?")
|
|
36
39
|
|
|
37
40
|
File.write(config_path, YAML.dump(config))
|
|
38
41
|
say "Wrote #{config_path}"
|
|
@@ -97,15 +100,14 @@ module Fizzy
|
|
|
97
100
|
accounts[idx]
|
|
98
101
|
end
|
|
99
102
|
|
|
100
|
-
def
|
|
103
|
+
def fetch_boards(account)
|
|
101
104
|
c = Client.new(token: account["access_token"], account_slug: account["account_slug"])
|
|
102
105
|
boards = c.get("boards").body
|
|
106
|
+
say "No boards found." if boards.empty?
|
|
107
|
+
boards
|
|
108
|
+
end
|
|
103
109
|
|
|
104
|
-
|
|
105
|
-
say "No boards found."
|
|
106
|
-
return nil
|
|
107
|
-
end
|
|
108
|
-
|
|
110
|
+
def pick_board(boards)
|
|
109
111
|
say "Boards:"
|
|
110
112
|
boards.each_with_index do |b, i|
|
|
111
113
|
say " #{i + 1}. #{b["name"]} (#{b["id"]})"
|
data/lib/fizzy/project_config.rb
CHANGED
data/lib/fizzy/version.rb
CHANGED