lu-tze 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/lu_tze.rb +16 -4
  2. metadata +3 -3
@@ -21,7 +21,7 @@ class LuTze
21
21
  end
22
22
 
23
23
  def upload
24
- file = File.new(compressed_file_name, 'rw')
24
+ file = File.new(compressed_file_name, 'r')
25
25
  RestClient.post 'http://historian.heroku.com/api/data_backups',
26
26
  :site_name => app_name,
27
27
  :backup => file
@@ -44,14 +44,26 @@ class LuTze
44
44
  end
45
45
 
46
46
  def compress_command
47
- "tar -czvf #{compressed_file_name} #{file_name}"
47
+ "cd #{tmp}; tar -czvf #{short_file_name} #{short_compressed_file_name}"
48
+ end
49
+
50
+ def short_file_name
51
+ "database.sql"
48
52
  end
49
53
 
50
54
  def file_name
51
- "#{RAILS_ROOT}/tmp/database.sql"
55
+ "#{tmp}/#{short_file_name}"
56
+ end
57
+
58
+ def short_compressed_file_name
59
+ "database.tar.gz"
52
60
  end
53
61
 
54
62
  def compressed_file_name
55
- "#{RAILS_ROOT}/tmp/database.tar.gz"
63
+ "#{tmp}/#{short_compressed_file_name}"
64
+ end
65
+
66
+ def tmp
67
+ "#{RAILS_ROOT}/tmp"
56
68
  end
57
69
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lu-tze
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Allan