File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed
Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1313# Create some sample transformations (they can be empty for now since we're returning a fixed URL)
1414transformations = [
1515 Imagekit ::Models ::Transformation . new (
16- height : 300 ,
17- width : 400 ,
16+ height : 300.0 ,
17+ width : 400.0 ,
1818 shadow : true
1919 )
2020]
2121
2222# Test all helper functions
2323puts "Testing helper functions:"
2424puts "1. buildURL: #{ image_kit . helper . buildURL ( transformations ) } "
25- puts "2. generateTransformationString : #{ image_kit . helper . generateTransformationString ( transformations ) } "
25+ puts "2. buildTransformationString : #{ image_kit . helper . buildTransformationString ( transformations ) } "
2626puts "3. GetAuthenticationParameters: #{ image_kit . helper . GetAuthenticationParameters } "
2727puts "All helper functions are working!"
28+
29+ image_kit . files . upload (
30+ file : StringIO . new ( "https://www.example.com/public-url.jpg" ) ,
31+ file_name : "file-name.jpg"
32+ )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def buildURL(transformations)
1717 #
1818 # @param transformations [Array<Imagekit::Models::Transformation>] Array of transformation objects
1919 # @return [String] The transformation string (e.g., "w-400,h-300")
20- def generateTransformationString ( transformations )
20+ def buildTransformationString ( transformations )
2121 # TODO: Implement actual transformation string generation
2222 # For now, return a fixed transformation string
2323 "w-400,h-300"
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ module Imagekit
2020 transformations : T ::Array [ Imagekit ::Models ::Transformation ]
2121 ) . returns ( String )
2222 end
23- def generateTransformationString ( transformations ) ; end
23+ def buildTransformationString ( transformations ) ; end
2424
2525 # Gets authentication parameters for ImageKit requests
2626 sig do
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module Imagekit
77 def buildURL : (Array[Imagekit::Models::Transformation] transformations) -> String
88
99 # Generates transformation string from transformation objects
10- def generateTransformationString : (Array[Imagekit::Models::Transformation] transformations) -> String
10+ def buildTransformationString : (Array[Imagekit::Models::Transformation] transformations) -> String
1111
1212 # Gets authentication parameters for ImageKit requests
1313 def GetAuthenticationParameters : (?String? token) -> Hash[Symbol, (String | Integer)]
You can’t perform that action at this time.
0 commit comments