lib/faastruby/cli/commands/function/deploy_to.rb in faastruby-0.5.15 vs lib/faastruby/cli/commands/function/deploy_to.rb in faastruby-0.5.16

- old
+ new

@@ -88,14 +88,18 @@ def usage puts "\nUsage: faastruby #{self.class.help}" puts %( -f,--function PATH/TO/FUNCTION # Specify the directory where the function is. ---context DATA # The data to be stored as context in the cloud, - # accessible via 'event.context' from within your function. ---set-root # Set the function as the root route of the workspace/ ---set-catch-all # Set the function as the catch-all route of the workspace. +--context 'JSON_STRING' # The data to be stored as execution context + # in the cloud, accessible via 'event.context' + # from within your function. + # The context data must be a JSON String, and + # have maximum size of 4KB. +--context-from-stdin # Read context data from STDIN. +--set-root # Set the function as the root route for the workspace. +--set-catch-all # Set the function as the catch-all route for the workspace. --dont-create-workspace # Don't try to create the workspace if it doesn't exist. ) end private @@ -169,9 +173,11 @@ case option when '-f', '--function' Dir.chdir @args.shift when '--context' @options['context'] = @args.shift + when '--context-from-stdin' + @options['context'] = STDIN.gets.chomp when '--quiet', '-q' @options['quiet'] = true when '--set-root' @options['is_root'] = true when '--set-catch-all'