heroku-mongo-backup 0.3.1 → 0.3.2

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/s3_helpers.rb +18 -5
  2. metadata +8 -8
@@ -1,11 +1,17 @@
1
1
  begin
2
2
  require 's3'
3
3
  rescue LoadError
4
- puts "There is no 's3' gem in Gemfile."
4
+ #
5
+ # There is no 's3' gem in Gmefile
6
+ #
7
+ #puts "There is no 's3' gem in Gemfile."
5
8
  end
6
9
 
7
10
  if defined?(S3)
8
- puts "Using \'s3\' gem as Amazon S3 interface."
11
+ #
12
+ # Using 's3' gem an Amazon S3 interface
13
+ #
14
+ #puts "Using \'s3\' gem as Amazon S3 interface."
9
15
  def HerokuMongoBackup::s3_connect(bucket, key, secret)
10
16
  service = S3::Service.new(:access_key_id => key,
11
17
  :secret_access_key => secret)
@@ -33,11 +39,17 @@ if defined?(S3)
33
39
  begin
34
40
  require 'aws/s3'
35
41
  rescue LoadError
36
- puts "There is no 'aws/s3' gem in Gemfile."
42
+ #
43
+ # There is no 'aws/s3' in Gemfile
44
+ #
45
+ #puts "There is no 'aws/s3' gem in Gemfile."
37
46
  end
38
47
 
39
48
  if defined?(AWS)
40
- puts "Using \'aws/s3\' gem as Amazon S3 interface."
49
+ #
50
+ # Using 'aws/s3' gem as Amazon S3 interface
51
+ #
52
+ #puts "Using \'aws/s3\' gem as Amazon S3 interface."
41
53
  def HerokuMongoBackup::s3_connect(bucket, key, secret)
42
54
  AWS::S3::Base.establish_connection!(:access_key_id => key,
43
55
  :secret_access_key => secret)
@@ -51,7 +63,8 @@ if defined?(S3)
51
63
  return content
52
64
  end
53
65
  else
54
- puts "Please include 's3' or 'aws/s3' gem in applications Gemfile."
66
+ logging = Logger.new(STDOUT)
67
+ logging.error "heroku-mongo-backup: Please include 's3' or 'aws/s3' gem in applications Gemfile."
55
68
  end
56
69
  end
57
70
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku-mongo-backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-09 00:00:00.000000000Z
12
+ date: 2012-02-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70165447584240 !ruby/object:Gem::Requirement
16
+ requirement: &70311073645040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70165447584240
24
+ version_requirements: *70311073645040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mocha
27
- requirement: &70165447583760 !ruby/object:Gem::Requirement
27
+ requirement: &70311073644180 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70165447583760
35
+ version_requirements: *70311073644180
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: crack
38
- requirement: &70165447580100 !ruby/object:Gem::Requirement
38
+ requirement: &70311073642720 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70165447580100
46
+ version_requirements: *70311073642720
47
47
  description: Rake task for backing up mongo database on heroku and push it to S3.
48
48
  Library can be used as rake task or be easily integrated into daily cron job.
49
49
  email: santyor@gmail.com