betters3tui 0.2.6 → 0.2.7

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/lib/betters3tui.rb +12 -7
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab931099fefd059f96432438693cbdcdeeb8f787ddf0b747b0803381f2633e46
4
- data.tar.gz: 50f83a05203e7f4fb2b1c70948c0c57be51263616b515b74baff606b89f92283
3
+ metadata.gz: 98a94ca0be3affeb0617f69182b5ec794b189ea5540b530346f2e5465db1b335
4
+ data.tar.gz: eec66f2677f6562e2e527c6b0a9da890524aef821db1d1e8319bb18c94477ad1
5
5
  SHA512:
6
- metadata.gz: a3ec6adc6791f0c8de899381721af78cbb6c42886345f25c0957cbde1fee4bf6bd8bbcc87caee4ccf5952ba006d61116bf3373a8c9fad9d1698b6d3bd6e4f2c2
7
- data.tar.gz: 9dafee1ec69e01d8bf5862a5291a85c50b1a2dff499477b7497949c5e96d58ba806375b852d4a2e7110065efa91cc53c8db49b395df067761ceb3114345e0403
6
+ metadata.gz: 35cfff2e92a797dae2c56441f30908dca5d01a7979508f327776a050428ce26a6fed12e793a33f523943edfa1fe47995d327e461bf6254942fe2e62e3a94d9d8
7
+ data.tar.gz: b0341c937891c6c662508750aee3b1f12b7094d2b1c6ca1fdee6de786603b869f734d81606448842118fd20dcfb522f7279bc81b5584d7f72f12057aa8ec9ac2
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.2.7] - 2026-02-28
6
+
7
+ ### Fixed
8
+ - **Auto-create profiles.json** - App now automatically creates the config directory and empty profiles.json file on first run instead of exiting with an error
9
+
5
10
  ## [0.2.6] - 2026-02-27
6
11
 
7
12
  ### Added
@@ -34,6 +39,7 @@ All notable changes to this project will be documented in this file.
34
39
  - File download capability
35
40
  - Interactive keyboard navigation
36
41
 
42
+ [0.2.7]: https://github.com/adiprnm/betters3tui/compare/v0.2.6...v0.2.7
37
43
  [0.2.6]: https://github.com/adiprnm/betters3tui/compare/v0.2.5...v0.2.6
38
44
  [0.1.1]: https://github.com/adiprnm/betters3tui/compare/v0.1.0...v0.1.1
39
45
  [0.1.0]: https://github.com/adiprnm/betters3tui/releases/tag/v0.1.0
data/lib/betters3tui.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- VERSION = "0.2.6"
4
+ VERSION = "0.2.7"
5
5
 
6
6
  require "json"
7
7
  require "aws-sdk-s3"
@@ -69,12 +69,7 @@ class S3Browser
69
69
  end
70
70
 
71
71
  def run
72
- if @profiles.empty?
73
- puts "No profiles found at #{PROFILES_PATH}"
74
- puts "Please create a profiles.json file with your S3 credentials."
75
- exit 1
76
- end
77
-
72
+ ensure_profiles_file_exists
78
73
  setup_terminal
79
74
 
80
75
  loop do
@@ -97,6 +92,16 @@ class S3Browser
97
92
  []
98
93
  end
99
94
 
95
+ def ensure_profiles_file_exists
96
+ require 'fileutils'
97
+ config_dir = File.dirname(PROFILES_PATH)
98
+ FileUtils.mkdir_p(config_dir) unless File.exist?(config_dir)
99
+
100
+ unless File.exist?(PROFILES_PATH)
101
+ File.write(PROFILES_PATH, JSON.pretty_generate([]))
102
+ end
103
+ end
104
+
100
105
  def setup_terminal
101
106
  @original_stty = `stty -g 2>/dev/null`.chomp
102
107
  system("stty -echo -icanon raw 2>/dev/null")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: betters3tui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adi Purnama