maid 0.2.0.beta.3 → 0.2.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -0
- data/README.md +4 -4
- data/lib/maid/tools.rb +3 -2
- data/lib/maid/version.rb +1 -1
- data/maid.gemspec +1 -1
- data/spec/lib/maid/tools_spec.rb +14 -1
- metadata +222 -115
data/ChangeLog
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
maid (0.2.0.rc.1) unstable; urgency=low
|
2
|
+
|
3
|
+
* More documentation for "dir".
|
4
|
+
|
5
|
+
-- Benjamin Oakes <hello@benjaminoakes.com> Wed, 19 Dec 2012 00:00:00 +0000
|
6
|
+
|
1
7
|
maid (0.2.0.beta.3) unstable; urgency=low
|
2
8
|
|
3
9
|
* Use newly released "xdg" instead of custom "maid-xdg" dependency. (The new
|
data/README.md
CHANGED
@@ -59,16 +59,16 @@ This project wouldn't be where it is today without its users and contributors.
|
|
59
59
|
|
60
60
|
[Hazel for hackers](http://news.ycombinator.com/item?id=4928605) - December 16th, 2012 (peaked at #2)
|
61
61
|
|
62
|
+
[![Ruby5 Logo](https://raw.github.com/benjaminoakes/maid/master/resources/ruby5.gif)](http://ruby5.envylabs.com/)
|
63
|
+
|
64
|
+
[Podcast #302](http://ruby5.envylabs.com/episodes/306-episode-302-august-31st-2012) (at 2:45) - August 31st, 2012
|
65
|
+
|
62
66
|
[
|
63
67
|
![OneThingWell Logo](https://raw.github.com/benjaminoakes/maid/master/resources/OneThingWell.png)
|
64
68
|
](http://onethingwell.org/)
|
65
69
|
|
66
70
|
[Maid](http://onethingwell.org/post/30455088809/maid) - August 29th, 2012
|
67
71
|
|
68
|
-
[![Ruby5 Logo](https://raw.github.com/benjaminoakes/maid/master/resources/ruby5.gif)](http://ruby5.envylabs.com/)
|
69
|
-
|
70
|
-
[Podcast #302](http://ruby5.envylabs.com/episodes/306-episode-302-august-31st-2012) (at 2:45) - August 31st, 2012
|
71
|
-
|
72
72
|
[More...](https://github.com/benjaminoakes/maid/wiki/In-the-Media)
|
73
73
|
|
74
74
|
## Installation
|
data/lib/maid/tools.rb
CHANGED
@@ -27,7 +27,7 @@ module Maid::Tools
|
|
27
27
|
# Multiple paths:
|
28
28
|
#
|
29
29
|
# move(['~/Downloads/foo.zip', '~/Downloads/bar.zip'], '~/Archive/Software/Mac OS X/')
|
30
|
-
# move(dir('~/Downloads/*.zip'), '~/Archive/Software/Mac OS X/')
|
30
|
+
# move(dir('~/Downloads/*.zip'), '~/Archive/Software/Mac OS X/')
|
31
31
|
def move(sources, destination)
|
32
32
|
destination = expand(destination)
|
33
33
|
|
@@ -158,10 +158,11 @@ module Maid::Tools
|
|
158
158
|
#
|
159
159
|
# dir('~/Downloads/*.{exe,deb,dmg,pkg,rpm}')
|
160
160
|
#
|
161
|
-
# Multiple glob (
|
161
|
+
# Multiple glob (all are equivalent):
|
162
162
|
#
|
163
163
|
# dir(['~/Downloads/*.zip', '~/Dropbox/*.zip'])
|
164
164
|
# dir(%w(~/Downloads/*.zip ~/Dropbox/*.zip))
|
165
|
+
# dir('~/{Downloads,Dropbox}/*.zip')
|
165
166
|
#
|
166
167
|
def dir(globs)
|
167
168
|
expand_all(globs).
|
data/lib/maid/version.rb
CHANGED
data/maid.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.email = %w(hello@benjaminoakes.com)
|
12
12
|
s.license = 'GPLv2'
|
13
13
|
s.homepage = 'http://github.com/benjaminoakes/maid'
|
14
|
-
s.summary = 'Be lazy. Let Maid clean up after you, based on rules you define.'
|
14
|
+
s.summary = 'Be lazy. Let Maid clean up after you, based on rules you define. Think of it as "Hazel for hackers".'
|
15
15
|
s.description = s.summary
|
16
16
|
|
17
17
|
s.rubyforge_project = 'maid'
|
data/spec/lib/maid/tools_spec.rb
CHANGED
@@ -176,7 +176,7 @@ module Maid
|
|
176
176
|
FileUtils.touch(@other_file)
|
177
177
|
end
|
178
178
|
|
179
|
-
it 'list files in all provided
|
179
|
+
it 'list files in all provided globs' do
|
180
180
|
@maid.dir(%w(~/Downloads/*.tgz ~/Downloads/*.zip)).should == [@file, @other_file]
|
181
181
|
end
|
182
182
|
|
@@ -184,6 +184,19 @@ module Maid
|
|
184
184
|
@maid.dir('~/Downloads/*.{tgz,zip}').should == [@file, @other_file]
|
185
185
|
end
|
186
186
|
end
|
187
|
+
|
188
|
+
context 'with multiple directories' do
|
189
|
+
before do
|
190
|
+
@other_file = "#@home/Desktop/bar.zip"
|
191
|
+
FileUtils.touch(@file)
|
192
|
+
FileUtils.mkdir_p(File.dirname(@other_file))
|
193
|
+
FileUtils.touch(@other_file)
|
194
|
+
end
|
195
|
+
|
196
|
+
it 'lists files in directories when using regexp-like glob patterns' do
|
197
|
+
@maid.dir('~/{Desktop,Downloads}/*.zip').should == [@other_file, @file]
|
198
|
+
end
|
199
|
+
end
|
187
200
|
end
|
188
201
|
|
189
202
|
describe '#mkdir' do
|
metadata
CHANGED
@@ -1,189 +1,275 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: maid
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 15424055
|
5
5
|
prerelease: 6
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
- rc
|
11
|
+
- 1
|
12
|
+
version: 0.2.0.rc.1
|
6
13
|
platform: ruby
|
7
|
-
authors:
|
14
|
+
authors:
|
8
15
|
- Benjamin Oakes
|
9
16
|
autorequire:
|
10
17
|
bindir: bin
|
11
18
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
19
|
+
|
20
|
+
date: 2012-12-19 00:00:00 -06:00
|
21
|
+
default_executable:
|
22
|
+
dependencies:
|
23
|
+
- !ruby/object:Gem::Dependency
|
15
24
|
name: thor
|
16
|
-
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
27
|
none: false
|
18
|
-
requirements:
|
28
|
+
requirements:
|
19
29
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
hash: 95
|
32
|
+
segments:
|
33
|
+
- 0
|
34
|
+
- 16
|
35
|
+
- 0
|
21
36
|
version: 0.16.0
|
22
37
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
38
|
+
version_requirements: *id001
|
39
|
+
- !ruby/object:Gem::Dependency
|
26
40
|
name: deprecated
|
27
|
-
|
41
|
+
prerelease: false
|
42
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
43
|
none: false
|
29
|
-
requirements:
|
44
|
+
requirements:
|
30
45
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
hash: 5
|
48
|
+
segments:
|
49
|
+
- 3
|
50
|
+
- 0
|
51
|
+
- 1
|
32
52
|
version: 3.0.1
|
33
53
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
54
|
+
version_requirements: *id002
|
55
|
+
- !ruby/object:Gem::Dependency
|
37
56
|
name: ohai
|
38
|
-
|
57
|
+
prerelease: false
|
58
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
59
|
none: false
|
40
|
-
requirements:
|
60
|
+
requirements:
|
41
61
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
hash: 23
|
64
|
+
segments:
|
65
|
+
- 6
|
66
|
+
- 14
|
67
|
+
- 0
|
43
68
|
version: 6.14.0
|
44
69
|
type: :runtime
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
70
|
+
version_requirements: *id003
|
71
|
+
- !ruby/object:Gem::Dependency
|
48
72
|
name: xdg
|
49
|
-
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
75
|
none: false
|
51
|
-
requirements:
|
76
|
+
requirements:
|
52
77
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
hash: 1
|
80
|
+
segments:
|
81
|
+
- 2
|
82
|
+
- 2
|
83
|
+
- 3
|
54
84
|
version: 2.2.3
|
55
85
|
type: :runtime
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
86
|
+
version_requirements: *id004
|
87
|
+
- !ruby/object:Gem::Dependency
|
59
88
|
name: fakefs
|
60
|
-
|
89
|
+
prerelease: false
|
90
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
91
|
none: false
|
62
|
-
requirements:
|
92
|
+
requirements:
|
63
93
|
- - ~>
|
64
|
-
- !ruby/object:Gem::Version
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
hash: 13
|
96
|
+
segments:
|
97
|
+
- 0
|
98
|
+
- 4
|
99
|
+
- 1
|
65
100
|
version: 0.4.1
|
66
101
|
type: :development
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
102
|
+
version_requirements: *id005
|
103
|
+
- !ruby/object:Gem::Dependency
|
70
104
|
name: guard
|
71
|
-
|
105
|
+
prerelease: false
|
106
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
107
|
none: false
|
73
|
-
requirements:
|
108
|
+
requirements:
|
74
109
|
- - ~>
|
75
|
-
- !ruby/object:Gem::Version
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
hash: 11
|
112
|
+
segments:
|
113
|
+
- 1
|
114
|
+
- 5
|
115
|
+
- 4
|
76
116
|
version: 1.5.4
|
77
117
|
type: :development
|
78
|
-
|
79
|
-
|
80
|
-
- !ruby/object:Gem::Dependency
|
118
|
+
version_requirements: *id006
|
119
|
+
- !ruby/object:Gem::Dependency
|
81
120
|
name: guard-rspec
|
82
|
-
|
121
|
+
prerelease: false
|
122
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
123
|
none: false
|
84
|
-
requirements:
|
124
|
+
requirements:
|
85
125
|
- - ~>
|
86
|
-
- !ruby/object:Gem::Version
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
hash: 3
|
128
|
+
segments:
|
129
|
+
- 2
|
130
|
+
- 3
|
131
|
+
- 0
|
87
132
|
version: 2.3.0
|
88
133
|
type: :development
|
89
|
-
|
90
|
-
|
91
|
-
- !ruby/object:Gem::Dependency
|
134
|
+
version_requirements: *id007
|
135
|
+
- !ruby/object:Gem::Dependency
|
92
136
|
name: rb-readline
|
93
|
-
|
137
|
+
prerelease: false
|
138
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
94
139
|
none: false
|
95
|
-
requirements:
|
140
|
+
requirements:
|
96
141
|
- - ~>
|
97
|
-
- !ruby/object:Gem::Version
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
hash: 11
|
144
|
+
segments:
|
145
|
+
- 0
|
146
|
+
- 4
|
147
|
+
- 2
|
98
148
|
version: 0.4.2
|
99
149
|
type: :development
|
100
|
-
|
101
|
-
|
102
|
-
- !ruby/object:Gem::Dependency
|
150
|
+
version_requirements: *id008
|
151
|
+
- !ruby/object:Gem::Dependency
|
103
152
|
name: rake
|
104
|
-
|
153
|
+
prerelease: false
|
154
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
105
155
|
none: false
|
106
|
-
requirements:
|
156
|
+
requirements:
|
107
157
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
hash: 75
|
160
|
+
segments:
|
161
|
+
- 10
|
162
|
+
- 0
|
163
|
+
- 2
|
109
164
|
version: 10.0.2
|
110
165
|
type: :development
|
111
|
-
|
112
|
-
|
113
|
-
- !ruby/object:Gem::Dependency
|
166
|
+
version_requirements: *id009
|
167
|
+
- !ruby/object:Gem::Dependency
|
114
168
|
name: redcarpet
|
115
|
-
|
169
|
+
prerelease: false
|
170
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
116
171
|
none: false
|
117
|
-
requirements:
|
172
|
+
requirements:
|
118
173
|
- - ~>
|
119
|
-
- !ruby/object:Gem::Version
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
hash: 3
|
176
|
+
segments:
|
177
|
+
- 2
|
178
|
+
- 2
|
179
|
+
- 2
|
120
180
|
version: 2.2.2
|
121
181
|
type: :development
|
122
|
-
|
123
|
-
|
124
|
-
- !ruby/object:Gem::Dependency
|
182
|
+
version_requirements: *id010
|
183
|
+
- !ruby/object:Gem::Dependency
|
125
184
|
name: rspec
|
126
|
-
|
185
|
+
prerelease: false
|
186
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
127
187
|
none: false
|
128
|
-
requirements:
|
188
|
+
requirements:
|
129
189
|
- - ~>
|
130
|
-
- !ruby/object:Gem::Version
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
hash: 63
|
192
|
+
segments:
|
193
|
+
- 2
|
194
|
+
- 12
|
195
|
+
- 0
|
131
196
|
version: 2.12.0
|
132
197
|
type: :development
|
133
|
-
|
134
|
-
|
135
|
-
- !ruby/object:Gem::Dependency
|
198
|
+
version_requirements: *id011
|
199
|
+
- !ruby/object:Gem::Dependency
|
136
200
|
name: timecop
|
137
|
-
|
201
|
+
prerelease: false
|
202
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
138
203
|
none: false
|
139
|
-
requirements:
|
204
|
+
requirements:
|
140
205
|
- - ~>
|
141
|
-
- !ruby/object:Gem::Version
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
hash: 13
|
208
|
+
segments:
|
209
|
+
- 0
|
210
|
+
- 5
|
211
|
+
- 3
|
142
212
|
version: 0.5.3
|
143
213
|
type: :development
|
144
|
-
|
145
|
-
|
146
|
-
- !ruby/object:Gem::Dependency
|
214
|
+
version_requirements: *id012
|
215
|
+
- !ruby/object:Gem::Dependency
|
147
216
|
name: yard
|
148
|
-
|
217
|
+
prerelease: false
|
218
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
149
219
|
none: false
|
150
|
-
requirements:
|
220
|
+
requirements:
|
151
221
|
- - ~>
|
152
|
-
- !ruby/object:Gem::Version
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
hash: 57
|
224
|
+
segments:
|
225
|
+
- 0
|
226
|
+
- 8
|
227
|
+
- 3
|
153
228
|
version: 0.8.3
|
154
229
|
type: :development
|
155
|
-
|
156
|
-
|
157
|
-
- !ruby/object:Gem::Dependency
|
230
|
+
version_requirements: *id013
|
231
|
+
- !ruby/object:Gem::Dependency
|
158
232
|
name: rb-inotify
|
159
|
-
|
233
|
+
prerelease: false
|
234
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
160
235
|
none: false
|
161
|
-
requirements:
|
236
|
+
requirements:
|
162
237
|
- - ~>
|
163
|
-
- !ruby/object:Gem::Version
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
hash: 47
|
240
|
+
segments:
|
241
|
+
- 0
|
242
|
+
- 8
|
243
|
+
- 8
|
164
244
|
version: 0.8.8
|
165
245
|
type: :development
|
166
|
-
|
167
|
-
|
168
|
-
- !ruby/object:Gem::Dependency
|
246
|
+
version_requirements: *id014
|
247
|
+
- !ruby/object:Gem::Dependency
|
169
248
|
name: rb-fsevent
|
170
|
-
|
249
|
+
prerelease: false
|
250
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
171
251
|
none: false
|
172
|
-
requirements:
|
252
|
+
requirements:
|
173
253
|
- - ~>
|
174
|
-
- !ruby/object:Gem::Version
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
hash: 63
|
256
|
+
segments:
|
257
|
+
- 0
|
258
|
+
- 9
|
259
|
+
- 2
|
175
260
|
version: 0.9.2
|
176
261
|
type: :development
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
email:
|
262
|
+
version_requirements: *id015
|
263
|
+
description: Be lazy. Let Maid clean up after you, based on rules you define. Think of it as "Hazel for hackers".
|
264
|
+
email:
|
181
265
|
- hello@benjaminoakes.com
|
182
|
-
executables:
|
266
|
+
executables:
|
183
267
|
- maid
|
184
268
|
extensions: []
|
269
|
+
|
185
270
|
extra_rdoc_files: []
|
186
|
-
|
271
|
+
|
272
|
+
files:
|
187
273
|
- .gitignore
|
188
274
|
- .rspec
|
189
275
|
- .rvmrc
|
@@ -229,30 +315,51 @@ files:
|
|
229
315
|
- spec/lib/maid/user_agent_spec.rb
|
230
316
|
- spec/lib/maid_spec.rb
|
231
317
|
- spec/spec_helper.rb
|
318
|
+
has_rdoc: true
|
232
319
|
homepage: http://github.com/benjaminoakes/maid
|
233
|
-
licenses:
|
320
|
+
licenses:
|
234
321
|
- GPLv2
|
235
322
|
post_install_message:
|
236
323
|
rdoc_options: []
|
237
|
-
|
324
|
+
|
325
|
+
require_paths:
|
238
326
|
- lib
|
239
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
327
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
240
328
|
none: false
|
241
|
-
requirements:
|
242
|
-
- -
|
243
|
-
- !ruby/object:Gem::Version
|
244
|
-
|
245
|
-
|
329
|
+
requirements:
|
330
|
+
- - ">="
|
331
|
+
- !ruby/object:Gem::Version
|
332
|
+
hash: 3
|
333
|
+
segments:
|
334
|
+
- 0
|
335
|
+
version: "0"
|
336
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
246
337
|
none: false
|
247
|
-
requirements:
|
248
|
-
- -
|
249
|
-
- !ruby/object:Gem::Version
|
338
|
+
requirements:
|
339
|
+
- - ">"
|
340
|
+
- !ruby/object:Gem::Version
|
341
|
+
hash: 25
|
342
|
+
segments:
|
343
|
+
- 1
|
344
|
+
- 3
|
345
|
+
- 1
|
250
346
|
version: 1.3.1
|
251
347
|
requirements: []
|
348
|
+
|
252
349
|
rubyforge_project: maid
|
253
|
-
rubygems_version: 1.
|
350
|
+
rubygems_version: 1.6.2
|
254
351
|
signing_key:
|
255
352
|
specification_version: 3
|
256
|
-
summary: Be lazy. Let Maid clean up after you, based on rules you define.
|
257
|
-
test_files:
|
258
|
-
|
353
|
+
summary: Be lazy. Let Maid clean up after you, based on rules you define. Think of it as "Hazel for hackers".
|
354
|
+
test_files:
|
355
|
+
- spec/dependency_spec.rb
|
356
|
+
- spec/lib/maid/app_spec.rb
|
357
|
+
- spec/lib/maid/maid_spec.rb
|
358
|
+
- spec/lib/maid/numeric_extensions_spec.rb
|
359
|
+
- spec/lib/maid/platform_spec.rb
|
360
|
+
- spec/lib/maid/rule_spec.rb
|
361
|
+
- spec/lib/maid/tools_spec.rb
|
362
|
+
- spec/lib/maid/trash_migration_spec.rb
|
363
|
+
- spec/lib/maid/user_agent_spec.rb
|
364
|
+
- spec/lib/maid_spec.rb
|
365
|
+
- spec/spec_helper.rb
|