epuber 0.7.4 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -2
  3. data/LICENSE.txt +1 -1
  4. data/README.md +4 -3
  5. data/epuber.gemspec +11 -16
  6. data/lib/epuber/book/contributor.rb +10 -7
  7. data/lib/epuber/book/file_request.rb +3 -3
  8. data/lib/epuber/book/target.rb +30 -33
  9. data/lib/epuber/book/toc_item.rb +2 -4
  10. data/lib/epuber/book.rb +21 -21
  11. data/lib/epuber/checker/bookspec_checker.rb +26 -0
  12. data/lib/epuber/checker/text_checker.rb +16 -7
  13. data/lib/epuber/checker.rb +16 -2
  14. data/lib/epuber/checker_transformer_base.rb +3 -6
  15. data/lib/epuber/command/build.rb +40 -25
  16. data/lib/epuber/command/from_file.rb +39 -0
  17. data/lib/epuber/command/init.rb +34 -32
  18. data/lib/epuber/command/server.rb +3 -3
  19. data/lib/epuber/command.rb +18 -20
  20. data/lib/epuber/compiler/compilation_context.rb +10 -8
  21. data/lib/epuber/compiler/file_database.rb +2 -4
  22. data/lib/epuber/compiler/file_finders/abstract.rb +36 -26
  23. data/lib/epuber/compiler/file_finders/imaginary.rb +40 -35
  24. data/lib/epuber/compiler/file_resolver.rb +79 -89
  25. data/lib/epuber/compiler/file_stat.rb +4 -4
  26. data/lib/epuber/compiler/file_types/abstract_file.rb +4 -7
  27. data/lib/epuber/compiler/file_types/bade_file.rb +20 -15
  28. data/lib/epuber/compiler/file_types/coffee_script_file.rb +1 -1
  29. data/lib/epuber/compiler/file_types/css_file.rb +103 -0
  30. data/lib/epuber/compiler/file_types/generated_file.rb +1 -1
  31. data/lib/epuber/compiler/file_types/image_file.rb +4 -2
  32. data/lib/epuber/compiler/file_types/nav_file.rb +0 -1
  33. data/lib/epuber/compiler/file_types/opf_file.rb +0 -1
  34. data/lib/epuber/compiler/file_types/source_file.rb +8 -3
  35. data/lib/epuber/compiler/file_types/stylus_file.rb +4 -3
  36. data/lib/epuber/compiler/file_types/xhtml_file.rb +67 -13
  37. data/lib/epuber/compiler/generator.rb +1 -2
  38. data/lib/epuber/compiler/meta_inf_generator.rb +1 -1
  39. data/lib/epuber/compiler/nav_generator.rb +10 -11
  40. data/lib/epuber/compiler/opf_generator.rb +26 -27
  41. data/lib/epuber/compiler/problem.rb +12 -21
  42. data/lib/epuber/compiler/xhtml_processor.rb +63 -32
  43. data/lib/epuber/compiler.rb +77 -25
  44. data/lib/epuber/config.rb +16 -10
  45. data/lib/epuber/dsl/attribute.rb +17 -18
  46. data/lib/epuber/dsl/attribute_support.rb +7 -7
  47. data/lib/epuber/dsl/object.rb +19 -17
  48. data/lib/epuber/dsl/tree_object.rb +2 -3
  49. data/lib/epuber/epubcheck.rb +15 -0
  50. data/lib/epuber/from_file/bookspec_generator.rb +371 -0
  51. data/lib/epuber/from_file/encryption_handler.rb +146 -0
  52. data/lib/epuber/from_file/from_file_executor.rb +140 -0
  53. data/lib/epuber/from_file/nav_file.rb +163 -0
  54. data/lib/epuber/from_file/opf_file.rb +219 -0
  55. data/lib/epuber/helper.rb +0 -1
  56. data/lib/epuber/lockfile.rb +7 -9
  57. data/lib/epuber/plugin.rb +2 -3
  58. data/lib/epuber/ruby_extensions/match_data.rb +1 -1
  59. data/lib/epuber/ruby_extensions/thread.rb +1 -0
  60. data/lib/epuber/server/base.styl +0 -1
  61. data/lib/epuber/server/basic.styl +1 -30
  62. data/lib/epuber/server/handlers.rb +1 -1
  63. data/lib/epuber/server.rb +81 -80
  64. data/lib/epuber/third_party/bower.rb +5 -5
  65. data/lib/epuber/transformer/book_transformer.rb +108 -0
  66. data/lib/epuber/transformer/text_transformer.rb +4 -2
  67. data/lib/epuber/transformer.rb +4 -2
  68. data/lib/epuber/user_interface.rb +49 -38
  69. data/lib/epuber/vendor/hash_binding.rb +9 -2
  70. data/lib/epuber/vendor/ruby_templater.rb +4 -8
  71. data/lib/epuber/vendor/version.rb +12 -12
  72. data/lib/epuber/version.rb +1 -1
  73. metadata +79 -100
  74. data/lib/epuber/server/fonts/AvenirNext/AvenirNext-Bold.ttf +0 -0
  75. data/lib/epuber/server/fonts/AvenirNext/AvenirNext-BoldItalic.ttf +0 -0
  76. data/lib/epuber/server/fonts/AvenirNext/AvenirNext-Italic.ttf +0 -0
  77. data/lib/epuber/server/fonts/AvenirNext/AvenirNext-Regular.ttf +0 -0
@@ -8,7 +8,7 @@ require_relative 'command'
8
8
 
9
9
  module Epuber
10
10
  class UserInterface
11
- Location = Struct.new(:path, :lineno)
11
+ Location = Struct.new(:path, :lineno, :column, keyword_init: true)
12
12
 
13
13
  class << self
14
14
  # @return [Epuber::Command]
@@ -35,7 +35,10 @@ module Epuber
35
35
  def self.error(message, location: nil)
36
36
  _clear_processing_line_for_new_output do
37
37
  $stdout.puts(_format_message(:error, message, location: location))
38
- _print_backtrace(location.try(:backtrace_locations) || message.try(:backtrace_locations) || caller_locations, location: location) if current_command && current_command.verbose?
38
+ if current_command&.verbose?
39
+ _print_backtrace(location.try(:backtrace_locations) || message.try(:backtrace_locations) || caller_locations,
40
+ location: location)
41
+ end
39
42
  end
40
43
  end
41
44
 
@@ -48,10 +51,6 @@ module Epuber
48
51
  end
49
52
  end
50
53
 
51
-
52
-
53
-
54
-
55
54
  # @param [#to_s] problem some problem, object just have to know to convert self into string with method #to_s
56
55
  #
57
56
  def self.print_processing_problem(problem)
@@ -63,16 +62,16 @@ module Epuber
63
62
  # @param [String] info_text
64
63
  #
65
64
  def self.print_processing_debug_info(info_text)
66
- if current_command && current_command.verbose?
67
- _clear_processing_line_for_new_output do
68
- message = if @current_file.nil?
69
- "▸ #{info_text}"
70
- else
71
- "▸ #{@current_file.source_path}: #{info_text}"
72
- end
73
-
74
- $stdout.puts(message.ansi.send(_color_from_level(:debug)))
75
- end
65
+ return unless current_command&.verbose?
66
+
67
+ _clear_processing_line_for_new_output do
68
+ message = if @current_file.nil?
69
+ "▸ #{info_text}"
70
+ else
71
+ "▸ #{@current_file.source_path}: #{info_text}"
72
+ end
73
+
74
+ $stdout.puts(message.ansi.send(_color_from_level(:debug)))
76
75
  end
77
76
  end
78
77
 
@@ -107,14 +106,18 @@ module Epuber
107
106
  @current_file = nil
108
107
  end
109
108
 
109
+ def self.puts(message)
110
+ _clear_processing_line_for_new_output do
111
+ $stdout.puts(message)
112
+ end
113
+ end
114
+
110
115
  # @param [Compiler::FileTypes::AbstractFile] file
111
116
  # @param [String] step_name
112
117
  # @param [Fixnum] time
113
118
  #
114
119
  def self.print_step_processing_time(step_name, time = nil)
115
- if !current_command || !current_command.debug_steps_times
116
- return yield
117
- end
120
+ return yield if !current_command || !current_command.debug_steps_times
118
121
 
119
122
  remove_processing_file_line
120
123
 
@@ -137,8 +140,6 @@ module Epuber
137
140
  returned_value
138
141
  end
139
142
 
140
- private
141
-
142
143
  def self._clear_processing_line_for_new_output
143
144
  last_line = remove_processing_file_line
144
145
 
@@ -154,12 +155,12 @@ module Epuber
154
155
  #
155
156
  def self._color_from_level(level)
156
157
  case level
157
- when :error; :red
158
- when :warning; :yellow
159
- when :normal; :white
160
- when :debug; :blue
161
- else
162
- raise "Unknown output level #{level}"
158
+ when :error then :red
159
+ when :warning then :yellow
160
+ when :normal then :white
161
+ when :debug then :blue
162
+ else
163
+ raise "Unknown output level #{level}"
163
164
  end
164
165
  end
165
166
 
@@ -170,13 +171,13 @@ module Epuber
170
171
  def self._location_from_obj(obj)
171
172
  case obj
172
173
  when ::Thread::Backtrace::Location
173
- Location.new(obj.path, obj.lineno)
174
+ Location.new(path: obj.path, lineno: obj.lineno)
174
175
  when ::Nokogiri::XML::Node
175
- Location.new(obj.document.file_path, obj.line)
176
+ Location.new(path: obj.document.file_path, lineno: obj.line)
176
177
  when Location
177
178
  obj
178
179
  when Epuber::Compiler::FileTypes::AbstractFile
179
- Location.new(obj.source_path, nil)
180
+ Location.new(path: obj.source_path)
180
181
  end
181
182
  end
182
183
 
@@ -191,12 +192,22 @@ module Epuber
191
192
 
192
193
  comps = []
193
194
  comps << message.to_s
194
- if !location.nil? && !(message.is_a?(Epuber::Compiler::Problem) || message.is_a?(Epuber::Checker::TextChecker::MatchProblem))
195
- if location.lineno
196
- comps << " (in file #{location.path} line #{location.lineno})"
197
- else
198
- comps << " (in file #{location.path})"
199
- end
195
+ message_already_formatted =
196
+ message.is_a?(Epuber::Compiler::Problem) || message.is_a?(Epuber::Checker::TextChecker::MatchProblem)
197
+
198
+ if !location.nil? && !message_already_formatted
199
+ path = location.path
200
+
201
+ # calculate relative path when path is absolute and in project
202
+ path = path[Config.instance.project_path.size + 1..-1] if path.start_with?(Config.instance.project_path)
203
+
204
+ line_parts = [
205
+ " (in file #{path}",
206
+ ]
207
+ line_parts << "line #{location.lineno}" if location.lineno
208
+ line_parts << "column #{location.column}" if location.column
209
+
210
+ comps << "#{line_parts.join(' ')})"
200
211
  end
201
212
 
202
213
  comps.join("\n").ansi.send(_color_from_level(level))
@@ -209,13 +220,13 @@ module Epuber
209
220
  #
210
221
  def self._format_backtrace(locations, location: nil)
211
222
  index = locations.index(location) || 0
212
- locations[index, locations.size].map { |loc| loc.to_s }
223
+ locations[index, locations.size].map(&:to_s)
213
224
  end
214
225
 
215
226
  # @param [Thread::Backtrace::Location] location location of the error
216
227
  #
217
228
  def self._print_backtrace(locations, location: nil)
218
- puts(_format_backtrace(locations, location: location)) if current_command.verbose?
229
+ $stdout.puts(_format_backtrace(locations, location: location)) if current_command.verbose?
219
230
  end
220
231
  end
221
232
 
@@ -8,19 +8,26 @@ module Epuber
8
8
  @vars = vars
9
9
  end
10
10
 
11
+ # @return [Boolean]
12
+ #
13
+ def respond_to_missing?(name, _include_private = false)
14
+ @vars.key?(name) || super
15
+ end
16
+
11
17
  # @param [String] name
12
18
  #
13
19
  def method_missing(name)
14
20
  raise NameError, "Not found value for key #{name}" unless @vars.key?(name)
21
+
15
22
  @vars[name]
16
23
  end
17
24
 
18
- # rubocop:disable Style/AccessorMethodName
25
+ # rubocop:disable Naming/AccessorMethodName
19
26
 
20
27
  def get_binding
21
28
  binding
22
29
  end
23
30
 
24
- # rubocop:enable Style/AccessorMethodName
31
+ # rubocop:enable Naming/AccessorMethodName
25
32
  end
26
33
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # rubocop:disable Lint/Eval
4
-
5
3
  require_relative 'hash_binding'
6
4
 
7
5
  module Epuber
@@ -18,7 +16,7 @@ module Epuber
18
16
  #
19
17
  attr_accessor :locals
20
18
 
21
- # @param source [String]
19
+ # @param [String] source
22
20
  #
