epuber 0.7.2 → 0.7.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
  SHA256:
3
- metadata.gz: 120dc4807061db90872cae78086dc39e71ad1102d317c7f5a7cf1e24ff18e4a2
4
- data.tar.gz: 8ef80f5cebf4007f49c9e57f4a2429ac41afc4307cb1c20e85ab5c9f1ae89c27
3
+ metadata.gz: af051eead00739e08c4b2aa7b4dcd418eee3c8dacbe4ba14f03d59eb0b0c5c9c
4
+ data.tar.gz: d5d6bac0ca3655ac9a121c9f259ea550015d4395ca39c7a403ea6937ba469809
5
5
  SHA512:
6
- metadata.gz: 5ff86e09420783826158a9808500f3c02c45426e22203324d9a5b4a62326a045aedf0425417ef0d9f59a173e3d01bff195de2fa524e2add51a40db2bf5e8ec05
7
- data.tar.gz: 29db60c84cf5c0e75ca992c5eb34d301b20a36c08c31883e829d2290bc100caf9a7ab05fd24ce073cea1314eb01959d9e15fc94af89ee45c1440f2d764dff098
6
+ metadata.gz: 49e6fd074fc50782e9227aac3ccd45997eb1760ca3e85acc3c14ac4f1660e8d77df877df1981993320ed432b5e9222fca02482813d25ec8e8464c6f6e0c93016
7
+ data.tar.gz: b26d34e7bbbb3903ab99d6f1b731854602e92a942aee598d2590fa44b9df292212eaa2242e6c8370f75f9d3fdd6d71310ed3a39684366aa29b7033d9bd5c36dd
data/epuber.gemspec CHANGED
@@ -27,15 +27,15 @@ Gem::Specification.new do |spec|
27
27
  spec.add_runtime_dependency 'listen', '~> 3.0'
28
28
  spec.add_runtime_dependency 'os', '~> 1.0'
29
29
 
30
- spec.add_runtime_dependency 'sinatra', '~> 2.0'
30
+ spec.add_runtime_dependency 'sinatra', '>= 2.0', '< 4.0'
31
31
  spec.add_runtime_dependency 'sinatra-websocket', '~> 0.3'
32
- spec.add_runtime_dependency 'sinatra-contrib', '~> 2.0'
32
+ spec.add_runtime_dependency 'sinatra-contrib', '>= 2.0', '< 4.0'
33
33
  spec.add_runtime_dependency 'thin', '~> 1.6'
34
34
 
35
- spec.add_runtime_dependency 'rmagick', '~> 4.2'
35
+ spec.add_runtime_dependency 'rmagick', '>= 4.2', '< 6.0'
36
36
  spec.add_runtime_dependency 'rubyzip', '~> 2.3'
37
37
 
38
- spec.add_runtime_dependency 'epubcheck-ruby', '~> 4.0'
38
+ spec.add_runtime_dependency 'epubcheck-ruby', '>= 4.0', '< 6.0'
39
39
 
40
40
  spec.add_runtime_dependency 'epuber-stylus', '~> 1.1', '>= 1.1.1'
41
41
  spec.add_runtime_dependency 'coffee-script', '~> 2.4'
@@ -44,5 +44,5 @@ Gem::Specification.new do |spec|
44
44
  spec.add_development_dependency 'rspec', '~> 3.2'
45
45
  spec.add_development_dependency 'rubocop', '~> 1.14'
46
46
  spec.add_development_dependency 'rake', '~> 13.0'
47
- spec.add_development_dependency 'fakefs', '~> 1.3'
47
+ spec.add_development_dependency 'fakefs', '>= 1.3', '< 3.0' # 2.0.0 is not compatible with Ruby 2.5
48
48
  end
@@ -72,7 +72,7 @@ module Epuber
72
72
 
73
73
  archive_name = compiler.epub_name
74
74
 
75
- if ::File.exists?(archive_name)
75
+ if ::File.exist?(archive_name)
76
76
  FileUtils.remove_file(archive_name)
77
77
  end
78
78
 
@@ -64,7 +64,7 @@ module Epuber
64
64
  # @return nil
65
65
  #
66
66
  def self.write_to_file?(content, to_path)
67
- return true unless File.exists?(to_path)
67
+ return true unless File.exist?(to_path)
68
68
 
69
69
  File.read(to_path) != content.to_s
70
70
  end
@@ -44,6 +44,7 @@ module Epuber
44
44
  xhtml_content = UI.print_step_processing_time('rendering precompiled Bade') do
45
45
  renderer = Bade::Renderer.from_precompiled(precompiled)
46
46
  .with_locals(variables)
47
+ renderer.file_path = source_path
47
48
 
48
49
  renderer.render(new_line: '', indent: '')
49
50
  end
@@ -113,7 +113,7 @@ module Epuber
113
113
  Dir.chdir(@file_resolver.destination_path) do
114
114
  new_paths = @file_resolver.package_files.map(&:pkg_destination_path)
115
115
 
116
- if ::File.exists?(epub_path)
116
+ if ::File.exist?(epub_path)
117
117
  Zip::File.open(epub_path, true) do |zip_file|
118
118
  old_paths = zip_file.instance_eval { @entry_set.entries.map(&:name) }
119
119
  diff = old_paths - new_paths
@@ -3,6 +3,7 @@
3
3
  require_relative 'attribute'
4
4
  require_relative 'attribute_support'
5
5
 
6
+ require 'active_support'
6
7
  require 'active_support/core_ext/string/inflections'
7
8
 
8
9
 
@@ -18,7 +18,7 @@ module Epuber
18
18
  # @return [self]
19
19
  #
20
20
  def self.from_file(file_path)
