fizzy-cli 0.2.0 → 0.2.2
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 +10 -0
- data/lib/fizzy/cli/auth.rb +6 -6
- 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: 070407ac06ff5b533dce440bc1eb62452c32adc089880a011e3c2af7fdb13b4b
|
|
4
|
+
data.tar.gz: 241fcbec138baedbd064f4b87f2ab327685ed41eec614661431dee91bac5ed0f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2ce69faf33ec985574500bafb3b2c896d667e7576fec78bc06d1683c9436458f493a8afff7061e8f6e54bfdc74bd1faed544a15560426b6704482f433dbdc3a
|
|
7
|
+
data.tar.gz: '009907a2a395c93e696cede48a408c776037594e668545f36ca06489df7e6d8bcb2c14bc040472ee5ef80e21c00f3a9445525ea2129016884d6fea6cbacb0b66'
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ 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.2.2] - 2026-02-21
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Auth login output displays account slugs from normalized stored data instead of raw API response
|
|
12
|
+
|
|
13
|
+
## [0.2.1] - 2026-02-21
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- Normalize account slugs at storage time during login (strip leading `/` from API response)
|
|
17
|
+
|
|
8
18
|
## [0.2.0] - 2026-02-21
|
|
9
19
|
|
|
10
20
|
### Changed
|
data/lib/fizzy/cli/auth.rb
CHANGED
|
@@ -37,7 +37,7 @@ module Fizzy
|
|
|
37
37
|
# Build tokens data
|
|
38
38
|
token_accounts = accounts.map do |a|
|
|
39
39
|
{
|
|
40
|
-
"account_slug" => a["slug"],
|
|
40
|
+
"account_slug" => Auth.normalize_slug(a["slug"]),
|
|
41
41
|
"account_name" => a["name"],
|
|
42
42
|
"account_id" => a["id"],
|
|
43
43
|
"access_token" => token,
|
|
@@ -53,17 +53,17 @@ module Fizzy
|
|
|
53
53
|
|
|
54
54
|
data = {
|
|
55
55
|
"accounts" => token_accounts,
|
|
56
|
-
"default_account" => accounts.first["slug"]
|
|
56
|
+
"default_account" => Auth.normalize_slug(accounts.first["slug"])
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
FileUtils.mkdir_p(Auth::CONFIG_DIR)
|
|
60
60
|
File.write(Auth::TOKEN_FILE, YAML.dump(data))
|
|
61
61
|
File.chmod(0o600, Auth::TOKEN_FILE)
|
|
62
62
|
|
|
63
|
-
puts "Authenticated as #{
|
|
64
|
-
|
|
65
|
-
marker = a["
|
|
66
|
-
puts " #{a["
|
|
63
|
+
puts "Authenticated as #{token_accounts.first.dig("user", "name")}"
|
|
64
|
+
token_accounts.each do |a|
|
|
65
|
+
marker = a["account_slug"] == data["default_account"] ? " (default)" : ""
|
|
66
|
+
puts " #{a["account_name"]} (#{a["account_slug"]})#{marker}"
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
|
data/lib/fizzy/version.rb
CHANGED