epubmeta 0.5.4 → 0.6.0

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
  SHA256:
3
- metadata.gz: acfe5c181b71fa145824b9f83f23fa48336e1c0b834ab729ae95f1c95781e81b
4
- data.tar.gz: 1e1de32666bd6c50623b0f118f9b2a2eb4d5faa7614759b24f67723acb062c9f
3
+ metadata.gz: 84249089c1dffd97f50af83c920ebc237109ce14f56719fa4dba466a3f7da120
4
+ data.tar.gz: b9fe97e1ccb61609ab3647cd69357796159dd318b68a21a99ef63dd8b75fb007
5
5
  SHA512:
6
- metadata.gz: fba144ee56f5170e3d5567f38fdc6305dce58078c90855661c235561b713ad8ed5850f3b2ff0844f8de9b72d01a45c2e0e47caa4d343c9f391ee7f2c14965d57
7
- data.tar.gz: f96b9b1a9411dd5450a2d4dc5655a09206e82272eccf08de5404f0c2d39094e1a565d5e378b0d6cd6c8526349f1943f7e004ba93db76abd46a0d8ea484cb8002
6
+ metadata.gz: f8c52a708560373f55cda9b65932f581f520918547ab74a47e4b3688a2f29d4aaabae2281915b0c9a5b9b0c395910a08c8ca45cd6f62ac5acaa35d43173fbadb
7
+ data.tar.gz: 07a2aaef05dbe3445dd6e9bcac263baa671a83462a0e0a79c6cd83c0bf46077ec8191a23be5b92eb90a9a26df804a8f0fe1c756de15420ee15bfb000276271ed
data/README.md CHANGED
@@ -14,6 +14,11 @@ Which returns a `EPUBMeta::Models::Book` instance, please refer to the [API docu
14
14
 
15
15
  ## Changelog
16
16
 
17
+ **0.6.0** *May 06, 2020*
18
+
19
+ * Support reading rendition property. Accessible via `Book.fixed_layout?`
20
+ * Update nokogiti dependency to `>= 1.10.8` to mitigate CVE-2020-7595
21
+
17
22
  **0.5.4** *Februry 04, 2020*
18
23
 
19
24
  * Update rubyzip dependency to `~> 1.3.0` to mitigate CVE-2019-16892
@@ -54,6 +59,6 @@ Which returns a `EPUBMeta::Models::Book` instance, please refer to the [API docu
54
59
 
55
60
  ## Copyright
56
61
 
57
- Copyright (c) 2018--2019 Andrew Roberts.
62
+ Copyright (c) 2018--2020 Andrew Roberts.
58
63
  Copyright (c) 2012--2014 Christof Dorner.
59
64
  See LICENSE.txt for further details.
@@ -39,6 +39,12 @@ module EPUBMeta
39
39
  attr_accessor :identifiers
40
40
  def identifiers; @identifiers || []; end
41
41
 
42
+ # Fixed layout
43
+ # @return [Boolean]
44
+ attr_accessor :fixed_layout
45
+ def fixed_layout; @fixed_layout || false; end
46
+ alias :fixed_layout? :fixed_layout
47
+
42
48
  # Source ({http://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2.11 EPUB2 reference})
43
49
  # @return [String]
44
50
  attr_accessor :source
@@ -92,6 +98,13 @@ module EPUBMeta
92
98
  self.rights = metadata.xpath('.//rights').first.content rescue nil
93
99
  self.drm_protected = parser.drm_protected?
94
100
  self.cover = EPUBMeta::Models::Cover.new(parser)
101
+
102
+ rendition_element = metadata.xpath(".//meta[@property='rendition:layout']").first
103
+ if rendition_element.nil?
104
+ self.fixed_layout = false
105
+ else
106
+ self.fixed_layout = rendition_element.content == "pre-paginated"
107
+ end
95
108
  end
96
109
 
97
110
 
@@ -111,6 +124,7 @@ module EPUBMeta
111
124
  :languages => @languages,
112
125
  :rights => @rights,
113
126
  :drm_protected => @drm_protected,
127
+ :fixed_layout => @fixed_layout,
114
128
  :cover => @cover,
115
129
  }
116
130
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epubmeta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-04 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '1.10'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 1.10.4
42
+ version: 1.10.8
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '1.10'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 1.10.4
52
+ version: 1.10.8
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: rspec
55
55
  requirement: !ruby/object:Gem::Requirement