Sha256: a68e1ba193c36d5233db37b67f8aa9d9b78114c0a1290dabf1458a1c5357edd1

Contents?: true

Size: 1.29 KB

Versions: 25

Compression:

Stored size: 1.29 KB

Contents

require 'ostruct'
module FaaStRuby
  module Command
    module Function
      class FunctionBaseCommand < BaseCommand
        # --- Example YAML
        # name: example
        # test:
        #   command: "rspec"
        #   on_fail:
        #     build: false
        #     deploy: false
        def load_yaml
          FaaStRuby::CLI.error("It looks like you created this function with an old version of faastruby. Please run 'faastruby upgrade'.") if File.file?('handler.rb') && !File.file?('faastruby.yml')
          FaaStRuby::CLI.error("Could not find file 'faastruby.yml' in the current directory") unless File.file?('faastruby.yml')
          @yaml_config = YAML.load(File.read('./faastruby.yml'))
          FaaStRuby::CLI.error("Could read function name from 'faastruby.yml'. Make sure you have a key 'name: FUNCTION_NAME' in that file!") unless @yaml_config['name']
        end
      end
    end
  end
end

require 'faastruby/cli/commands/function/build'
require 'faastruby/cli/commands/function/deploy_to'
require 'faastruby/cli/commands/function/new'
require 'faastruby/cli/commands/function/remove_from'
require 'faastruby/cli/commands/function/test'
require 'faastruby/cli/commands/function/update_context'
require 'faastruby/cli/commands/function/upgrade'
require 'faastruby/cli/commands/function/run'

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
faastruby-0.4.18 lib/faastruby/cli/commands/function.rb
faastruby-0.4.17 lib/faastruby/cli/commands/function.rb
faastruby-0.4.16 lib/faastruby/cli/commands/function.rb
faastruby-0.4.15 lib/faastruby/cli/commands/function.rb
faastruby-0.4.14 lib/faastruby/cli/commands/function.rb
faastruby-0.4.12 lib/faastruby/cli/commands/function.rb
faastruby-0.4.11 lib/faastruby/cli/commands/function.rb
faastruby-0.4.10 lib/faastruby/cli/commands/function.rb
faastruby-0.4.9 lib/faastruby/cli/commands/function.rb
faastruby-0.4.8 lib/faastruby/cli/commands/function.rb
faastruby-0.4.7 lib/faastruby/cli/commands/function.rb
faastruby-0.4.6 lib/faastruby/cli/commands/function.rb
faastruby-0.4.5 lib/faastruby/cli/commands/function.rb
faastruby-0.4.4 lib/faastruby/cli/commands/function.rb
faastruby-0.4.3 lib/faastruby/cli/commands/function.rb
faastruby-0.4.2 lib/faastruby/cli/commands/function.rb
faastruby-0.4.1 lib/faastruby/cli/commands/function.rb
faastruby-0.4.0 lib/faastruby/cli/commands/function.rb
faastruby-0.3.8 lib/faastruby/cli/commands/function.rb
faastruby-0.3.7 lib/faastruby/cli/commands/function.rb