maid 0.5.0.alpha.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,3 +3,4 @@ cache: bundler
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
+ - 2.1.0-preview2
data/ChangeLog CHANGED
@@ -1,10 +1,16 @@
1
- maid (0.5.0) unstable; urgency=low
1
+ maid (0.5.0) stable; urgency=low
2
2
 
3
- * New utility methods: "dir_safe", "downloading?"
4
- * Shiro Hazuki: Implementations of "dir_safe" and "downloading?" released
5
- into the public domain (Closes: #107)
3
+ * Started official support Ruby 2.1.0 (Closes: #114)
4
+ * Shiro Hazuki (public domain code): New utility methods: "dir_safe",
5
+ "downloading?" (Closes: #107)
6
6
 
7
- -- Benjamin Oakes <hello@benjaminoakes.com> TODO
7
+ -- Benjamin Oakes <hello@benjaminoakes.com> Thu, 26 Dec 2013 00:00:00 +0000
8
+
9
+ maid (0.4.2) stable; urgency=low
10
+
11
+ * Updated dependencies: "rubyzip"
12
+
13
+ -- Benjamin Oakes <hello@benjaminoakes.com> Fri, 1 Nov 2013 00:00:00 +0000
8
14
 
9
15
  maid (0.4.1) stable; urgency=low
10
16
 
data/README.md CHANGED
@@ -85,7 +85,7 @@ Modern Ruby versions and Unix-like operating systems should work, but only OS X
85
85
  Offically supported:
86
86
 
87
87
  * **OS:** Mac OS X, Ubuntu
88
- * **Ruby:** 1.9.3+ (2.0.0 preferred)
88
+ * **Ruby:** 1.9.3+ (2.0.0 or 2.1.0 are preferred)
89
89
 
90
90
  Some features require OS X. See the [documentation][] for more details.
91
91
 
@@ -222,4 +222,4 @@ ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
222
222
 
223
223
  GPLv2. See LICENSE for a copy.
224
224
 
225
- [documentation]: http://rubydoc.info/gems/maid/Maid/Tools
225
+ [documentation]: http://rubydoc.info/github/benjaminoakes/maid/master/frames
@@ -298,9 +298,7 @@ module Maid::Tools
298
298
  expanded_path = expand(path)
299
299
 
300
300
  if block.nil?
301
- files = []
302
- Find.find(expanded_path) { |file_path| files << file_path }
303
- files
301
+ Find.find(expanded_path).to_a
304
302
  else
305
303
  Find.find(expanded_path, &block)
306
304
  end
@@ -1,3 +1,3 @@
1
1
  module Maid
2
- VERSION = '0.5.0.alpha.1'
2
+ VERSION = '0.5.0'
3
3
  end
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_dependency('thor', '>= 0.14.0', '< 0.19.0')
23
23
  s.add_dependency('deprecated', '~> 3.0.0')
24
24
  s.add_dependency('mime-types', '~> 2.0')
25
- s.add_dependency('rubyzip', '~> 1.0.0')
25
+ s.add_dependency('rubyzip', '~> 1.1.0')
26
26
  s.add_dependency('xdg', '~> 2.2.3') # previous versions had bugs
27
27
  # TODO: use one of these two gems instead of `mdfind`. **But** They have to work on Linux as well.
28
28
  #
@@ -1,6 +1,19 @@
1
1
  # encoding: utf-8
2
2
  require 'spec_helper'
3
3
 
4
+ # Workaround for Ruby 2.1.0, remove after https://github.com/defunkt/fakefs/pull/209 is released
5
+ if RUBY_VERSION == '2.1.0'
6
+ module FakeFS
7
+ class Dir
8
+ def self.entries(dirname, opts = {})
9
+ _check_for_valid_file(dirname)
10
+
11
+ Dir.new(dirname).map { |file| File.basename(file) }
12
+ end
13
+ end
14
+ end
15
+ end
16
+
4
17
  module Maid
5
18
  # NOTE: Please use FakeFS instead of mocking and stubbing specific calls which happen to modify the filesystem.
6
19
  #
@@ -315,7 +328,7 @@ module Maid
315
328
 
316
329
  it 'should log the creation of the directory' do
317
330
  @logger.should_receive(:info)
318
- @maid.mkdir('~/Downlaods/Music/Pink.Floyd')
331
+ @maid.mkdir('~/Downloads/Music/Pink.Floyd')
319
332
  end
320
333
 
321
334
  it 'returns the path of the created directory' do
@@ -562,9 +575,14 @@ module Maid
562
575
  end
563
576
 
564
577
  describe '#newest_dupes_in' do
565
- it 'should list all but the shortest-named dupe' do
566
- oldest_path = "#{file_fixtures_path}/foo.zip"
567
- FileUtils.touch(oldest_path, :mtime => Time.new(1970, 1, 1))
578
+ it 'should list all but the oldest dupe' do
579
+ # FIXME: Broken on Ruby 2.1.0-preview2, maybe because of FakeFS
580
+ #
581
+ # oldest_path = "#{file_fixtures_path}/foo.zip"
582
+ # FileUtils.touch(oldest_path, :mtime => Time.new(1970, 1, 1))
583
+
584
+ FileUtils.touch("#{file_fixtures_path}/bar.zip")
585
+ FileUtils.touch("#{file_fixtures_path}/1.zip")
568
586
 
569
587
  dupes = @maid.newest_dupes_in(file_fixtures_glob)
570
588
 
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.alpha.1
5
- prerelease: 6
4
+ version: 0.5.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Benjamin Oakes
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-28 00:00:00.000000000 Z
12
+ date: 2013-12-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: escape
16
- requirement: &9483740 !ruby/object:Gem::Requirement
16
+ requirement: &11397480 !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: *9483740
27
+ version_requirements: *11397480
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: thor
30
- requirement: &9482840 !ruby/object:Gem::Requirement
30
+ requirement: &11395160 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -38,10 +38,10 @@ dependencies:
38
38
  version: 0.19.0
39
39
  type: :runtime
40
40
  prerelease: false
41
- version_requirements: *9482840
41
+ version_requirements: *11395160
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: deprecated
44
- requirement: &9482000 !ruby/object:Gem::Requirement
44
+ requirement: &11393320 !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: *9482000
52
+ version_requirements: *11393320
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: mime-types
55
- requirement: &9481480 !ruby/object:Gem::Requirement
55
+ requirement: &11405620 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ~>
@@ -60,21 +60,21 @@ dependencies:
60
60
  version: '2.0'
61
61
  type: :runtime
62
62
  prerelease: false
63
- version_requirements: *9481480
63
+ version_requirements: *11405620
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: rubyzip
66
- requirement: &9480860 !ruby/object:Gem::Requirement
66
+ requirement: &11402200 !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
69
  - - ~>
70
70
  - !ruby/object:Gem::Version
71
- version: 1.0.0
71
+ version: 1.1.0
72
72
  type: :runtime
73
73
  prerelease: false
74
- version_requirements: *9480860
74
+ version_requirements: *11402200
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: xdg
77
- requirement: &9480280 !ruby/object:Gem::Requirement
77
+ requirement: &11416340 !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
80
  - - ~>
@@ -82,10 +82,10 @@ dependencies:
82
82
  version: 2.2.3
83
83
  type: :runtime
84
84
  prerelease: false
85
- version_requirements: *9480280
85
+ version_requirements: *11416340
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: fakefs
88
- requirement: &9479380 !ruby/object:Gem::Requirement
88
+ requirement: &11414520 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ~>
@@ -93,10 +93,10 @@ dependencies:
93
93
  version: 0.4.2
94
94
  type: :development
95
95
  prerelease: false
96
- version_requirements: *9479380
96
+ version_requirements: *11414520
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: guard
99
- requirement: &9478580 !ruby/object:Gem::Requirement
99
+ requirement: &11409900 !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
102
102
  - - ~>
@@ -104,10 +104,10 @@ dependencies:
104
104
  version: 2.2.2
105
105
  type: :development
106
106
  prerelease: false
107
- version_requirements: *9478580
107
+ version_requirements: *11409900
108
108
  - !ruby/object:Gem::Dependency
109
109
  name: guard-rspec
110
- requirement: &9477600 !ruby/object:Gem::Requirement
110
+ requirement: &11421800 !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
113
113
  - - ~>
@@ -115,10 +115,10 @@ dependencies:
115
115
  version: 4.0.3
116
116
  type: :development
117
117
  prerelease: false
118
- version_requirements: *9477600
118
+ version_requirements: *11421800
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: rake
121
- requirement: &9476380 !ruby/object:Gem::Requirement
121
+ requirement: &11419420 !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
124
124
  - - ~>
@@ -126,10 +126,10 @@ dependencies:
126
126
  version: 10.1.0
127
127
  type: :development
128
128
  prerelease: false
129
- version_requirements: *9476380
129
+ version_requirements: *11419420
130
130
  - !ruby/object:Gem::Dependency
131
131
  name: redcarpet
132
- requirement: &9474760 !ruby/object:Gem::Requirement
132
+ requirement: &11542980 !ruby/object:Gem::Requirement
133
133
  none: false
134
134
  requirements:
135
135
  - - ~>
@@ -137,10 +137,10 @@ dependencies:
137
137
  version: 3.0.0
138
138
  type: :development
139
139
  prerelease: false
140
- version_requirements: *9474760
140
+ version_requirements: *11542980
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: rspec
143
- requirement: &9471940 !ruby/object:Gem::Requirement
143
+ requirement: &11540960 !ruby/object:Gem::Requirement
144
144
  none: false
145
145
  requirements:
146
146
  - - ~>
@@ -148,10 +148,10 @@ dependencies:
148
148
  version: 2.14.1
149
149
  type: :development
150
150
  prerelease: false
151
- version_requirements: *9471940
151
+ version_requirements: *11540960
152
152
  - !ruby/object:Gem::Dependency
153
153
  name: timecop
154
- requirement: &9471120 !ruby/object:Gem::Requirement
154
+ requirement: &11538500 !ruby/object:Gem::Requirement
155
155
  none: false
156
156
  requirements:
157
157
  - - ~>
@@ -159,10 +159,10 @@ dependencies:
159
159
  version: 0.6.3
160
160
  type: :development
161
161
  prerelease: false
162
- version_requirements: *9471120
162
+ version_requirements: *11538500
163
163
  - !ruby/object:Gem::Dependency
164
164
  name: yard
165
- requirement: &9470440 !ruby/object:Gem::Requirement
165
+ requirement: &11535740 !ruby/object:Gem::Requirement
166
166
  none: false
167
167
  requirements:
168
168
  - - ~>
@@ -170,10 +170,10 @@ dependencies:
170
170
  version: 0.8.4
171
171
  type: :development
172
172
  prerelease: false
173
- version_requirements: *9470440
173
+ version_requirements: *11535740
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: rb-inotify
176
- requirement: &9469460 !ruby/object:Gem::Requirement
176
+ requirement: &11550600 !ruby/object:Gem::Requirement
177
177
  none: false
178
178
  requirements:
179
179
  - - ~>
@@ -181,10 +181,10 @@ dependencies:
181
181
  version: 0.9.0
182
182
  type: :development
183
183
  prerelease: false
184
- version_requirements: *9469460
184
+ version_requirements: *11550600
185
185
  - !ruby/object:Gem::Dependency
186
186
  name: rb-fsevent
187
- requirement: &9468360 !ruby/object:Gem::Requirement
187
+ requirement: &11548620 !ruby/object:Gem::Requirement
188
188
  none: false
189
189
  requirements:
190
190
  - - ~>
@@ -192,7 +192,7 @@ dependencies:
192
192
  version: 0.9.2
193
193
  type: :development
194
194
  prerelease: false
195
- version_requirements: *9468360
195
+ version_requirements: *11548620
196
196
  description: ! 'Be lazy: let Maid clean up after you. Think of it as "Hazel for hackers".'
197
197
  email:
198
198
  - hello@benjaminoakes.com
@@ -243,7 +243,7 @@ files:
243
243
  - spec/fixtures/files/foo.zip
244
244
  - spec/fixtures/files/ruby.jpg
245
245
  - spec/fixtures/files/unknown.foo
246
- - ! "spec/fixtures/files/ã\x81\x95.zip"
246
+ - spec/fixtures/files/さ.zip
247
247
  - spec/lib/maid/app_spec.rb
248
248
  - spec/lib/maid/maid_spec.rb
249
249
  - spec/lib/maid/numeric_extensions_spec.rb
@@ -270,9 +270,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
270
270
  required_rubygems_version: !ruby/object:Gem::Requirement
271
271
  none: false
272
272
  requirements:
273
- - - ! '>'
273
+ - - ! '>='
274
274
  - !ruby/object:Gem::Version
275
- version: 1.3.1
275
+ version: '0'
276
276
  requirements: []
277
277
  rubyforge_project: maid
278
278
  rubygems_version: 1.8.11