Skip to content

Commit

Permalink
(m) whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminoakes committed Feb 28, 2014
1 parent ab1bfd3 commit 636084e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/maid/tools.rb
Expand Up @@ -28,11 +28,11 @@ module Maid::Tools
# Single path:
#
# move('~/Downloads/foo.zip', '~/Archive/Software/Mac OS X/')
#
#
# Multiple paths:
#
# move(['~/Downloads/foo.zip', '~/Downloads/bar.zip'], '~/Archive/Software/Mac OS X/')
# move(dir('~/Downloads/*.zip'), '~/Archive/Software/Mac OS X/')
# move(dir('~/Downloads/*.zip'), '~/Archive/Software/Mac OS X/')
def move(sources, destination)
destination = expand(destination)

Expand Down Expand Up @@ -84,11 +84,11 @@ def rename(source, destination)
#
# The path is still moved if a file already exists in the trash with the same name. However, the current date and
# time is appended to the filename.
#
#
# **Note:** the OS-native "restore" or "put back" functionality for trashed files is not currently supported. (See
# [issue #63](https://github.com/benjaminoakes/maid/issues/63).) However, they can be restored manually, and the Maid
# log can help assist with this.
#
#
# ## Options
#
# `:remove_over => Fixnum` (e.g. `1.gigabyte`, `1024.megabytes`)
Expand All @@ -102,7 +102,7 @@ def rename(source, destination)
# Single path:
#
# trash('~/Downloads/foo.zip')
#
#
# Multiple paths:
#
# trash(['~/Downloads/foo.zip', '~/Downloads/bar.zip'])
Expand Down Expand Up @@ -146,7 +146,7 @@ def trash(paths, options = {})
# Delete the files at the given path recursively.
#
# **NOTE**: In most cases, `trash` is a safer choice, since the files will be recoverable by retreiving them from the trash. Once you delete a file using `remove`, it's gone! Please use `trash` whenever possible and only use `remove` when necessary.
#
#
# ## Options
#
# `:force => boolean`
Expand Down Expand Up @@ -234,11 +234,11 @@ def files(globs)
dir(globs).
select { |f| File.file?(f) }
end

# Escape characters that have special meaning as a part of path global patterns.
#
# Useful when using `dir` with file names that may contain `{ } [ ]` characters.
#
#
# ## Example
#
# escape_glob('test [tmp]') # => 'test \\[tmp\\]'
Expand Down Expand Up @@ -430,7 +430,7 @@ def disk_usage(path)
raw = cmd("du -s #{ sh_escape(path) }")
# FIXME: This reports in kilobytes, but should probably report in bytes.
usage_kb = raw.split(/\s+/).first.to_i

if usage_kb.zero?
raise "Stopping pessimistically because of unexpected value from du (#{ raw.inspect })"
else
Expand Down Expand Up @@ -521,7 +521,7 @@ def git_piston(path)
# The host OS must provide `rsync`. See the `rsync` man page for a detailed description.
#
# man rsync
#
#
# ## Options
#
# `:delete => boolean`
Expand Down Expand Up @@ -610,7 +610,7 @@ def mime_type(path)
# media_type('bar.jpg') # => "image"
def media_type(path)
type = MIME::Types.type_for(path)[0]

if type
type.media_type
end
Expand All @@ -634,7 +634,7 @@ def media_type(path)
# where_content_type(dir('~/Downloads/*'), 'image/jpeg')
#
# ### Using Spotlight content types
#
#
# Less portable, but richer data in some cases.
#
# where_content_type(dir('~/Downloads/*'), 'public.image')
Expand Down

0 comments on commit 636084e

Please sign in to comment.