akamai 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/akamai.rb +17 -18
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -51,28 +51,27 @@ module Akamai
51
51
  tempfile.close
52
52
  puts "Generated file deleted from tmp."
53
53
 
54
-
55
54
  end
55
+ end
56
56
 
57
- def self.put_file(local_path, location, filename)
58
- ftp = Net::FTP::new(self.configuration.netstorage_ftp_host)
59
- ftp.passive = true
60
-
61
- ftp.login(self.configuration.netstorage_username, self.configuration.netstorage_password)
62
- ftp.chdir(self.configuration.netstorage_basedir) if self.configuration.netstorage_basedir
63
- ftp.chdir(location)
57
+ def self.put_file(local_path, location, filename)
58
+ ftp = Net::FTP::new(self.configuration.netstorage_ftp_host)
59
+ ftp.passive = true
60
+
61
+ ftp.login(self.configuration.netstorage_username, self.configuration.netstorage_password)
62
+ ftp.chdir(self.configuration.netstorage_basedir) if self.configuration.netstorage_basedir
63
+ ftp.chdir(location)
64
64
 
65
- ftp.put(local_path, "#{filename}.new")
66
- ftp.delete(filename) unless ftp.ls(filename)
67
- ftp.rename("#{filename}.new", filename)
68
- ftp.close
65
+ ftp.put(local_path, "#{filename}.new")
66
+ ftp.delete(filename) unless ftp.ls(filename)
67
+ ftp.rename("#{filename}.new", filename)
68
+ ftp.close
69
69
 
70
- puts "Akamai upload completed for #{filename}."
71
-
72
- puts "Sending purge request"
73
- purge_result = purge("http://#{self.configuration.netstorage_public_host}/#{location}/#{filename}")
74
- puts "Purge request #{ purge_result ? 'was successful' : 'failed' }."
75
- end
70
+ puts "Akamai upload completed for #{filename}."
71
+
72
+ puts "Sending purge request"
73
+ purge_result = purge("http://#{self.configuration.netstorage_public_host}/#{location}/#{filename}")
74
+ puts "Purge request #{ purge_result ? 'was successful' : 'failed' }."
76
75
  end
77
76
 
78
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akamai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Zeschin