broom 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.markdown +4 -4
- data/lib/broom.rb +3 -1
- metadata +20 -29
data/LICENSE
CHANGED
data/README.markdown
CHANGED
@@ -20,8 +20,8 @@ using the 'success_dir' and 'failure_dir' options.
|
|
20
20
|
|
21
21
|
## Examples
|
22
22
|
|
23
|
-
Broom.sweep('/dropbox') do |
|
24
|
-
Resque.enqueue(Job, "#{
|
23
|
+
Broom.sweep('/dropbox') do |path, dirname, basename, extname|
|
24
|
+
Resque.enqueue(Job, "#{dirname}/_success/#{basename}")
|
25
25
|
end
|
26
26
|
|
27
27
|
---
|
@@ -29,13 +29,13 @@ using the 'success_dir' and 'failure_dir' options.
|
|
29
29
|
threads = []
|
30
30
|
|
31
31
|
threads << Thread.new do
|
32
|
-
Broom.sweep('/foo') do |
|
32
|
+
Broom.sweep('/foo') do |path, dirname, basename, extname|
|
33
33
|
# do something
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
threads << Thread.new do
|
38
|
-
Broom.sweep('/bar') do |
|
38
|
+
Broom.sweep('/bar') do |path, dirname, basename, extname|
|
39
39
|
# do something
|
40
40
|
end
|
41
41
|
end
|
data/lib/broom.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
|
3
3
|
module Broom
|
4
|
-
VERSION = '0.3.
|
4
|
+
VERSION = '0.3.4'
|
5
5
|
|
6
6
|
class Directory
|
7
7
|
|
@@ -38,6 +38,8 @@ module Broom
|
|
38
38
|
puts "#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}: #{msg}" if options[:log]
|
39
39
|
end
|
40
40
|
|
41
|
+
@do_work = true
|
42
|
+
|
41
43
|
Signal.trap('INT') do
|
42
44
|
log.call("stopping...")
|
43
45
|
@do_work = false
|
metadata
CHANGED
@@ -1,59 +1,50 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: broom
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.4
|
4
5
|
prerelease:
|
5
|
-
version: 0.3.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Daniel Johnston
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
date: 2011-08-14 00:00:00 -05:00
|
14
|
-
default_executable:
|
12
|
+
date: 2012-06-21 00:00:00.000000000 Z
|
15
13
|
dependencies: []
|
14
|
+
description: ! ' A small module for watching a directory for new files.
|
16
15
|
|
17
|
-
|
16
|
+
'
|
18
17
|
email: dan@dj-agiledev.com
|
19
18
|
executables: []
|
20
|
-
|
21
19
|
extensions: []
|
22
|
-
|
23
20
|
extra_rdoc_files: []
|
24
|
-
|
25
|
-
files:
|
21
|
+
files:
|
26
22
|
- README.markdown
|
27
23
|
- LICENSE
|
28
24
|
- Rakefile
|
29
25
|
- lib/broom.rb
|
30
|
-
has_rdoc: true
|
31
26
|
homepage: https://github.com/drfeelngood/broom
|
32
27
|
licenses: []
|
33
|
-
|
34
28
|
post_install_message:
|
35
29
|
rdoc_options: []
|
36
|
-
|
37
|
-
require_paths:
|
30
|
+
require_paths:
|
38
31
|
- lib
|
39
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
33
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version:
|
45
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
39
|
none: false
|
47
|
-
requirements:
|
48
|
-
- -
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version:
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
51
44
|
requirements: []
|
52
|
-
|
53
45
|
rubyforge_project:
|
54
|
-
rubygems_version: 1.
|
46
|
+
rubygems_version: 1.8.16
|
55
47
|
signing_key:
|
56
48
|
specification_version: 3
|
57
49
|
summary: Simple file picker-upper
|
58
50
|
test_files: []
|
59
|
-
|