db2s3 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1,3 +1,2 @@
1
1
  spec/s3_config.rb
2
- db2s3.gemspec
3
2
  pkg
@@ -1,9 +1,9 @@
1
- DB2S3 - A rails plugin to backup Mysql to Amazon S3
2
- ---------------------------------------------------
3
- You're looking at a monthly spend of four cents
4
- So pony up you cheap bastard, and store your backups on S3
1
+ = DB2S3
2
+
3
+ A rails plugin to backup Mysql to Amazon S3. You're looking at a monthly spend of four cents. So pony up you cheap bastard, and store your backups on S3
4
+
5
+ == Usage
5
6
 
6
- Usage:
7
7
  # In config/environment.rb
8
8
  config.gem "db2s3", :source => "http://gemcutter.org"
9
9
 
@@ -29,7 +29,12 @@ Usage:
29
29
  # Handy tasks
30
30
  rake db2s3:statistics # Shows you the size of your DB
31
31
  rake db2s3:backup:restore # You should be testing this regularly
32
- rake db2s3:backup:clear # Clean up old backups - cron this
32
+ rake db2s3:backup:clean # Clean up old backups - cron this
33
+
34
+ == Development
35
+
36
+ Specs are really week. This code is bit hackish but is being used by quite a few people.
37
+
38
+ == Kudos
33
39
 
34
- Kudos:
35
- http://github.com/pauldowman/blog_code_examples/tree/master/mysql_s3_backup
40
+ http://github.com/pauldowman/blog_code_examples/tree/master/mysql_s3_backup
data/Rakefile CHANGED
@@ -2,17 +2,3 @@ desc "Create test database"
2
2
  task :create_test_db do
3
3
  `mysqladmin -u root create db2s3_unittest`
4
4
  end
5
-
6
- begin
7
- require 'jeweler'
8
- Jeweler::Tasks.new do |gemspec|
9
- gemspec.name = 'db2s3'
10
- gemspec.summary = "Summarize your gem"
11
- gemspec.description = 'db2s3 provides rake tasks for backing up and restoring your DB to S3'
12
- gemspec.email = 'contact@rhnh.net'
13
- gemspec.homepage = 'http://github.com/xaviershay/db2s3'
14
- gemspec.authors = ['Xavier Shay']
15
- end
16
- rescue LoadError
17
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
18
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -1,4 +1,8 @@
1
- require 'activesupport'
1
+ begin
2
+ require 'activesupport' # The old one
3
+ rescue LoadError
4
+ require 'active_support' # The new one
5
+ end
2
6
  require 'aws/s3'
3
7
  require 'tempfile'
4
8
 
@@ -64,7 +68,7 @@ class DB2S3
64
68
  table_name article_attachment
65
69
  FROM information_schema.tables
66
70
  WHERE table_schema = '#{db_credentials[:database]}'
67
- ORDER BY 3 desc;
71
+ ORDER BY total_size_mb + total_index_size_mb desc;
68
72
  EOS
69
73
  rows = []
70
74
  results.each {|x| rows << x.to_a }
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db2s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 3
8
+ - 2
9
+ version: 0.3.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - Xavier Shay
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-12-07 00:00:00 +11:00
17
+ date: 2010-10-22 00:00:00 +11:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -20,11 +25,11 @@ executables: []
20
25
  extensions: []
21
26
 
22
27
  extra_rdoc_files:
23
- - README
28
+ - README.rdoc
24
29
  files:
25
30
  - .gitignore
26
31
  - HISTORY
27
- - README
32
+ - README.rdoc
28
33
  - Rakefile
29
34
  - VERSION
30
35
  - init.rb
@@ -47,21 +52,25 @@ rdoc_options:
47
52
  require_paths:
48
53
  - lib
49
54
  required_ruby_version: !ruby/object:Gem::Requirement
55
+ none: false
50
56
  requirements:
51
57
  - - ">="
52
58
  - !ruby/object:Gem::Version
59
+ segments:
60
+ - 0
53
61
  version: "0"
54
- version:
55
62
  required_rubygems_version: !ruby/object:Gem::Requirement
63
+ none: false
56
64
  requirements:
57
65
  - - ">="
58
66
  - !ruby/object:Gem::Version
67
+ segments:
68
+ - 0
59
69
  version: "0"
60
- version:
61
70
  requirements: []
62
71
 
63
72
  rubyforge_project:
64
- rubygems_version: 1.3.5
73
+ rubygems_version: 1.3.7
65
74
  signing_key:
66
75
  specification_version: 3
67
76
  summary: Summarize your gem