{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/1e2b26a0cb21331878155152e3d59080?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1e2b26a0cb21331878155152e3d59080","url":"https://api.github.com/users/uoksana","login":"uoksana","id":449552},"milestone":null,"labels":[],"assignee":null,"updated_at":"2011-11-12T16:54:49Z","closed_at":null,"comments":0,"url":"https://api.github.com/repos/meskyanichi/backup/issues/212","body":"Is it passable using uri in Backup:Model for MongoDB?\r\n\r\nLike this:\r\n\r\nrequire 'yaml'\r\ndatabase_yml = File.expand_path('../config/mongoid.yml',  __FILE__)\r\nRAILS_ENV    = ENV['RAILS_ENV'] || 'development'\r\nconfig = YAML.load_file(database_yml)\r\n\r\nBackup::Model.new(:db_backup, 'database backup') do\r\n  database MongoDB do |db|\r\n    db.uri                = config[RAILS_ENV][\"uri\"]\r\n    db.only_collections   = ['locations', 'tariffs' 'trips','users']\r\n    db.additional_options = []\r\n    db.lock               = false\r\n  end\r\n\r\n store_with Dropbox do |db|\r\n    db.email      = 'foo@email'\r\n    db.password   = 'password'\r\n    db.api_key    = 'api key'\r\n    db.api_secret = 'secret'\r\n    db.timeout    = 300\r\n    db.path       = '/myapp'\r\n    db.keep       = 25\r\n  end\r\n\r\n  ##\r\n  # Gzip [Compressor]\r\n  #\r\n  compress_with Gzip do |compression|\r\n    compression.best = true\r\n    compression.fast = false\r\n  end\r\nend\r\n\r\n\r\nmongoid.yml\r\n\r\nproduction:\r\n# <<: *defaults\r\n# <<: *defaults\r\n  uri: <%= ENV['MONGOLAB_URI'] %>\r\n","html_url":"https://github.com/meskyanichi/backup/issues/212","title":"Using uri in Mongodb backup model","number":212,"id":2217770,"created_at":"2011-11-12T16:54:49Z"},"action":"opened"}