maid 0.7.0.alpha.4 → 0.7.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
data/AUTHORS.md CHANGED
@@ -4,6 +4,7 @@ In alphabetical order:
4
4
  * Bradley Smith (@bradleyd)
5
5
  * Brandon Pittman (@brandonpittman)
6
6
  * Graham Siener (@gsiener)
7
+ * Itsuki Kurokawa (@fanalis)
7
8
  * Jayson Rhynas (@jayrhynas)
8
9
  * John Colvin (@JohnColvin)
9
10
  * Jurriaan Pruis (@jurriaan)
data/ChangeLog CHANGED
@@ -1,7 +1,11 @@
1
1
  maid (0.7.0) unstable; urgency=low
2
2
 
3
+ * Stats! { 'collaborators' => 19, 'downloads' => 19988, 'forks' => 49,
4
+ 'open_issues' => 40, 'closed_issues' => 105, 'stars' => 1070,
5
+ 'users_sharing_rules' => 43 }
3
6
  * Started official support for Ruby 2.2.1.
4
7
  * Updated dependencies: "listen"
8
+ * Updated development dependencies, except for FakeFS (help appreciated!).
5
9
  * Add dependencies: "exifr", "geocoder"
6
10
  * Add "location_city" tool
7
11
  * Itsuki Kurokawa: Add "ignore_child_dirs", "tree_empty?" tools. (Closes: #144, #145)
@@ -708,17 +708,17 @@ module Maid::Tools
708
708
  #
709
709
  # ## Example
710
710
  #
711
- # if tree_empty? dir('~/Downloads/foo')
712
- # trash '~/Downloads/foo'
711
+ # if tree_empty?(dir('~/Downloads/foo'))
712
+ # trash('~/Downloads/foo')
713
713
  # end
714
714
  def tree_empty?(root)
715
- return nil if File.file? root
715
+ return nil if File.file?(root)
716
716
  return true if Dir.glob(root + '/*').length == 0
717
717
 
718
718
  ignore = []
719
719
 
720
720
  # Look for files.
721
- return false if Dir.glob(root + '/*').select { |f| File.file? f }.length > 0
721
+ return false if Dir.glob(root + '/*').select { |f| File.file?(f) }.length > 0
722
722
 
723
723
  empty_dirs = Dir.glob(root + '/**/*').select { |d|
724
724
  File.directory?(d)
@@ -727,7 +727,7 @@ module Maid::Tools
727
727
 
728
728
  # If the directory is empty, its parent should ignore it.
729
729
  should_ignore = Dir.glob(d + '/*').select { |n|
730
- not ignore.include? n
730
+ !ignore.include?(n)
731
731
  }.length == 0
732
732
 
733
733
  ignore << d if should_ignore
@@ -736,7 +736,7 @@ module Maid::Tools
736
736
  }
737
737
 
738
738
  Dir.glob(root + '/*').select { |n|
739
- not empty_dirs.include? n
739
+ !empty_dirs.include?(n)
740
740
  }.length == 0
741
741
  end
742
742
 
@@ -750,7 +750,7 @@ module Maid::Tools
750
750
  arr.sort { |x, y|
751
751
  y.count('/') - x.count('/')
752
752
  }.select { |d|
753
- not arr.include?(File.dirname(d))
753
+ !arr.include?(File.dirname(d))
754
754
  }
755
755
  end
756
756
 
@@ -1,4 +1,4 @@
1
1
  module Maid
2
- VERSION = '0.7.0.alpha.4'
2
+ VERSION = '0.7.0.beta.1'
3
3
  SUMMARY = 'Be lazy. Let Maid clean up after you, based on rules you define. Think of it as "Hazel for hackers".'
4
4
  end
@@ -36,12 +36,12 @@ Gem::Specification.new do |s|
36
36
  # s.add_dependency('spotlight', '~> 0.0.6')
37
37
 
38
38
  # Strategy: specific versions (since they're just for development)
39
- s.add_development_dependency('fakefs', '~> 0.4.2')
40
- s.add_development_dependency('guard', '~> 2.10.4')
39
+ s.add_development_dependency('fakefs', '~> 0.4.3')
40
+ s.add_development_dependency('guard', '~> 2.12.5')
41
41
  s.add_development_dependency('guard-rspec', '~> 4.5.0')
42
42
  s.add_development_dependency('rake', '~> 10.4.2')
43
43
  s.add_development_dependency('redcarpet', '~> 3.2.2') # Soft dependency of `yard`
44
- s.add_development_dependency('rspec', '~> 3.1.0')
44
+ s.add_development_dependency('rspec', '~> 3.2.0')
45
45
  s.add_development_dependency('timecop', '~> 0.7.0')
46
46
  s.add_development_dependency('yard', '~> 0.8.4')
47
47
 
@@ -738,34 +738,34 @@ module Maid
738
738
  describe '#ignore_child_dirs' do
739
739
  it 'filters out any child directory' do
740
740
  src = [
741
- "a",
742
- "b",
743
- "b/x",
744
- "c",
745
- "c/x",
746
- "c/y",
747
- "d/x",
748
- "d/y",
749
- "e/x/y",
750
- "e/x/y/z",
751
- "f/x/y/z",
752
- "g/x/y",
753
- "g/x/z",
754
- "g/y/a/b",
755
- "g/y/a/c",
741
+ 'a',
742
+ 'b',
743
+ 'b/x',
744
+ 'c',
745
+ 'c/x',
746
+ 'c/y',
747
+ 'd/x',
748
+ 'd/y',
749
+ 'e/x/y',
750
+ 'e/x/y/z',
751
+ 'f/x/y/z',
752
+ 'g/x/y',
753
+ 'g/x/z',
754
+ 'g/y/a/b',
755
+ 'g/y/a/c',
756
756
  ]
757
757
  expected = [
758
- "a", # no child directories
759
- "b", # ignore b/x
760
- "c", # ignore c/x and c/y
761
- "d/x", # no child directories
762
- "d/y", # no child directories
763
- "e/x/y", # ignore e/x/y/z
764
- "f/x/y/z", # no empty parents
765
- "g/x/y", # g/x isn't empty
766
- "g/x/z",
767
- "g/y/a/b", # g/y/a isn't empty
768
- "g/y/a/c",
758
+ 'a', # no child directories
759
+ 'b', # ignore b/x
760
+ 'c', # ignore c/x and c/y
761
+ 'd/x', # no child directories
762
+ 'd/y', # no child directories
763
+ 'e/x/y', # ignore e/x/y/z
764
+ 'f/x/y/z', # no empty parents
765
+ 'g/x/y', # g/x isn't empty
766
+ 'g/x/z',
767
+ 'g/y/a/b', # g/y/a isn't empty
768
+ 'g/y/a/c',
769
769
  ].sort
770
770
 
771
771
  expect(@maid.ignore_child_dirs(src).sort).to eq(expected)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.alpha.4
4
+ version: 0.7.0.beta.1
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2015-03-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: escape
16
- requirement: &14712500 !ruby/object:Gem::Requirement
16
+ requirement: &22905420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 0.1.0
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *14712500
27
+ version_requirements: *22905420
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: thor
30
- requirement: &14710280 !ruby/object:Gem::Requirement
30
+ requirement: &22903120 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -38,10 +38,10 @@ dependencies:
38
38
  version: 1.0.0
39
39
  type: :runtime
40
40
  prerelease: false
41
- version_requirements: *14710280
41
+ version_requirements: *22903120
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: deprecated
44
- requirement: &14708280 !ruby/object:Gem::Requirement
44
+ requirement: &22901080 !ruby/object:Gem::Requirement
45
45
  none: false
46
46
  requirements:
47
47
  - - ~>
@@ -49,10 +49,10 @@ dependencies:
49
49
  version: 3.0.0
50
50
  type: :runtime
51
51
  prerelease: false
52
- version_requirements: *14708280
52
+ version_requirements: *22901080
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: dimensions
55
- requirement: &14706920 !ruby/object:Gem::Requirement
55
+ requirement: &22914700 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ! '>='
@@ -63,10 +63,10 @@ dependencies:
63
63
  version: '2.0'
64
64
  type: :runtime
65
65
  prerelease: false
66
- version_requirements: *14706920
66
+ version_requirements: *22914700
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: mime-types
69
- requirement: &14720620 !ruby/object:Gem::Requirement
69
+ requirement: &22911140 !ruby/object:Gem::Requirement
70
70
  none: false
71
71
  requirements:
72
72
  - - ~>
@@ -74,10 +74,10 @@ dependencies:
74
74
  version: '2.0'
75
75
  type: :runtime
76
76
  prerelease: false
77
- version_requirements: *14720620
77
+ version_requirements: *22911140
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: rubyzip
80
- requirement: &14717840 !ruby/object:Gem::Requirement
80
+ requirement: &22925580 !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
83
83
  - - ~>
@@ -85,10 +85,10 @@ dependencies:
85
85
  version: 1.1.0
86
86
  type: :runtime
87
87
  prerelease: false
88
- version_requirements: *14717840
88
+ version_requirements: *22925580
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: xdg
91
- requirement: &14731960 !ruby/object:Gem::Requirement
91
+ requirement: &22922640 !ruby/object:Gem::Requirement
92
92
  none: false
93
93
  requirements:
94
94
  - - ~>
@@ -96,10 +96,10 @@ dependencies:
96
96
  version: 2.2.3
97
97
  type: :runtime
98
98
  prerelease: false
99
- version_requirements: *14731960
99
+ version_requirements: *22922640
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: listen
102
- requirement: &14729320 !ruby/object:Gem::Requirement
102
+ requirement: &22920140 !ruby/object:Gem::Requirement
103
103
  none: false
104
104
  requirements:
105
105
  - - ! '>='
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: 2.11.0
111
111
  type: :runtime
112
112
  prerelease: false
113
- version_requirements: *14729320
113
+ version_requirements: *22920140
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: rufus-scheduler
116
- requirement: &14737320 !ruby/object:Gem::Requirement
116
+ requirement: &22930040 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ~>
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: 3.0.6
122
122
  type: :runtime
123
123
  prerelease: false
124
- version_requirements: *14737320
124
+ version_requirements: *22930040
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: exifr
127
- requirement: &14736120 !ruby/object:Gem::Requirement
127
+ requirement: &22928820 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ~>
@@ -132,10 +132,10 @@ dependencies:
132
132
  version: 1.2.0
133
133
  type: :runtime
134
134
  prerelease: false
135
- version_requirements: *14736120
135
+ version_requirements: *22928820
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: geocoder
138
- requirement: &14735260 !ruby/object:Gem::Requirement
138
+ requirement: &22928060 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ~>
@@ -143,32 +143,32 @@ dependencies:
143
143
  version: 1.2.0
144
144
  type: :runtime
145
145
  prerelease: false
146
- version_requirements: *14735260
146
+ version_requirements: *22928060
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: fakefs
149
- requirement: &14732960 !ruby/object:Gem::Requirement
149
+ requirement: &22926640 !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements:
152
152
  - - ~>
153
153
  - !ruby/object:Gem::Version
154
- version: 0.4.2
154
+ version: 0.4.3
155
155
  type: :development
156
156
  prerelease: false
157
- version_requirements: *14732960
157
+ version_requirements: *22926640
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: guard
160
- requirement: &14763300 !ruby/object:Gem::Requirement
160
+ requirement: &22957340 !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
163
  - - ~>
164
164
  - !ruby/object:Gem::Version
165
- version: 2.10.4
165
+ version: 2.12.5
166
166
  type: :development
167
167
  prerelease: false
168
- version_requirements: *14763300
168
+ version_requirements: *22957340
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: guard-rspec
171
- requirement: &14762680 !ruby/object:Gem::Requirement
171
+ requirement: &22955620 !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements:
174
174
  - - ~>
@@ -176,10 +176,10 @@ dependencies:
176
176
  version: 4.5.0
177
177
  type: :development
178
178
  prerelease: false
179
- version_requirements: *14762680
179
+ version_requirements: *22955620
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: rake
182
- requirement: &14760320 !ruby/object:Gem::Requirement
182
+ requirement: &22953980 !ruby/object:Gem::Requirement
183
183
  none: false
184
184
  requirements:
185
185
  - - ~>
@@ -187,10 +187,10 @@ dependencies:
187
187
  version: 10.4.2
188
188
  type: :development
189
189
  prerelease: false
190
- version_requirements: *14760320
190
+ version_requirements: *22953980
191
191
  - !ruby/object:Gem::Dependency
192
192
  name: redcarpet
193
- requirement: &14774440 !ruby/object:Gem::Requirement
193
+ requirement: &22951820 !ruby/object:Gem::Requirement
194
194
  none: false
195
195
  requirements:
196
196
  - - ~>
@@ -198,21 +198,21 @@ dependencies:
198
198
  version: 3.2.2
199
199
  type: :development
200
200
  prerelease: false
201
- version_requirements: *14774440
201
+ version_requirements: *22951820
202
202
  - !ruby/object:Gem::Dependency
203
203
  name: rspec
204
- requirement: &14770380 !ruby/object:Gem::Requirement
204
+ requirement: &22964400 !ruby/object:Gem::Requirement
205
205
  none: false
206
206
  requirements:
207
207
  - - ~>
208
208
  - !ruby/object:Gem::Version
209
- version: 3.1.0
209
+ version: 3.2.0
210
210
  type: :development
211
211
  prerelease: false
212
- version_requirements: *14770380
212
+ version_requirements: *22964400
213
213
  - !ruby/object:Gem::Dependency
214
214
  name: timecop
215
- requirement: &14768360 !ruby/object:Gem::Requirement
215
+ requirement: &22961400 !ruby/object:Gem::Requirement
216
216
  none: false
217
217
  requirements:
218
218
  - - ~>
@@ -220,10 +220,10 @@ dependencies:
220
220
  version: 0.7.0
221
221
  type: :development
222
222
  prerelease: false
223
- version_requirements: *14768360
223
+ version_requirements: *22961400
224
224
  - !ruby/object:Gem::Dependency
225
225
  name: yard
226
- requirement: &14767240 !ruby/object:Gem::Requirement
226
+ requirement: &22960500 !ruby/object:Gem::Requirement
227
227
  none: false
228
228
  requirements:
229
229
  - - ~>
@@ -231,10 +231,10 @@ dependencies:
231
231
  version: 0.8.4
232
232
  type: :development
233
233
  prerelease: false
234
- version_requirements: *14767240
234
+ version_requirements: *22960500
235
235
  - !ruby/object:Gem::Dependency
236
236
  name: rb-inotify
237
- requirement: &14782720 !ruby/object:Gem::Requirement
237
+ requirement: &22976020 !ruby/object:Gem::Requirement
238
238
  none: false
239
239
  requirements:
240
240
  - - ~>
@@ -242,10 +242,10 @@ dependencies:
242
242
  version: 0.9.0
243
243
  type: :development
244
244
  prerelease: false
245
- version_requirements: *14782720
245
+ version_requirements: *22976020
246
246
  - !ruby/object:Gem::Dependency
247
247
  name: rb-fsevent
248
- requirement: &14782160 !ruby/object:Gem::Requirement
248
+ requirement: &22975200 !ruby/object:Gem::Requirement
249
249
  none: false
250
250
  requirements:
251
251
  - - ~>
@@ -253,7 +253,7 @@ dependencies:
253
253
  version: 0.9.2
254
254
  type: :development
255
255
  prerelease: false
256
- version_requirements: *14782160
256
+ version_requirements: *22975200
257
257
  description: Be lazy. Let Maid clean up after you, based on rules you define. Think
258
258
  of it as "Hazel for hackers".
259
259
  email: