maid 0.2.0.rc.1 → 0.2.0.rc.2

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ maid (0.2.0.rc.2) unstable; urgency=low
2
+
3
+ * Change "maid --version" to be the same as "maid version"
4
+
5
+ -- Benjamin Oakes <hello@benjaminoakes.com> Wed, 24 Dec 2012 00:00:00 +0000
1
6
  maid (0.2.0.rc.1) unstable; urgency=low
2
7
 
3
8
  * More documentation for "dir".
data/README.md CHANGED
@@ -5,6 +5,7 @@ Be lazy! Let Maid clean up after you, based on rules you define.
5
5
  [Installation](https://github.com/benjaminoakes/maid#installation)
6
6
  | [Tutorial](https://github.com/benjaminoakes/maid#tutorial)
7
7
  | [Example](https://github.com/benjaminoakes/maid-example)
8
+ | [User Community](https://github.com/benjaminoakes/maid/wiki)
8
9
  | [Documentation][]
9
10
  | [Change Log](https://github.com/benjaminoakes/maid/blob/master/ChangeLog)
10
11
 
@@ -192,6 +193,9 @@ For help with command line usage, run `maid help`. For more help, please see th
192
193
  Once you get a hang for what you can do with Maid, let it do its stuff automatically throughout the day. You'll find
193
194
  your computer stays a little tidier with as you teach it how to handle your common files.
194
195
 
196
+ **Note:** Both Mac OS X and Ubuntu support callbacks when folders are changed (`fsevent`/`inotify`), and that may be a forthcoming feature in Maid.
197
+ That said, I find `cron` to take care of most of my needs. Pull requests are welcome, however. :)
198
+
195
199
  To do this, edit your crontab in your tool of choice:
196
200
 
197
201
  crontab -e
@@ -204,9 +208,6 @@ Example for every day at 1am:
204
208
  # minute hour day_of_month month day_of_week command_to_execute
205
209
  0 1 * * * /bin/bash -li -c "maid clean --silent"
206
210
 
207
- Both Mac OS X and Ubuntu support callbacks when folders are changed, and that may be a forthcoming feature in Maid.
208
- That said, I find `cron` to take care of most of my needs.
209
-
210
211
  ## Warranty
211
212
 
212
213
  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING
data/lib/maid/app.rb CHANGED
@@ -40,6 +40,9 @@ class Maid::App < Thor
40
40
  end
41
41
  end
42
42
 
43
+ # Since this happens a lot by mistake
44
+ map '--version' => :version
45
+
43
46
  desc 'sample', "Create sample rules at #{ self.sample_rules_path }"
44
47
  def sample
45
48
  path = self.class.sample_rules_path
@@ -13,13 +13,14 @@
13
13
  # # ...
14
14
  # end
15
15
  #
16
- # If you come up with some cool tools of your own, please send me a pull request on GitHub!
16
+ # If you come up with some cool tools of your own, please send me a pull request on GitHub! Also, please consider sharing your rules with others via [the wiki](https://github.com/benjaminoakes/maid/wiki).
17
17
  #
18
18
  # For more help on Maid:
19
19
  #
20
20
  # * Run `maid help`
21
21
  # * Read the README, tutorial, and documentation at https://github.com/benjaminoakes/maid#maid
22
22
  # * Ask me a question over email (hello@benjaminoakes.com) or Twitter (@benjaminoakes)
23
+ # * Check out how others are using Maid in [the Maid wiki](https://github.com/benjaminoakes/maid/wiki)
23
24
 
24
25
  Maid.rules do
25
26
  # **NOTE:** It's recommended you just use this as a template; if you run these rules on your machine without knowing
data/lib/maid/tools.rb CHANGED
@@ -193,7 +193,7 @@ module Maid::Tools
193
193
  def mkdir(path, options = {})
194
194
  path = expand(path)
195
195
  log("mkdir -p #{ path.inspect }")
196
- FileUtils.mkdir_p(path, options) # @file_options.merge(options))
196
+ FileUtils.mkdir_p(path, @file_options.merge(options))
197
197
  path
198
198
  end
199
199
 
data/lib/maid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Maid
2
- VERSION = '0.2.0.rc.1'
2
+ VERSION = '0.2.0.rc.2'
3
3
  end
data/script/smoke-test CHANGED
@@ -2,6 +2,7 @@
2
2
  # Check major functionality.
3
3
  set -o errexit
4
4
 
5
+ maid --version
5
6
  maid version --long
6
7
  maid help
7
8
  maid sample
@@ -76,6 +76,10 @@ module Maid
76
76
  @app.version
77
77
  end
78
78
 
79
+ it 'is mapped as --version' do
80
+ # TODO: Test via Rspec (it's only in the smoke test script for now)
81
+ end
82
+
79
83
  context 'with the "long" option' do
80
84
  before do
81
85
  # FIXME: This is ugly. Maybe use `Maid.start(%w(version --long))` instead.
@@ -213,6 +213,13 @@ module Maid
213
213
  it 'returns the path of the created directory' do
214
214
  @maid.mkdir('~/Reference/Foo').should == "#@home/Reference/Foo"
215
215
  end
216
+
217
+ # FIXME: FakeFS doesn't seem to report `File.exist?` properly. However, this has been tested manually.
218
+ #
219
+ # it 'should respect the noop option' do
220
+ # @maid.mkdir('~/Downloads/Music/Pink.Floyd')
221
+ # File.exist?("#@home/Downloads/Music/Pink.Floyd").should be_false
222
+ # end
216
223
  end
217
224
 
218
225
  describe '#find' do
metadata CHANGED
@@ -1,275 +1,190 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: maid
3
- version: !ruby/object:Gem::Version
4
- hash: 15424055
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0.rc.2
5
5
  prerelease: 6
6
- segments:
7
- - 0
8
- - 2
9
- - 0
10
- - rc
11
- - 1
12
- version: 0.2.0.rc.1
13
6
  platform: ruby
14
- authors:
7
+ authors:
15
8
  - Benjamin Oakes
16
9
  autorequire:
17
10
  bindir: bin
18
11
  cert_chain: []
19
-
20
- date: 2012-12-19 00:00:00 -06:00
21
- default_executable:
22
- dependencies:
23
- - !ruby/object:Gem::Dependency
12
+ date: 2012-12-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
24
15
  name: thor
25
- prerelease: false
26
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &7031280 !ruby/object:Gem::Requirement
27
17
  none: false
28
- requirements:
18
+ requirements:
29
19
  - - ~>
30
- - !ruby/object:Gem::Version
31
- hash: 95
32
- segments:
33
- - 0
34
- - 16
35
- - 0
20
+ - !ruby/object:Gem::Version
36
21
  version: 0.16.0
37
22
  type: :runtime
38
- version_requirements: *id001
39
- - !ruby/object:Gem::Dependency
40
- name: deprecated
41
23
  prerelease: false
42
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *7031280
25
+ - !ruby/object:Gem::Dependency
26
+ name: deprecated
27
+ requirement: &7029060 !ruby/object:Gem::Requirement
43
28
  none: false
44
- requirements:
29
+ requirements:
45
30
  - - ~>
46
- - !ruby/object:Gem::Version
47
- hash: 5
48
- segments:
49
- - 3
50
- - 0
51
- - 1
31
+ - !ruby/object:Gem::Version
52
32
  version: 3.0.1
53
33
  type: :runtime
54
- version_requirements: *id002
55
- - !ruby/object:Gem::Dependency
56
- name: ohai
57
34
  prerelease: false
58
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *7029060
36
+ - !ruby/object:Gem::Dependency
37
+ name: ohai
38
+ requirement: &7025580 !ruby/object:Gem::Requirement
59
39
  none: false
60
- requirements:
40
+ requirements:
61
41
  - - ~>
62
- - !ruby/object:Gem::Version
63
- hash: 23
64
- segments:
65
- - 6
66
- - 14
67
- - 0
42
+ - !ruby/object:Gem::Version
68
43
  version: 6.14.0
69
44
  type: :runtime
70
- version_requirements: *id003
71
- - !ruby/object:Gem::Dependency
72
- name: xdg
73
45
  prerelease: false
74
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *7025580
47
+ - !ruby/object:Gem::Dependency
48
+ name: xdg
49
+ requirement: &7024700 !ruby/object:Gem::Requirement
75
50
  none: false
76
- requirements:
51
+ requirements:
77
52
  - - ~>
78
- - !ruby/object:Gem::Version
79
- hash: 1
80
- segments:
81
- - 2
82
- - 2
83
- - 3
53
+ - !ruby/object:Gem::Version
84
54
  version: 2.2.3
85
55
  type: :runtime
86
- version_requirements: *id004
87
- - !ruby/object:Gem::Dependency
88
- name: fakefs
89
56
  prerelease: false
90
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *7024700
58
+ - !ruby/object:Gem::Dependency
59
+ name: fakefs
60
+ requirement: &7039920 !ruby/object:Gem::Requirement
91
61
  none: false
92
- requirements:
62
+ requirements:
93
63
  - - ~>
94
- - !ruby/object:Gem::Version
95
- hash: 13
96
- segments:
97
- - 0
98
- - 4
99
- - 1
64
+ - !ruby/object:Gem::Version
100
65
  version: 0.4.1
101
66
  type: :development
102
- version_requirements: *id005
103
- - !ruby/object:Gem::Dependency
104
- name: guard
105
67
  prerelease: false
106
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *7039920
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard
71
+ requirement: &7037140 !ruby/object:Gem::Requirement
107
72
  none: false
108
- requirements:
73
+ requirements:
109
74
  - - ~>
110
- - !ruby/object:Gem::Version
111
- hash: 11
112
- segments:
113
- - 1
114
- - 5
115
- - 4
75
+ - !ruby/object:Gem::Version
116
76
  version: 1.5.4
117
77
  type: :development
118
- version_requirements: *id006
119
- - !ruby/object:Gem::Dependency
120
- name: guard-rspec
121
78
  prerelease: false
122
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *7037140
80
+ - !ruby/object:Gem::Dependency
81
+ name: guard-rspec
82
+ requirement: &7035800 !ruby/object:Gem::Requirement
123
83
  none: false
124
- requirements:
84
+ requirements:
125
85
  - - ~>
126
- - !ruby/object:Gem::Version
127
- hash: 3
128
- segments:
129
- - 2
130
- - 3
131
- - 0
86
+ - !ruby/object:Gem::Version
132
87
  version: 2.3.0
133
88
  type: :development
134
- version_requirements: *id007
135
- - !ruby/object:Gem::Dependency
136
- name: rb-readline
137
89
  prerelease: false
138
- requirement: &id008 !ruby/object:Gem::Requirement
90
+ version_requirements: *7035800
91
+ - !ruby/object:Gem::Dependency
92
+ name: rb-readline
93
+ requirement: &7034140 !ruby/object:Gem::Requirement
139
94
  none: false
140
- requirements:
95
+ requirements:
141
96
  - - ~>
142
- - !ruby/object:Gem::Version
143
- hash: 11
144
- segments:
145
- - 0
146
- - 4
147
- - 2
97
+ - !ruby/object:Gem::Version
148
98
  version: 0.4.2
149
99
  type: :development
150
- version_requirements: *id008
151
- - !ruby/object:Gem::Dependency
152
- name: rake
153
100
  prerelease: false
154
- requirement: &id009 !ruby/object:Gem::Requirement
101
+ version_requirements: *7034140
102
+ - !ruby/object:Gem::Dependency
103
+ name: rake
104
+ requirement: &7044480 !ruby/object:Gem::Requirement
155
105
  none: false
156
- requirements:
106
+ requirements:
157
107
  - - ~>
158
- - !ruby/object:Gem::Version
159
- hash: 75
160
- segments:
161
- - 10
162
- - 0
163
- - 2
108
+ - !ruby/object:Gem::Version
164
109
  version: 10.0.2
165
110
  type: :development
166
- version_requirements: *id009
167
- - !ruby/object:Gem::Dependency
168
- name: redcarpet
169
111
  prerelease: false
170
- requirement: &id010 !ruby/object:Gem::Requirement
112
+ version_requirements: *7044480
113
+ - !ruby/object:Gem::Dependency
114
+ name: redcarpet
115
+ requirement: &7042360 !ruby/object:Gem::Requirement
171
116
  none: false
172
- requirements:
117
+ requirements:
173
118
  - - ~>
174
- - !ruby/object:Gem::Version
175
- hash: 3
176
- segments:
177
- - 2
178
- - 2
179
- - 2
119
+ - !ruby/object:Gem::Version
180
120
  version: 2.2.2
181
121
  type: :development
182
- version_requirements: *id010
183
- - !ruby/object:Gem::Dependency
184
- name: rspec
185
122
  prerelease: false
186
- requirement: &id011 !ruby/object:Gem::Requirement
123
+ version_requirements: *7042360
124
+ - !ruby/object:Gem::Dependency
125
+ name: rspec
126
+ requirement: &7873260 !ruby/object:Gem::Requirement
187
127
  none: false
188
- requirements:
128
+ requirements:
189
129
  - - ~>
190
- - !ruby/object:Gem::Version
191
- hash: 63
192
- segments:
193
- - 2
194
- - 12
195
- - 0
130
+ - !ruby/object:Gem::Version
196
131
  version: 2.12.0
197
132
  type: :development
198
- version_requirements: *id011
199
- - !ruby/object:Gem::Dependency
200
- name: timecop
201
133
  prerelease: false
202
- requirement: &id012 !ruby/object:Gem::Requirement
134
+ version_requirements: *7873260
135
+ - !ruby/object:Gem::Dependency
136
+ name: timecop
137
+ requirement: &7871940 !ruby/object:Gem::Requirement
203
138
  none: false
204
- requirements:
139
+ requirements:
205
140
  - - ~>
206
- - !ruby/object:Gem::Version
207
- hash: 13
208
- segments:
209
- - 0
210
- - 5
211
- - 3
141
+ - !ruby/object:Gem::Version
212
142
  version: 0.5.3
213
143
  type: :development
214
- version_requirements: *id012
215
- - !ruby/object:Gem::Dependency
216
- name: yard
217
144
  prerelease: false
218
- requirement: &id013 !ruby/object:Gem::Requirement
145
+ version_requirements: *7871940
146
+ - !ruby/object:Gem::Dependency
147
+ name: yard
148
+ requirement: &7868800 !ruby/object:Gem::Requirement
219
149
  none: false
220
- requirements:
150
+ requirements:
221
151
  - - ~>
222
- - !ruby/object:Gem::Version
223
- hash: 57
224
- segments:
225
- - 0
226
- - 8
227
- - 3
152
+ - !ruby/object:Gem::Version
228
153
  version: 0.8.3
229
154
  type: :development
230
- version_requirements: *id013
231
- - !ruby/object:Gem::Dependency
232
- name: rb-inotify
233
155
  prerelease: false
234
- requirement: &id014 !ruby/object:Gem::Requirement
156
+ version_requirements: *7868800
157
+ - !ruby/object:Gem::Dependency
158
+ name: rb-inotify
159
+ requirement: &7867720 !ruby/object:Gem::Requirement
235
160
  none: false
236
- requirements:
161
+ requirements:
237
162
  - - ~>
238
- - !ruby/object:Gem::Version
239
- hash: 47
240
- segments:
241
- - 0
242
- - 8
243
- - 8
163
+ - !ruby/object:Gem::Version
244
164
  version: 0.8.8
245
165
  type: :development
246
- version_requirements: *id014
247
- - !ruby/object:Gem::Dependency
248
- name: rb-fsevent
249
166
  prerelease: false
250
- requirement: &id015 !ruby/object:Gem::Requirement
167
+ version_requirements: *7867720
168
+ - !ruby/object:Gem::Dependency
169
+ name: rb-fsevent
170
+ requirement: &7866540 !ruby/object:Gem::Requirement
251
171
  none: false
252
- requirements:
172
+ requirements:
253
173
  - - ~>
254
- - !ruby/object:Gem::Version
255
- hash: 63
256
- segments:
257
- - 0
258
- - 9
259
- - 2
174
+ - !ruby/object:Gem::Version
260
175
  version: 0.9.2
261
176
  type: :development
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:
177
+ prerelease: false
178
+ version_requirements: *7866540
179
+ description: Be lazy. Let Maid clean up after you, based on rules you define. Think
180
+ of it as "Hazel for hackers".
181
+ email:
265
182
  - hello@benjaminoakes.com
266
- executables:
183
+ executables:
267
184
  - maid
268
185
  extensions: []
269
-
270
186
  extra_rdoc_files: []
271
-
272
- files:
187
+ files:
273
188
  - .gitignore
274
189
  - .rspec
275
190
  - .rvmrc
@@ -315,51 +230,31 @@ files:
315
230
  - spec/lib/maid/user_agent_spec.rb
316
231
  - spec/lib/maid_spec.rb
317
232
  - spec/spec_helper.rb
318
- has_rdoc: true
319
233
  homepage: http://github.com/benjaminoakes/maid
320
- licenses:
234
+ licenses:
321
235
  - GPLv2
322
236
  post_install_message:
323
237
  rdoc_options: []
324
-
325
- require_paths:
238
+ require_paths:
326
239
  - lib
327
- required_ruby_version: !ruby/object:Gem::Requirement
240
+ required_ruby_version: !ruby/object:Gem::Requirement
328
241
  none: false
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
242
+ requirements:
243
+ - - ! '>='
244
+ - !ruby/object:Gem::Version
245
+ version: '0'
246
+ required_rubygems_version: !ruby/object:Gem::Requirement
337
247
  none: false
338
- requirements:
339
- - - ">"
340
- - !ruby/object:Gem::Version
341
- hash: 25
342
- segments:
343
- - 1
344
- - 3
345
- - 1
248
+ requirements:
249
+ - - ! '>'
250
+ - !ruby/object:Gem::Version
346
251
  version: 1.3.1
347
252
  requirements: []
348
-
349
253
  rubyforge_project: maid
350
- rubygems_version: 1.6.2
254
+ rubygems_version: 1.8.11
351
255
  signing_key:
352
256
  specification_version: 3
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
257
+ summary: Be lazy. Let Maid clean up after you, based on rules you define. Think
258
+ of it as "Hazel for hackers".
259
+ test_files: []
260
+ has_rdoc: