heroku-mongo-backup 0.1.2 → 0.2.0

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/heroku_mongo_backup.rb +3 -2
  2. metadata +6 -6
@@ -14,7 +14,7 @@ module HerokuMongoBackup
14
14
 
15
15
  class Backup
16
16
  def chdir
17
- Dir.chdir("tmp")
17
+ Dir.chdir("/tmp")
18
18
  begin
19
19
  Dir.mkdir("dump")
20
20
  rescue
@@ -108,7 +108,8 @@ module HerokuMongoBackup
108
108
  @file_name = Time.now.strftime("%Y-%m-%d_%H-%M-%S.gz")
109
109
 
110
110
  if ENV['RAILS_ENV'] == 'production'
111
- uri = YAML.load_file("config/mongoid.yml")['production']['uri']
111
+ config_template = ERB.new(IO.read("config/mongoid.yml"))
112
+ uri = YAML.load(config_template.result)['production']['uri']
112
113
  else
113
114
  config = YAML.load_file("config/mongoid.yml")['development']
114
115
  uri = "mongodb://#{config['host']}:#{config['port']}/#{config['database']}"
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.1.2
4
+ version: 0.2.0
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: 2011-09-13 00:00:00.000000000Z
12
+ date: 2011-09-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70126427513420 !ruby/object:Gem::Requirement
16
+ requirement: &70151865654680 !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: *70126427513420
24
+ version_requirements: *70151865654680
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mocha
27
- requirement: &70126427512740 !ruby/object:Gem::Requirement
27
+ requirement: &70151865653920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70126427512740
35
+ version_requirements: *70151865653920
36
36
  description: Rake task for backing up mongo database on heroku and push it to S3.
37
37
  email: mail@alexkravets.com
38
38
  executables: []