lib/mongoid/shell/commands/mongodump.rb in mongoid-shell-0.4.4 vs lib/mongoid/shell/commands/mongodump.rb in mongoid-shell-0.4.5
- old
+ new
@@ -5,36 +5,25 @@
include Mongoid::Shell::Properties::Host
include Mongoid::Shell::Properties::Database
include Mongoid::Shell::Properties::Username
include Mongoid::Shell::Properties::Password
- attr_accessor :collection, :query, :out, :directoryperdb, :journal, :oplog, :repair, :forceTableScan, :dbpath, :ipv6, :excludeCollection,
- :excludeCollectionsWithPrefix
-
- def initialize(attrs = {})
- super
- end
-
- def vargs
- super({
- '--host' => :host,
- '--db' => :db,
- '--username' => :username,
- '--password' => :password,
- '--collection' => :collection,
- '--excludeCollection' => :excludeCollection,
- '--excludeCollectionsWithPrefix' => :excludeCollectionsWithPrefix,
- '--query' => :query,
- '--out' => :out,
- '--directoryperdb' => :directoryperdb,
- '--journal' => :journal,
- '--oplog' => :oplog,
- '--repair' => :repair,
- '--forceTableScan' => :forceTableScan,
- '--dbpath' => :dbpath,
- '--ipv6' => :ipv6
- })
- end
+ option :host
+ option :db
+ option :username
+ option :password, sensitive: true
+ option :collection
+ option :excludeCollection
+ option :excludeCollectionsWithPrefix
+ option :query
+ option :out
+ option :directoryperdb
+ option :journal
+ option :oplog
+ option :repair
+ option :forceTableScan
+ option :dbpath
+ option :ipv6
end
end
end
end