Class: BeamUp::Providers::S3Compatible

Inherits:
Base
  • Object
show all
Defined in:
lib/beam_up/providers/s3_compatible.rb

Direct Known Subclasses

AwsS3, DigitalOceanSpaces, Hetzner

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from BeamUp::Providers::Base

Instance Method Details

#deploy!(path) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/beam_up/providers/s3_compatible.rb', line 8

def deploy!(path)
  @path = path

  files_to_deploy.each do |file|
    upload file.delete_prefix("#{@path}/"), file
  end

  Result.new(
    provider: provider_name,
    deploy_id: Time.now.to_i.to_s,
    url: public_url
  )
rescue => error
  Result.new(provider: provider_name, error: error.message)
end