Class: Stan::Deployer
- Inherits:
-
Object
- Object
- Stan::Deployer
- Defined in:
- lib/stan/deployer.rb
Class Method Summary collapse
Class Method Details
.deploy(source, name, keep: false) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/stan/deployer.rb', line 4 def self.deploy(source, name, keep: false) url = ENV.fetch('STAN_SERVER') Typhoeus.post( "#{url}/upload", body: { name: name, file: File.open(source,"r") }, followlocation: true ) FileUtils.rm(source) unless keep end |