lib/mongo/auth/user/view.rb in mongo-2.5.0.beta vs lib/mongo/auth/user/view.rb in mongo-2.5.0
- old
+ new
@@ -42,11 +42,11 @@
#
# @since 2.0.0
def create(user_or_name, options = {})
user = generate(user_or_name, options)
client.send(:with_session, options) do |session|
- Operation::Write::CreateUser.new(
+ Operation::Write::Command::CreateUser.new(
user: user,
db_name: database.name,
session: session
).execute(next_primary)
end
@@ -77,11 +77,11 @@
# @return [ Result ] The command response.
#
# @since 2.0.0
def remove(name, options = {})
client.send(:with_session, options) do |session|
- Operation::Write::RemoveUser.new(
+ Operation::Write::Command::RemoveUser.new(
user_name: name,
db_name: database.name,
session: session
).execute(next_primary)
end
@@ -101,11 +101,11 @@
#
# @since 2.0.0
def update(user_or_name, options = {})
client.send(:with_session, options) do |session|
user = generate(user_or_name, options)
- Operation::Write::UpdateUser.new(
+ Operation::Write::Command::UpdateUser.new(
user: user,
db_name: database.name,
session: session
).execute(next_primary)
end
@@ -130,10 +130,10 @@
private
def user_query(name, options = {})
client.send(:with_session, options) do |session|
- Operation::Commands::UserQuery.new(
+ Operation::Commands::UsersInfo.new(
user_name: name,
db_name: database.name,
session: session
).execute(next_primary)
end