epub-parser 0.3.0 → 0.3.1

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: 70cad0b9d998cc93a778340ffe85d24539a91a3c
4
- data.tar.gz: 4a8ab71c1773a7d7e7840b0928c3242838d7b58c
3
+ metadata.gz: 655aca49d6761da9e30df396fa811d63aee8c7fb
4
+ data.tar.gz: f1aad47cfbe0594fa64fbc1a09075d1ab4b7624d
5
5
  SHA512:
6
- metadata.gz: c38a92e46c148e20bd9c70fffe7bb5f138d4af3a5a4e049dff3a7f543d9676d7d7a31ce909ce8bd21819d4e26e3ef4486ae274889f2ecc61db58ea44008e38f0
7
- data.tar.gz: 786fb17c12e0f8c874ffacc13980ddfef8a56c48146ac5bdd181021b950738e7270f75737c27b9b87873ef77ef31d65bf6ff6718a3231a337d60e96dcdd066d3
6
+ metadata.gz: 4027e8135e0a87bbe18f8947cba9c3a6f6b643aa64745d08a4b89c1a944f96de1e2059dbd099243e6479d02a65e12a4967b8bd80a324dbd8119a6464d019363e
7
+ data.tar.gz: 6a4cf144baf144804b27700d4fc404653f1d59ed2e2d31fd380be510b746293b85550f4e362b304b7a6a86a611da894857be4f00387a6b08ebb1a709f46df7ea
@@ -1,6 +1,18 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 0.3.1
5
+ -----
6
+
7
+ * Load epub/parser.rb in epub/parser/cfi.rb to allow to use Parser::CFI independently
8
+ * Make `CFI` comparable. Now can call `CFI#==`
9
+ * Include `Publication::Package::Spine::Itemref` in `Searcher.search_element`'s result
10
+
11
+ 0.3.0
12
+ -----
13
+
14
+ * Wrong release. I'm sorry.
15
+
4
16
  0.2.9
5
17
  -----
6
18
 
@@ -152,6 +152,15 @@ If you find other gems, please tell me or request a pull request.
152
152
  RECENT CHANGES
153
153
  --------------
154
154
 
155
+ ### 0.3.1
156
+
157
+ * Make `CFI` comparable. Now can call `CFI#==`
158
+ * Include `Publication::Package::Spine::Itemref` in `Searcher.search_element`'s result
159
+
160
+ ### 0.3.0
161
+
162
+ * Wrong release. I'm sorry.
163
+
155
164
  ### 0.2.9
156
165
 
157
166
  * Fix a bug that `Searcher.search_element` returns wrong CFI
data/Rakefile CHANGED
@@ -17,8 +17,6 @@ file CFI_TAB do
17
17
  sh "racc #{CFI_Y}"
18
18
  end
19
19
 
20
- task :build => CFI_TAB
21
-
22
20
  namespace :test do
23
21
  task :default => [:build, :test]
24
22
 
@@ -14,6 +14,8 @@ module EPUB
14
14
  end
15
15
 
16
16
  class Location
17
+ include Comparable
18
+
17
19
  attr_reader :paths
18
20
 
19
21
  def initialize(paths=[])
@@ -1,4 +1,5 @@
1
1
  require 'strscan'
2
+ require 'epub/parser'
2
3
  require 'epub/parser/cfi.tab'
3
4
  require 'epub/cfi'
4
5
 
@@ -1,5 +1,5 @@
1
1
  module EPUB
2
2
  class Parser
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -39,6 +39,7 @@ module EPUB
39
39
  # @todo: Refactoring
40
40
  # @return [Array<Hash>] An array of rearch results. Each result is composed of:
41
41
  # :element: [Nokogiri::XML::ELement] Found element
42
+ # :itemref: [EPUB::Publication::Package::Spine::Itemref] Itemref that element's document belongs to
42
43
  # :location: [EPUB::CFI::Location] CFI that indicates the element
43
44
  # :package: [EPUB::Publication::Package] Package that the element belongs to
44
45
  def search_element(css: nil, xpath: nil, namespaces: {})
@@ -65,6 +66,7 @@ module EPUB
65
66
  results << {
66
67
  location: EPUB::CFI::Location.new([path_to_itemref, path]),
67
68
  package: @package,
69
+ itemref: itemref,
68
70
  element: elem
69
71
  }
70
72
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epub-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - KITAITI Makoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-10 00:00:00.000000000 Z
11
+ date: 2017-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake