diff --git a/lib/parse/api/users.rb b/lib/parse/api/users.rb index bba45d0..295df95 100644 --- a/lib/parse/api/users.rb +++ b/lib/parse/api/users.rb @@ -84,7 +84,7 @@ def update_user(id, body = {}, headers: {}, **opts) # @return [Parse::Response] def set_service_auth_data(id, service_name, auth_data, headers: {}, **opts) body = { authData: { service_name => auth_data } } - update_user(id, body, opts) + update_user(id, body, **opts) end # Delete a {Parse::User} record given an objectId. @@ -143,7 +143,7 @@ def logout(session_token, headers: {}, **opts) def signup(username, password, email = nil, body: {}, **opts) body = body.merge({ username: username, password: password }) body[:email] = email || body[:email] - create_user(body, opts) + create_user(body, **opts) end end # Users end #API diff --git a/lib/parse/model/associations/has_many.rb b/lib/parse/model/associations/has_many.rb index 6d69020..86d1e4d 100644 --- a/lib/parse/model/associations/has_many.rb +++ b/lib/parse/model/associations/has_many.rb @@ -406,7 +406,7 @@ def has_many(key, scope = nil, **opts) opts[:through] ||= :query if opts[:through] == :query - return has_many_queried(key, scope, opts) + return has_many_queried(key, scope, **opts) end # below this is the same diff --git a/lib/parse/model/classes/session.rb b/lib/parse/model/classes/session.rb index 36db1f7..aa5cef8 100644 --- a/lib/parse/model/classes/session.rb +++ b/lib/parse/model/classes/session.rb @@ -68,7 +68,7 @@ class Session < Parse::Object # @param token [String] the session token # @return [Session] the session for this token, otherwise nil. def self.session(token, **opts) - response = client.fetch_session(token, opts) + response = client.fetch_session(token, **opts) if response.success? return Parse::Session.build response.result end diff --git a/lib/parse/model/classes/user.rb b/lib/parse/model/classes/user.rb index 19b3051..a15c437 100644 --- a/lib/parse/model/classes/user.rb +++ b/lib/parse/model/classes/user.rb @@ -417,7 +417,7 @@ def self.session(token, opts = {}) def self.session!(token, opts = {}) # support Parse::Session objects token = token.session_token if token.respond_to?(:session_token) - response = client.current_user(token, opts) + response = client.current_user(token, **opts) response.success? ? Parse::User.build(response.result) : nil end diff --git a/lib/parse/model/core/fetching.rb b/lib/parse/model/core/fetching.rb index 8c69c90..448cc68 100644 --- a/lib/parse/model/core/fetching.rb +++ b/lib/parse/model/core/fetching.rb @@ -15,7 +15,7 @@ module Fetching # @param opts [Hash] a set of options to pass to the client request. # @return [self] the current object, useful for chaining. def fetch!(opts = {}) - response = client.fetch_object(parse_class, id, opts) + response = client.fetch_object(parse_class, id, **opts) if response.error? puts "[Fetch Error] #{response.code}: #{response.error}" end diff --git a/lib/parse/query.rb b/lib/parse/query.rb index c6e8695..d53e52e 100644 --- a/lib/parse/query.rb +++ b/lib/parse/query.rb @@ -635,7 +635,7 @@ def distinct(field) compile_query[:distinct] = Query.format_field(field).to_sym @count = old_count_value # perform aggregation - return client.aggregate_objects(@table, compile_query.as_json, _opts).result + return client.aggregate_objects(@table, compile_query.as_json, **_opts).result else raise ArgumentError, "Invalid field name passed to `distinct`." end @@ -654,7 +654,7 @@ def distinct(field) def count old_value = @count @count = 1 - res = client.find_objects(@table, compile.as_json, _opts).count + res = client.find_objects(@table, compile.as_json, **_opts).count @count = old_value res end @@ -766,7 +766,7 @@ def _opts # @param compiled_query [Hash] the compiled query # @return [Parse::Response] a response for a query request. def fetch!(compiled_query) - response = client.find_objects(@table, compiled_query.as_json, _opts) + response = client.find_objects(@table, compiled_query.as_json, **_opts) if response.error? puts "[ParseQuery] #{response.error}" end