Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/aws-record/record/client_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ module ClientConfiguration
# @option opts [Aws::DynamoDB::Client] :client allows you to pass in your
# own pre-configured client.
def configure_client(opts = {})
# rubocop:disable Style/RedundantSelf
@dynamodb_client = if self.class != Module && Aws::Record.extends_record?(self) && opts.empty? &&
self.superclass.instance_variable_get('@dynamodb_client')
self.superclass.instance_variable_get('@dynamodb_client')
superclass.instance_variable_get('@dynamodb_client')
superclass.instance_variable_get('@dynamodb_client')
else
_build_client(opts)
end
# rubocop:enable Style/RedundantSelf
end

# Gets the
Expand Down
4 changes: 2 additions & 2 deletions lib/aws-record/record/transactions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ def _transform_save_record(save_record, opts)
'currently supported. You should rewrite this case to use ' \
'a :put transaction, adding the existence check to your ' \
"own condition expression if desired.\n" \
"\tItem: #{JSON.pretty_unparse(save_record.to_h)}\n" \
"\tExtra Options: #{JSON.pretty_unparse(opts)}"
"\tItem: #{JSON.pretty_generate(save_record.to_h)}\n" \
"\tExtra Options: #{JSON.pretty_generate(opts)}"
else
opts = opts.merge(safety_expression)
_transform_put_record(save_record, opts)
Expand Down
Loading