flickrup 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/flickrup/processor.rb +13 -2
  2. metadata +3 -3
@@ -26,9 +26,20 @@ class Processor
26
26
  return 0
27
27
  end
28
28
 
29
- images = files.map { |x| TaggedImage.new(x) }
29
+ # some files may have been removed by now: https://bitbucket.org/jgilbert/flickrup/issue/1
30
+ images = files.map { |x|
31
+ if File.exist? x
32
+ TaggedImage.new(x)
33
+ else
34
+ nil
35
+ end
36
+ }.compact
30
37
 
31
- tagged = images.select { |x| !(x.tags.nil? || x.tags.empty?) }.sort { |x,y| x.filename <=> y.filename}
38
+ tagged = images.select { |x|
39
+ !(x.tags.nil? || x.tags.empty?)
40
+ }.sort_by { |x|
41
+ [x.filename]
42
+ }
32
43
 
33
44
  logger.debug("Selected #{tagged.length} files for upload")
34
45
 
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonathan Gilbert