Sha256: b43d91a6e0ee81bcfd277d21829c0925fb0ac83106af53e8373c24cae9ce92ec
Contents?: true
Size: 944 Bytes
Versions: 18
Compression:
Stored size: 944 Bytes
Contents
module FaaStRuby module Local class RubyFunction < Function include Local::Logger def self.default_gemfile faastruby_rpc_version = Gem::DependencyList.from_specs.select{|d| d.name == 'faastruby-rpc'}[0]&.version || '0.2.3' %(source 'https://rubygems.org' group :test do gem 'rspec' end ) end def yaml_hash debug "yaml_hash" hash = { 'cli_version' => FaaStRuby::VERSION, 'name' => @name, 'runtime' => DEFAULT_RUBY_RUNTIME } end def write_handler debug "write_handler" content = "def handler(event)\n # Write code here\n \nend" file = "#{@absolute_folder}/handler.rb" if File.size(file) > 0 puts "New Ruby function '#{@name}' detected." else File.write(file, content) puts "New Ruby function '#{@name}' initialized." end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems