epubber 0.1.0 → 0.1.1
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/epubber.gemspec +1 -0
- data/lib/epubber/models/book.rb +0 -6
- data/lib/epubber/models/chapter.rb +5 -1
- data/lib/epubber/models/concerns/has_html.rb +10 -0
- data/lib/epubber/models/endnotes.rb +5 -1
- data/lib/epubber/models/introduction.rb +5 -1
- data/lib/epubber/version.rb +1 -1
- metadata +16 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76429913c62496698719265f293d923e73470b40
|
4
|
+
data.tar.gz: 7b29b2bfe6142cc238b1fbf973dd009f36745325
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83faa5f556544b8f6f2fbebe77cf76bbf27ac051c4c4b545990d902da43ec070cea258defafe62749aaf98b5b969a3d1e06e5228d7ef01abc46528d1e17f4cd5
|
7
|
+
data.tar.gz: 1050cc0d622bee5a9fc7b067214e8520fe14051238b219deb39074757473413720b47f293207903636056bf761ae90f5555897031966c829aefe93038f6906cb
|
data/epubber.gemspec
CHANGED
data/lib/epubber/models/book.rb
CHANGED
@@ -14,7 +14,6 @@ module Epubber::Models
|
|
14
14
|
def initialize
|
15
15
|
@title = not_specified
|
16
16
|
@author = not_specified
|
17
|
-
@description = not_specified
|
18
17
|
@publisher = not_specified
|
19
18
|
@language = 'en'
|
20
19
|
@url = not_specified
|
@@ -36,10 +35,6 @@ module Epubber::Models
|
|
36
35
|
@publisher = text
|
37
36
|
end
|
38
37
|
|
39
|
-
def description(text)
|
40
|
-
@description = text
|
41
|
-
end
|
42
|
-
|
43
38
|
def language(lang)
|
44
39
|
@language = lang
|
45
40
|
end
|
@@ -62,7 +57,6 @@ module Epubber::Models
|
|
62
57
|
# Attributes
|
63
58
|
"title" => @title,
|
64
59
|
"author" => @author,
|
65
|
-
"description" => @description,
|
66
60
|
"publisher" => @publisher,
|
67
61
|
"language" => @language,
|
68
62
|
"url" => @url,
|
@@ -1,6 +1,10 @@
|
|
1
|
+
require 'epubber/models/concerns/has_endnotes'
|
2
|
+
|
1
3
|
# Represents a book's chapter
|
2
4
|
module Epubber::Models
|
3
5
|
class Chapter
|
6
|
+
include Epubber::Models::Concerns::HasHTML
|
7
|
+
|
4
8
|
def initialize
|
5
9
|
@id = 0
|
6
10
|
@title = 'Not specified'
|
@@ -16,7 +20,7 @@ module Epubber::Models
|
|
16
20
|
end
|
17
21
|
|
18
22
|
def content(text)
|
19
|
-
@content = text
|
23
|
+
@content = clean_html(text)
|
20
24
|
end
|
21
25
|
|
22
26
|
def contextify
|
@@ -1,12 +1,16 @@
|
|
1
|
+
require 'epubber/models/concerns/has_endnotes'
|
2
|
+
|
1
3
|
# Represents a book's introduction
|
2
4
|
module Epubber::Models
|
3
5
|
class Endnotes
|
6
|
+
include Epubber::Models::Concerns::HasHTML
|
7
|
+
|
4
8
|
def initialize
|
5
9
|
@content = '<p>Not specified</p>'
|
6
10
|
end
|
7
11
|
|
8
12
|
def content(content)
|
9
|
-
@content = content
|
13
|
+
@content = clean_html(content)
|
10
14
|
end
|
11
15
|
|
12
16
|
def contextify
|
@@ -1,12 +1,16 @@
|
|
1
|
+
require 'epubber/models/concerns/has_endnotes'
|
2
|
+
|
1
3
|
# Represents a book's introduction
|
2
4
|
module Epubber::Models
|
3
5
|
class Introduction
|
6
|
+
include Epubber::Models::Concerns::HasHTML
|
7
|
+
|
4
8
|
def initialize
|
5
9
|
@content = '<p>Not specified</p>'
|
6
10
|
end
|
7
11
|
|
8
12
|
def content(content)
|
9
|
-
@content = content
|
13
|
+
@content = clean_html(content)
|
10
14
|
end
|
11
15
|
|
12
16
|
def contextify
|
data/lib/epubber/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epubber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Ramirez
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.0.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: nokogiri
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.6'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.6'
|
83
97
|
description:
|
84
98
|
email:
|
85
99
|
- fedra.arg@gmail.com
|
@@ -106,6 +120,7 @@ files:
|
|
106
120
|
- lib/epubber/models/chapter.rb
|
107
121
|
- lib/epubber/models/concerns/has_chapters.rb
|
108
122
|
- lib/epubber/models/concerns/has_endnotes.rb
|
123
|
+
- lib/epubber/models/concerns/has_html.rb
|
109
124
|
- lib/epubber/models/concerns/has_introduction.rb
|
110
125
|
- lib/epubber/models/endnotes.rb
|
111
126
|
- lib/epubber/models/introduction.rb
|