appydave-tools 0.35.0 → 0.36.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3127d2d39627f11abec8d246a4c9e44db67eb2328d5eaca5ac2ee0322e3ea510
4
- data.tar.gz: 051cc015da88ada5cb9c7806bda877a1f9a18eaed15731558f6616b17b214c2b
3
+ metadata.gz: c9081147c515c93a4c3a45f8ca2f8f94dfc4c69b8025d78212a121dde8b70927
4
+ data.tar.gz: 88e44bc2c634968665123e1dcedda8bf57c415b524c14c78752f456439df712e
5
5
  SHA512:
6
- metadata.gz: 1f93c82c13fedcb6d1c7dd53c128ba5d3cfa70394def7826df90bf4f4ebda03585d9bfed91b9dfa25b4548c173c3f8b9802f2d306018ef6892f6b69dfe7616e5
7
- data.tar.gz: 2c7c30f3a3e9f4b4a6681c2c57911f6d571e804016a05c37d3d5873ec7b15879bb10c8cdbd5cd0b02eafb416e5cf620b738f3fa988212743bb569b6939dca97d
6
+ metadata.gz: 418d0e01e3773faeb31c966e7875fa6d985d9fc4af9a697f48b15658a10bb55efdfc8d5f8c8c88df62854d9b8189b0d6a4df0761421db90fb4f5fda671b13086
7
+ data.tar.gz: 7bef2c885d0d89df18b6c9ebd91fe2c9821f91973ddb7421a6184db13e1db7f8ec4289ff4a755b3b6930be28549f7bd4786bc018f08f6b096dfc140cb167c4ab
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.35.0](https://github.com/appydave/appydave-tools/compare/v0.34.1...v0.35.0) (2025-11-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * improve s3-discover UX with table format showing file sizes, last modified, total summary, and quick action commands for share/download/cleanup ([3aa5edc](https://github.com/appydave/appydave-tools/commit/3aa5edcd70ca238c084021e0ef264d46b74557dc))
7
+
1
8
  ## [0.34.1](https://github.com/appydave/appydave-tools/compare/v0.34.0...v0.34.1) (2025-11-21)
2
9
 
3
10
 
@@ -10,10 +10,27 @@ module Appydave
10
10
  def get_brand(brand_key)
11
11
  brand_key_str = brand_key.to_s
12
12
 
13
+ log.info "Looking up brand: '#{brand_key_str}'" if debug_mode?
14
+
15
+ # Validate data structure
16
+ unless data.is_a?(Hash)
17
+ log.error "Config data is not a Hash: #{data.class}"
18
+ raise "Invalid brands config: data is #{data.class}, expected Hash"
19
+ end
20
+
21
+ unless data['brands'].is_a?(Hash)
22
+ log.error "Config data['brands'] is #{data['brands'].class}, expected Hash"
23
+ log.error "Available keys in data: #{data.keys.inspect}"
24
+ raise "Invalid brands config: 'brands' key is #{data['brands'].class}, expected Hash"
25
+ end
26
+
27
+ log.info "Available brands: #{data['brands'].keys.inspect}" if debug_mode?
28
+
13
29
  # Try direct key lookup first (case-insensitive)
14
30
  brand_entry = data['brands'].find { |key, _info| key.downcase == brand_key_str.downcase }
15
31
  if brand_entry
16
32
  actual_key = brand_entry[0]
33
+ log.info "Found brand by key: '#{actual_key}'" if debug_mode?
17
34
  return BrandInfo.new(actual_key, brand_entry[1])
18
35
  end
19
36
 
@@ -21,10 +38,12 @@ module Appydave
21
38
  brand_entry = data['brands'].find { |_key, info| info['shortcut']&.downcase == brand_key_str.downcase }
22
39
  if brand_entry
23
40
  actual_key = brand_entry[0]
41
+ log.info "Found brand by shortcut: '#{actual_key}'" if debug_mode?
24
42
  return BrandInfo.new(actual_key, brand_entry[1])
25
43
  end
26
44
 
27
45
  # Return default if not found (use normalized lowercase key)
46
+ log.warn "Brand not found: '#{brand_key_str}', returning default" if debug_mode?
28
47
  BrandInfo.new(brand_key_str.downcase, default_brand_info)
29
48
  end
30
49
 
@@ -30,11 +30,31 @@ module Appydave
30
30
  end
31
31
 
32
32
  def load
33
- return JSON.parse(File.read(config_path)) if File.exist?(config_path)
33
+ if debug_mode?
34
+ log.info "Loading config: #{config_name}"
35
+ log.info "Config path: #{config_path}"
36
+ log.info "File exists: #{File.exist?(config_path)}"
37
+ end
38
+
39
+ unless File.exist?(config_path)
40
+ log.warn "Config file not found: #{config_path}" if debug_mode?
41
+ return default_data
42
+ end
34
43
 
44
+ content = File.read(config_path)
45
+ log.info "Config file size: #{content.bytesize} bytes" if debug_mode?
46
+
47
+ data = JSON.parse(content)
48
+ log.info "Config loaded successfully: #{config_name}" if debug_mode?
49
+ log.json data if debug_mode?
50
+ data
51
+ rescue JSON::ParserError => e
52
+ log.error "JSON parse error in #{config_path}: #{e.message}"
53
+ log.error "File content preview: #{content[0..200]}" if content
35
54
  default_data
36
- rescue JSON::ParserError
37
- # log.exception e
55
+ rescue StandardError => e
56
+ log.error "Error loading #{config_path}: #{e.message}"
57
+ log.error e.backtrace.first(3).join("\n") if debug_mode?
38
58
  default_data
39
59
  end
40
60
 
@@ -55,6 +75,10 @@ module Appydave
55
75
 
56
76
  private
57
77
 
78
+ def debug_mode?
79
+ ENV['DAM_DEBUG'] == 'true' || ENV['DEBUG'] == 'true'
80
+ end
81
+
58
82
  def default_data
59
83
  {}
60
84
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- VERSION = '0.35.0'
5
+ VERSION = '0.36.0'
6
6
  end
7
7
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "AppyDave YouTube Automation Tools",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appydave-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.0
4
+ version: 0.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys