paperclip-location 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/paperclip/location/processor.rb +5 -2
- data/paperclip-location.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d83cfb902c31a155ba56326a8452faba62e1628
|
4
|
+
data.tar.gz: 7767686c871797fd35b2ad4901162e0dc74ac4f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1afc944888f33116265fbfc6492ec7d14ee5585c9b1262ea7fb2d2b4ad876779909d7469ec1234ebac1f099da4bf708acbe5bc7576ea5697723c50b5e887d62
|
7
|
+
data.tar.gz: f9b3b0ba67b8e1ed87b2b3561d791f9e2d1f6fafec06ccce14138ea9a86f8e305cea924bfe283b6806dcb634db6d0fdea5ccc83f490a1ef3049852448a353eb3
|
@@ -3,7 +3,6 @@ require 'paperclip'
|
|
3
3
|
|
4
4
|
module Paperclip::Location
|
5
5
|
class Processor < Paperclip::Processor
|
6
|
-
delegate :location_locked?, to: :instance, allow_nil: true
|
7
6
|
delegate :instance, to: :attachment, allow_nil: true
|
8
7
|
delegate :gps, to: :exif
|
9
8
|
|
@@ -23,6 +22,10 @@ module Paperclip::Location
|
|
23
22
|
|
24
23
|
private
|
25
24
|
|
25
|
+
def location_locked?
|
26
|
+
instance.respond_to?(:location_locked?) && instance.location_locked?
|
27
|
+
end
|
28
|
+
|
26
29
|
def can_process?
|
27
30
|
!location_locked? && gps.present? && instance.present?
|
28
31
|
end
|
@@ -31,4 +34,4 @@ module Paperclip::Location
|
|
31
34
|
@exif ||= EXIFR::JPEG.new(file.path)
|
32
35
|
end
|
33
36
|
end
|
34
|
-
end
|
37
|
+
end
|
data/paperclip-location.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "paperclip-location"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.7"
|
8
8
|
spec.authors = ["Sean Doyle"]
|
9
9
|
spec.email = ["sean.p.doyle24@gmail.com"]
|
10
10
|
spec.description = %q{extract geolocation during Paperclip processing}
|