flickrup 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/flickrup/processor.rb +9 -0
- metadata +3 -3
data/lib/flickrup/processor.rb
CHANGED
@@ -9,10 +9,19 @@ class Processor
|
|
9
9
|
@config = config
|
10
10
|
end
|
11
11
|
|
12
|
+
def paused
|
13
|
+
Dir["#{@config['watch_dir']}/paused"].length > 0
|
14
|
+
end
|
15
|
+
|
12
16
|
def run(files = Dir["#{@config['watch_dir']}/*.{jpg,JPG,jpeg,JPEG}"])
|
13
17
|
|
14
18
|
logger.debug("Processing #{files.length} files")
|
15
19
|
|
20
|
+
if paused
|
21
|
+
logger.debug("Paused detected, so skipping processing...")
|
22
|
+
return 0
|
23
|
+
end
|
24
|
+
|
16
25
|
images = files.map { |x| TaggedImage.new(x) }
|
17
26
|
|
18
27
|
tagged = images.select { |x| !(x.tags.nil? || x.tags.empty?) }
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flickrup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jonathan Gilbert
|