Sha256: e9036c920e272041cf554b85483c6ec84c8011d4b6b885f71b072320dcad5c47

Contents?: true

Size: 617 Bytes

Versions: 4

Compression:

Stored size: 617 Bytes

Contents

class Jets::CLI::Env
  class Set < Base
    include Parse

    def run
      are_you_sure?
      puts "Setting env vars for #{@lambda_function.name}"

      @lambda_function.environment_variables = environment_variables
      Jets::CLI::Tip.show(:env_change)
    end

    def environment_variables
      parse_cli_env_values(@options[:values])
    end

    def are_you_sure?
      name = self.class.to_s.demodulize.underscore.humanize.downcase
      sure? <<~EOL
        Will #{name} env vars for #{@lambda_function.name}
        The Lambda Function will immediately use the new env vars.
      EOL
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jets-6.0.5 lib/jets/cli/env/set.rb
jets-6.0.4 lib/jets/cli/env/set.rb
jets-6.0.3 lib/jets/cli/env/set.rb
jets-6.0.2 lib/jets/cli/env/set.rb