From 35ddba13e32f4d57c0896c75c747cb8dab3bc549 Mon Sep 17 00:00:00 2001 From: Tom Wilson Date: Fri, 22 May 2015 11:17:52 -0600 Subject: [PATCH] Fixed mismatch error between README and resource code, now using 's3_time_prefix' everywhere. --- README.md | 10 +++++----- libraries/provider_s3_backup_base.rb | 2 +- libraries/resource_s3_backup_base.rb | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 199eba5..48ccac1 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,11 @@ The S3 bucket to back up into. The S3 access_key_id. * __s3_secret_access_key__ - kind_of: String, required: true. The S3 secret_access_key. -* __s3_date_prefix__ - kind_of: String,, default: '%d-%b-%Y'. -The prefix used with each saved object name. -This string is processed using the Ruby Time.strftime() function so this -prefix is useful to name backups by date, etc. -For example, the default might resolve to this: "20-May-2015", +* __s3_time_prefix__ - kind_of: String,, default: '%d-%b-%Y'. +The s3_time_prefix is processed using the Ruby Time.strftime() function +and prepended to each saved object name. +The usual usage is to provide a date prefix for a daily backup. +For example, on May 20th, 2015, the default will resolve to: "20-May-2015". See Ruby Time.strftime() docs for more examples. __Logging:__ diff --git a/libraries/provider_s3_backup_base.rb b/libraries/provider_s3_backup_base.rb index c46642a..b4c5cad 100644 --- a/libraries/provider_s3_backup_base.rb +++ b/libraries/provider_s3_backup_base.rb @@ -50,7 +50,7 @@ def action_create 'access_key_id' => new_resource.s3_access_key_id, 'secret_access_key' => new_resource.s3_secret_access_key, 'bucket' => new_resource.s3_bucket, - 'time_prefix' => new_resource.time_prefix + 'time_prefix' => new_resource.s3_time_prefix }, 'log' => { 'ident' => new_resource.log_ident, diff --git a/libraries/resource_s3_backup_base.rb b/libraries/resource_s3_backup_base.rb index 1c22095..052e4e5 100644 --- a/libraries/resource_s3_backup_base.rb +++ b/libraries/resource_s3_backup_base.rb @@ -31,8 +31,8 @@ def s3_access_key_id(arg = nil) def s3_secret_access_key(arg = nil) set_or_return :s3_secret_access_key, arg, kind_of: String, required: true end - def time_prefix(arg = nil) - set_or_return :time_prefix, arg, kind_of: String, default: '%d-%b-%Y' + def s3_time_prefix(arg = nil) + set_or_return :s3_time_prefix, arg, kind_of: String, default: '%d-%b-%Y' end def log_ident(arg = nil)