imagesite 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3abd4c946c4f8ae6ca32cb5c1039796d1c3c71a
4
- data.tar.gz: 877c5ad7845ec2992f043d4a20ad80dfa44e1ada
3
+ metadata.gz: 1804fe40fa021349a53a85319947999865463535
4
+ data.tar.gz: ad38b2c60ec98742080219ef4edc50d9fac4aaa4
5
5
  SHA512:
6
- metadata.gz: e980538689ca9ca1dbe5c95d9f349ffc3a15cec284b0963e37e8ec8fbd623951c70c9f4c64e88e313bb726dbb982a02889738fe6228a880e56edfb0c6a0a059a
7
- data.tar.gz: 0a5d8a6da480301a2f1f8f5c211560d90dab0d12a9632d9e7a34ee8675f2376719b2b8edbfc29e4a7a9b784d483900c237141db4a744d665bd176b8bb2d994b4
6
+ metadata.gz: 45b33bd47fdb0735faa8509e49bbae790b66bd40b61e207f57b33daaeed067b8a167f9d880b944e8ec8969ba666a0f5fbed90bb7658ce12cd533cc2c12d0f883
7
+ data.tar.gz: 9432e3eb6f1950d49828753f0be5f4d79e05e9807010ddce62d70a1e4473ca8a781b8daeb61d961f17e443a36e5d656ca47d8a3e119ea959f84ac5999492e084
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- imagesite (1.0.3)
4
+ imagesite (1.0.4)
5
5
  erubis (>= 2.7.0)
6
6
  exifr (>= 1.3.3)
7
7
  image_science (>= 1.3.0)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'imagesite'
3
- spec.version = '1.0.3'
3
+ spec.version = '1.0.4'
4
4
  spec.author = 'Dave Schweisguth'
5
5
  spec.email = 'dave@schweisguth.org'
6
6
 
@@ -42,7 +42,8 @@ module ImageSite
42
42
  end
43
43
 
44
44
  def title
45
- xmp && xmp.dc && xmp.dc.respond_to?(:title) && xmp.dc.title && xmp.dc.title.first
45
+ title = dc(:title)
46
+ title && title.first || nil
46
47
  end
47
48
 
48
49
  NEWLINE = "\xE2\x80\xA8".force_encoding('ASCII-8BIT')
@@ -52,7 +53,7 @@ module ImageSite
52
53
  end
53
54
 
54
55
  def tags
55
- xmp && xmp.dc && xmp.dc.respond_to?(:subject) && xmp.dc.subject || []
56
+ dc(:subject) || []
56
57
  end
57
58
 
58
59
  def relative_html
@@ -78,6 +79,10 @@ module ImageSite
78
79
  end
79
80
  end
80
81
 
82
+ def dc(property)
83
+ xmp && xmp.dc && xmp.dc.respond_to?(property) && xmp.dc.send(property)
84
+ end
85
+
81
86
  def xmp
82
87
  @xmp ||= XMP.parse exif
83
88
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imagesite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Schweisguth