amakanize 0.1.10 → 0.1.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 535cb8685bfd10b15a67dcebfbc016d0d0a08294
4
- data.tar.gz: bc44af1e7521aa3d2bb08738fb957bf11be9b8c4
3
+ metadata.gz: 887fc56cde24ae116d73ae198ba4246a90937cba
4
+ data.tar.gz: ec9bf6ab0dfa007bbc24f46b8a16583d59df6c38
5
5
  SHA512:
6
- metadata.gz: 7118e6d90a507854dcf1cdf51cb8a3b8ca8b176c2a9a6a5d0850d315f005d0120badb68a078072ff9380ba68ea6889e3914ae30379ccc78af507bca9e7c15769
7
- data.tar.gz: ed33a9f685e3e3449eacfaef6461ce8b9f7cf465f61e2c86d336baddd055c5a9f440e14425e4fa812ba6d31b3ca4583b3a9f7973a5866837c44ba1fb90a12965
6
+ metadata.gz: 958909d0a39723c394c5944e9a5b3202895af943ee0d8f213f3c4c5ee2e930748be19cc500c48138df8f8390f6e026f04b87fddf8e153198a4d798b067858392
7
+ data.tar.gz: b461db6c5c76a59c580f55aedaa0bb7a8398bf1eea854e50984d71481107c90c379e6a2687843d54d6e63b14aa5a17d5a255687beecbc632cb816bcab05f0d1e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.11
2
+ - Improve volume detection for アニウッド大通り
3
+
1
4
  ## 0.1.10
2
5
  - Detect obvious volume number in product title
3
6
 
@@ -2,10 +2,11 @@ module Amakanize
2
2
  module Filters
3
3
  class ObviousVolumeNumberDeletionFilter < BaseFilter
4
4
  # @note Override
5
- # @param string [String] e.g. `"刀語 第十一話 毒刀・鍍"`
6
- # @return [String] e.g. `"刀語"`
5
+ # @param string [String] e.g. `"刀語 第十一話 毒刀・鍍"`, `"アニウッド大通り 1: アニメ監督一家物語"`
6
+ # @return [String] e.g. `"刀語"`, `"アニウッド大通り"`
7
7
  def call(string)
8
- string.gsub(/\s*第?[\diIvVxX1-9①②③④⑤⑥⑦⑧⑨⑩〇一二三四五六七八九十百千万零壱弍参肆伍陸漆捌玖壹貳參拾佰仟萬]+(?:話|巻).*/, "")
8
+ string.gsub(/\s*第?#{Amakanize::PATTERN_OF_NUMERIC_CHARACTER}+(?:話|巻).*/, "")
9
+ .gsub(/\s+第?#{Amakanize::PATTERN_OF_NUMERIC_CHARACTER}+(?:話|巻)?:\s+.*/, "")
9
10
  end
10
11
  end
11
12
  end
@@ -5,7 +5,7 @@ module Amakanize
5
5
  # @param string [String] e.g. `"やはり俺の青春ラブコメはまちがっている。4"`
6
6
  # @return [String] e.g. `"やはり俺の青春ラブコメはまちがっている。"`
7
7
  def call(string)
8
- string.gsub(/\s*第?[\diIvVxX1-9①②③④⑤⑥⑦⑧⑨⑩〇一二三四五六七八九十百千万零壱弍参肆伍陸漆捌玖壹貳參拾佰仟萬]+(?:話|巻)?\z/, "")
8
+ string.gsub(/\s*第?#{Amakanize::PATTERN_OF_NUMERIC_CHARACTER}+(?:話|巻)?\z/, "")
9
9
  end
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Amakanize
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
data/lib/amakanize.rb CHANGED
@@ -19,3 +19,7 @@ require "amakanize/filters/trailing_surrounding_hyphens_deletion_filter"
19
19
  require "amakanize/filters/trailing_volume_number_deletion_filter"
20
20
  require "amakanize/series_name"
21
21
  require "amakanize/version"
22
+
23
+ module Amakanize
24
+ PATTERN_OF_NUMERIC_CHARACTER = /[\diIvVxX1-9①②③④⑤⑥⑦⑧⑨⑩〇一二三四五六七八九十百千万零壱弍参肆伍陸漆捌玖壹貳參拾佰仟萬]/
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amakanize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - r7kamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-07 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -126,9 +126,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.4.5
129
+ rubygems_version: 2.4.5.1
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Utilities to canonicalize series names and author names.
133
133
  test_files: []
134
- has_rdoc: