summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-11-09 15:43:26 -0800
committerPaul Berry <paul@puppetlabs.com>2010-11-09 15:43:26 -0800
commite62870f63c63644a7719636f211c8e821695cc20 (patch)
tree01790f4d2cdd886c72035ae80de61b4554b12e8a
parent0f5c57f0f81879ec0bf8be0350ad87ac9778527d (diff)
parent04515cfb1230d6bf0fd88910c91715d1d94faeae (diff)
downloadpuppet-e62870f63c63644a7719636f211c8e821695cc20.tar.gz
puppet-e62870f63c63644a7719636f211c8e821695cc20.tar.xz
puppet-e62870f63c63644a7719636f211c8e821695cc20.zip
Merge branch 'feature/master/5198' into next
-rwxr-xr-xlib/puppet/type/tidy.rb10
-rwxr-xr-xspec/unit/type/tidy_spec.rb3
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/puppet/type/tidy.rb b/lib/puppet/type/tidy.rb
index 65cc077cf..93a7e96cf 100755
--- a/lib/puppet/type/tidy.rb
+++ b/lib/puppet/type/tidy.rb
@@ -141,15 +141,17 @@ Puppet::Type.newtype(:tidy) do
newparam(:size) do
desc "Tidy files whose size is equal to or greater than
the specified size. Unqualified values are in kilobytes, but
- *b*, *k*, and *m* can be appended to specify *bytes*, *kilobytes*,
- and *megabytes*, respectively. Only the first character is
- significant, so the full word can also be used."
+ *b*, *k*, *m*, *g*, and *t* can be appended to specify *bytes*,
+ *kilobytes*, *megabytes*, *gigabytes*, and *terabytes*, respectively.
+ Only the first character is significant, so the full word can also
+ be used."
@@sizeconvertors = {
:b => 0,
:k => 1,
:m => 2,
- :g => 3
+ :g => 3,
+ :t => 4
}
def convert(unit, multi)
diff --git a/spec/unit/type/tidy_spec.rb b/spec/unit/type/tidy_spec.rb
index 11edbfbf3..1573ead1b 100755
--- a/spec/unit/type/tidy_spec.rb
+++ b/spec/unit/type/tidy_spec.rb
@@ -110,7 +110,8 @@ describe tidy do
:b => 0,
:kb => 1,
:mb => 2,
- :gb => 3
+ :gb => 3,
+ :tb => 4
}
convertors.each do |unit, multiple|