diff --git a/lib/aws-record/record/client_configuration.rb b/lib/aws-record/record/client_configuration.rb index c8279a8..15a015e 100644 --- a/lib/aws-record/record/client_configuration.rb +++ b/lib/aws-record/record/client_configuration.rb @@ -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 diff --git a/lib/aws-record/record/transactions.rb b/lib/aws-record/record/transactions.rb index 90f194e..b678026 100644 --- a/lib/aws-record/record/transactions.rb +++ b/lib/aws-record/record/transactions.rb @@ -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)