maid 0.7.0.alpha.2 → 0.7.0.alpha.4

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -11,3 +11,4 @@ rvm:
11
11
  - 2.1.4
12
12
  - 2.1.5
13
13
  - 2.2.0
14
+ - 2.2.1
data/ChangeLog CHANGED
@@ -1,9 +1,11 @@
1
1
  maid (0.7.0) unstable; urgency=low
2
2
 
3
+ * Started official support for Ruby 2.2.1.
4
+ * Updated dependencies: "listen"
3
5
  * Add dependencies: "exifr", "geocoder"
4
6
  * Add "location_city" tool
5
- * Itsuki Kurokawa: Add "ignore_child_dirs" tool
6
- * Itsuki Kurokawa: Add "tree_empty?" tool
7
+ * Itsuki Kurokawa: Add "ignore_child_dirs", "tree_empty?" tools. (Closes: #144, #145)
8
+ * Bugfix: "copy" now respects the dry-run/noop option
7
9
 
8
10
  -- Benjamin Oakes <hello@benjaminoakes.com> TODO
9
11
 
data/lib/maid/tools.rb CHANGED
@@ -160,17 +160,17 @@ module Maid::Tools
160
160
  #
161
161
  # copy(['~/Downloads/foo.zip', '~/Downloads/bar.zip'], '~/Archive/Software/Mac OS X/')
162
162
  # copy(dir('~/Downloads/*.zip'), '~/Archive/Software/Mac OS X/')
163
- def copy(sources, destination, options = {})
163
+ def copy(sources, destination)
164
164
  destination = expand(destination)
165
165
 
166
166
  expand_all(sources).each do |source|
167
167
  target = File.join(destination, File.basename(source))
168
168
 
169
169
  unless File.exist?(target)
170
- log("cp #{ source.inspect } #{ destination.inspect }")
171
- FileUtils.cp(source, destination )
170
+ log("cp #{ sh_escape(source) } #{ sh_escape(destination) }")
171
+ FileUtils.cp(source, destination, @file_options)
172
172
  else
173
- warn("skipping #{ source.inspect } because #{ target.inspect } already exists")
173
+ warn("skipping copy because #{ sh_escape(source) } because #{ sh_escape(target) } already exists")
174
174
  end
175
175
  end
176
176
  end
data/lib/maid/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Maid
2
- VERSION = '0.7.0.alpha.2'
2
+ VERSION = '0.7.0.alpha.4'
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
data/maid.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
  s.add_dependency('mime-types', '~> 2.0')
26
26
  s.add_dependency('rubyzip', '~> 1.1.0')
27
27
  s.add_dependency('xdg', '~> 2.2.3') # previous versions had bugs
28
- s.add_dependency('listen', '~> 2.8.0')
28
+ s.add_dependency('listen', '>= 2.8.0', '< 2.11.0')
29
29
  s.add_dependency('rufus-scheduler', '~> 3.0.6')
30
30
  s.add_dependency('exifr', '~> 1.2.0')
31
31
  s.add_dependency('geocoder', '~> 1.2.0')
@@ -14,6 +14,15 @@ if RUBY_VERSION =~ /2\.[12]\.\d/
14
14
  end
15
15
  end
16
16
 
17
+ # Workaround for broken `cp` implementation; remove after upgrading FakeFS
18
+ module FakeFS
19
+ module FileUtils
20
+ def self.cp(src, dest, options = {})
21
+ copy(src, dest)
22
+ end
23
+ end
24
+ end
25
+
17
26
  module Maid
18
27
  # NOTE: Please use FakeFS instead of mocking and stubbing specific calls which happen to modify the filesystem.
19
28
  #
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.2
4
+ version: 0.7.0.alpha.4
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-26 00:00:00.000000000 Z
12
+ date: 2015-03-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: escape
16
- requirement: &15664940 !ruby/object:Gem::Requirement
16
+ requirement: &14712500 !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: *15664940
27
+ version_requirements: *14712500
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: thor
30
- requirement: &15662820 !ruby/object:Gem::Requirement
30
+ requirement: &14710280 !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: *15662820
41
+ version_requirements: *14710280
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: deprecated
44
- requirement: &15660640 !ruby/object:Gem::Requirement
44
+ requirement: &14708280 !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: *15660640
52
+ version_requirements: *14708280
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: dimensions
55
- requirement: &15659060 !ruby/object:Gem::Requirement
55
+ requirement: &14706920 !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: *15659060
66
+ version_requirements: *14706920
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: mime-types
69
- requirement: &15671640 !ruby/object:Gem::Requirement
69
+ requirement: &14720620 !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: *15671640
77
+ version_requirements: *14720620
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: rubyzip
80
- requirement: &15669140 !ruby/object:Gem::Requirement
80
+ requirement: &14717840 !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: *15669140
88
+ version_requirements: *14717840
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: xdg
91
- requirement: &15682880 !ruby/object:Gem::Requirement
91
+ requirement: &14731960 !ruby/object:Gem::Requirement
92
92
  none: false
93
93
  requirements:
94
94
  - - ~>
@@ -96,21 +96,24 @@ dependencies:
96
96
  version: 2.2.3
97
97
  type: :runtime
98
98
  prerelease: false
99
- version_requirements: *15682880
99
+ version_requirements: *14731960
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: listen
102
- requirement: &15680240 !ruby/object:Gem::Requirement
102
+ requirement: &14729320 !ruby/object:Gem::Requirement
103
103
  none: false
104
104
  requirements:
105
- - - ~>
105
+ - - ! '>='
106
106
  - !ruby/object:Gem::Version
107
107
  version: 2.8.0
108
+ - - <
109
+ - !ruby/object:Gem::Version
110
+ version: 2.11.0
108
111
  type: :runtime
109
112
  prerelease: false
110
- version_requirements: *15680240
113
+ version_requirements: *14729320
111
114
  - !ruby/object:Gem::Dependency
112
115
  name: rufus-scheduler
113
- requirement: &15690200 !ruby/object:Gem::Requirement
116
+ requirement: &14737320 !ruby/object:Gem::Requirement
114
117
  none: false
115
118
  requirements:
116
119
  - - ~>
@@ -118,10 +121,10 @@ dependencies:
118
121
  version: 3.0.6
119
122
  type: :runtime
120
123
  prerelease: false
121
- version_requirements: *15690200
124
+ version_requirements: *14737320
122
125
  - !ruby/object:Gem::Dependency
123
126
  name: exifr
124
- requirement: &15688820 !ruby/object:Gem::Requirement
127
+ requirement: &14736120 !ruby/object:Gem::Requirement
125
128
  none: false
126
129
  requirements:
127
130
  - - ~>
@@ -129,10 +132,10 @@ dependencies:
129
132
  version: 1.2.0
130
133
  type: :runtime
131
134
  prerelease: false
132
- version_requirements: *15688820
135
+ version_requirements: *14736120
133
136
  - !ruby/object:Gem::Dependency
134
137
  name: geocoder
135
- requirement: &15688100 !ruby/object:Gem::Requirement
138
+ requirement: &14735260 !ruby/object:Gem::Requirement
136
139
  none: false
137
140
  requirements:
138
141
  - - ~>
@@ -140,10 +143,10 @@ dependencies:
140
143
  version: 1.2.0
141
144
  type: :runtime
142
145
  prerelease: false
143
- version_requirements: *15688100
146
+ version_requirements: *14735260
144
147
  - !ruby/object:Gem::Dependency
145
148
  name: fakefs
146
- requirement: &15687040 !ruby/object:Gem::Requirement
149
+ requirement: &14732960 !ruby/object:Gem::Requirement
147
150
  none: false
148
151
  requirements:
149
152
  - - ~>
@@ -151,10 +154,10 @@ dependencies:
151
154
  version: 0.4.2
152
155
  type: :development
153
156
  prerelease: false
154
- version_requirements: *15687040
157
+ version_requirements: *14732960
155
158
  - !ruby/object:Gem::Dependency
156
159
  name: guard
157
- requirement: &15719380 !ruby/object:Gem::Requirement
160
+ requirement: &14763300 !ruby/object:Gem::Requirement
158
161
  none: false
159
162
  requirements:
160
163
  - - ~>
@@ -162,10 +165,10 @@ dependencies:
162
165
  version: 2.10.4
163
166
  type: :development
164
167
  prerelease: false
165
- version_requirements: *15719380
168
+ version_requirements: *14763300
166
169
  - !ruby/object:Gem::Dependency
167
170
  name: guard-rspec
168
- requirement: &15715640 !ruby/object:Gem::Requirement
171
+ requirement: &14762680 !ruby/object:Gem::Requirement
169
172
  none: false
170
173
  requirements:
171
174
  - - ~>
@@ -173,10 +176,10 @@ dependencies:
173
176
  version: 4.5.0
174
177
  type: :development
175
178
  prerelease: false
176
- version_requirements: *15715640
179
+ version_requirements: *14762680
177
180
  - !ruby/object:Gem::Dependency
178
181
  name: rake
179
- requirement: &15714700 !ruby/object:Gem::Requirement
182
+ requirement: &14760320 !ruby/object:Gem::Requirement
180
183
  none: false
181
184
  requirements:
182
185
  - - ~>
@@ -184,10 +187,10 @@ dependencies:
184
187
  version: 10.4.2
185
188
  type: :development
186
189
  prerelease: false
187
- version_requirements: *15714700
190
+ version_requirements: *14760320
188
191
  - !ruby/object:Gem::Dependency
189
192
  name: redcarpet
190
- requirement: &15712460 !ruby/object:Gem::Requirement
193
+ requirement: &14774440 !ruby/object:Gem::Requirement
191
194
  none: false
192
195
  requirements:
193
196
  - - ~>
@@ -195,10 +198,10 @@ dependencies:
195
198
  version: 3.2.2
196
199
  type: :development
197
200
  prerelease: false
198
- version_requirements: *15712460
201
+ version_requirements: *14774440
199
202
  - !ruby/object:Gem::Dependency
200
203
  name: rspec
201
- requirement: &15726780 !ruby/object:Gem::Requirement
204
+ requirement: &14770380 !ruby/object:Gem::Requirement
202
205
  none: false
203
206
  requirements:
204
207
  - - ~>
@@ -206,10 +209,10 @@ dependencies:
206
209
  version: 3.1.0
207
210
  type: :development
208
211
  prerelease: false
209
- version_requirements: *15726780
212
+ version_requirements: *14770380
210
213
  - !ruby/object:Gem::Dependency
211
214
  name: timecop
212
- requirement: &15722640 !ruby/object:Gem::Requirement
215
+ requirement: &14768360 !ruby/object:Gem::Requirement
213
216
  none: false
214
217
  requirements:
215
218
  - - ~>
@@ -217,10 +220,10 @@ dependencies:
217
220
  version: 0.7.0
218
221
  type: :development
219
222
  prerelease: false
220
- version_requirements: *15722640
223
+ version_requirements: *14768360
221
224
  - !ruby/object:Gem::Dependency
222
225
  name: yard
223
- requirement: &15720520 !ruby/object:Gem::Requirement
226
+ requirement: &14767240 !ruby/object:Gem::Requirement
224
227
  none: false
225
228
  requirements:
226
229
  - - ~>
@@ -228,10 +231,10 @@ dependencies:
228
231
  version: 0.8.4
229
232
  type: :development
230
233
  prerelease: false
231
- version_requirements: *15720520
234
+ version_requirements: *14767240
232
235
  - !ruby/object:Gem::Dependency
233
236
  name: rb-inotify
234
- requirement: &15719640 !ruby/object:Gem::Requirement
237
+ requirement: &14782720 !ruby/object:Gem::Requirement
235
238
  none: false
236
239
  requirements:
237
240
  - - ~>
@@ -239,10 +242,10 @@ dependencies:
239
242
  version: 0.9.0
240
243
  type: :development
241
244
  prerelease: false
242
- version_requirements: *15719640
245
+ version_requirements: *14782720
243
246
  - !ruby/object:Gem::Dependency
244
247
  name: rb-fsevent
245
- requirement: &15735180 !ruby/object:Gem::Requirement
248
+ requirement: &14782160 !ruby/object:Gem::Requirement
246
249
  none: false
247
250
  requirements:
248
251
  - - ~>
@@ -250,7 +253,7 @@ dependencies:
250
253
  version: 0.9.2
251
254
  type: :development
252
255
  prerelease: false
253
- version_requirements: *15735180
256
+ version_requirements: *14782160
254
257
  description: Be lazy. Let Maid clean up after you, based on rules you define. Think
255
258
  of it as "Hazel for hackers".
256
259
  email: