narou 3.1.4 → 3.1.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of narou might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f3968784d197a6d45098c0c6d60709d4d83dc27
4
- data.tar.gz: 596ed06a2ae6c65c376186ddda343b77db83e7b1
3
+ metadata.gz: 5c64825f0e9ba719bdba129092a9490baa21b2e9
4
+ data.tar.gz: cd27b5ff3a870649f44cc24d8453631b3fee3a95
5
5
  SHA512:
6
- metadata.gz: 9a6738055f7081d514f7749b1a063dcbbccefefa1d47fba40f3111426a915b54eeae0fac73006043c9eb5c782464935f94f54125c35e02ec3bcbd5acbd1f68e4
7
- data.tar.gz: 478960b800e328a3330b066d383205fdc80da162f08587fe855f509ac83a45bde835d1876dcdedb457e6e03e3800fc4582a88c478a483baa743cac263bad9f4b
6
+ metadata.gz: f87b45303c55d9f5e1370bb5752aa78f95aeffddcffb4dcd706f96eda67a7a230a352f5d00ecca8e0baac9e8efcc3053313b08032d43f8f53a71ad2225e863d4
7
+ data.tar.gz: 18d3a9e31c572d46cf804163db49937aec9068f978f00c5652b680ade13f913d59d74c2bfae20b81c35047232632a5eb2ad870462bb6007a0a7d231156b14282
data/ChangeLog.md CHANGED
@@ -2,6 +2,12 @@
2
2
  更新履歴 - ChangeLog
3
3
  ====================
4
4
 
5
+ 3.1.5: 2017/08/27
6
+ ------------------
7
+ #### 修正内容
8
+ - 変換時にエラーになる小説に対応
9
+
10
+
5
11
  3.1.4 : 2017/08/22
6
12
  ------------------
7
13
  #### 追加機能
data/README.md CHANGED
@@ -33,6 +33,12 @@ Narou.rb ― 「小説家になろう」「小説を読もう!」ダウンロ
33
33
  更新履歴 - ChangeLog
34
34
  --------------------
35
35
 
36
+ 3.1.5: 2017/08/27
37
+ ------------------
38
+ #### 修正内容
39
+ - 変換時にエラーになる小説に対応
40
+
41
+
36
42
  3.1.4 : 2017/08/22
37
43
  ------------------
38
44
  #### 追加機能
data/lib/converterbase.rb CHANGED
@@ -1307,6 +1307,7 @@ class ConverterBase
1307
1307
  return "" if text == ""
1308
1308
  output_text_dir = @output_text_dir || @setting.archive_path
1309
1309
  @text_type = text_type
1310
+ text.force_encoding(Encoding::UTF_8)
1310
1311
  io = StringIO.new(rstrip_all_lines(text))
1311
1312
  (io = before_convert(io)).rewind
1312
1313
  (io = convert_main(io)).rewind
@@ -352,9 +352,9 @@ class NovelConverter
352
352
  def initialize(setting, output_filename = nil, display_inspector = false, output_text_dir = nil)
353
353
  @setting = setting
354
354
  @novel_id = setting.id
355
- @novel_author = setting.author
356
- @novel_title = setting.title
357
- @output_filename = output_filename
355
+ @novel_author = setting.include?("novel_author") ? setting["novel_author"] : setting.author
356
+ @novel_title = setting.include?("novel_title") ? setting["novel_title"] : setting.title
357
+ @output_filename = (output_filename || setting.output_filename)
358
358
  @inspector = Inspector.new(@setting)
359
359
  @illustration = Illustration.new(@setting, @inspector)
360
360
  @display_inspector = display_inspector
@@ -427,6 +427,8 @@ class NovelConverter
427
427
  cover_chuki = create_cover_chuki
428
428
  device = Narou.get_device
429
429
  setting = @setting
430
+ toc["title"] = setting["novel_title"] if setting.include?("novel_title")
431
+ toc["author"] = setting["novel_author"] if setting.include?("novel_author")
430
432
  processed_title = decorate_title(toc["title"])
431
433
  tempalte_name = (device && device.ibunko? ? NOVEL_TEXT_TEMPLATE_NAME_FOR_IBUNKO : NOVEL_TEXT_TEMPLATE_NAME)
432
434
  Template.get(tempalte_name, binding, 1.1)
data/lib/novelsetting.rb CHANGED
@@ -193,6 +193,14 @@ class NovelSetting
193
193
  @settings[name] = value
194
194
  end
195
195
 
196
+ def output_filename
197
+ @settings.fetch("output_filename", nil)
198
+ end
199
+
200
+ def include?(key)
201
+ @settings.include?(key)
202
+ end
203
+
196
204
  #
197
205
  # replace.txt による置換定義を読み込む
198
206
  #
data/lib/version.rb CHANGED
@@ -3,4 +3,4 @@
3
3
  # Copyright 2013 whiteleaf. All rights reserved.
4
4
  #
5
5
 
6
- Version = "3.1.4"
6
+ Version = "3.1.5"
data/narou.gemspec CHANGED
@@ -32,6 +32,12 @@ Gem::Specification.new do |gem|
32
32
  install_message = <<-EOS
33
33
  #{"*" * 60}
34
34
 
35
+ 3.1.5: 2017/08/27
36
+ ------------------
37
+ #### 修正内容
38
+ - 変換時にエラーになる小説に対応
39
+
40
+
35
41
  3.1.4 : 2017/08/22
36
42
  ------------------
37
43
  #### 追加機能
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: narou
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.4
4
+ version: 3.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - whiteleaf7
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-22 00:00:00.000000000 Z
11
+ date: 2017-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: termcolorlight
@@ -487,6 +487,12 @@ metadata: {}
487
487
  post_install_message: |
488
488
  ************************************************************
489
489
 
490
+ 3.1.5: 2017/08/27
491
+ ------------------
492
+ #### 修正内容
493
+ - 変換時にエラーになる小説に対応
494
+
495
+
490
496
  3.1.4 : 2017/08/22
491
497
  ------------------
492
498
  #### 追加機能