File tree Expand file tree Collapse file tree 7 files changed +44
-1
lines changed
Expand file tree Collapse file tree 7 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1818 config . secret_key = ENV . fetch ( 'UPLOADCARE_SECRET_KEY' , nil )
1919end
2020
21+ # Validate required configuration
22+ unless Uploadcare . configuration . public_key
23+ puts 'Error: UPLOADCARE_PUBLIC_KEY environment variable is required'
24+ puts 'Please set UPLOADCARE_PUBLIC_KEY=your_public_key in your environment or .env file'
25+ exit 1
26+ end
27+
2128# Get file paths from command line arguments
2229file_paths = ARGV
2330
Original file line number Diff line number Diff line change 1818 config . secret_key = ENV . fetch ( 'UPLOADCARE_SECRET_KEY' , nil )
1919end
2020
21+ # Validate required configuration
22+ unless Uploadcare . configuration . public_key
23+ puts 'Error: UPLOADCARE_PUBLIC_KEY environment variable is required'
24+ puts 'Please set UPLOADCARE_PUBLIC_KEY=your_public_key in your environment or .env file'
25+ exit 1
26+ end
27+
2128# Get file paths from command line arguments
2229file_paths = ARGV
2330
Original file line number Diff line number Diff line change 1818 config . secret_key = ENV . fetch ( 'UPLOADCARE_SECRET_KEY' , nil )
1919end
2020
21+ # Validate required configuration
22+ unless Uploadcare . configuration . public_key
23+ puts 'Error: UPLOADCARE_PUBLIC_KEY environment variable is required'
24+ puts 'Please set UPLOADCARE_PUBLIC_KEY=your_public_key in your environment or .env file'
25+ exit 1
26+ end
27+
2128# Get file path and optional thread count
2229file_path = ARGV [ 0 ]
2330threads = ( ARGV [ 1 ] || 4 ) . to_i
Original file line number Diff line number Diff line change 1818 config . secret_key = ENV . fetch ( 'UPLOADCARE_SECRET_KEY' , nil )
1919end
2020
21+ # Validate required configuration
22+ unless Uploadcare . configuration . public_key
23+ puts 'Error: UPLOADCARE_PUBLIC_KEY environment variable is required'
24+ puts 'Please set UPLOADCARE_PUBLIC_KEY=your_public_key in your environment or .env file'
25+ exit 1
26+ end
27+
2128# Get file path from command line argument
2229file_path = ARGV [ 0 ]
2330
Original file line number Diff line number Diff line change 1818 config . secret_key = ENV . fetch ( 'UPLOADCARE_SECRET_KEY' , nil )
1919end
2020
21+ # Validate required configuration
22+ unless Uploadcare . configuration . public_key
23+ puts 'Error: UPLOADCARE_PUBLIC_KEY environment variable is required'
24+ puts 'Please set UPLOADCARE_PUBLIC_KEY=your_public_key in your environment or .env file'
25+ exit 1
26+ end
27+
2128# Get file path from command line argument
2229file_path = ARGV [ 0 ]
2330
Original file line number Diff line number Diff line change 1818 config . secret_key = ENV . fetch ( 'UPLOADCARE_SECRET_KEY' , nil )
1919end
2020
21+ # Validate required configuration
22+ unless Uploadcare . configuration . public_key
23+ puts 'Error: UPLOADCARE_PUBLIC_KEY environment variable is required'
24+ puts 'Please set UPLOADCARE_PUBLIC_KEY=your_public_key in your environment or .env file'
25+ exit 1
26+ end
27+
2128# Get URL from command line argument
2229url = ARGV [ 0 ]
2330
Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ def uuid
190190 # If initialized from URL, extract UUID
191191 if @url
192192 extracted_uuid = @url . gsub ( 'https://ucarecdn.com/' , '' )
193- extracted_uuid . gsub ( %r{/.*} , '' )
193+ extracted_uuid . gsub! ( %r{/.*} , '' )
194+ extracted_uuid
194195 else
195196 @uuid
196197 end
You can’t perform that action at this time.
0 commit comments