21
- if File.exists?(file_path)
21
+ if File.exist?(file_path)
22
22
  hash = YAML.safe_load(File.read(file_path))
23
23
  else
24
24
  hash = {}
data/lib/epuber/server.rb CHANGED
@@ -485,7 +485,7 @@ module Epuber
485
485
  # @param [String] file_path
486
486
  #
487
487
  def handle_file(file_path)
488
- return not_found unless File.exists?(file_path)
488
+ return not_found unless File.exist?(file_path)
489
489
 
490
490
  mtime = File.mtime(file_path)
491
491
  last_modified(mtime)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Epuber
4
- VERSION = '0.7.2'
4
+ VERSION = '0.7.4'
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.2
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kříž
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-14 00:00:00.000000000 Z
11
+ date: 2023-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -124,16 +124,22 @@ dependencies:
124
124
  name: sinatra
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - "~>"
127
+ - - ">="
128
128
  - !ruby/object:Gem::Version
129
129
  version: '2.0'
130
+ - - "<"
131
+ - !ruby/object:Gem::Version
132
+ version: '4.0'
130
133
  type: :runtime
131
134
  prerelease: false
132
135
  version_requirements: !ruby/object:Gem::Requirement
133
136
  requirements:
134
- - - "~>"
137
+ - - ">="
135
138
  - !ruby/object:Gem::Version
136
139
  version: '2.0'
140
+ - - "<"
141
+ - !ruby/object:Gem::Version
142
+ version: '4.0'
137
143
  - !ruby/object:Gem::Dependency
138
144
  name: sinatra-websocket
139
145
  requirement: !ruby/object:Gem::Requirement
@@ -152,16 +158,22 @@ dependencies:
152
158
  name: sinatra-contrib
153
159
  requirement: !ruby/object:Gem::Requirement
154
160
  requirements:
155
- - - "~>"
161
+ - - ">="
156
162
  - !ruby/object:Gem::Version
157
163
  version: '2.0'
164
+ - - "<"
165
+ - !ruby/object:Gem::Version
166
+ version: '4.0'
158
167
  type: :runtime
159
168
  prerelease: false
160
169
  version_requirements: !ruby/object:Gem::Requirement
161
170
  requirements:
162
- - - "~>"
171
+ - - ">="
163
172
  - !ruby/object:Gem::Version
164
173
  version: '2.0'
174
+ - - "<"
175
+ - !ruby/object:Gem::Version
176
+ version: '4.0'
165
177
  - !ruby/object:Gem::Dependency
166
178
  name: thin
167
179
  requirement: !ruby/object:Gem::Requirement
@@ -180,16 +192,22 @@ dependencies:
180
192
  name: rmagick
181
193
  requirement: !ruby/object:Gem::Requirement
182
194
  requirements:
183
- - - "~>"
195
+ - - ">="
184
196
  - !ruby/object:Gem::Version
185
197
  version: '4.2'
198
+ - - "<"
199
+ - !ruby/object:Gem::Version
200
+ version: '6.0'
186
201
  type: :runtime
187
202
  prerelease: false
188
203
  version_requirements: !ruby/object:Gem::Requirement
189
204
  requirements:
190
- - - "~>"
205
+ - - ">="
191
206
  - !ruby/object:Gem::Version
192
207
  version: '4.2'
208
+ - - "<"
209
+ - !ruby/object:Gem::Version
210
+ version: '6.0'
193
211
  - !ruby/object:Gem::Dependency
194
212
  name: rubyzip
195
213
  requirement: !ruby/object:Gem::Requirement
@@ -208,16 +226,22 @@ dependencies:
208
226
  name: epubcheck-ruby
209
227
  requirement: !ruby/object:Gem::Requirement
210
228
  requirements:
211
- - - "~>"
229
+ - - ">="
212
230
  - !ruby/object:Gem::Version
213
231
  version: '4.0'
232
+ - - "<"
233
+ - !ruby/object:Gem::Version
234
+ version: '6.0'
214
235
  type: :runtime
215
236
  prerelease: false
216
237
  version_requirements: !ruby/object:Gem::Requirement
217
238
  requirements:
218
- - - "~>"
239
+ - - ">="
219
240
  - !ruby/object:Gem::Version
220
241
  version: '4.0'
242
+ - - "<"
243
+ - !ruby/object:Gem::Version
244
+ version: '6.0'
221
245
  - !ruby/object:Gem::Dependency
222
246
  name: epuber-stylus
223
247
  requirement: !ruby/object:Gem::Requirement
@@ -318,16 +342,22 @@ dependencies:
318
342
  name: fakefs
319
343
  requirement: !ruby/object:Gem::Requirement
320
344
  requirements:
321
- - - "~>"
345
+ - - ">="
322
346
  - !ruby/object:Gem::Version
323
347
  version: '1.3'
348
+ - - "<"
349
+ - !ruby/object:Gem::Version
350
+ version: '3.0'
324
351
  type: :development
325
352
  prerelease: false
326
353
  version_requirements: !ruby/object:Gem::Requirement
327
354
  requirements:
328
- - - "~>"
355
+ - - ">="
329
356
  - !ruby/object:Gem::Version
330
357
  version: '1.3'
358
+ - - "<"
359
+ - !ruby/object:Gem::Version
360
+ version: '3.0'
331
361
  description:
332
362
  email:
333
363
  - samnung@gmail.com
@@ -585,7 +615,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
585
615
  - !ruby/object:Gem::Version
586
616
  version: '0'
587
617
  requirements: []
588
- rubygems_version: 3.3.21
618
+ rubygems_version: 3.4.21
589
619
  signing_key:
590
620
  specification_version: 4
591
621
  summary: Epuber is simple tool to compile and pack source files into EPUB format.