unmac 0.9 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/README +10 -17
  2. data/Rakefile +2 -2
  3. data/bin/unmac +9 -3
  4. data/test/test_unmac.rb +9 -0
  5. data/unmac.gemspec +1 -1
  6. metadata +3 -3
data/README CHANGED
@@ -10,6 +10,8 @@ Options:
10
10
  -s, --keep-spotlight Do not delete Spotlight data
11
11
  -f, --keep-fsevents Do not delete Time Machine stuff
12
12
  -t, --keep-trashes Do not delete volume trashes
13
+ -c, --keep-document-revisions Do not delete document revisions
14
+ -b, --keep-mobile-backups Do not delete mobile backups
13
15
  -m, --keep-macosx Do not delete "__MACOSX" directories
14
16
  -r, --keep-dsstore Do not delete ".DS_Store" files
15
17
  -d, --keep-apple-double Do not delete "._*" ghost files
@@ -20,8 +22,8 @@ Description:
20
22
  When a Mac copies files to volumes that have a different file system it adds
21
23
  some auxiliary files that represent different kinds of metadata. This typically
22
24
  happens with memory sticks, network drives, SD cards, etc. Mac archivers like
23
- zip(1) add special files as well, like "__MACOSX", you'll see them for example
24
- if you extract a Zip file like that on Windows.
25
+ zip(1) add special files as well, like "__MACOSX", you'll see them
26
+ for example if you extract a Zip file like that on Windows.
25
27
 
26
28
  The purpose of these special files is to let another Mac rebuild the metadata
27
29
  from them, Spotlight integration, etc. But if you are not interested in these
@@ -41,6 +43,12 @@ What's deleted:
41
43
  * A folder called ".Trashes" in the root directory of volumes stores their
42
44
  trashes. Those ones are taken into account by the Trash in the Dock.
43
45
 
46
+ * Document revisions are stored on a folder called .DocumentRevisions-V100
47
+ in the root directory. (New in Lion.)
48
+
49
+ * Mobile backups are stored on a folder called .MobileBackups in the root
50
+ directory. (New in Lion.)
51
+
44
52
  * Some archivers create auxiliary directories called "__MACOSX".
45
53
 
46
54
  * Finder and Spotlight data related to each folder gets stored in an
@@ -54,18 +62,3 @@ What's deleted:
54
62
 
55
63
  Some stuff is only found in the root folder of volumes, unmac looks for them
56
64
  in any directory you pass as argument, but not on their subdirectories.
57
-
58
- Installation:
59
- This program is portable, it has been tested on Mac OS X, Linux, and Windows.
60
- Should work at least in any other Unix.
61
-
62
- unmac is distributed as a Ruby gem. Once you have Ruby and RubyGems installed
63
- execute
64
-
65
- gem install unmac
66
-
67
- License:
68
- See the MIT-LICENSE file included in the distribution.
69
-
70
- Copyright:
71
- Copyright (C) 2009-2011 Xavier Noria.
data/Rakefile CHANGED
@@ -7,6 +7,6 @@ Rake::TestTask.new do |t|
7
7
  t.verbose = true
8
8
  end
9
9
 
10
- task :home do
11
- sh "scp home/index.html fxn@rubyforge.org:/var/www/gforge-projects/unmac/"
10
+ task :readme do
11
+ system "ruby -Ilib bin/unmac > README"
12
12
  end
data/bin/unmac CHANGED
@@ -51,9 +51,11 @@ What's deleted:
51
51
  * A folder called "#{Unmacer::TRASHES}" in the root directory of volumes stores their
52
52
  trashes. Those ones are taken into account by the Trash in the Dock.
53
53
 
54
- * Document revisions are stored in the /.DocumentRevisions-V100 folder. (New in Lion.)
54
+ * Document revisions are stored on a folder called #{Unmacer::REVISIONS}
55
+ in the root directory. (New in Lion.)
55
56
 
56
- * Mobile backups are stored in the /.MobileBackups folder. (New in Lion.)
57
+ * Mobile backups are stored on a folder called #{Unmacer::MBACKUPS} in the root
58
+ directory. (New in Lion.)
57
59
 
58
60
  * Some archivers create auxiliary directories called "#{Unmacer::MACOSX}".
59
61
 
@@ -106,7 +108,11 @@ begin
106
108
  test = true
107
109
  end
108
110
  end
109
- unmacer.unmac!(ARGV) unless test
111
+ if ARGV.empty?
112
+ usage and exit
113
+ else
114
+ unmacer.unmac!(ARGV) unless test
115
+ end
110
116
  rescue GetoptLong::InvalidOption
111
117
  usage and exit 1
112
118
  end
@@ -281,4 +281,13 @@ class TestUnmac < Test::Unit::TestCase
281
281
  assert_match %r{^Usage\b}, buf
282
282
  assert ARGV.empty?
283
283
  end
284
+
285
+ def test_no_directory
286
+ buf = ''
287
+ $> = StringIO.open(buf, 'w')
288
+ call_unmac
289
+ $> = $stdout
290
+ assert_match %r{^unmac\b}, buf
291
+ assert_match %r{^Usage\b}, buf
292
+ end
284
293
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'unmac'
3
- spec.version = '0.9'
3
+ spec.version = '1.0'
4
4
  spec.summary = 'Delete spurious Mac files under a directory or volume'
5
5
  spec.homepage = 'http://github.com/fxn/unmac/tree/master'
6
6
  spec.executables = %w(unmac)
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unmac
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
+ - 1
7
8
  - 0
8
- - 9
9
- version: "0.9"
9
+ version: "1.0"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Xavier Noria