23
21
  # @return [self]
24
22
  #
@@ -29,7 +27,7 @@ module Epuber
29
27
  inst
30
28
  end
31
29
 
32
- # @param file [String, File]
30
+ # @param [String, File] file
33
31
  #
34
32
  # @return [self]
35
33
  #
@@ -48,7 +46,7 @@ module Epuber
48
46
  # DSL methods
49
47
 
50
48
 
51
- # @param locals [Hash]
49
+ # @param [Hash] locals
52
50
  #
53
51
  # @return [self]
54
52
  #
@@ -62,9 +60,7 @@ module Epuber
62
60
  def render
63
61
  hash_binding = HashBinding.new(locals)
64
62
  eval_string = %(%(#{source_text}))
65
- eval(eval_string, hash_binding.get_binding)
63
+ eval(eval_string, hash_binding.get_binding) # rubocop:disable Security/Eval
66
64
  end
67
65
  end
68
66
  end
69
-
70
- # rubocop:enable Lint/Eval
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Most of this code is taken from github.com/CocoaPods/Core/blob/master/lib/cocoapods-core/vendor/version.rb
4
4
 
5
- def is_number(other)
5
+ def number?(other)
6
6
  other.is_a?(Numeric) || other.is_a?(Integer) || other.is_a?(Float)
7
7
  end
8
8
 
@@ -10,7 +10,7 @@ module Epuber
10
10
  class Version
11
11
  include Comparable
12
12
 
13
- VERSION_RE ||= /\A[0-9]+(\.[0-9a-zA-Z]+)*\z/
13
+ VERSION_RE = /\A[0-9]+(\.[0-9a-zA-Z]+)*\z/.freeze
14
14
 
15
15
  # True if the +version+ string matches RubyGems' requirements.
16
16
  #
@@ -18,15 +18,13 @@ module Epuber
18
18
  version.to_s =~ VERSION_RE
19
19
  end
20
20
 
21
- attr_reader :version, :segments
21
+ attr_reader :version
22
22
 
23
23
 
24
24
  # @param [String, Numeric] version input primitive value for version
25
25
  #
26
26
  def initialize(version)
27
- unless self.class.correct?(version)
28
- raise StandardError, "Malformed version number string #{version}"
29
- end
27
+ raise StandardError, "Malformed version number string #{version}" unless self.class.correct?(version)
30
28
 
31
29
  @version = version.to_s.strip
32
30
  end
@@ -42,7 +40,7 @@ module Epuber
42
40
  # @return [String]
43
41
  #
44
42
  def to_s
45
- "#{segments.join('.')}"
43
+ segments.join('.').to_s
46
44
  end
47
45
 
48
46
  # Compares this version with +other+ returning -1, 0, or 1 if the
@@ -53,7 +51,8 @@ module Epuber
53
51
  #
54
52
  def <=>(other)
55
53
  return unless other.is_a?(Version) || other.is_a?(String) || other.is_a?(Float) || other.is_a?(Integer)
56
- other = other.is_a?(Version) ? other : Version.new(other)
54
+
55
+ other = Version.new(other) unless other.is_a?(Version)
57
56
 
58
57
  return 0 if @version == other.version
59
58
 
@@ -62,17 +61,18 @@ module Epuber
62
61
 
63
62
  lhsize = lhsegments.size
64
63
  rhsize = rhsegments.size
65
- limit = (lhsize > rhsize ? lhsize : rhsize) - 1
64
+ limit = [lhsize, rhsize].max - 1
66
65
 
67
66
  i = 0
68
67
 
69
68
  while i <= limit
70
- lhs, rhs = lhsegments[i] || 0, rhsegments[i] || 0
69
+ lhs = lhsegments[i] || 0
70
+ rhs = rhsegments[i] || 0
71
71
  i += 1
72
72
 
73
73
  next if lhs == rhs
74
- return -1 if lhs.is_a?(String) && is_number(rhs)
75
- return 1 if is_number(lhs) && rhs.is_a?(String)
74
+ return -1 if lhs.is_a?(String) && number?(rhs)
75
+ return 1 if number?(lhs) && rhs.is_a?(String)
76
76
 
77
77
  return lhs <=> rhs
78
78
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Epuber
4
- VERSION = '0.7.4'
4
+ VERSION = '0.9.0'
5
5
 
6
6
  HOME_URL = 'https://github.com/epuber-io/epuber'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epuber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kříž
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-27 00:00:00.000000000 Z
11
+ date: 2023-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -45,27 +45,21 @@ dependencies:
45
45
  - !ruby/object:Gem::Version
46
46
  version: '2.7'
47
47
  - !ruby/object:Gem::Dependency
48
- name: nokogiri
48
+ name: claide
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.8'
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: 1.8.2
53
+ version: '1.0'
57
54
  type: :runtime
58
55
  prerelease: false
59
56
  version_requirements: !ruby/object:Gem::Requirement
60
57
  requirements:
61
58
  - - "~>"
62
59
  - !ruby/object:Gem::Version
63
- version: '1.8'
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: 1.8.2
60
+ version: '1.0'
67
61
  - !ruby/object:Gem::Dependency
68
- name: mime-types
62
+ name: listen
69
63
  requirement: !ruby/object:Gem::Requirement
70
64
  requirements:
71
65
  - - "~>"
@@ -79,33 +73,39 @@ dependencies:
79
73
  - !ruby/object:Gem::Version
80
74
  version: '3.0'
81
75
  - !ruby/object:Gem::Dependency
82
- name: claide
76
+ name: mime-types
83
77
  requirement: !ruby/object:Gem::Requirement
84
78
  requirements:
85
79
  - - "~>"
86
80
  - !ruby/object:Gem::Version
87
- version: '1.0'
81
+ version: '3.0'
88
82
  type: :runtime
89
83
  prerelease: false
90
84
  version_requirements: !ruby/object:Gem::Requirement
91
85
  requirements:
92
86
  - - "~>"
93
87
  - !ruby/object:Gem::Version
94
- version: '1.0'
88
+ version: '3.0'
95
89
  - !ruby/object:Gem::Dependency
96
- name: listen
90
+ name: nokogiri
97
91
  requirement: !ruby/object:Gem::Requirement
98
92
  requirements:
99
93
  - - "~>"
100
94
  - !ruby/object:Gem::Version
101
- version: '3.0'
95
+ version: '1.8'
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 1.8.2
102
99
  type: :runtime
103
100
  prerelease: false
104
101
  version_requirements: !ruby/object:Gem::Requirement
105
102
  requirements:
106
103
  - - "~>"
107
104
  - !ruby/object:Gem::Version
108
- version: '3.0'
105
+ version: '1.8'
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: 1.8.2
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: os
111
111
  requirement: !ruby/object:Gem::Requirement
@@ -120,6 +120,20 @@ dependencies:
120
120
  - - "~>"
121
121
  - !ruby/object:Gem::Version
122
122
  version: '1.0'
123
+ - !ruby/object:Gem::Dependency
124
+ name: uuidtools
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '2.1'
130
+ type: :runtime
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - "~>"
135
+ - !ruby/object:Gem::Version
136
+ version: '2.1'
123
137
  - !ruby/object:Gem::Dependency
124
138
  name: sinatra
125
139
  requirement: !ruby/object:Gem::Requirement
@@ -140,20 +154,6 @@ dependencies:
140
154
  - - "<"
141
155
  - !ruby/object:Gem::Version
142
156
  version: '4.0'
143
- - !ruby/object:Gem::Dependency
144
- name: sinatra-websocket
145
- requirement: !ruby/object:Gem::Requirement
146
- requirements:
147
- - - "~>"
148
- - !ruby/object:Gem::Version
149
- version: '0.3'
150
- type: :runtime
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- requirements:
154
- - - "~>"
155
- - !ruby/object:Gem::Version
156
- version: '0.3'
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: sinatra-contrib
159
159
  requirement: !ruby/object:Gem::Requirement
@@ -174,6 +174,20 @@ dependencies:
174
174
  - - "<"
175
175
  - !ruby/object:Gem::Version
176
176
  version: '4.0'
177
+ - !ruby/object:Gem::Dependency
178
+ name: sinatra-websocket
179
+ requirement: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - "~>"
182
+ - !ruby/object:Gem::Version
183
+ version: '0.3'
184
+ type: :runtime
185
+ prerelease: false
186
+ version_requirements: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - "~>"
189
+ - !ruby/object:Gem::Version
190
+ version: '0.3'
177
191
  - !ruby/object:Gem::Dependency
178
192
  name: thin
179
193
  requirement: !ruby/object:Gem::Requirement
@@ -243,25 +257,25 @@ dependencies:
243
257
  - !ruby/object:Gem::Version
244
258
  version: '6.0'
245
259
  - !ruby/object:Gem::Dependency
246
- name: epuber-stylus
260
+ name: bade
247
261
  requirement: !ruby/object:Gem::Requirement
248
262
  requirements:
249
263
  - - "~>"
250
264
  - !ruby/object:Gem::Version
251
- version: '1.1'
265
+ version: '0.3'
252
266
  - - ">="
253
267
  - !ruby/object:Gem::Version
254
- version: 1.1.1
268
+ version: 0.3.1
255
269
  type: :runtime
256
270
  prerelease: false
257
271
  version_requirements: !ruby/object:Gem::Requirement
258
272
  requirements:
259
273
  - - "~>"
260
274
  - !ruby/object:Gem::Version
261
- version: '1.1'
275
+ version: '0.3'
262
276
  - - ">="
263
277
  - !ruby/object:Gem::Version
264
- version: 1.1.1
278
+ version: 0.3.1
265
279
  - !ruby/object:Gem::Dependency
266
280
  name: coffee-script
267
281
  requirement: !ruby/object:Gem::Requirement
@@ -277,87 +291,45 @@ dependencies:
277
291
  - !ruby/object:Gem::Version
278
292
  version: '2.4'
279
293
  - !ruby/object:Gem::Dependency
280
- name: bade
294
+ name: css_parser
281
295
  requirement: !ruby/object:Gem::Requirement
282
296
  requirements:
283
- - - "~>"
284
- - !ruby/object:Gem::Version
285
- version: '0.3'
286
297
  - - ">="
287
298
  - !ruby/object:Gem::Version
288
- version: 0.3.1
299
+ version: '0.8'
300
+ - - "<"
301
+ - !ruby/object:Gem::Version
302
+ version: '2.0'
289
303
  type: :runtime
290
304
  prerelease: false
291
305
  version_requirements: !ruby/object:Gem::Requirement
292
306
  requirements:
293
- - - "~>"
294
- - !ruby/object:Gem::Version
295
- version: '0.3'
296
307
  - - ">="
297
308
  - !ruby/object:Gem::Version
298
- version: 0.3.1
299
- - !ruby/object:Gem::Dependency
300
- name: rspec
301
- requirement: !ruby/object:Gem::Requirement
302
- requirements:
303
- - - "~>"
304
- - !ruby/object:Gem::Version
305
- version: '3.2'
306
- type: :development
307
- prerelease: false
308
- version_requirements: !ruby/object:Gem::Requirement
309
- requirements:
310
- - - "~>"
309
+ version: '0.8'
310
+ - - "<"
311
311
  - !ruby/object:Gem::Version
312
- version: '3.2'
312
+ version: '2.0'
313
313
  - !ruby/object:Gem::Dependency
314
- name: rubocop
314
+ name: epuber-stylus
315
315
  requirement: !ruby/object:Gem::Requirement
316
316
  requirements:
317
317
  - - "~>"
318
318
  - !ruby/object:Gem::Version
319
- version: '1.14'
320
- type: :development
321
- prerelease: false
322
- version_requirements: !ruby/object:Gem::Requirement
323
- requirements:
324
- - - "~>"
325
- - !ruby/object:Gem::Version
326
- version: '1.14'
327
- - !ruby/object:Gem::Dependency
328
- name: rake
329
- requirement: !ruby/object:Gem::Requirement
330
- requirements:
331
- - - "~>"
319
+ version: '1.1'
320
+ - - ">="
332
321
  - !ruby/object:Gem::Version
333
- version: '13.0'
334
- type: :development
322
+ version: 1.1.1
323
+ type: :runtime
335
324
  prerelease: false
336
325
  version_requirements: !ruby/object:Gem::Requirement
337
326
  requirements:
338
327
  - - "~>"
339
328
  - !ruby/object:Gem::Version
340
- version: '13.0'
341
- - !ruby/object:Gem::Dependency
342
- name: fakefs
343
- requirement: !ruby/object:Gem::Requirement
344
- requirements:
345
- - - ">="
346
- - !ruby/object:Gem::Version
347
- version: '1.3'
348
- - - "<"
349
- - !ruby/object:Gem::Version
350
- version: '3.0'
351
- type: :development
352
- prerelease: false
353
- version_requirements: !ruby/object:Gem::Requirement
354
- requirements:
329
+ version: '1.1'
355
330
  - - ">="
356
331
  - !ruby/object:Gem::Version
357
- version: '1.3'
358
- - - "<"
359
- - !ruby/object:Gem::Version
360
- version: '3.0'
332
+ version: 1.1.1
361
333
  description:
362
334
  email:
363
335
  - samnung@gmail.com
@@ -378,11 +350,13 @@ files:
378
350
  - lib/epuber/book/target.rb
379
351
  - lib/epuber/book/toc_item.rb
380
352
  - lib/epuber/checker.rb
353
+ - lib/epuber/checker/bookspec_checker.rb
381
354
  - lib/epuber/checker/text_checker.rb
382
355
  - lib/epuber/checker_transformer_base.rb
383
356
  - lib/epuber/command.rb
384
357
  - lib/epuber/command/build.rb
385
358
  - lib/epuber/command/compile.rb
359
+ - lib/epuber/command/from_file.rb
386
360
  - lib/epuber/command/init.rb
387
361
  - lib/epuber/command/server.rb
388
362
  - lib/epuber/compiler.rb
@@ -397,6 +371,7 @@ files:
397
371
  - lib/epuber/compiler/file_types/bade_file.rb
398
372
  - lib/epuber/compiler/file_types/coffee_script_file.rb
399
373
  - lib/epuber/compiler/file_types/container_xml_file.rb
374
+ - lib/epuber/compiler/file_types/css_file.rb
400
375
  - lib/epuber/compiler/file_types/generated_file.rb
401
376
  - lib/epuber/compiler/file_types/ibooks_display_options_file.rb
402
377
  - lib/epuber/compiler/file_types/image_file.rb
@@ -418,6 +393,12 @@ files:
418
393
  - lib/epuber/dsl/attribute_support.rb
419
394
  - lib/epuber/dsl/object.rb
420
395
  - lib/epuber/dsl/tree_object.rb
396
+ - lib/epuber/epubcheck.rb
397
+ - lib/epuber/from_file/bookspec_generator.rb
398
+ - lib/epuber/from_file/encryption_handler.rb
399
+ - lib/epuber/from_file/from_file_executor.rb
400
+ - lib/epuber/from_file/nav_file.rb
401
+ - lib/epuber/from_file/opf_file.rb
421
402
  - lib/epuber/helper.rb
422
403
  - lib/epuber/lockfile.rb
423
404
  - lib/epuber/plugin.rb
@@ -432,10 +413,6 @@ files:
432
413
  - lib/epuber/server/basic.styl
433
414
  - lib/epuber/server/book_content.styl
434
415
  - lib/epuber/server/default_cover.png
435
- - lib/epuber/server/fonts/AvenirNext/AvenirNext-Bold.ttf
436
- - lib/epuber/server/fonts/AvenirNext/AvenirNext-BoldItalic.ttf
437
- - lib/epuber/server/fonts/AvenirNext/AvenirNext-Italic.ttf
438
- - lib/epuber/server/fonts/AvenirNext/AvenirNext-Regular.ttf
439
416
  - lib/epuber/server/handlers.rb
440
417
  - lib/epuber/server/keyboard_control.coffee
441
418
  - lib/epuber/server/pages/book.bade
@@ -588,6 +565,7 @@ files:
588
565
  - lib/epuber/third_party/bower/bower_components/uri.js/src/jquery.URI.min.js
589
566
  - lib/epuber/third_party/bower/bower_components/uri.js/src/punycode.js
590
567
  - lib/epuber/transformer.rb
568
+ - lib/epuber/transformer/book_transformer.rb
591
569
  - lib/epuber/transformer/text_transformer.rb
592
570
  - lib/epuber/user_interface.rb
593
571
  - lib/epuber/vendor/hash_binding.rb
@@ -599,7 +577,8 @@ files:
599
577
  homepage: https://github.com/epuber-io/epuber
600
578
  licenses:
601
579
  - MIT
602
- metadata: {}
580
+ metadata:
581
+ rubygems_mfa_required: 'true'
603
582
  post_install_message:
604
583
  rdoc_options: []
605
584
  require_paths:
@@ -615,7 +594,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
615
594
  - !ruby/object:Gem::Version
616
595
  version: '0'
617
596
  requirements: []
618
- rubygems_version: 3.4.21
597
+ rubygems_version: 3.4.22
619
598
  signing_key:
620
599
  specification_version: 4
621
600
  summary: Epuber is simple tool to compile and pack source files into EPUB format.