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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8dff080f62b6b259b77127650d8be4044a35ecd86959efb4aeef2145c1446f54
4
- data.tar.gz: c91fc7730a30946f973afed8f3e88599b4f1e6133f4985c012b26c323112f3aa
3
+ metadata.gz: 070407ac06ff5b533dce440bc1eb62452c32adc089880a011e3c2af7fdb13b4b
4
+ data.tar.gz: 241fcbec138baedbd064f4b87f2ab327685ed41eec614661431dee91bac5ed0f
5
5
  SHA512:
6
- metadata.gz: 920efebccdd3501bf2337d2ba494fc7d8a83ec975494069a973dffa20537f8cf6fd3e9aff8f67f509f4cd011e24b1787ff8370fb909591fbf3b820d55c03c096
7
- data.tar.gz: 05d674ae7f2cd41978a6e4ef18a108812e54314fb6a8a0f0a1c5c1dacb096119aebf6b69561b376ee4f6559f9b1b9051121a5d7ba9067aeb383a501ab31e69da
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
@@ -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 #{accounts.first.dig("user", "name")}"
64
- accounts.each do |a|
65
- marker = a["slug"] == data["default_account"] ? " (default)" : ""
66
- puts " #{a["name"]} (#{a["slug"]})#{marker}"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fizzy
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fizzy-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Paluy