From 762d8f57d5b1607c126b491db0770e1140debe82 Mon Sep 17 00:00:00 2001 From: geemus <geemus@gmail.com> Date: Sun, 29 Apr 2012 16:31:28 -0500 Subject: [PATCH] [aws|dynamodb] correct batch_put_item to batch_write_item for consistency with API --- lib/fog/aws/dynamodb.rb | 2 +- .../dynamodb/{batch_put_item.rb => batch_write_item.rb} | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) rename lib/fog/aws/requests/dynamodb/{batch_put_item.rb => batch_write_item.rb} (80%) diff --git a/lib/fog/aws/dynamodb.rb b/lib/fog/aws/dynamodb.rb index 7f3678079..bda735a4a 100644 --- a/lib/fog/aws/dynamodb.rb +++ b/lib/fog/aws/dynamodb.rb @@ -9,7 +9,7 @@ module Fog request_path 'fog/aws/requests/dynamodb' request :batch_get_item - request :batch_put_item + request :batch_write_item request :create_table request :delete_item request :delete_table diff --git a/lib/fog/aws/requests/dynamodb/batch_put_item.rb b/lib/fog/aws/requests/dynamodb/batch_write_item.rb similarity index 80% rename from lib/fog/aws/requests/dynamodb/batch_put_item.rb rename to lib/fog/aws/requests/dynamodb/batch_write_item.rb index 3b179936c..30e1c63b9 100644 --- a/lib/fog/aws/requests/dynamodb/batch_put_item.rb +++ b/lib/fog/aws/requests/dynamodb/batch_write_item.rb @@ -3,6 +3,11 @@ module Fog class DynamoDB class Real + def batch_put_item(request_items) + Fog::Logger.deprecation("batch_put_item is deprecated, use batch_write_item instead") + batch_write_item(request_items) + end + #request_items has form: #{"table_name"=> # [{"PutRequest"=> @@ -13,7 +18,7 @@ module Fog # }}}, ... ]} # For more information: # http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_BatchWriteItems.html - def batch_put_item(request_items) + def batch_write_item(request_items) body = { 'RequestItems' => request_items }